Skip to content

Commit e012735

Browse files
committed
Reduce number of histograms in MC
1 parent 8e36596 commit e012735

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

PWGLF/Tasks/GlobalEventProperties/flattenictyPikp.cxx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ static constexpr float CdEtaFV0 = (CmaxEtaFV0 - CminEtaFV0) / CmaxRingsFV0;
9797

9898
// PID names
9999
static constexpr int CprocessIdWeak = 4;
100-
static constexpr o2::track::PID::ID Npart = 5;
101-
const std::array<int, Npart> pDGs{11, 13, 211, 321, 2212};
102-
static constexpr std::array<std::string, Npart> CspeciesAll{"El", "Mu", "Pi", "Ka", "Pr"};
100+
static constexpr o2::track::PID::ID Npart = 3;
101+
const std::array<int, Npart> pDGs{211, 321, 2212};
102+
static constexpr std::array<std::string, Npart> CspeciesAll{"Pi", "Ka", "Pr"};
103103

104104
// histogram naming
105105
static constexpr std::array<std::string, 3> PidDir{"el/", "pi/", "pr/"};
@@ -2082,7 +2082,7 @@ struct FlattenictyPikp {
20822082
v0sPerCollision.bindExternalIndices(&tracks);
20832083
filldEdx(tracksPerCollision, v0sPerCollision, collision, bcs);
20842084
if (defOpt.fillDCAxyHist) {
2085-
static_for<0, 4>([&](auto i) {
2085+
static_for<0, 2>([&](auto i) {
20862086
fillDCA<i>(tracksPerCollision, collision, bcs);
20872087
});
20882088
}
@@ -2218,7 +2218,7 @@ struct FlattenictyPikp {
22182218
continue;
22192219
}
22202220
if (gtOneRec) {
2221-
static_for<0, 4>([&](auto i) {
2221+
static_for<0, 2>([&](auto i) {
22222222
constexpr int Cidx = i.value;
22232223
if (std::fabs(particle.pdgCode()) == pDGs[Cidx]) {
22242224
registryMC.fill(HIST(Cprefix) + HIST(CspeciesAll[Cidx]) + HIST(CpTeffGenPrimRecEvt), multRec, flatRec, particle.pt());
@@ -2271,7 +2271,7 @@ struct FlattenictyPikp {
22712271
if (!particle.isPhysicalPrimary()) {
22722272
continue;
22732273
}
2274-
static_for<0, 4>([&](auto i) {
2274+
static_for<0, 2>([&](auto i) {
22752275
constexpr int Cidx = i.value;
22762276
if (std::fabs(particle.pdgCode()) == pDGs[Cidx]) {
22772277
registryMC.fill(HIST(Cprefix) + HIST(CspeciesAll[Cidx]) + HIST(CpTeffPrimRecEvt), multRec, flatRec, track.pt());
@@ -2334,7 +2334,7 @@ struct FlattenictyPikp {
23342334
}
23352335
}
23362336
registryMC.fill(HIST("Events/hEvtMcGen"), 2.5);
2337-
if (evtSelOpt.useInelgt0wTVX && !(mcCollision.multMCFT0C() <= 0 || mcCollision.multMCFT0A() <= 0)) {
2337+
if (evtSelOpt.useInelgt0wTVX && !(mcCollision.multMCFT0C() > 0 && mcCollision.multMCFT0A() > 0)) {
23382338
return;
23392339
}
23402340
registryMC.fill(HIST("Events/hEvtMcGen"), 3.5);
@@ -2350,7 +2350,7 @@ struct FlattenictyPikp {
23502350
if (std::abs(particle.eta()) > trkSelOpt.trkEtaMax) {
23512351
continue;
23522352
}
2353-
static_for<0, 4>([&](auto i) {
2353+
static_for<0, 2>([&](auto i) {
23542354
constexpr int Cidx = i.value;
23552355
if (std::fabs(particle.pdgCode()) == pDGs[Cidx]) {
23562356
registryMC.fill(HIST(Cprefix) + HIST(CspeciesAll[Cidx]) + HIST(CpTgenPrimSgn), multMC, flatMC, particle.pt()); // Sgn loss den
@@ -2395,7 +2395,7 @@ struct FlattenictyPikp {
23952395
continue;
23962396
}
23972397
if (gtOneRec) {
2398-
static_for<0, 4>([&](auto i) {
2398+
static_for<0, 2>([&](auto i) {
23992399
constexpr int Cidx = i.value;
24002400
if (std::fabs(particle.pdgCode()) == pDGs[Cidx]) {
24012401
registryMC.fill(HIST(Cprefix) + HIST(CspeciesAll[Cidx]) + HIST(CpTrecCollPrimSgn), multMC, flatMC, particle.pt()); // Sgn loss num
@@ -2429,7 +2429,7 @@ struct FlattenictyPikp {
24292429
continue;
24302430
}
24312431
const float multRec = getMult(collision);
2432-
const float flatRec = fillFlat<true>(collision);
2432+
const float flatRec = fillFlat<false>(collision);
24332433

24342434
const auto& groupedTrks = tracks.sliceBy(perCollTrk, collision.globalIndex());
24352435
for (const auto& track : groupedTrks) {
@@ -2452,7 +2452,7 @@ struct FlattenictyPikp {
24522452
if (std::abs(particle.eta()) > trkSelOpt.trkEtaMax) {
24532453
continue;
24542454
}
2455-
static_for<0, 4>([&](auto i) {
2455+
static_for<0, 2>([&](auto i) {
24562456
constexpr int Cidx = i.value;
24572457
if (std::fabs(particle.pdgCode()) == pDGs[Cidx]) {
24582458
if (!particle.isPhysicalPrimary()) {
@@ -2469,7 +2469,7 @@ struct FlattenictyPikp {
24692469
}
24702470
});
24712471
if (isGoodTrack<true, false>(track, magField)) {
2472-
static_for<0, 4>([&](auto i) {
2472+
static_for<0, 2>([&](auto i) {
24732473
constexpr int Cidx = i.value;
24742474
if (std::fabs(particle.pdgCode()) == pDGs[Cidx]) {
24752475
if (particle.isPhysicalPrimary()) {

0 commit comments

Comments
 (0)