Skip to content

Commit bd6d679

Browse files
authored
PWGCF: Update trigger (#4007)
* PWGCF: Update trigger Add options to reject tracks whose assumed PID during tracking does not correspond to the selected PID selected in the analysis. This rejection can be turned on/off with a switch and can be applied up to a configurabel p_TPC threshold. It can also be configured independently for protons and deuterons. * Fix: fix linter complaint
1 parent 421a9db commit bd6d679

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

EventFiltering/PWGCF/CFFilterAll.cxx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ static const std::vector<std::string> TPCTOFAvgName{"TPC Avg", "TOF Avg"};
9696
static const std::vector<std::string> PidCutsName{"TPC min", "TPC max", "TOF min", "TOF max", "TPCTOF max"};
9797
static const std::vector<std::string> PtCutsName{"Pt min (particle)", "Pt max (particle)", "Pt min (antiparticle)", "Pt max (antiparticle)", "P thres"};
9898
static const std::vector<std::string> MomCorCutsName{"Momemtum Correlation min", "Momemtum Correlation max"};
99+
static const std::vector<std::string> PIDForTrackingName{"Switch", "Momemtum Threshold"};
99100
static const std::vector<std::string> ThreeBodyFilterNames{"PPP", "PPL", "PLL", "LLL"};
100101
static const std::vector<std::string> TwoBodyFilterNames{"PD", "LD"};
101102
static const std::vector<std::string> ParticleNames{"PPP", "aPaPaP", "PPL", "aPaPaL", "PLL", "aPaLaL", "LLL", "aLaLaL", "PD", "aPaD", "LD", "aLaD"};
@@ -135,6 +136,9 @@ static const float NClustersMin[1][nTracks]{
135136
static const float MomCorLimits[2][nMomCorCuts] =
136137
{{-99, 99},
137138
{-99, 99}};
139+
static const float PIDForTrackingTable[2][nTracks]{
140+
{-1, 0.75},
141+
{-1, 1.2}};
138142

139143
static const float triggerSwitches[1][nAllTriggers]{
140144
{1, 1, 1, 1, 1, 1}};
@@ -383,6 +387,11 @@ struct CFFilter {
383387
"Cut on momentum correlation ratio (antipartilce)"};
384388
Configurable<bool> ConfMomCorRatioCutFlag{"ConfMomCorRatioFlag", false, "Flag for cut on momentum correlation ratio"};
385389

390+
Configurable<LabeledArray<float>> ConfPIDForTracking{
391+
"ConfPIDForTracking",
392+
{CFTrigger::PIDForTrackingTable[0], CFTrigger::nTracks, 2, CFTrigger::SpeciesName, CFTrigger::PIDForTrackingName},
393+
"Use PID used in tracking up to momentum threshold"};
394+
386395
Configurable<LabeledArray<float>> ConfPtCuts{
387396
"ConfPtCuts",
388397
{CFTrigger::ptcutsTable[0], CFTrigger::kNParticleSpecies, CFTrigger::nPtCuts, CFTrigger::SpeciesNameAll, CFTrigger::PtCutsName},
@@ -971,6 +980,22 @@ struct CFFilter {
971980
bool pThres = true;
972981
float nSigma = -999.;
973982

983+
// check tracking PID
984+
uint8_t SpeciesForTracking = 0;
985+
if (partSpecies == CFTrigger::kProton) {
986+
SpeciesForTracking = o2::track::PID::Proton;
987+
} else if (partSpecies == CFTrigger::kDeuteron) {
988+
SpeciesForTracking = o2::track::PID::Deuteron;
989+
} else {
990+
LOG(warn) << "Unknown PID for tracking encountered";
991+
}
992+
993+
if (ConfPIDForTracking->get(partSpecies, "Switch") > 0 && track.tpcInnerParam() < ConfPIDForTracking->get(partSpecies, "Momemtum Threshold")) {
994+
if (track.pidForTracking() != SpeciesForTracking) {
995+
return false;
996+
}
997+
}
998+
974999
// check momentum threshold
9751000
if (track.tpcInnerParam() <= ConfPtCuts->get(partSpecies, "P thres")) {
9761001
pThres = true;

0 commit comments

Comments
 (0)