Skip to content

Commit 5bbb7c5

Browse files
committed
Change enumeration names
1 parent 8b56286 commit 5bbb7c5

File tree

1 file changed

+80
-80
lines changed

1 file changed

+80
-80
lines changed

PWGHF/HFL/Tasks/taskSingleElectron.cxx

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,34 @@ enum PdgCode {
3838
};
3939

4040
enum SourceType {
41-
notElec = 0, // not electron
42-
directCharm = 1, // electrons from prompt charm hadrons
43-
directBeauty = 2, // electrons from primary beauty hadrons
44-
beautyCharm = 3, // electrons from non-prompt charm hadrons
45-
directGamma = 4, // electrons from direct photon
46-
gammaPi0 = 5,
47-
gammaEta = 6,
48-
gammaOmega = 7,
49-
gammaPhi = 8,
50-
gammaEtaPrime = 9,
51-
gammaRho0 = 10,
52-
gammaK0s = 11,
53-
gammaK0l = 12,
54-
gammaKe3 = 13,
55-
gammaLambda0 = 14,
56-
gammaSigma = 15,
57-
pi0 = 16,
58-
eta = 17,
59-
fOmega = 18,
60-
fPhi = 19,
61-
etaPrime = 20,
62-
rho0 = 21,
63-
k0s = 22,
64-
k0l = 23,
65-
ke3 = 24,
66-
lambda0 = 25,
67-
sigma = 26,
68-
others = 27
41+
NotElec = 0, // not electron
42+
DirectCharm = 1, // electrons from prompt charm hadrons
43+
DirectBeauty = 2, // electrons from primary beauty hadrons
44+
BeautyCharm = 3, // electrons from non-prompt charm hadrons
45+
DirectGamma = 4, // electrons from direct photon
46+
GammaPi0 = 5,
47+
GammaEta = 6,
48+
GammaOmega = 7,
49+
GammaPhi = 8,
50+
GammaEtaPrime = 9,
51+
GammaRho0 = 10,
52+
GammaK0s = 11,
53+
GammaK0l = 12,
54+
GammaKe3 = 13,
55+
GammaLambda0 = 14,
56+
GammaSigma = 15,
57+
Pi0 = 16,
58+
Eta = 17,
59+
Omega = 18,
60+
Phi = 19,
61+
EtaPrime = 20,
62+
Rho0 = 21,
63+
K0s = 22,
64+
K0l = 23,
65+
Ke3 = 24,
66+
Lambda0 = 25,
67+
Sigma = 26,
68+
Else = 27
6969
};
7070

7171
struct HfTaskSingleElectron {
@@ -194,7 +194,7 @@ struct HfTaskSingleElectron {
194194
{
195195
auto mcpart = track.mcParticle();
196196
if (std::abs(mcpart.pdgCode()) != kElectron) {
197-
return notElec;
197+
return NotElec;
198198
}
199199

200200
int motherPdg = -999;
@@ -223,27 +223,27 @@ struct HfTaskSingleElectron {
223223
auto const& grmothersIdsVec = mctrack.front().mothersIds();
224224

225225
if (grmothersIdsVec.empty()) {
226-
return directCharm;
226+
return DirectCharm;
227227
} else {
228228
grmotherPt = mctrack.front().pt();
229229
grmotherPdg = std::abs(mctrack.front().pdgCode());
230230
if ((static_cast<int>(grmotherPdg / 100.) % 10) == kBottom || (static_cast<int>(grmotherPdg / 1000.) % 10) == kBottom) {
231231
mpt = grmotherPt;
232232
mpdg = grmotherPdg;
233-
return beautyCharm;
233+
return BeautyCharm;
234234
}
235235
}
236236
}
237237
partMother = mctrack;
238238
}
239239
} else if ((static_cast<int>(motherPdg / 100.) % 10) == kBottom || (static_cast<int>(motherPdg / 1000.) % 10) == kBottom) { // check if electron from beauty hadrons
240-
return directBeauty;
240+
return DirectBeauty;
241241
} else if (motherPdg == kGamma) { // check if electron from photon conversion
242242
mctrack = partMother.front().template mothers_as<aod::McParticles>();
243243
if (mctrack.size()) {
244244
auto const& grmothersIdsVec = mctrack.front().mothersIds();
245245
if (grmothersIdsVec.empty()) {
246-
return directGamma;
246+
return DirectGamma;
247247
} else {
248248
grmotherPdg = std::abs(mctrack.front().pdgCode());
249249
mpdg = grmotherPdg;
@@ -255,19 +255,19 @@ struct HfTaskSingleElectron {
255255
auto const& ggrmothersIdsVec = mctrack.front().mothersIds();
256256
if (ggrmothersIdsVec.empty()) {
257257
if (grmotherPdg == kPi0) {
258-
return gammaPi0;
258+
return GammaPi0;
259259
} else if (grmotherPdg == kEta) {
260-
return gammaEta;
260+
return GammaEta;
261261
} else if (grmotherPdg == kOmega) {
262-
return gammaOmega;
262+
return GammaOmega;
263263
} else if (grmotherPdg == kPhi) {
264-
return gammaPhi;
264+
return GammaPhi;
265265
} else if (grmotherPdg == kEtaPrime) {
266-
return gammaEtaPrime;
266+
return GammaEtaPrime;
267267
} else if (grmotherPdg == kRho770_0) {
268-
return gammaRho0;
268+
return GammaRho0;
269269
} else {
270-
return others;
270+
return Else;
271271
}
272272
} else {
273273
ggrmotherPdg = mctrack.front().pdgCode();
@@ -276,42 +276,42 @@ struct HfTaskSingleElectron {
276276
mpt = ggrmotherPt;
277277
if (grmotherPdg == kPi0) {
278278
if (ggrmotherPdg == kK0Short) {
279-
return gammaK0s;
279+
return GammaK0s;
280280
} else if (ggrmotherPdg == kK0Long) {
281-
return gammaK0l;
281+
return GammaK0l;
282282
} else if (ggrmotherPdg == kKPlus) {
283-
return gammaKe3;
283+
return GammaKe3;
284284
} else if (ggrmotherPdg == kLambda0) {
285-
return gammaLambda0;
285+
return GammaLambda0;
286286
} else if (ggrmotherPdg == kSigmaPlus) {
287-
return gammaSigma;
287+
return GammaSigma;
288288
} else {
289289
mpdg = grmotherPdg;
290290
mpt = grmotherPt;
291-
return gammaPi0;
291+
return GammaPi0;
292292
}
293293
} else if (grmotherPdg == kEta) {
294294
mpdg = grmotherPdg;
295295
mpt = grmotherPt;
296-
return gammaEta;
296+
return GammaEta;
297297
} else if (grmotherPdg == kOmega) {
298298
mpdg = grmotherPdg;
299299
mpt = grmotherPt;
300-
return gammaOmega;
300+
return GammaOmega;
301301
} else if (grmotherPdg == kPhi) {
302302
mpdg = grmotherPdg;
303303
mpt = grmotherPt;
304-
return gammaPhi;
304+
return GammaPhi;
305305
} else if (grmotherPdg == kEtaPrime) {
306306
mpdg = grmotherPdg;
307307
mpt = grmotherPt;
308-
return gammaEtaPrime;
308+
return GammaEtaPrime;
309309
} else if (grmotherPdg == kRho770_0) {
310310
mpdg = grmotherPdg;
311311
mpt = grmotherPt;
312-
return gammaRho0;
312+
return GammaRho0;
313313
} else {
314-
return others;
314+
return Else;
315315
}
316316
}
317317
}
@@ -323,20 +323,20 @@ struct HfTaskSingleElectron {
323323
auto const& grmothersIdsVec = mctrack.front().mothersIds();
324324
if (grmothersIdsVec.empty()) {
325325
static const std::map<int, SourceType> pdgToSource = {
326-
{kPi0, pi0},
327-
{kEta, eta},
328-
{kOmega, fOmega},
329-
{kPhi, fPhi},
330-
{kEtaPrime, etaPrime},
331-
{kRho770_0, rho0},
332-
{kKPlus, ke3},
333-
{kK0Long, k0l}};
326+
{kPi0, Pi0},
327+
{kEta, Eta},
328+
{kOmega, Omega},
329+
{kPhi, Phi},
330+
{kEtaPrime, EtaPrime},
331+
{kRho770_0, Rho0},
332+
{kKPlus, Ke3},
333+
{kK0Long, K0l}};
334334

335335
auto it = pdgToSource.find(motherPdg);
336336
if (it != pdgToSource.end()) {
337337
return it->second;
338338
}
339-
return others;
339+
return Else;
340340

341341
} else {
342342
if (motherPdg == kPi0) {
@@ -345,42 +345,42 @@ struct HfTaskSingleElectron {
345345
mpt = grmotherPt;
346346
mpdg = grmotherPdg;
347347
if (grmotherPdg == kK0Short) {
348-
return k0s;
348+
return K0s;
349349
} else if (grmotherPdg == kK0Long) {
350-
return k0l;
350+
return K0l;
351351
} else if (grmotherPdg == kKPlus) {
352-
return ke3;
352+
return Ke3;
353353
} else if (grmotherPdg == kLambda0) {
354-
return lambda0;
354+
return Lambda0;
355355
} else if (grmotherPdg == kSigmaPlus) {
356-
return sigma;
356+
return Sigma;
357357
} else {
358358
mpt = motherPt;
359359
mpdg = motherPdg;
360-
return pi0;
360+
return Pi0;
361361
}
362362
} else if (motherPdg == kEta) {
363-
return eta;
363+
return Eta;
364364
} else if (motherPdg == kOmega) {
365-
return fOmega;
365+
return Omega;
366366
} else if (motherPdg == kPhi) {
367-
return fPhi;
367+
return Phi;
368368
} else if (motherPdg == kEtaPrime) {
369-
return etaPrime;
369+
return EtaPrime;
370370
} else if (motherPdg == kRho770_0) {
371-
return rho0;
371+
return Rho0;
372372
} else if (motherPdg == kKPlus) {
373-
return ke3;
373+
return Ke3;
374374
} else if (motherPdg == kK0Long) {
375-
return k0l;
375+
return K0l;
376376
} else {
377-
return others;
377+
return Else;
378378
}
379379
}
380380
}
381381
}
382382

383-
return others;
383+
return Else;
384384
}
385385

386386
void processData(soa::Filtered<MyCollisions>::iterator const& collision,
@@ -474,22 +474,22 @@ struct HfTaskSingleElectron {
474474
double mpt; // electron source pt
475475
int source = getElecSource(track, mpt, mpdg);
476476

477-
if (source == directBeauty || source == beautyCharm) {
477+
if (source == DirectBeauty || source == BeautyCharm) {
478478
histos.fill(HIST("hPdgB"), mpdg);
479479
histos.fill(HIST("dcaBeauty"), track.pt(), track.dcaXY());
480480
}
481481

482-
if (source == directCharm) {
482+
if (source == DirectCharm) {
483483
histos.fill(HIST("hPdgC"), mpdg);
484484
histos.fill(HIST("dcaCharm"), track.pt(), track.dcaXY());
485485
}
486486

487-
if (source >= gammaPi0 && source <= gammaSigma) {
487+
if (source >= GammaPi0 && source <= GammaSigma) {
488488
histos.fill(HIST("hPdgCo"), mpdg);
489489
histos.fill(HIST("dcaConv"), track.pt(), track.dcaXY());
490490
}
491491

492-
if (source >= pi0 && source <= sigma) {
492+
if (source >= Pi0 && source <= Sigma) {
493493
histos.fill(HIST("hPdgDa"), mpdg);
494494
histos.fill(HIST("dcaDalitz"), track.pt(), track.dcaXY());
495495
}

0 commit comments

Comments
 (0)