Skip to content

Commit 0c28da7

Browse files
committed
Add flag to select circular or square deta-dphi cut
1 parent e066dde commit 0c28da7

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ class FemtoUniverseDetaDphiStar
562562

563563
/// Check if pair is close or not
564564
template <typename Part>
565-
bool isClosePairFrac(Part const& part1, Part const& part2, float lmagfield, uint8_t ChosenEventType, bool IsDphiAvgOrDist, float DistMax, float FracMax)
565+
bool isClosePairFrac(Part const& part1, Part const& part2, float lmagfield, uint8_t ChosenEventType, bool IsDphiAvgOrDist, float DistMax, float FracMax, bool CircCut)
566566
{
567567
magfield = lmagfield;
568568

@@ -585,7 +585,9 @@ class FemtoUniverseDetaDphiStar
585585
}
586586

587587
if (IsDphiAvgOrDist) {
588-
if ((dphiAvg > cutDeltaPhiStarMin) && (dphiAvg < cutDeltaPhiStarMax) && (deta > cutDeltaEtaMin) && (deta < cutDeltaEtaMax)) {
588+
if (CircCut && (std::pow(dphiAvg, 2) / std::pow(cutDeltaPhiStarMax, 2) + std::pow(deta, 2) / std::pow(cutDeltaEtaMax, 2) < 1.)) {
589+
return true;
590+
} else if (!CircCut && (dphiAvg > cutDeltaPhiStarMin) && (dphiAvg < cutDeltaPhiStarMax) && (deta > cutDeltaEtaMin) && (deta < cutDeltaEtaMax)) {
589591
return true;
590592
} else {
591593
if (ChosenEventType == femto_universe_container::EventType::same) {

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
201201
Configurable<float> confCPRFracMax{"confCPRFracMax", 0.0, "Max. allowed fraction bad to all TPC points of radial seperation between two closed-pairs"};
202202
Configurable<bool> confCPRIsAtITS{"confCPRIsAtITS", false, "Close Pair Rejection at ITS or TPC"};
203203
Configurable<bool> confCPRDphiAvgOrDist{"confCPRDphiAvgOrDist", true, "Close Pair Rejection by radial or angular seperation"};
204+
Configurable<bool> confIsCircularCut{"confIsCircularCut", true, "Close Pair Rejection by circular cut"};
204205

205206
FemtoUniverseSHContainer<femto_universe_sh_container::EventType::same, femto_universe_sh_container::Observable::kstar> sameEventCont;
206207
FemtoUniverseSHContainer<femto_universe_sh_container::EventType::mixed, femto_universe_sh_container::Observable::kstar> mixedEventCont;
@@ -521,7 +522,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
521522
continue;
522523
}
523524
} else {
524-
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax)) {
525+
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax, confIsCircularCut)) {
525526
continue;
526527
}
527528
}
@@ -551,7 +552,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
551552
continue;
552553
}
553554
} else {
554-
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax)) {
555+
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::same, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax, confIsCircularCut)) {
555556
continue;
556557
}
557558
}
@@ -872,7 +873,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
872873
continue;
873874
}
874875
} else {
875-
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::mixed, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax)) {
876+
if (pairCloseRejection.isClosePairFrac(p1, p2, magFieldTesla, femto_universe_container::EventType::mixed, confCPRDphiAvgOrDist, confCPRDistMax, confCPRFracMax, confIsCircularCut)) {
876877
continue;
877878
}
878879
}

0 commit comments

Comments
 (0)