1515// Please write to: daiki.sekihata@cern.ch
1616
1717#include " PWGEM/Dilepton/DataModel/dileptonTables.h"
18+ #include " PWGEM/PhotonMeson/DataModel/gammaTables.h"
1819
1920#include " Framework/ASoAHelpers.h"
2021#include " Framework/AnalysisDataModel.h"
@@ -30,32 +31,39 @@ struct filterEoI {
3031 enum SubSystem {
3132 kElectron = 0x1 ,
3233 kFwdMuon = 0x2 ,
34+ kPCM = 0x4 ,
3335 };
3436 Produces<o2::aod::EMEoIs> emeoi;
35- Configurable<int > minNElectrons{" minNElectrons" , 1 , " min number of e+ and e- at midrapidity" };
36- Configurable<int > minNMuons{" minNMuons" , 1 , " min number of mu+ and mu- at forward rapidity" };
37+ Configurable<int > minNElectrons{" minNElectrons" , 1 , " min number of e+ or e- at midrapidity" };
38+ Configurable<int > minNMuons{" minNMuons" , 1 , " min number of mu+ or mu- at forward rapidity" };
39+ Configurable<int > minNV0s{" minNV0s" , 1 , " min number of v0 photons at midrapidity" };
3740
3841 HistogramRegistry fRegistry {" output" };
3942 void init (o2::framework::InitContext&)
4043 {
41- auto hEventCounter = fRegistry .add <TH1>(" hEventCounter" , " hEventCounter" , kTH1D , {{5 , 0 .5f , 5 .5f }});
44+ auto hEventCounter = fRegistry .add <TH1>(" hEventCounter" , " hEventCounter" , kTH1D , {{8 , 0 .5f , 8 .5f }});
4245 hEventCounter->GetXaxis ()->SetBinLabel (1 , " all" );
4346 hEventCounter->GetXaxis ()->SetBinLabel (2 , " event with electron" );
4447 hEventCounter->GetXaxis ()->SetBinLabel (3 , " event with forward muon" );
45- hEventCounter->GetXaxis ()->SetBinLabel (4 , " event with electron or forward muon" );
46- hEventCounter->GetXaxis ()->SetBinLabel (5 , " event with electron and forward muon" );
48+ 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" );
4753 }
4854
4955 SliceCache cache;
5056 Preslice<aod::EMPrimaryElectrons> perCollision_el = aod::emprimaryelectron::collisionId;
5157 Preslice<aod::EMPrimaryMuons> perCollision_mu = aod::emprimarymuon::collisionId;
58+ Preslice<aod::V0PhotonsKF> perCollision_v0 = aod::v0photonkf::collisionId;
5259
53- template <uint8_t system, typename TCollisions, typename TElectrons, typename TMuons>
54- void selectEoI (TCollisions const & collisions, TElectrons const & electrons, TMuons const & muons)
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 )
5562 {
5663 for (const auto & collision : collisions) {
5764 bool does_electron_exist = false ;
5865 bool does_fwdmuon_exist = false ;
66+ bool does_pcm_exist = false ;
5967 fRegistry .fill (HIST (" hEventCounter" ), 1 );
6068
6169 if constexpr (static_cast <bool >(system & kElectron )) {
@@ -72,15 +80,28 @@ struct filterEoI {
7280 fRegistry .fill (HIST (" hEventCounter" ), 3 );
7381 }
7482 }
83+ if constexpr (static_cast <bool >(system & kPCM )) {
84+ auto v0s_coll = v0s.sliceBy (perCollision_v0, collision.globalIndex ());
85+ if (v0s_coll.size () >= minNV0s) {
86+ does_pcm_exist = true ;
87+ fRegistry .fill (HIST (" hEventCounter" ), 4 );
88+ }
89+ }
7590
7691 if (does_electron_exist || does_fwdmuon_exist) {
77- fRegistry .fill (HIST (" hEventCounter" ), 4 );
92+ fRegistry .fill (HIST (" hEventCounter" ), 5 );
7893 }
7994 if (does_electron_exist && does_fwdmuon_exist) {
80- fRegistry .fill (HIST (" hEventCounter" ), 5 );
95+ fRegistry .fill (HIST (" hEventCounter" ), 6 );
96+ }
97+ if (does_electron_exist || does_fwdmuon_exist || does_pcm_exist) {
98+ fRegistry .fill (HIST (" hEventCounter" ), 7 );
99+ }
100+ if (does_electron_exist && does_fwdmuon_exist && does_pcm_exist) {
101+ fRegistry .fill (HIST (" hEventCounter" ), 8 );
81102 }
82103
83- emeoi (does_electron_exist || does_fwdmuon_exist);
104+ emeoi (does_electron_exist || does_fwdmuon_exist || does_pcm_exist );
84105
85106 } // end of collision loop
86107
@@ -89,19 +110,31 @@ struct filterEoI {
89110 void process_Electron (aod::Collisions const & collisions, aod::EMPrimaryElectrons const & electrons)
90111 {
91112 const uint8_t sysflag = kElectron ;
92- selectEoI<sysflag>(collisions, electrons, nullptr );
113+ selectEoI<sysflag>(collisions, electrons, nullptr , nullptr );
93114 }
94115
95116 void process_FwdMuon (aod::Collisions const & collisions, aod::EMPrimaryMuons const & muons)
96117 {
97118 const uint8_t sysflag = kFwdMuon ;
98- selectEoI<sysflag>(collisions, nullptr , muons);
119+ selectEoI<sysflag>(collisions, nullptr , muons, nullptr );
99120 }
100121
101122 void process_Electron_FwdMuon (aod::Collisions const & collisions, aod::EMPrimaryElectrons const & electrons, aod::EMPrimaryMuons const & muons)
102123 {
103124 const uint8_t sysflag = kElectron | kFwdMuon ;
104- selectEoI<sysflag>(collisions, electrons, muons);
125+ selectEoI<sysflag>(collisions, electrons, muons, nullptr );
126+ }
127+
128+ void process_PCM (aod::Collisions const & collisions, aod::V0PhotonsKF const & v0s)
129+ {
130+ const uint8_t sysflag = kPCM ;
131+ selectEoI<sysflag>(collisions, nullptr , nullptr , v0s);
132+ }
133+
134+ void process_Electron_FwdMuon_PCM (aod::Collisions const & collisions, aod::EMPrimaryElectrons const & electrons, aod::EMPrimaryMuons const & muons, aod::V0PhotonsKF const & v0s)
135+ {
136+ const uint8_t sysflag = kElectron | kFwdMuon | kPCM ;
137+ selectEoI<sysflag>(collisions, electrons, muons, v0s);
105138 }
106139
107140 void processDummy (aod::Collisions const & collisions)
@@ -113,7 +146,9 @@ struct filterEoI {
113146
114147 PROCESS_SWITCH (filterEoI, process_Electron, " create filter bit for Electron" , false );
115148 PROCESS_SWITCH (filterEoI, process_FwdMuon, " create filter bit for Forward Muon" , false );
149+ PROCESS_SWITCH (filterEoI, process_PCM, " create filter bit for PCM" , false );
116150 PROCESS_SWITCH (filterEoI, process_Electron_FwdMuon, " create filter bit for Electron, FwdMuon" , false );
151+ PROCESS_SWITCH (filterEoI, process_Electron_FwdMuon_PCM, " create filter bit for Electron, FwdMuon, PCM" , false );
117152 PROCESS_SWITCH (filterEoI, processDummy, " processDummy" , true );
118153};
119154WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments