Skip to content

Commit 834e08f

Browse files
authored
[PWGLF] Add configurable for TOF nsigma selection (#18017)
1 parent fb96939 commit 834e08f

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎PWGLF/Tasks/GlobalEventProperties/flattenictyPikp.cxx‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ struct FlattenictyPikp {
328328
Configurable<int16_t> nclPidTPCMin{"nclPidTPCMin", 130, "Minimum number of TPC PID clusters"};
329329
Configurable<float> phiCutPtMin{"phiCutPtMin", 2.0f, "Minimum pT for phi cut"};
330330
Configurable<float> tofBetaPion{"tofBetaPion", 1.0f, "Minimum beta for TOF pions"};
331-
Configurable<bool> useSelTOFBeta{"useSelTOFBeta", true, "Use selection of TOF Beta"};
331+
Configurable<bool> useSelTOFBeta{"useSelTOFBeta", true, "Apply selection of TOF Beta"};
332+
Configurable<bool> useSelTOFnSigma{"useSelTOFnSigma", false, "Apply Nsigma selection of TOF"};
332333
Configurable<float> tofBetaPiMax{"tofBetaPiMax", 5E-5, "Maximum beta for TOF pion selection"};
333334
Configurable<bool> rejectTrkAtTPCSector{"rejectTrkAtTPCSector", true, "Reject tracks close to the TPC sector boundaries"};
334335
Configurable<std::string> geoTrkCutMin{"geoTrkCutMin", "0.06/x+pi/18.0-0.06", "ROOT TF1 formula for minimum phi cut in TPC"};
@@ -973,9 +974,9 @@ struct FlattenictyPikp {
973974
if (track.length() == Cnull) {
974975
return false;
975976
}
976-
const float tTOF = track.tofSignal();
977-
const float tExpPiTOF = track.tofExpSignalPi(tTOF);
978-
if (tTOF == Cnull) {
977+
const float& tTOF = track.tofSignal();
978+
const float& tExpPiTOF = track.tofExpSignalPi(tTOF);
979+
if (tTOF <= Cnull) {
979980
return false;
980981
}
981982
registryData.fill(HIST(CprefixCleanTof) + HIST(Ccharge[chrg]) + HIST("hTofExpPi"), track.p(), tExpPiTOF / tTOF);
@@ -986,7 +987,7 @@ struct FlattenictyPikp {
986987
if (trkSelOpt.useSelTOFBeta && !isSelTOFBeta) {
987988
return false;
988989
}
989-
if (!isSelNsigmaPi) {
990+
if (trkSelOpt.useSelTOFnSigma && !isSelNsigmaPi) {
990991
return false;
991992
}
992993
registryData.fill(HIST(CprefixCleanTof) + HIST(Ccharge[chrg]) + HIST("hBetaVsP"), track.p(), track.beta());

0 commit comments

Comments
 (0)