Skip to content

Commit 55c0eb8

Browse files
EloviyoShirajum Monira
andauthored
[PWGCF] FemtoUniverse cascade task -- added cascade-cascade Close Pair Rejection (#9753)
Co-authored-by: Shirajum Monira <shirajum.monira@cernch>
1 parent 2e8e5b7 commit 55c0eb8

File tree

1 file changed

+89
-13
lines changed

1 file changed

+89
-13
lines changed

PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

Lines changed: 89 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/// \author Laura Serksnyte, TU München, laura.serksnyte@tum.de
1515
/// \author Zuzanna Chochulska, WUT Warsaw & CTU Prague, zchochul@cern.ch
1616
/// \author Pritam Chakraborty, WUT Warsaw, pritam.chakraborty@cern.ch
17+
/// \author Shirajum Monira, WUT Warsaw, shirajum.monira@cern.ch
1718

1819
#ifndef PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEDETADPHISTAR_H_
1920
#define PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEDETADPHISTAR_H_
@@ -102,6 +103,21 @@ class FemtoUniverseDetaDphiStar
102103
}
103104
}
104105
}
106+
if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kCascade && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) {
107+
/// Xi-Xi and Omega-Omega combination
108+
for (int k = 0; k < 7; k++) {
109+
std::string dirName = static_cast<std::string>(DirNames[5]);
110+
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}});
111+
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}});
112+
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}});
113+
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}});
114+
if (plotForEveryRadii) {
115+
for (int l = 0; l < 9; l++) {
116+
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}});
117+
}
118+
}
119+
}
120+
}
105121
if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) {
106122
for (int i = 0; i < 2; i++) {
107123
std::string dirName = static_cast<std::string>(DirNames[3]);
@@ -209,7 +225,6 @@ class FemtoUniverseDetaDphiStar
209225

210226
} else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kV0 && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) {
211227
/// V0-V0 combination
212-
// check if provided particles are in agreement with the class instantiation
213228
if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0 || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0) {
214229
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar instantiation! Please provide kV0,kV0 candidates.";
215230
return false;
@@ -246,6 +261,44 @@ class FemtoUniverseDetaDphiStar
246261
}
247262
return pass;
248263

264+
} else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kCascade && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) {
265+
/// Xi-Xi and Omega-Omega combination
266+
if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kCascade || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kCascade) {
267+
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar instantiation! Please provide kCascade,kCascade candidates.";
268+
return false;
269+
}
270+
271+
bool pass = false;
272+
static constexpr int CascChildTable[][2] = {{-1, -1}, {-1, -2}, {-1, -3}, {-2, -2}, {-3, -3}, {-2, -1}, {-3, -1}};
273+
for (int i = 0; i < 5; i++) {
274+
auto indexOfDaughterpart1 = (ChosenEventType == femto_universe_container::EventType::mixed ? part1.globalIndex() : part1.index()) + CascChildTable[i][0];
275+
auto indexOfDaughterpart2 = (ChosenEventType == femto_universe_container::EventType::mixed ? part2.globalIndex() : part2.index()) + CascChildTable[i][1];
276+
auto daughterpart1 = particles.begin() + indexOfDaughterpart1;
277+
auto daughterpart2 = particles.begin() + indexOfDaughterpart2;
278+
auto deta = daughterpart1.eta() - daughterpart2.eta();
279+
auto dphiAvg = averagePhiStar(*daughterpart1, *daughterpart2, i);
280+
if (ChosenEventType == femto_universe_container::EventType::same) {
281+
histdetadpisame[i][0]->Fill(deta, dphiAvg);
282+
} else if (ChosenEventType == femto_universe_container::EventType::mixed) {
283+
histdetadpimixed[i][0]->Fill(deta, dphiAvg);
284+
} else {
285+
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed.";
286+
}
287+
288+
if ((dphiAvg > cutDeltaPhiStarMin) && (dphiAvg < cutDeltaPhiStarMax) && (deta > cutDeltaEtaMin) && (deta < cutDeltaEtaMax)) {
289+
pass = true;
290+
} else {
291+
if (ChosenEventType == femto_universe_container::EventType::same) {
292+
histdetadpisame[i][1]->Fill(deta, dphiAvg);
293+
} else if (ChosenEventType == femto_universe_container::EventType::mixed) {
294+
histdetadpimixed[i][1]->Fill(deta, dphiAvg);
295+
} else {
296+
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed.";
297+
}
298+
}
299+
}
300+
return pass;
301+
249302
} else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) {
250303
/// Track-D0 combination
251304
// check if provided particles are in agreement with the class instantiation
@@ -354,19 +407,42 @@ class FemtoUniverseDetaDphiStar
354407
private:
355408
HistogramRegistry* mHistogramRegistry = nullptr; ///< For main output
356409
HistogramRegistry* mHistogramRegistryQA = nullptr; ///< For QA output
357-
static constexpr std::string_view DirNames[5] = {"kTrack_kTrack/", "kTrack_kV0/", "kV0_kV0/", "kTrack_kPhi/", "kTrack_kD0/"};
358-
359-
static constexpr std::string_view HistNamesSame[2][2] = {{"detadphidetadphi0BeforeSame_0", "detadphidetadphi0BeforeSame_1"},
360-
{"detadphidetadphi0AfterSame_0", "detadphidetadphi0AfterSame_1"}};
361-
static constexpr std::string_view HistNamesMixed[2][2] = {{"detadphidetadphi0BeforeMixed_0", "detadphidetadphi0BeforeMixed_1"},
362-
{"detadphidetadphi0AfterMixed_0", "detadphidetadphi0AfterMixed_1"}};
363-
364-
static constexpr std::string_view HistNamesRadii[2][9] = {{"detadphidetadphi0Before_0_0", "detadphidetadphi0Before_0_1", "detadphidetadphi0Before_0_2",
410+
static constexpr std::string_view DirNames[6] = {"kTrack_kTrack/", "kTrack_kV0/", "kV0_kV0/", "kTrack_kPhi/", "kTrack_kD0/", "kCascade_kCascade/"};
411+
412+
static constexpr std::string_view HistNamesSame[2][7] = {{"detadphidetadphi0BeforeSame_0", "detadphidetadphi0BeforeSame_1", "detadphidetadphi0BeforeSame_2",
413+
"detadphidetadphi0BeforeSame_3", "detadphidetadphi0BeforeSame_4", "detadphidetadphi0BeforeSame_5",
414+
"detadphidetadphi0BeforeSame_6"},
415+
{"detadphidetadphi0AfterSame_0", "detadphidetadphi0AfterSame_1", "detadphidetadphi0AfterSame_2",
416+
"detadphidetadphi0AfterSame_3", "detadphidetadphi0AfterSame_4", "detadphidetadphi0AfterSame_5",
417+
"detadphidetadphi0AfterSame_6"}};
418+
static constexpr std::string_view HistNamesMixed[2][7] = {{"detadphidetadphi0BeforeMixed_0", "detadphidetadphi0BeforeMixed_1", "detadphidetadphi0BeforeMixed_2",
419+
"detadphidetadphi0BeforeMixed_3", "detadphidetadphi0BeforeMixed_4", "detadphidetadphi0BeforeMixed_5",
420+
"detadphidetadphi0BeforeMixed_6"},
421+
{"detadphidetadphi0AfterMixed_0", "detadphidetadphi0AfterMixed_1", "detadphidetadphi0AfterMixed_2",
422+
"detadphidetadphi0AfterMixed_3", "detadphidetadphi0AfterMixed_4", "detadphidetadphi0AfterMixed_5",
423+
"detadphidetadphi0AfterMixed_6"}};
424+
425+
static constexpr std::string_view HistNamesRadii[7][9] = {{"detadphidetadphi0Before_0_0", "detadphidetadphi0Before_0_1", "detadphidetadphi0Before_0_2",
365426
"detadphidetadphi0Before_0_3", "detadphidetadphi0Before_0_4", "detadphidetadphi0Before_0_5",
366427
"detadphidetadphi0Before_0_6", "detadphidetadphi0Before_0_7", "detadphidetadphi0Before_0_8"},
367428
{"detadphidetadphi0Before_1_0", "detadphidetadphi0Before_1_1", "detadphidetadphi0Before_1_2",
368429
"detadphidetadphi0Before_1_3", "detadphidetadphi0Before_1_4", "detadphidetadphi0Before_1_5",
369-
"detadphidetadphi0Before_1_6", "detadphidetadphi0Before_1_7", "detadphidetadphi0Before_1_8"}};
430+
"detadphidetadphi0Before_1_6", "detadphidetadphi0Before_1_7", "detadphidetadphi0Before_1_8"},
431+
{"detadphidetadphi0Before_2_0", "detadphidetadphi0Before_2_1", "detadphidetadphi0Before_2_2",
432+
"detadphidetadphi0Before_2_3", "detadphidetadphi0Before_2_4", "detadphidetadphi0Before_2_5",
433+
"detadphidetadphi0Before_2_6", "detadphidetadphi0Before_2_7", "detadphidetadphi0Before_2_8"},
434+
{"detadphidetadphi0Before_3_0", "detadphidetadphi0Before_3_1", "detadphidetadphi0Before_3_2",
435+
"detadphidetadphi0Before_3_3", "detadphidetadphi0Before_3_4", "detadphidetadphi0Before_3_5",
436+
"detadphidetadphi0Before_3_6", "detadphidetadphi0Before_3_7", "detadphidetadphi0Before_3_8"},
437+
{"detadphidetadphi0Before_4_0", "detadphidetadphi0Before_4_1", "detadphidetadphi0Before_4_2",
438+
"detadphidetadphi0Before_4_3", "detadphidetadphi0Before_4_4", "detadphidetadphi0Before_4_5",
439+
"detadphidetadphi0Before_4_6", "detadphidetadphi0Before_4_7", "detadphidetadphi0Before_4_8"},
440+
{"detadphidetadphi0Before_5_0", "detadphidetadphi0Before_5_1", "detadphidetadphi0Before_5_2",
441+
"detadphidetadphi0Before_5_3", "detadphidetadphi0Before_5_4", "detadphidetadphi0Before_5_5",
442+
"detadphidetadphi0Before_5_6", "detadphidetadphi0Before_5_7", "detadphidetadphi0Before_5_8"},
443+
{"detadphidetadphi0Before_6_0", "detadphidetadphi0Before_6_1", "detadphidetadphi0Before_6_2",
444+
"detadphidetadphi0Before_6_3", "detadphidetadphi0Before_6_4", "detadphidetadphi0Before_6_5",
445+
"detadphidetadphi0Before_6_6", "detadphidetadphi0Before_6_7", "detadphidetadphi0Before_6_8"}};
370446

371447
static constexpr o2::aod::femtouniverseparticle::ParticleType kPartOneType = partOne; ///< Type of particle 1
372448
static constexpr o2::aod::femtouniverseparticle::ParticleType kPartTwoType = partTwo; ///< Type of particle 2
@@ -387,9 +463,9 @@ class FemtoUniverseDetaDphiStar
387463
float cutPhiInvMassLow;
388464
float cutPhiInvMassHigh;
389465

390-
std::array<std::array<std::shared_ptr<TH2>, 2>, 2> histdetadpisame{};
391-
std::array<std::array<std::shared_ptr<TH2>, 2>, 2> histdetadpimixed{};
392-
std::array<std::array<std::shared_ptr<TH2>, 9>, 2> histdetadpiRadii{};
466+
std::array<std::array<std::shared_ptr<TH2>, 2>, 7> histdetadpisame{};
467+
std::array<std::array<std::shared_ptr<TH2>, 2>, 7> histdetadpimixed{};
468+
std::array<std::array<std::shared_ptr<TH2>, 9>, 7> histdetadpiRadii{};
393469

394470
/// Calculate phi at all required radii stored in TmpRadiiTPC
395471
/// Magnetic field to be provided in Tesla

0 commit comments

Comments
 (0)