Skip to content

Commit 2bf83e9

Browse files
author
jokonig
committed
[PWGEM] Add Event Skimmer for Dalitz taking both V0 and Elec into account
- New skimmer needs tables from photon-conversion-builder and dalitz-electron-skimmer. Then, based no the contents of these tables, the final tables are written into the AO2D - Consequently, the photon-conversion-builder and the dalitz-skimmer need to be able to write temporary tables with the same content as the original tables - Added these temporary tables to the datamodel - Templated photon-conversion-builder and Dalitz-Skimmer to be able to write both types of tables - Added new Dalitz skimmer that reads these tables and then writes the non-temporary ones
1 parent e0461a8 commit 2bf83e9

11 files changed

Lines changed: 3140 additions & 2777 deletions

PWGEM/Dilepton/DataModel/dileptonTables.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,12 @@ using EMPrimaryElectronsDeDxMC = EMPrimaryElectronsDeDxMC_000;
962962
// iterators
963963
using EMPrimaryElectronDeDxMC = EMPrimaryElectronsDeDxMC::iterator;
964964

965+
// copy of EMPrimaryElectronDeDxMC to use as intermediate step for Dalitz analysis
966+
DECLARE_SOA_TABLE(EMPrimaryElectronsDeDxMCTmp, "AOD", "EMPRMELDEDXMCTMP", mcpidtpc::DeDxTunedMc, o2::soa::Marker<1>);
967+
using EMPrimaryElectronsDeDxMCTmp = EMPrimaryElectronsDeDxMCTmp;
968+
// iterators
969+
using EMPrimaryElectronDeDxMC = EMPrimaryElectronsDeDxMC::iterator;
970+
965971
DECLARE_SOA_TABLE(EMPrimaryElectronEMEventIds, "AOD", "PRMELMEVENTID", emprimaryelectron::EMEventId); // To be joined with EMPrimaryElectrons table at analysis level.
966972
// iterators
967973
using EMPrimaryElectronEMEventId = EMPrimaryElectronEMEventIds::iterator;

PWGEM/Dilepton/TableProducer/filterEoI.cxx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ struct filterEoI {
135135
fRegistry.fill(HIST("hEventCounter"), 8);
136136
}
137137

138-
emeoi(does_electron_exist || does_fwdmuon_exist || does_pcm_exist || does_electronda_exist);
138+
if constexpr (static_cast<bool>(system & kPCM) && static_cast<bool>(system & kElectronFromDalitz)) {
139+
emeoi(does_pcm_exist && does_electronda_exist);
140+
} else {
141+
emeoi(does_electron_exist || does_fwdmuon_exist || does_pcm_exist || does_electronda_exist);
142+
}
139143

140144
} // end of collision loop
141145

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

178+
void process_ElectronFromDalitz(aod::Collisions const& collisions, aod::EMPrimaryElectronsFromDalitz const& electronsda)
179+
{
180+
const uint8_t sysflag = kElectronFromDalitz;
181+
selectEoI<sysflag>(collisions, nullptr, nullptr, nullptr, electronsda);
182+
}
183+
174184
void process_PCM_ElectronFromDalitz(aod::Collisions const& collisions, aod::V0PhotonsKF const& v0s, aod::EMPrimaryElectronsFromDalitz const& electronsda)
175185
{
176186
const uint8_t sysflag = kPCM | kElectronFromDalitz;
@@ -189,6 +199,7 @@ struct filterEoI {
189199
PROCESS_SWITCH(filterEoI, process_PCM, "create filter bit for PCM", false);
190200
PROCESS_SWITCH(filterEoI, process_Electron_FwdMuon, "create filter bit for Electron, FwdMuon", false);
191201
PROCESS_SWITCH(filterEoI, process_Electron_FwdMuon_PCM, "create filter bit for Electron, FwdMuon, PCM", false);
202+
PROCESS_SWITCH(filterEoI, process_ElectronFromDalitz, "create filter bit for ElectronFromDalitz", false);
192203
PROCESS_SWITCH(filterEoI, process_PCM_ElectronFromDalitz, "create filter bit for PCM, ElectronFromDalitz", false);
193204
PROCESS_SWITCH(filterEoI, processDummy, "processDummy", true);
194205
};

PWGEM/PhotonMeson/DataModel/gammaTables.h

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,56 @@ using V0Legs = V0Legs_001;
242242
// iterators
243243
using V0Leg = V0Legs::iterator;
244244

245+
// copy of V0Legs table
246+
DECLARE_SOA_TABLE(V0LegsTmp, "AOD", "V0LEGTMP", //!
247+
o2::soa::Index<>, v0leg::CollisionId, v0leg::TrackId, v0leg::Sign,
248+
v0leg::Px, v0leg::Py, v0leg::Pz,
249+
track::DcaXY, track::DcaZ,
250+
track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusCrossedRows, track::TPCNClsShared,
251+
track::TPCChi2NCl, track::TPCInnerParam,
252+
track::TPCSignal, pidtpc::TPCNSigmaEl, pidtpc::TPCNSigmaPi,
253+
track::ITSClusterSizes, track::ITSChi2NCl, track::DetectorMap,
254+
255+
// dynamic column
256+
v0leg::P<v0leg::Px, v0leg::Py, v0leg::Pz>,
257+
v0leg::Pt<v0leg::Px, v0leg::Py>,
258+
v0leg::Eta<v0leg::Px, v0leg::Py, v0leg::Pz>,
259+
v0leg::Phi<v0leg::Px, v0leg::Py>,
260+
v0leg::Tgl<v0leg::Px, v0leg::Py, v0leg::Pz>,
261+
262+
track::TPCNClsFound<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
263+
track::TPCNClsCrossedRows<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
264+
track::TPCCrossedRowsOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
265+
track::TPCFoundOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
266+
track::TPCFractionSharedCls<track::TPCNClsShared, track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
267+
track::v001::ITSClusterMap<track::ITSClusterSizes>, track::v001::ITSNCls<track::ITSClusterSizes>, track::v001::ITSNClsInnerBarrel<track::ITSClusterSizes>,
268+
track::HasITS<track::DetectorMap>, track::HasTPC<track::DetectorMap>, track::HasTRD<track::DetectorMap>, track::HasTOF<track::DetectorMap>,
269+
v0leg::MeanClusterSizeITS<track::ITSClusterSizes>,
270+
v0leg::MeanClusterSizeITSib<track::ITSClusterSizes>,
271+
v0leg::MeanClusterSizeITSob<track::ITSClusterSizes>);
272+
// iterators
273+
using V0LegTmp = V0LegsTmp::iterator;
274+
245275
DECLARE_SOA_TABLE_VERSIONED(V0LegsXYZ_000, "AOD", "V0LEGXYZ", 0, track::X, track::Y, track::Z);
246276
using V0LegsXYZ = V0LegsXYZ_000;
247277
// iterators
248278
using V0LegXYZ = V0LegsXYZ::iterator;
249279

280+
// copy of V0Legs table
281+
DECLARE_SOA_TABLE(V0LegsXYZTmp, "AOD", "V0LEGXYZTMP", track::X, track::Y, track::Z);
282+
// iterators
283+
using V0LegXYZTmp = V0LegsXYZTmp::iterator;
284+
250285
DECLARE_SOA_TABLE_VERSIONED(V0LegsDeDxMC_000, "AOD", "V0LEGDEDXMC", 0, mcpidtpc::DeDxTunedMc, o2::soa::Marker<2>);
251286
using V0LegsDeDxMC = V0LegsDeDxMC_000;
252287
// iterators
253288
using V0LegDeDxMC = V0LegsDeDxMC::iterator;
254289

290+
// copy of V0Legs table
291+
DECLARE_SOA_TABLE_VERSIONED(V0LegsDeDxMCTmp, "AOD", "V0LEGDEDXMCTMP", 0, mcpidtpc::DeDxTunedMc, o2::soa::Marker<2>);
292+
// iterators
293+
using V0LegDeDxMCTmp = V0LegsDeDxMCTmp::iterator;
294+
255295
namespace emevent
256296
{
257297
DECLARE_SOA_COLUMN(NgPCM, ngpcm, int);
@@ -347,6 +387,27 @@ using V0PhotonsKF = V0PhotonsKF_001;
347387
// iterators
348388
using V0PhotonKF = V0PhotonsKF::iterator;
349389

390+
// Clone of V0PhotonKF table for intermediate processing needed for dalitz
391+
DECLARE_SOA_TABLE(V0PhotonsKFTmp, "AOD", "V0PHOTONKFTMP", //!
392+
o2::soa::Index<>, v0photonkf::CollisionId, v0photonkf::V0Id, v0photonkf::PosTrackId, v0photonkf::NegTrackId,
393+
v0photonkf::Vx, v0photonkf::Vy, v0photonkf::Vz,
394+
v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz,
395+
v0photonkf::MGamma,
396+
v0photonkf::DCAxyToPV, v0photonkf::DCAzToPV,
397+
v0photonkf::CosPA, v0photonkf::CosPAXY, v0photonkf::CosPARZ, v0photonkf::PCA,
398+
v0photonkf::Alpha, v0photonkf::QtArm,
399+
v0photonkf::ChiSquareNDF,
400+
401+
// dynamic column
402+
v0photonkf::E<v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz>,
403+
v0photonkf::Pt<v0photonkf::Px, v0photonkf::Py>,
404+
v0photonkf::Eta<v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz>,
405+
v0photonkf::Phi<v0photonkf::Px, v0photonkf::Py>,
406+
v0photonkf::P<v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz>,
407+
v0photonkf::V0Radius<v0photonkf::Vx, v0photonkf::Vy>);
408+
// iterators
409+
using V0PhotonKFTmp = V0PhotonsKFTmp::iterator;
410+
350411
DECLARE_SOA_TABLE(V0KFEMEventIds_000, "AOD", "V0KFEMEVENTID", v0photonkf::EMEventId); // To be joined with V0PhotonsKF table at analysis level.
351412
DECLARE_SOA_TABLE_VERSIONED(V0KFEMEventIds_001, "AOD", "V0KFEMEVENTID", 1, v0photonkf::PMEventId); // To be joined with V0PhotonsKF table at analysis level.
352413
using V0KFEMEventIds = V0KFEMEventIds_001;
@@ -423,6 +484,39 @@ using EMPrimaryElectronsFromDalitz = EMPrimaryElectronsFromDalitz_001;
423484
// iterators
424485
using EMPrimaryElectronFromDalitz = EMPrimaryElectronsFromDalitz::iterator;
425486

487+
// Table that is a clone of EMPrimaryELectronsFromDalitz but needed for event selection purposes
488+
DECLARE_SOA_TABLE(EMPrimaryElectronsFromDalitzTmp, "AOD", "EMPRIMARYELDATMP", //!
489+
o2::soa::Index<>, emprimaryelectron::CollisionId,
490+
emprimaryelectron::TrackId, emprimaryelectron::Sign,
491+
track::Pt, track::Eta, track::Phi, track::DcaXY, track::DcaZ, track::CYY, track::CZY, track::CZZ,
492+
track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusCrossedRows, track::TPCNClsShared,
493+
track::TPCChi2NCl, track::TPCInnerParam,
494+
track::TPCSignal, pidtpc::TPCNSigmaEl, pidtpc::TPCNSigmaPi,
495+
pidtofbeta::Beta, pidtof::TOFNSigmaEl,
496+
track::ITSClusterSizes, track::ITSChi2NCl, track::TOFChi2, track::DetectorMap,
497+
498+
// dynamic column
499+
track::TPCNClsFound<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
500+
track::TPCNClsCrossedRows<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
501+
track::TPCCrossedRowsOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
502+
track::TPCFoundOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
503+
track::v001::ITSClusterMap<track::ITSClusterSizes>, track::v001::ITSNCls<track::ITSClusterSizes>, track::v001::ITSNClsInnerBarrel<track::ITSClusterSizes>,
504+
track::TPCFractionSharedCls<track::TPCNClsShared, track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
505+
track::HasITS<track::DetectorMap>, track::HasTPC<track::DetectorMap>, track::HasTRD<track::DetectorMap>, track::HasTOF<track::DetectorMap>,
506+
507+
emprimaryelectron::Signed1Pt<track::Pt, emprimaryelectron::Sign>,
508+
emprimaryelectron::P<track::Pt, track::Eta>,
509+
emprimaryelectron::Px<track::Pt, track::Phi>,
510+
emprimaryelectron::Py<track::Pt, track::Phi>,
511+
emprimaryelectron::Pz<track::Pt, track::Eta>,
512+
emprimaryelectron::Tgl<track::Eta>,
513+
emprimaryelectron::MeanClusterSizeITS<track::ITSClusterSizes>,
514+
emprimaryelectron::MeanClusterSizeITSib<track::ITSClusterSizes>,
515+
emprimaryelectron::MeanClusterSizeITSob<track::ITSClusterSizes>);
516+
517+
// iterators
518+
using EMPrimaryElectronFromDalitzTmp = EMPrimaryElectronsFromDalitzTmp::iterator;
519+
426520
namespace emprimaryelectronda
427521
{
428522
DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //!
@@ -445,6 +539,12 @@ DECLARE_SOA_TABLE(V0PhotonsPhiVPsi, "AOD", "V0PHOTONPHIVPSI", //!
445539
// iterators
446540
using V0PhotonsPhiVPsi = V0PhotonsPhiVPsi;
447541

542+
// clone for temporary table
543+
DECLARE_SOA_TABLE(V0PhotonsPhiVPsiTmp, "AOD", "V0PHOTONPHIVTMP", //!
544+
o2::soa::Index<>, v0photonsphivpsi::PhiV, v0photonsphivpsi::PsiPair);
545+
// iterators
546+
using V0PhotonsPhiVPsiTmp = V0PhotonsPhiVPsiTmp;
547+
448548
namespace dalitzee
449549
{
450550
DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //!

PWGEM/PhotonMeson/TableProducer/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ o2physics_add_dpl_workflow(photon-conversion-builder
1616
PUBLIC_LINK_LIBRARIES O2::Framework O2::DCAFitter O2Physics::AnalysisCore O2Physics::MLCore KFParticle::KFParticle O2Physics::TPCDriftManager
1717
COMPONENT_NAME Analysis)
1818

19+
o2physics_add_dpl_workflow(photon-conversion-builder-tmptable
20+
SOURCES photonconversionbuilderTmpTable.cxx
21+
PUBLIC_LINK_LIBRARIES O2::Framework O2::DCAFitter O2Physics::AnalysisCore O2Physics::MLCore KFParticle::KFParticle O2Physics::TPCDriftManager
22+
COMPONENT_NAME Analysis)
23+
1924
o2physics_add_dpl_workflow(create-emevent-photon
2025
SOURCES createEMEventPhoton.cxx
2126
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGJECore
@@ -46,6 +51,16 @@ o2physics_add_dpl_workflow(skimmer-primary-electron-from-dalitzee
4651
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
4752
COMPONENT_NAME Analysis)
4853

54+
o2physics_add_dpl_workflow(skimmer-primary-electron-from-dalitzee-tmptable
55+
SOURCES skimmerPrimaryElectronFromDalitzEETmpTable.cxx
56+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
57+
COMPONENT_NAME Analysis)
58+
59+
o2physics_add_dpl_workflow(skimmer-dalitz-events
60+
SOURCES skimmerDalitzEvents.cxx
61+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
62+
COMPONENT_NAME Analysis)
63+
4964
o2physics_add_dpl_workflow(non-lin-producer
5065
SOURCES nonLinProducer.cxx
5166
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore

0 commit comments

Comments
 (0)