Skip to content

Commit b246336

Browse files
EloviyoShirajum Monira
andauthored
[PWGCF] FemtoUniverse cascade task -- added track-cascade CPR option (#12567)
Co-authored-by: Shirajum Monira <shirajum.monira@cernch>
1 parent f7e9d3b commit b246336

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,21 @@ class FemtoUniverseDetaDphiStar
125125
}
126126
}
127127
}
128+
if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) {
129+
/// Track-Xi and Track-Omega combination
130+
for (int k = 0; k < 3; k++) {
131+
std::string dirName = static_cast<std::string>(DirNames[6]);
132+
histdetadpisame[k][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
133+
histdetadpisame[k][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
134+
histdetadpimixed[k][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
135+
histdetadpimixed[k][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
136+
if (plotForEveryRadii) {
137+
for (int l = 0; l < 9; l++) {
138+
histdetadpiRadii[k][l] = mHistogramRegistryQA->add<TH2>((dirName + static_cast<std::string>(HistNamesRadii[k][l])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
139+
}
140+
}
141+
}
142+
}
128143
if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) {
129144
for (int i = 0; i < 2; i++) {
130145
std::string dirName = static_cast<std::string>(DirNames[3]);
@@ -277,7 +292,7 @@ class FemtoUniverseDetaDphiStar
277292

278293
bool pass = false;
279294
static constexpr int CascChildTable[][2] = {{-1, -1}, {-1, -2}, {-1, -3}, {-2, -2}, {-3, -3}, {-2, -1}, {-3, -1}};
280-
for (int i = 0; i < 5; i++) {
295+
for (int i = 0; i < 7; i++) {
281296
auto indexOfDaughterpart1 = (ChosenEventType == femto_universe_container::EventType::mixed ? part1.globalIndex() : part1.index()) + CascChildTable[i][0];
282297
auto indexOfDaughterpart2 = (ChosenEventType == femto_universe_container::EventType::mixed ? part2.globalIndex() : part2.index()) + CascChildTable[i][1];
283298
auto daughterpart1 = particles.begin() + indexOfDaughterpart1;
@@ -308,6 +323,43 @@ class FemtoUniverseDetaDphiStar
308323
}
309324
return pass;
310325

326+
} else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) {
327+
/// Track-Xi and Track-Omega combination
328+
if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kCascade) {
329+
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar instantiation! Please provide kTrack,kCascade candidates.";
330+
return false;
331+
}
332+
333+
bool pass = false;
334+
for (int i = 0; i < 3; i++) {
335+
auto indexOfDaughter = (ChosenEventType == femto_universe_container::EventType::mixed ? part2.globalIndex() : part2.index()) - 3 + i;
336+
auto daughter = particles.begin() + indexOfDaughter;
337+
if (isSameSignCPR && (part1.mAntiLambda() != daughter.mAntiLambda())) // mAntiLambda() is used here as sign getter
338+
continue;
339+
auto deta = part1.eta() - daughter.eta();
340+
auto dphiAvg = averagePhiStar(*part1, *daughter, i);
341+
if (ChosenEventType == femto_universe_container::EventType::same) {
342+
histdetadpisame[i][0]->Fill(deta, dphiAvg);
343+
} else if (ChosenEventType == femto_universe_container::EventType::mixed) {
344+
histdetadpimixed[i][0]->Fill(deta, dphiAvg);
345+
} else {
346+
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed.";
347+
}
348+
349+
if ((dphiAvg > cutDeltaPhiStarMin) && (dphiAvg < cutDeltaPhiStarMax) && (deta > cutDeltaEtaMin) && (deta < cutDeltaEtaMax)) {
350+
pass = true;
351+
} else {
352+
if (ChosenEventType == femto_universe_container::EventType::same) {
353+
histdetadpisame[i][1]->Fill(deta, dphiAvg);
354+
} else if (ChosenEventType == femto_universe_container::EventType::mixed) {
355+
histdetadpimixed[i][1]->Fill(deta, dphiAvg);
356+
} else {
357+
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed.";
358+
}
359+
}
360+
}
361+
return pass;
362+
311363
} else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) {
312364
/// Track-D0 combination
313365
// check if provided particles are in agreement with the class instantiation
@@ -534,7 +586,7 @@ class FemtoUniverseDetaDphiStar
534586
private:
535587
HistogramRegistry* mHistogramRegistry = nullptr; ///< For main output
536588
HistogramRegistry* mHistogramRegistryQA = nullptr; ///< For QA output
537-
static constexpr std::string_view DirNames[6] = {"kTrack_kTrack/", "kTrack_kV0/", "kV0_kV0/", "kTrack_kPhi/", "kTrack_kD0/", "kCascade_kCascade/"};
589+
static constexpr std::string_view DirNames[7] = {"kTrack_kTrack/", "kTrack_kV0/", "kV0_kV0/", "kTrack_kPhi/", "kTrack_kD0/", "kCascade_kCascade/", "kTrack_kCascade/"};
538590

539591
static constexpr std::string_view HistNamesSame[2][8] = {{"detadphidetadphi0BeforeSame_0", "detadphidetadphi0BeforeSame_1", "detadphidetadphi0BeforeSame_2",
540592
"detadphidetadphi0BeforeSame_3", "detadphidetadphi0BeforeSame_4", "detadphidetadphi0BeforeSame_5",

0 commit comments

Comments
 (0)