Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions PWGEM/Dilepton/DataModel/dileptonTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@
namespace emeventnorm
{
DECLARE_SOA_DYNAMIC_COLUMN(PosZ, posZ, [](int8_t posZint8) -> float { return (posZint8 < 0 ? std::nextafter(posZint8 * 0.5f, -std::numeric_limits<float>::infinity()) : std::nextafter(posZint8 * 0.5f, std::numeric_limits<float>::infinity())); }); //! posZ is multiplied by 2 in createEMEventDileton.cxx
DECLARE_SOA_DYNAMIC_COLUMN(CentFT0M, centFT0M, [](uint8_t centuint8) -> float { return centuint8 < 100 ? std::nextafter(centuint8 * 0.01f, std::numeric_limits<float>::infinity()) : std::nextafter(centuint8 - 110.f, std::numeric_limits<float>::infinity()); }); //! centrality is multiplied by 100 in createEMEventDilepton.cxx

Check failure on line 241 in PWGEM/Dilepton/DataModel/dileptonTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
DECLARE_SOA_DYNAMIC_COLUMN(CentFT0A, centFT0A, [](uint8_t centuint8) -> float { return centuint8 < 100 ? std::nextafter(centuint8 * 0.01f, std::numeric_limits<float>::infinity()) : std::nextafter(centuint8 - 110.f, std::numeric_limits<float>::infinity()); }); //! centrality is multiplied by 100 in createEMEventDilepton.cxx

Check failure on line 242 in PWGEM/Dilepton/DataModel/dileptonTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
DECLARE_SOA_DYNAMIC_COLUMN(CentFT0C, centFT0C, [](uint8_t centuint8) -> float { return centuint8 < 100 ? std::nextafter(centuint8 * 0.01f, std::numeric_limits<float>::infinity()) : std::nextafter(centuint8 - 110.f, std::numeric_limits<float>::infinity()); }); //! centrality is multiplied by 100 in createEMEventDilepton.cxx

Check failure on line 243 in PWGEM/Dilepton/DataModel/dileptonTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
DECLARE_SOA_DYNAMIC_COLUMN(CentNTPV, centNTPV, [](uint8_t centuint8) -> float { return centuint8 < 100 ? std::nextafter(centuint8 * 0.01f, std::numeric_limits<float>::infinity()) : std::nextafter(centuint8 - 110.f, std::numeric_limits<float>::infinity()); }); //! centrality is multiplied by 100 in createEMEventDilepton.cxx

Check failure on line 244 in PWGEM/Dilepton/DataModel/dileptonTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
DECLARE_SOA_DYNAMIC_COLUMN(CentNGlobal, centNGlobal, [](uint8_t centuint8) -> float { return centuint8 < 100 ? std::nextafter(centuint8 * 0.01f, std::numeric_limits<float>::infinity()) : std::nextafter(centuint8 - 110.f, std::numeric_limits<float>::infinity()); }); //! centrality is multiplied by 100 in createEMEventDilepton.cxx

Check failure on line 245 in PWGEM/Dilepton/DataModel/dileptonTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
} // namespace emeventnorm

DECLARE_SOA_TABLE(EMBCs_000, "AOD", "EMBC", //! bc information for normalization
Expand Down Expand Up @@ -677,7 +677,7 @@
DECLARE_SOA_DYNAMIC_COLUMN(Tgl, tgl, [](float eta) -> float { return std::tan(o2::constants::math::PIHalf - 2 * std::atan(std::exp(-eta))); });
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITS, meanClusterSizeITS, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 680 in PWGEM/Dilepton/DataModel/dileptonTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
if (cluster_size_per_layer > 0) {
nl++;
Expand All @@ -692,7 +692,7 @@
});
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITSib, meanClusterSizeITSib, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 3; layer++) {

Check failure on line 695 in PWGEM/Dilepton/DataModel/dileptonTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
if (cluster_size_per_layer > 0) {
nl++;
Expand All @@ -707,7 +707,7 @@
});
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITSob, meanClusterSizeITSob, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 3; layer < 7; layer++) {

Check failure on line 710 in PWGEM/Dilepton/DataModel/dileptonTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
if (cluster_size_per_layer > 0) {
nl++;
Expand Down Expand Up @@ -962,6 +962,12 @@
// iterators
using EMPrimaryElectronDeDxMC = EMPrimaryElectronsDeDxMC::iterator;

// copy of EMPrimaryElectronDeDxMC to use as intermediate step for Dalitz analysis
DECLARE_SOA_TABLE(EMPrimaryElectronsDeDxMCTmp, "AOD", "EMELDEDXMCTMP", mcpidtpc::DeDxTunedMc, o2::soa::Marker<1>);
using EMPrimaryElectronsDeDxMCTmp = EMPrimaryElectronsDeDxMCTmp;
// iterators
using EMPrimaryElectronDeDxMC = EMPrimaryElectronsDeDxMC::iterator;

DECLARE_SOA_TABLE(EMPrimaryElectronEMEventIds, "AOD", "PRMELMEVENTID", emprimaryelectron::EMEventId); // To be joined with EMPrimaryElectrons table at analysis level.
// iterators
using EMPrimaryElectronEMEventId = EMPrimaryElectronEMEventIds::iterator;
Expand Down Expand Up @@ -1026,7 +1032,7 @@
DECLARE_SOA_DYNAMIC_COLUMN(NClustersMFT, nClustersMFT, //! Number of MFT clusters
[](uint64_t mftClusterSizesAndTrackFlags) -> uint8_t {
uint8_t nClusters = 0;
for (int layer = 0; layer < 10; layer++) {

Check failure on line 1035 in PWGEM/Dilepton/DataModel/dileptonTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if ((mftClusterSizesAndTrackFlags >> (layer * 6)) & 0x3F) {
nClusters++;
}
Expand All @@ -1036,7 +1042,7 @@
DECLARE_SOA_DYNAMIC_COLUMN(MFTClusterMap, mftClusterMap, //! MFT cluster map, one bit per a layer, starting from the innermost
[](uint64_t mftClusterSizesAndTrackFlags) -> uint16_t {
uint16_t clmap = 0;
for (unsigned int layer = 0; layer < 10; layer++) {

Check failure on line 1045 in PWGEM/Dilepton/DataModel/dileptonTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if ((mftClusterSizesAndTrackFlags >> (layer * 6)) & 0x3f) {
clmap |= (1 << layer);
}
Expand Down
13 changes: 12 additions & 1 deletion PWGEM/Dilepton/TableProducer/filterEoI.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ struct filterEoI {
fRegistry.fill(HIST("hEventCounter"), 8);
}

emeoi(does_electron_exist || does_fwdmuon_exist || does_pcm_exist || does_electronda_exist);
if constexpr (static_cast<bool>(system & kPCM) && static_cast<bool>(system & kElectronFromDalitz)) {
emeoi(does_pcm_exist && does_electronda_exist);
} else {
emeoi(does_electron_exist || does_fwdmuon_exist || does_pcm_exist || does_electronda_exist);
}

} // end of collision loop

Expand Down Expand Up @@ -171,6 +175,12 @@ struct filterEoI {
selectEoI<sysflag>(collisions, electrons, muons, v0s, nullptr);
}

void process_ElectronFromDalitz(aod::Collisions const& collisions, aod::EMPrimaryElectronsFromDalitz const& electronsda)
{
const uint8_t sysflag = kElectronFromDalitz;
selectEoI<sysflag>(collisions, nullptr, nullptr, nullptr, electronsda);
}

void process_PCM_ElectronFromDalitz(aod::Collisions const& collisions, aod::V0PhotonsKF const& v0s, aod::EMPrimaryElectronsFromDalitz const& electronsda)
{
const uint8_t sysflag = kPCM | kElectronFromDalitz;
Expand All @@ -189,6 +199,7 @@ struct filterEoI {
PROCESS_SWITCH(filterEoI, process_PCM, "create filter bit for PCM", false);
PROCESS_SWITCH(filterEoI, process_Electron_FwdMuon, "create filter bit for Electron, FwdMuon", false);
PROCESS_SWITCH(filterEoI, process_Electron_FwdMuon_PCM, "create filter bit for Electron, FwdMuon, PCM", false);
PROCESS_SWITCH(filterEoI, process_ElectronFromDalitz, "create filter bit for ElectronFromDalitz", false);
PROCESS_SWITCH(filterEoI, process_PCM_ElectronFromDalitz, "create filter bit for PCM, ElectronFromDalitz", false);
PROCESS_SWITCH(filterEoI, processDummy, "processDummy", true);
};
Expand Down
100 changes: 100 additions & 0 deletions PWGEM/PhotonMeson/DataModel/gammaTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,56 @@ using V0Legs = V0Legs_001;
// iterators
using V0Leg = V0Legs::iterator;

// copy of V0Legs table
DECLARE_SOA_TABLE(V0LegsTmp, "AOD", "V0LEGTMP", //!
o2::soa::Index<>, v0leg::CollisionId, v0leg::TrackId, v0leg::Sign,
v0leg::Px, v0leg::Py, v0leg::Pz,
track::DcaXY, track::DcaZ,
track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusCrossedRows, track::TPCNClsShared,
track::TPCChi2NCl, track::TPCInnerParam,
track::TPCSignal, pidtpc::TPCNSigmaEl, pidtpc::TPCNSigmaPi,
track::ITSClusterSizes, track::ITSChi2NCl, track::DetectorMap,

// dynamic column
v0leg::P<v0leg::Px, v0leg::Py, v0leg::Pz>,
v0leg::Pt<v0leg::Px, v0leg::Py>,
v0leg::Eta<v0leg::Px, v0leg::Py, v0leg::Pz>,
v0leg::Phi<v0leg::Px, v0leg::Py>,
v0leg::Tgl<v0leg::Px, v0leg::Py, v0leg::Pz>,

track::TPCNClsFound<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::TPCNClsCrossedRows<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
track::TPCCrossedRowsOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
track::TPCFoundOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::TPCFractionSharedCls<track::TPCNClsShared, track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::v001::ITSClusterMap<track::ITSClusterSizes>, track::v001::ITSNCls<track::ITSClusterSizes>, track::v001::ITSNClsInnerBarrel<track::ITSClusterSizes>,
track::HasITS<track::DetectorMap>, track::HasTPC<track::DetectorMap>, track::HasTRD<track::DetectorMap>, track::HasTOF<track::DetectorMap>,
v0leg::MeanClusterSizeITS<track::ITSClusterSizes>,
v0leg::MeanClusterSizeITSib<track::ITSClusterSizes>,
v0leg::MeanClusterSizeITSob<track::ITSClusterSizes>);
// iterators
using V0LegTmp = V0LegsTmp::iterator;

DECLARE_SOA_TABLE_VERSIONED(V0LegsXYZ_000, "AOD", "V0LEGXYZ", 0, track::X, track::Y, track::Z);
using V0LegsXYZ = V0LegsXYZ_000;
// iterators
using V0LegXYZ = V0LegsXYZ::iterator;

// copy of V0Legs table
DECLARE_SOA_TABLE(V0LegsXYZTmp, "AOD", "V0LEGXYZTMP", track::X, track::Y, track::Z);
// iterators
using V0LegXYZTmp = V0LegsXYZTmp::iterator;

DECLARE_SOA_TABLE_VERSIONED(V0LegsDeDxMC_000, "AOD", "V0LEGDEDXMC", 0, mcpidtpc::DeDxTunedMc, o2::soa::Marker<2>);
using V0LegsDeDxMC = V0LegsDeDxMC_000;
// iterators
using V0LegDeDxMC = V0LegsDeDxMC::iterator;

// copy of V0Legs table
DECLARE_SOA_TABLE_VERSIONED(V0LegsDeDxMCTmp, "AOD", "V0LEGDEDXMCTMP", 0, mcpidtpc::DeDxTunedMc, o2::soa::Marker<2>);
// iterators
using V0LegDeDxMCTmp = V0LegsDeDxMCTmp::iterator;

namespace emevent
{
DECLARE_SOA_COLUMN(NgPCM, ngpcm, int);
Expand Down Expand Up @@ -347,6 +387,27 @@ using V0PhotonsKF = V0PhotonsKF_001;
// iterators
using V0PhotonKF = V0PhotonsKF::iterator;

// Clone of V0PhotonKF table for intermediate processing needed for dalitz
DECLARE_SOA_TABLE(V0PhotonsKFTmp, "AOD", "V0PHOTONKFTMP", //!
o2::soa::Index<>, v0photonkf::CollisionId, v0photonkf::V0Id, v0photonkf::PosTrackId, v0photonkf::NegTrackId,
v0photonkf::Vx, v0photonkf::Vy, v0photonkf::Vz,
v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz,
v0photonkf::MGamma,
v0photonkf::DCAxyToPV, v0photonkf::DCAzToPV,
v0photonkf::CosPA, v0photonkf::CosPAXY, v0photonkf::CosPARZ, v0photonkf::PCA,
v0photonkf::Alpha, v0photonkf::QtArm,
v0photonkf::ChiSquareNDF,

// dynamic column
v0photonkf::E<v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz>,
v0photonkf::Pt<v0photonkf::Px, v0photonkf::Py>,
v0photonkf::Eta<v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz>,
v0photonkf::Phi<v0photonkf::Px, v0photonkf::Py>,
v0photonkf::P<v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz>,
v0photonkf::V0Radius<v0photonkf::Vx, v0photonkf::Vy>);
// iterators
using V0PhotonKFTmp = V0PhotonsKFTmp::iterator;

DECLARE_SOA_TABLE(V0KFEMEventIds_000, "AOD", "V0KFEMEVENTID", v0photonkf::EMEventId); // To be joined with V0PhotonsKF table at analysis level.
DECLARE_SOA_TABLE_VERSIONED(V0KFEMEventIds_001, "AOD", "V0KFEMEVENTID", 1, v0photonkf::PMEventId); // To be joined with V0PhotonsKF table at analysis level.
using V0KFEMEventIds = V0KFEMEventIds_001;
Expand Down Expand Up @@ -423,6 +484,39 @@ using EMPrimaryElectronsFromDalitz = EMPrimaryElectronsFromDalitz_001;
// iterators
using EMPrimaryElectronFromDalitz = EMPrimaryElectronsFromDalitz::iterator;

// Table that is a clone of EMPrimaryELectronsFromDalitz but needed for event selection purposes
DECLARE_SOA_TABLE(EMPrimaryElectronsFromDalitzTmp, "AOD", "EMPRIMARYELDATMP", //!
o2::soa::Index<>, emprimaryelectron::CollisionId,
emprimaryelectron::TrackId, emprimaryelectron::Sign,
track::Pt, track::Eta, track::Phi, track::DcaXY, track::DcaZ, track::CYY, track::CZY, track::CZZ,
track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusCrossedRows, track::TPCNClsShared,
track::TPCChi2NCl, track::TPCInnerParam,
track::TPCSignal, pidtpc::TPCNSigmaEl, pidtpc::TPCNSigmaPi,
pidtofbeta::Beta, pidtof::TOFNSigmaEl,
track::ITSClusterSizes, track::ITSChi2NCl, track::TOFChi2, track::DetectorMap,

// dynamic column
track::TPCNClsFound<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::TPCNClsCrossedRows<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
track::TPCCrossedRowsOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
track::TPCFoundOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::v001::ITSClusterMap<track::ITSClusterSizes>, track::v001::ITSNCls<track::ITSClusterSizes>, track::v001::ITSNClsInnerBarrel<track::ITSClusterSizes>,
track::TPCFractionSharedCls<track::TPCNClsShared, track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::HasITS<track::DetectorMap>, track::HasTPC<track::DetectorMap>, track::HasTRD<track::DetectorMap>, track::HasTOF<track::DetectorMap>,

emprimaryelectron::Signed1Pt<track::Pt, emprimaryelectron::Sign>,
emprimaryelectron::P<track::Pt, track::Eta>,
emprimaryelectron::Px<track::Pt, track::Phi>,
emprimaryelectron::Py<track::Pt, track::Phi>,
emprimaryelectron::Pz<track::Pt, track::Eta>,
emprimaryelectron::Tgl<track::Eta>,
emprimaryelectron::MeanClusterSizeITS<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSib<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSob<track::ITSClusterSizes>);

// iterators
using EMPrimaryElectronFromDalitzTmp = EMPrimaryElectronsFromDalitzTmp::iterator;

namespace emprimaryelectronda
{
DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //!
Expand All @@ -445,6 +539,12 @@ DECLARE_SOA_TABLE(V0PhotonsPhiVPsi, "AOD", "V0PHOTONPHIVPSI", //!
// iterators
using V0PhotonsPhiVPsi = V0PhotonsPhiVPsi;

// clone for temporary table
DECLARE_SOA_TABLE(V0PhotonsPhiVPsiTmp, "AOD", "V0PHOTONPHIVTMP", //!
o2::soa::Index<>, v0photonsphivpsi::PhiV, v0photonsphivpsi::PsiPair);
// iterators
using V0PhotonsPhiVPsiTmp = V0PhotonsPhiVPsiTmp;

namespace dalitzee
{
DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //!
Expand Down
15 changes: 15 additions & 0 deletions PWGEM/PhotonMeson/TableProducer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ o2physics_add_dpl_workflow(photon-conversion-builder
PUBLIC_LINK_LIBRARIES O2::Framework O2::DCAFitter O2Physics::AnalysisCore O2Physics::MLCore KFParticle::KFParticle O2Physics::TPCDriftManager
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(photon-conversion-builder-tmptable
SOURCES photonconversionbuilderTmpTable.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2::DCAFitter O2Physics::AnalysisCore O2Physics::MLCore KFParticle::KFParticle O2Physics::TPCDriftManager
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(create-emevent-photon
SOURCES createEMEventPhoton.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGJECore
Expand Down Expand Up @@ -46,6 +51,16 @@ o2physics_add_dpl_workflow(skimmer-primary-electron-from-dalitzee
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(skimmer-primary-electron-from-dalitzee-tmptable
SOURCES skimmerPrimaryElectronFromDalitzEETmpTable.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(skimmer-dalitz-events
SOURCES skimmerDalitzEvents.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(non-lin-producer
SOURCES nonLinProducer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore
Expand Down
Loading
Loading