Skip to content

Commit 2a92123

Browse files
prchakraalibuild
andauthored
[PWGCF] FemtoUniverse: Checking closed-pair at vertex (#12411)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent a1389bb commit 2a92123

File tree

2 files changed

+66
-6
lines changed

2 files changed

+66
-6
lines changed

PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,47 @@ class FemtoUniverseDetaDphiStar
413413
}
414414
}
415415

416+
/// Check if pair is close or not
417+
template <typename Part>
418+
bool isClosePairAtITS(Part const& part1, Part const& part2, float lmagfield, uint8_t ChosenEventType)
419+
{
420+
magfield = lmagfield;
421+
422+
if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kTrack) {
423+
/// Track-Track combination
424+
// check if provided particles are in agreement with the class instantiation
425+
if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack) {
426+
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar instantiation! Please provide kTrack,kTrack candidates.";
427+
return false;
428+
}
429+
auto deta = part1.eta() - part2.eta();
430+
auto dphiAvg = part1.phi() - part2.phi();
431+
if (ChosenEventType == femto_universe_container::EventType::same) {
432+
histdetadpisame[0][0]->Fill(deta, dphiAvg);
433+
} else if (ChosenEventType == femto_universe_container::EventType::mixed) {
434+
histdetadpimixed[0][0]->Fill(deta, dphiAvg);
435+
} else {
436+
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed.";
437+
}
438+
439+
if (std::pow(dphiAvg, 2) / std::pow(cutDeltaPhiStarMax, 2) + std::pow(deta, 2) / std::pow(cutDeltaEtaMax, 2) < 1.) {
440+
return true;
441+
} else {
442+
if (ChosenEventType == femto_universe_container::EventType::same) {
443+
histdetadpisame[0][1]->Fill(deta, dphiAvg);
444+
} else if (ChosenEventType == femto_universe_container::EventType::mixed) {
445+
histdetadpimixed[0][1]->Fill(deta, dphiAvg);
446+
} else {
447+
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed.";
448+
}
449+
return false;
450+
}
451+
} else {
452+
LOG(fatal) << "FemtoUniversePairCleaner: Combination of objects not defined - quitting!";
453+
return false;
454+
}
455+
}
456+
416457
/// Check if pair is close or not
417458
template <typename Part>
418459
bool isClosePairFrac(Part const& part1, Part const& part2, float lmagfield, uint8_t ChosenEventType, bool IsDphiAvgOrDist, float DistMax, float FracMax)

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
185185
Configurable<bool> ConfIsFillAngqLCMS{"ConfIsFillAngqLCMS", true, "Fill qLCMS vs dEta vs dPhi"};
186186
Configurable<float> confCPRDistMax{"confCPRDistMax", 0.0, "Max. radial seperation between two closed-pairs"};
187187
Configurable<float> confCPRFracMax{"confCPRFracMax", 0.0, "Max. allowed fraction bad to all TPC points of radial seperation between two closed-pairs"};
188+
Configurable<bool> confCPRIsAtITS{"confCPRIsAtITS", false, "Close Pair Rejection at ITS or TPC"};
188189
Configurable<bool> confCPRDphiAvgOrDist{"confCPRDphiAvgOrDist", true, "Close Pair Rejection by radial or angular seperation"};
189190

190191
FemtoUniverseSHContainer<femto_universe_sh_container::EventType::same, femto_universe_sh_container::Observable::kstar> sameEventCont;
@@ -485,8 +486,14 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
485486
}
486487

487488
if (ConfIsCPR.value) {
488-
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax)) {
489-
continue;
489+
if (confCPRIsAtITS.value) {
490+
if (pairCloseRejection.isClosePairAtITS(p1, p2, magFieldTesla, femto_universe_container::EventType::same)) {
491+
continue;
492+
}
493+
} else {
494+
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax)) {
495+
continue;
496+
}
490497
}
491498
}
492499

@@ -509,8 +516,14 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
509516
}
510517

511518
if (ConfIsCPR.value) {
512-
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax)) {
513-
continue;
519+
if (confCPRIsAtITS.value) {
520+
if (pairCloseRejection.isClosePairAtITS(p1, p2, magFieldTesla, femto_universe_container::EventType::same)) {
521+
continue;
522+
}
523+
} else {
524+
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax)) {
525+
continue;
526+
}
514527
}
515528
}
516529

@@ -667,8 +680,14 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
667680
}
668681

669682
if (ConfIsCPR.value) {
670-
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::mixed, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax)) {
671-
continue;
683+
if (confCPRIsAtITS.value) {
684+
if (pairCloseRejection.isClosePairAtITS(p1, p2, magFieldTesla, femto_universe_container::EventType::same)) {
685+
continue;
686+
}
687+
} else {
688+
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax)) {
689+
continue;
690+
}
672691
}
673692
}
674693

0 commit comments

Comments
 (0)