Skip to content

Commit 8e36764

Browse files
authored
[PWGCF] FemtoUniverse: Add option to choose rectangular or elliptic CPR cut for V0V0 pair (#13905)
1 parent bc00ec9 commit 8e36764

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class FemtoUniverseDetaDphiStar
213213
}
214214

215215
/// Check if pair is close or not
216-
template <typename Part, typename Parts>
216+
template <bool V0V0rect = true, typename Part, typename Parts>
217217
bool isClosePair(Part const& part1, Part const& part2, Parts const& particles, float lmagfield, uint8_t ChosenEventType)
218218
{
219219
magfield = lmagfield;
@@ -307,8 +307,9 @@ class FemtoUniverseDetaDphiStar
307307
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed.";
308308
}
309309

310-
// if (std::pow(dphiAvg, 2) / std::pow(cutDeltaPhiStarMax, 2) + std::pow(deta, 2) / std::pow(cutDeltaEtaMax, 2) < 1.) {
311-
if ((dphiAvg > cutDeltaPhiStarMin) && (dphiAvg < cutDeltaPhiStarMax) && (deta > cutDeltaEtaMin) && (deta < cutDeltaEtaMax)) {
310+
if (V0V0rect && (dphiAvg > cutDeltaPhiStarMin) && (dphiAvg < cutDeltaPhiStarMax) && (deta > cutDeltaEtaMin) && (deta < cutDeltaEtaMax)) {
311+
pass = true;
312+
} else if (!V0V0rect && std::pow(dphiAvg, 2) / std::pow(cutDeltaPhiStarMax, 2) + std::pow(deta, 2) / std::pow(cutDeltaEtaMax, 2) < 1.) {
312313
pass = true;
313314
} else {
314315
if (ChosenEventType == femto_universe_container::EventType::same) {
@@ -321,7 +322,6 @@ class FemtoUniverseDetaDphiStar
321322
}
322323
}
323324
return pass;
324-
325325
} else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kCascade && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) {
326326
/// Cascade-Cascade combination
327327
if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kCascade || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kCascade) {
@@ -361,7 +361,6 @@ class FemtoUniverseDetaDphiStar
361361
}
362362
}
363363
return pass;
364-
365364
} else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) {
366365
/// Track-Cascade combination
367366
if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kCascade) {
@@ -398,7 +397,6 @@ class FemtoUniverseDetaDphiStar
398397
}
399398
}
400399
return pass;
401-
402400
} else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kV0 && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) {
403401
/// V0-Cascade combination
404402
if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0 || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kCascade) {
@@ -438,7 +436,6 @@ class FemtoUniverseDetaDphiStar
438436
}
439437
}
440438
return pass;
441-
442439
} else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) {
443440
/// Track-D0 combination
444441
// check if provided particles are in agreement with the class instantiation

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
133133
ConfigurableAxis confkTBins{"confkTBins", {150, 0., 9.}, "binning kT"};
134134
ConfigurableAxis confmTBins{"confmTBins", {225, 0., 7.5}, "binning mT"};
135135
Configurable<bool> confIsCPR{"confIsCPR", true, "Close Pair Rejection"};
136+
Configurable<bool> confRectV0V0CPR{"confRectV0V0CPR", true, "Enable rectangular CPR cut for V0-V0 pairs"};
136137
Configurable<bool> confCPRPlotPerRadii{"confCPRPlotPerRadii", false, "Plot CPR per radii"};
137138
Configurable<float> confCPRdeltaPhiCutMax{"confCPRdeltaPhiCutMax", 0.0, "Delta Phi max cut for Close Pair Rejection"};
138139
Configurable<float> confCPRdeltaPhiCutMin{"confCPRdeltaPhiCutMin", 0.0, "Delta Phi min cut for Close Pair Rejection"};
@@ -441,7 +442,9 @@ struct FemtoUniversePairTaskTrackV0Extended {
441442
return;
442443
}
443444
if (confIsCPR.value) {
444-
if (pairCloseRejectionV0.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
445+
if (confRectV0V0CPR && pairCloseRejectionV0.isClosePair<true>(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
446+
return;
447+
} else if (!confRectV0V0CPR && pairCloseRejectionV0.isClosePair<false>(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
445448
return;
446449
}
447450
}
@@ -732,7 +735,9 @@ struct FemtoUniversePairTaskTrackV0Extended {
732735
continue;
733736
}
734737
if (confIsCPR.value) {
735-
if (pairCloseRejectionV0.isClosePair(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
738+
if (confRectV0V0CPR && pairCloseRejectionV0.isClosePair<true>(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
739+
continue;
740+
} else if (!confRectV0V0CPR && pairCloseRejectionV0.isClosePair<false>(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
736741
continue;
737742
}
738743
}

0 commit comments

Comments
 (0)