2323#include < Framework/AnalysisTask.h>
2424#include < Framework/runDataProcessing.h>
2525
26+ #include < map>
27+
2628using namespace o2 ;
2729using namespace o2 ::constants::math;
2830using namespace o2 ::constants::physics;
@@ -36,34 +38,34 @@ enum PdgCode {
3638};
3739
3840enum SourceType {
39- NotElec = 0 , // not electron
40- DirectCharm = 1 , // electrons from prompt charm hadrons
41- DirectBeauty = 2 , // electrons from primary beauty hadrons
42- BeautyCharm = 3 , // electrons from non-prompt charm hadrons
43- DirectGamma = 4 , // electrons from direct photon
44- GammaPi0 = 5 ,
45- GammaEta = 6 ,
46- GammaOmega = 7 ,
47- GammaPhi = 8 ,
48- GammaEtaPrime = 9 ,
49- GammaRho0 = 10 ,
50- GammaK0s = 11 ,
51- GammaK0l = 12 ,
52- GammaKe3 = 13 ,
53- GammaLambda0 = 14 ,
54- GammaSigma = 15 ,
55- Pi0 = 16 ,
56- Eta = 17 ,
57- Omega = 18 ,
58- Phi = 19 ,
59- EtaPrime = 20 ,
60- Rho0 = 21 ,
61- K0s = 22 ,
62- K0l = 23 ,
63- Ke3 = 24 ,
64- Lambda0 = 25 ,
65- Sigma = 26 ,
66- Else = 27
41+ fNotElec = 0 , // not electron
42+ fDirectCharm = 1 , // electrons from prompt charm hadrons
43+ fDirectBeauty = 2 , // electrons from primary beauty hadrons
44+ fBeautyCharm = 3 , // electrons from non-prompt charm hadrons
45+ fDirectGamma = 4 , // electrons from direct photon
46+ fGammaPi0 = 5 ,
47+ fGammaEta = 6 ,
48+ fGammaOmega = 7 ,
49+ fGammaPhi = 8 ,
50+ fGammaEtaPrime = 9 ,
51+ fGammaRho0 = 10 ,
52+ fGammaK0s = 11 ,
53+ fGammaK0l = 12 ,
54+ fGammaKe3 = 13 ,
55+ fGammaLambda0 = 14 ,
56+ fGammaSigma = 15 ,
57+ fPi0 = 16 ,
58+ fEta = 17 ,
59+ fOmega = 18 ,
60+ fPhi = 19 ,
61+ fEtaPrime = 20 ,
62+ fRho0 = 21 ,
63+ fK0s = 22 ,
64+ fK0l = 23 ,
65+ fKe3 = 24 ,
66+ fLambda0 = 25 ,
67+ fSigma = 26 ,
68+ fElse = 27
6769};
6870
6971struct HfTaskSingleElectron {
@@ -192,7 +194,7 @@ struct HfTaskSingleElectron {
192194 {
193195 auto mcpart = track.mcParticle ();
194196 if (std::abs (mcpart.pdgCode ()) != kElectron ) {
195- return NotElec ;
197+ return fNotElec ;
196198 }
197199
198200 int motherPdg = -999 ;
@@ -221,27 +223,27 @@ struct HfTaskSingleElectron {
221223 auto const & grmothersIdsVec = mctrack.front ().mothersIds ();
222224
223225 if (grmothersIdsVec.empty ()) {
224- return DirectCharm ;
226+ return fDirectCharm ;
225227 } else {
226228 grmotherPt = mctrack.front ().pt ();
227229 grmotherPdg = std::abs (mctrack.front ().pdgCode ());
228230 if ((static_cast <int >(grmotherPdg / 100 .) % 10 ) == kBottom || (static_cast <int >(grmotherPdg / 1000 .) % 10 ) == kBottom ) {
229231 mpt = grmotherPt;
230232 mpdg = grmotherPdg;
231- return BeautyCharm ;
233+ return fBeautyCharm ;
232234 }
233235 }
234236 }
235237 partMother = mctrack;
236238 }
237239 } else if ((static_cast <int >(motherPdg / 100 .) % 10 ) == kBottom || (static_cast <int >(motherPdg / 1000 .) % 10 ) == kBottom ) { // check if electron from beauty hadrons
238- return DirectBeauty ;
240+ return fDirectBeauty ;
239241 } else if (motherPdg == kGamma ) { // check if electron from photon conversion
240242 mctrack = partMother.front ().template mothers_as <aod::McParticles>();
241243 if (mctrack.size ()) {
242244 auto const & grmothersIdsVec = mctrack.front ().mothersIds ();
243245 if (grmothersIdsVec.empty ()) {
244- return DirectGamma ;
246+ return fDirectGamma ;
245247 } else {
246248 grmotherPdg = std::abs (mctrack.front ().pdgCode ());
247249 mpdg = grmotherPdg;
@@ -253,19 +255,19 @@ struct HfTaskSingleElectron {
253255 auto const & ggrmothersIdsVec = mctrack.front ().mothersIds ();
254256 if (ggrmothersIdsVec.empty ()) {
255257 if (grmotherPdg == kPi0 ) {
256- return GammaPi0 ;
258+ return fGammaPi0 ;
257259 } else if (grmotherPdg == kEta ) {
258- return GammaEta ;
260+ return fGammaEta ;
259261 } else if (grmotherPdg == kOmega ) {
260- return GammaOmega ;
262+ return fGammaOmega ;
261263 } else if (grmotherPdg == kPhi ) {
262- return GammaPhi ;
264+ return fGammaPhi ;
263265 } else if (grmotherPdg == kEtaPrime ) {
264- return GammaEtaPrime ;
266+ return fGammaEtaPrime ;
265267 } else if (grmotherPdg == kRho770_0 ) {
266- return GammaRho0 ;
268+ return fGammaRho0 ;
267269 } else {
268- return Else ;
270+ return fElse ;
269271 }
270272 } else {
271273 ggrmotherPdg = mctrack.front ().pdgCode ();
@@ -274,42 +276,42 @@ struct HfTaskSingleElectron {
274276 mpt = ggrmotherPt;
275277 if (grmotherPdg == kPi0 ) {
276278 if (ggrmotherPdg == kK0Short ) {
277- return GammaK0s ;
279+ return fGammaK0s ;
278280 } else if (ggrmotherPdg == kK0Long ) {
279- return GammaK0l ;
281+ return fGammaK0l ;
280282 } else if (ggrmotherPdg == kKPlus ) {
281- return GammaKe3 ;
283+ return fGammaKe3 ;
282284 } else if (ggrmotherPdg == kLambda0 ) {
283- return GammaLambda0 ;
285+ return fGammaLambda0 ;
284286 } else if (ggrmotherPdg == kSigmaPlus ) {
285- return GammaSigma ;
287+ return fGammaSigma ;
286288 } else {
287289 mpdg = grmotherPdg;
288290 mpt = grmotherPt;
289- return GammaPi0 ;
291+ return fGammaPi0 ;
290292 }
291293 } else if (grmotherPdg == kEta ) {
292294 mpdg = grmotherPdg;
293295 mpt = grmotherPt;
294- return GammaEta ;
296+ return fGammaEta ;
295297 } else if (grmotherPdg == kOmega ) {
296298 mpdg = grmotherPdg;
297299 mpt = grmotherPt;
298- return GammaOmega ;
300+ return fGammaOmega ;
299301 } else if (grmotherPdg == kPhi ) {
300302 mpdg = grmotherPdg;
301303 mpt = grmotherPt;
302- return GammaPhi ;
304+ return fGammaPhi ;
303305 } else if (grmotherPdg == kEtaPrime ) {
304306 mpdg = grmotherPdg;
305307 mpt = grmotherPt;
306- return GammaEtaPrime ;
308+ return fGammaEtaPrime ;
307309 } else if (grmotherPdg == kRho770_0 ) {
308310 mpdg = grmotherPdg;
309311 mpt = grmotherPt;
310- return GammaRho0 ;
312+ return fGammaRho0 ;
311313 } else {
312- return Else ;
314+ return fElse ;
313315 }
314316 }
315317 }
@@ -321,20 +323,20 @@ struct HfTaskSingleElectron {
321323 auto const & grmothersIdsVec = mctrack.front ().mothersIds ();
322324 if (grmothersIdsVec.empty ()) {
323325 static const std::map<int , SourceType> PdgToSource = {
324- {kPi0 , Pi0 },
325- {kEta , Eta },
326- {kOmega , Omega },
327- {kPhi , Phi },
328- {kEtaPrime , EtaPrime },
329- {kRho770_0 , Rho0 },
330- {kKPlus , Ke3 },
331- {kK0Long , K0l }};
326+ {kPi0 , fPi0 },
327+ {kEta , fEta },
328+ {kOmega , fOmega },
329+ {kPhi , fPhi },
330+ {kEtaPrime , fEtaPrime },
331+ {kRho770_0 , fRho0 },
332+ {kKPlus , fKe3 },
333+ {kK0Long , fK0l }};
332334
333335 auto it = PdgToSource.find (motherPdg);
334336 if (it != PdgToSource.end ()) {
335337 return it->second ;
336338 }
337- return Else ;
339+ return fElse ;
338340
339341 } else {
340342 if (motherPdg == kPi0 ) {
@@ -343,42 +345,42 @@ struct HfTaskSingleElectron {
343345 mpt = grmotherPt;
344346 mpdg = grmotherPdg;
345347 if (grmotherPdg == kK0Short ) {
346- return K0s ;
348+ return fK0s ;
347349 } else if (grmotherPdg == kK0Long ) {
348- return K0l ;
350+ return fK0l ;
349351 } else if (grmotherPdg == kKPlus ) {
350- return Ke3 ;
352+ return fKe3 ;
351353 } else if (grmotherPdg == kLambda0 ) {
352- return Lambda0 ;
354+ return fLambda0 ;
353355 } else if (grmotherPdg == kSigmaPlus ) {
354- return Sigma ;
356+ return fSigma ;
355357 } else {
356358 mpt = motherPt;
357359 mpdg = motherPdg;
358- return Pi0 ;
360+ return fPi0 ;
359361 }
360362 } else if (motherPdg == kEta ) {
361- return Eta ;
363+ return fEta ;
362364 } else if (motherPdg == kOmega ) {
363- return Omega ;
365+ return fOmega ;
364366 } else if (motherPdg == kPhi ) {
365- return Phi ;
367+ return fPhi ;
366368 } else if (motherPdg == kEtaPrime ) {
367- return EtaPrime ;
369+ return fEtaPrime ;
368370 } else if (motherPdg == kRho770_0 ) {
369- return Rho0 ;
371+ return fRho0 ;
370372 } else if (motherPdg == kKPlus ) {
371- return Ke3 ;
373+ return fKe3 ;
372374 } else if (motherPdg == kK0Long ) {
373- return K0l ;
375+ return fK0l ;
374376 } else {
375- return Else ;
377+ return fElse ;
376378 }
377379 }
378380 }
379381 }
380382
381- return Else ;
383+ return fElse ;
382384 }
383385
384386 void processData (soa::Filtered<MyCollisions>::iterator const & collision,
@@ -472,22 +474,22 @@ struct HfTaskSingleElectron {
472474 double mpt; // electron source pt
473475 int source = getElecSource (track, mpt, mpdg);
474476
475- if (source == DirectBeauty || source == BeautyCharm ) {
477+ if (source == fDirectBeauty || source == fBeautyCharm ) {
476478 histos.fill (HIST (" hPdgB" ), mpdg);
477479 histos.fill (HIST (" dcaBeauty" ), track.pt (), track.dcaXY ());
478480 }
479481
480- if (source == DirectCharm ) {
482+ if (source == fDirectCharm ) {
481483 histos.fill (HIST (" hPdgC" ), mpdg);
482484 histos.fill (HIST (" dcaCharm" ), track.pt (), track.dcaXY ());
483485 }
484486
485- if (source >= GammaPi0 && source <= GammaSigma ) {
487+ if (source >= fGammaPi0 && source <= fGammaSigma ) {
486488 histos.fill (HIST (" hPdgCo" ), mpdg);
487489 histos.fill (HIST (" dcaConv" ), track.pt (), track.dcaXY ());
488490 }
489491
490- if (source >= Pi0 && source <= Sigma ) {
492+ if (source >= fPi0 && source <= fSigma ) {
491493 histos.fill (HIST (" hPdgDa" ), mpdg);
492494 histos.fill (HIST (" dcaDalitz" ), track.pt (), track.dcaXY ());
493495 }
0 commit comments