Skip to content

Commit be3b919

Browse files
sawankumawatSawan Sawan
andauthored
[PWGLF] Added cuts on particle mother (#12323)
Co-authored-by: Sawan Sawan <sawan.sawan@cern.ch>
1 parent febce25 commit be3b919

File tree

1 file changed

+52
-2
lines changed

1 file changed

+52
-2
lines changed

PWGLF/Tasks/Resonances/kstarqa.cxx

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ struct Kstarqa {
102102
Configurable<float> cfgRCRFC{"cfgRCRFC", 0.8f, "Crossed Rows to Findable Clusters"};
103103
Configurable<float> cfgITSChi2NCl{"cfgITSChi2NCl", 36.0, "ITS Chi2/NCl"};
104104
Configurable<float> cfgTPCChi2NCl{"cfgTPCChi2NCl", 4.0, "TPC Chi2/NCl"};
105+
Configurable<bool> cfgUseITSTPCRefit{"cfgUseITSTPCRefit", false, "Require ITS Refit"};
106+
107+
// cuts on mother
108+
Configurable<bool> isApplyCutsOnMother{"isApplyCutsOnMother", false, "Enable additional cuts on Kstar mother"};
109+
Configurable<float> cMaxPtMotherCut{"cMaxPtMotherCut", 15.0, "Maximum pt of mother cut"};
110+
Configurable<float> cMaxMinvMotherCut{"cMaxMinvMotherCut", 1.5, "Maximum mass of mother cut"};
105111

106112
// Other fixed variables
107113
float lowPtCutPID = 0.5;
@@ -405,8 +411,31 @@ struct Kstarqa {
405411
template <typename T>
406412
bool selectionTrack(const T& candidate)
407413
{
408-
if (selectionConfig.isGlobalTracks && !(candidate.isGlobalTrackWoDCA() && candidate.isPVContributor() && std::abs(candidate.dcaXY()) < selectionConfig.cfgCutDCAxy && std::abs(candidate.dcaZ()) < selectionConfig.cfgCutDCAz && candidate.itsNCls() > selectionConfig.cfgITScluster && candidate.tpcNClsFound() > selectionConfig.cfgTPCcluster && std::abs(candidate.eta()) < selectionConfig.cfgCutEta && std::abs(candidate.pt()) > selectionConfig.cfgCutPT)) {
409-
return false;
414+
if (selectionConfig.isGlobalTracks) {
415+
if (!candidate.isGlobalTrackWoDCA())
416+
return false;
417+
if (std::abs(candidate.pt()) < selectionConfig.cfgCutPT)
418+
return false;
419+
if (std::abs(candidate.eta()) > selectionConfig.cfgCutEta)
420+
return false;
421+
if (std::abs(candidate.dcaXY()) > selectionConfig.cfgCutDCAxy)
422+
return false;
423+
if (std::abs(candidate.dcaZ()) > selectionConfig.cfgCutDCAz)
424+
return false;
425+
if (candidate.tpcCrossedRowsOverFindableCls() < selectionConfig.cfgRCRFC)
426+
return false;
427+
if (candidate.itsNCls() < selectionConfig.cfgITScluster)
428+
return false;
429+
if (candidate.tpcNClsFound() < selectionConfig.cfgTPCcluster)
430+
return false;
431+
if (candidate.itsChi2NCl() >= selectionConfig.cfgITSChi2NCl)
432+
return false;
433+
if (candidate.tpcChi2NCl() >= selectionConfig.cfgTPCChi2NCl)
434+
return false;
435+
if (selectionConfig.cfgPVContributor && !candidate.isPVContributor())
436+
return false;
437+
if (selectionConfig.cfgUseITSTPCRefit && (!(o2::aod::track::ITSrefit) || !(o2::aod::track::TPCrefit)))
438+
return false;
410439
} else if (!selectionConfig.isGlobalTracks) {
411440
if (std::abs(candidate.pt()) < selectionConfig.cfgCutPT)
412441
return false;
@@ -944,6 +973,13 @@ struct Kstarqa {
944973
daughter2 = ROOT::Math::PxPyPzMVector(track2.px(), track2.py(), track2.pz(), massPi);
945974
mother = daughter1 + daughter2; // Kstar meson
946975

976+
if (selectionConfig.isApplyCutsOnMother) {
977+
if (mother.Pt() >= selectionConfig.cMaxPtMotherCut) // excluding candidates in overflow
978+
continue;
979+
if (mother.M() >= selectionConfig.cMaxMinvMotherCut) // excluding candidates in overflow
980+
continue;
981+
}
982+
947983
hOthers.fill(HIST("hKstar_Rap"), mother.Rapidity());
948984
hOthers.fill(HIST("hKstar_Eta"), mother.Eta());
949985

@@ -1104,6 +1140,13 @@ struct Kstarqa {
11041140
continue;
11051141
}
11061142

1143+
if (selectionConfig.isApplyCutsOnMother) {
1144+
if (mcParticle.pt() >= selectionConfig.cMaxPtMotherCut) // excluding candidates in overflow
1145+
continue;
1146+
if ((std::sqrt(mcParticle.e() * mcParticle.e() - mcParticle.p() * mcParticle.p())) >= selectionConfig.cMaxMinvMotherCut) // excluding candidates in overflow
1147+
continue;
1148+
}
1149+
11071150
if (std::abs(mcParticle.pdgCode()) != o2::constants::physics::kK0Star892) {
11081151
continue;
11091152
}
@@ -1349,6 +1392,13 @@ struct Kstarqa {
13491392
}
13501393
}
13511394

1395+
if (selectionConfig.isApplyCutsOnMother) {
1396+
if (mothertrack1.pt() >= selectionConfig.cMaxPtMotherCut) // excluding candidates in overflow
1397+
continue;
1398+
if ((std::sqrt(mothertrack1.e() * mothertrack1.e() - mothertrack1.p() * mothertrack1.p())) >= selectionConfig.cMaxMinvMotherCut) // excluding candidates in overflow
1399+
continue;
1400+
}
1401+
13521402
if (avoidsplitrackMC && oldindex == mothertrack1.globalIndex()) {
13531403
hInvMass.fill(HIST("h1KSRecsplit"), mothertrack1.pt());
13541404
continue;

0 commit comments

Comments
 (0)