@@ -32,38 +32,43 @@ struct filterEoI {
3232 kElectron = 0x1 ,
3333 kFwdMuon = 0x2 ,
3434 kPCM = 0x4 ,
35+ kElectronFromDalitz = 0x8 ,
3536 };
3637 Produces<o2::aod::EMEoIs> emeoi;
3738 Configurable<int > minNElectrons{" minNElectrons" , 1 , " min number of e+ or e- at midrapidity" };
3839 Configurable<int > minNMuons{" minNMuons" , 1 , " min number of mu+ or mu- at forward rapidity" };
3940 Configurable<int > minNV0s{" minNV0s" , 1 , " min number of v0 photons at midrapidity" };
41+ Configurable<int > minNElectronsFromDalitz{" minNElectronsFromDalitz" , 1 , " min number of e+ or e- from dalitz decay at midrapidity" };
4042
4143 HistogramRegistry fRegistry {" output" };
4244 void init (o2::framework::InitContext&)
4345 {
44- auto hEventCounter = fRegistry .add <TH1>(" hEventCounter" , " hEventCounter" , kTH1D , {{8 , 0 .5f , 8 .5f }});
46+ auto hEventCounter = fRegistry .add <TH1>(" hEventCounter" , " hEventCounter" , kTH1D , {{9 , 0 .5f , 9 .5f }});
4547 hEventCounter->GetXaxis ()->SetBinLabel (1 , " all" );
4648 hEventCounter->GetXaxis ()->SetBinLabel (2 , " event with electron" );
4749 hEventCounter->GetXaxis ()->SetBinLabel (3 , " event with forward muon" );
4850 hEventCounter->GetXaxis ()->SetBinLabel (4 , " event with v0" );
49- hEventCounter->GetXaxis ()->SetBinLabel (5 , " event with electron or forward muon" );
50- hEventCounter->GetXaxis ()->SetBinLabel (6 , " event with electron and forward muon" );
51- hEventCounter->GetXaxis ()->SetBinLabel (7 , " event with electron or forward muon or v0" );
52- hEventCounter->GetXaxis ()->SetBinLabel (8 , " event with electron and forward muon and v0" );
51+ hEventCounter->GetXaxis ()->SetBinLabel (5 , " event with electron from dalitz" );
52+ hEventCounter->GetXaxis ()->SetBinLabel (6 , " event with electron or forward muon" );
53+ hEventCounter->GetXaxis ()->SetBinLabel (7 , " event with electron and forward muon" );
54+ hEventCounter->GetXaxis ()->SetBinLabel (8 , " event with electron or forward muon or v0" );
55+ hEventCounter->GetXaxis ()->SetBinLabel (9 , " event with v0 or electron from dalitz" );
5356 }
5457
5558 SliceCache cache;
5659 Preslice<aod::EMPrimaryElectrons> perCollision_el = aod::emprimaryelectron::collisionId;
5760 Preslice<aod::EMPrimaryMuons> perCollision_mu = aod::emprimarymuon::collisionId;
5861 Preslice<aod::V0PhotonsKF> perCollision_v0 = aod::v0photonkf::collisionId;
62+ Preslice<aod::EMPrimaryElectronsFromDalitz> perCollision_elda = aod::emprimaryelectron::collisionId;
5963
60- template <uint8_t system, typename TCollisions, typename TElectrons, typename TMuons, typename TV0s>
61- void selectEoI (TCollisions const & collisions, TElectrons const & electrons, TMuons const & muons, TV0s const & v0s)
64+ template <uint8_t system, typename TCollisions, typename TElectrons, typename TMuons, typename TV0s, typename TElectronsFromDalitz >
65+ void selectEoI (TCollisions const & collisions, TElectrons const & electrons, TMuons const & muons, TV0s const & v0s, TElectronsFromDalitz const & electronsda )
6266 {
6367 for (const auto & collision : collisions) {
6468 bool does_electron_exist = false ;
6569 bool does_fwdmuon_exist = false ;
6670 bool does_pcm_exist = false ;
71+ bool does_electronda_exist = false ;
6772 fRegistry .fill (HIST (" hEventCounter" ), 1 );
6873
6974 if constexpr (static_cast <bool >(system & kElectron )) {
@@ -87,21 +92,28 @@ struct filterEoI {
8792 fRegistry .fill (HIST (" hEventCounter" ), 4 );
8893 }
8994 }
95+ if constexpr (static_cast <bool >(system & kElectronFromDalitz )) {
96+ auto electronsda_coll = electronsda.sliceBy (perCollision_elda, collision.globalIndex ());
97+ if (electronsda_coll.size () >= minNElectronsFromDalitz) {
98+ does_electronda_exist = true ;
99+ fRegistry .fill (HIST (" hEventCounter" ), 5 );
100+ }
101+ }
90102
91103 if (does_electron_exist || does_fwdmuon_exist) {
92- fRegistry .fill (HIST (" hEventCounter" ), 5 );
93- }
94- if (does_electron_exist && does_fwdmuon_exist) {
95104 fRegistry .fill (HIST (" hEventCounter" ), 6 );
96105 }
97- if (does_electron_exist || does_fwdmuon_exist || does_pcm_exist ) {
106+ if (does_electron_exist && does_fwdmuon_exist) {
98107 fRegistry .fill (HIST (" hEventCounter" ), 7 );
99108 }
100- if (does_electron_exist && does_fwdmuon_exist && does_pcm_exist) {
109+ if (does_electron_exist || does_fwdmuon_exist || does_pcm_exist) {
101110 fRegistry .fill (HIST (" hEventCounter" ), 8 );
102111 }
112+ if (does_electronda_exist || does_pcm_exist) {
113+ fRegistry .fill (HIST (" hEventCounter" ), 9 );
114+ }
103115
104- emeoi (does_electron_exist || does_fwdmuon_exist || does_pcm_exist);
116+ emeoi (does_electron_exist || does_fwdmuon_exist || does_pcm_exist || does_electronda_exist );
105117
106118 } // end of collision loop
107119
@@ -110,31 +122,37 @@ struct filterEoI {
110122 void process_Electron (aod::Collisions const & collisions, aod::EMPrimaryElectrons const & electrons)
111123 {
112124 const uint8_t sysflag = kElectron ;
113- selectEoI<sysflag>(collisions, electrons, nullptr , nullptr );
125+ selectEoI<sysflag>(collisions, electrons, nullptr , nullptr , nullptr );
114126 }
115127
116128 void process_FwdMuon (aod::Collisions const & collisions, aod::EMPrimaryMuons const & muons)
117129 {
118130 const uint8_t sysflag = kFwdMuon ;
119- selectEoI<sysflag>(collisions, nullptr , muons, nullptr );
131+ selectEoI<sysflag>(collisions, nullptr , muons, nullptr , nullptr );
120132 }
121133
122134 void process_Electron_FwdMuon (aod::Collisions const & collisions, aod::EMPrimaryElectrons const & electrons, aod::EMPrimaryMuons const & muons)
123135 {
124136 const uint8_t sysflag = kElectron | kFwdMuon ;
125- selectEoI<sysflag>(collisions, electrons, muons, nullptr );
137+ selectEoI<sysflag>(collisions, electrons, muons, nullptr , nullptr );
126138 }
127139
128140 void process_PCM (aod::Collisions const & collisions, aod::V0PhotonsKF const & v0s)
129141 {
130142 const uint8_t sysflag = kPCM ;
131- selectEoI<sysflag>(collisions, nullptr , nullptr , v0s);
143+ selectEoI<sysflag>(collisions, nullptr , nullptr , v0s, nullptr );
132144 }
133145
134146 void process_Electron_FwdMuon_PCM (aod::Collisions const & collisions, aod::EMPrimaryElectrons const & electrons, aod::EMPrimaryMuons const & muons, aod::V0PhotonsKF const & v0s)
135147 {
136148 const uint8_t sysflag = kElectron | kFwdMuon | kPCM ;
137- selectEoI<sysflag>(collisions, electrons, muons, v0s);
149+ selectEoI<sysflag>(collisions, electrons, muons, v0s, nullptr );
150+ }
151+
152+ void process_PCM_ElectronFromDalitz (aod::Collisions const & collisions, aod::V0PhotonsKF const & v0s, aod::EMPrimaryElectronsFromDalitz const & electronsda)
153+ {
154+ const uint8_t sysflag = kPCM | kElectronFromDalitz ;
155+ selectEoI<sysflag>(collisions, nullptr , nullptr , v0s, electronsda);
138156 }
139157
140158 void processDummy (aod::Collisions const & collisions)
@@ -149,6 +167,7 @@ struct filterEoI {
149167 PROCESS_SWITCH (filterEoI, process_PCM, " create filter bit for PCM" , false );
150168 PROCESS_SWITCH (filterEoI, process_Electron_FwdMuon, " create filter bit for Electron, FwdMuon" , false );
151169 PROCESS_SWITCH (filterEoI, process_Electron_FwdMuon_PCM, " create filter bit for Electron, FwdMuon, PCM" , false );
170+ PROCESS_SWITCH (filterEoI, process_PCM_ElectronFromDalitz, " create filter bit for PCM, electron from dalitz" , false );
152171 PROCESS_SWITCH (filterEoI, processDummy, " processDummy" , true );
153172};
154173WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments