@@ -88,6 +88,7 @@ struct Kstarqa {
8888 Configurable<int > cRotations{" cRotations" , 3 , " Number of random rotations in the rotational background" };
8989 Configurable<int > cSelectMultEstimator{" cSelectMultEstimator" , 0 , " Select multiplicity estimator: 0 - FT0M, 1 - FT0A, 2 - FT0C" };
9090 Configurable<bool > applyRecMotherRapidity{" applyRecMotherRapidity" , true , " Apply rapidity cut on reconstructed mother track" };
91+ Configurable<bool > applypTdepPID{" applypTdepPID" , false , " Apply pT dependent PID" };
9192
9293 // Configurables for track selections
9394 Configurable<int > rotationalCut{" rotationalCut" , 10 , " Cut value (Rotation angle pi - pi/cut and pi + pi/cut)" };
@@ -96,16 +97,15 @@ struct Kstarqa {
9697 Configurable<float > cfgCutDCAxy{" cfgCutDCAxy" , 2 .0f , " DCAxy range for tracks" };
9798 Configurable<float > cfgCutDCAz{" cfgCutDCAz" , 2 .0f , " DCAz range for tracks" };
9899 Configurable<int > cfgNoMixedEvents{" cfgNoMixedEvents" , 5 , " Number of mixed events per event" };
99- Configurable<bool > ismanualDCAcut{ " ismanualDCAcut " , true , " ismanualDCAcut " };
100+ Configurable<bool > isGlobalTracks{ " isGlobalTracks " , true , " isGlobalTracks " };
100101 Configurable<int > cfgITScluster{" cfgITScluster" , 0 , " Number of ITS cluster" };
101102 Configurable<int > cfgTPCcluster{" cfgTPCcluster" , 70 , " Number of TPC cluster" };
102103 Configurable<float > cfgRCRFC{" cfgRCRFC" , 0 .8f , " Crossed Rows to Findable Clusters" };
103104 Configurable<float > cfgITSChi2NCl{" cfgITSChi2NCl" , 36.0 , " ITS Chi2/NCl" };
104105 Configurable<float > cfgTPCChi2NCl{" cfgTPCChi2NCl" , 4.0 , " TPC Chi2/NCl" };
105- Configurable<bool > cfgPVContributor{" cfgPVContributor" , false , " PV contributor track selection" }; // PV Contriuibutor
106- Configurable<bool > cfgPrimaryTrack{" cfgPrimaryTrack" , false , " Primary track selection" }; // kGoldenChi2 | kDCAxy | kDCAz
107- Configurable<bool > cfgGlobalWoDCATrack{" cfgGlobalWoDCATrack" , false , " Global track selection without DCA" }; // kQualityTracks (kTrackType | kTPCNCls | kTPCCrossedRows | kTPCCrossedRowsOverNCls | kTPCChi2NDF | kTPCRefit | kITSNCls | kITSChi2NDF | kITSRefit | kITSHits) | kInAcceptanceTracks (kPtRange | kEtaRange)
108- Configurable<bool > cfgGlobalTrack{" cfgGlobalTrack" , false , " Global track selection" }; // kGoldenChi2 | kDCAxy | kDCAz
106+ Configurable<bool > cfgPVContributor{" cfgPVContributor" , false , " PV contributor track selection" }; // PV Contriuibutor
107+ Configurable<bool > cfgPrimaryTrack{" cfgPrimaryTrack" , false , " Primary track selection" }; // kGoldenChi2 | kDCAxy | kDCAz
108+ // Configurable<bool> cfgGlobalWoDCATrack{"cfgGlobalWoDCATrack", false, "Global track selection without DCA"}; // kQualityTracks (kTrackType | kTPCNCls | kTPCCrossedRows | kTPCCrossedRowsOverNCls | kTPCChi2NDF | kTPCRefit | kITSNCls | kITSChi2NDF | kITSRefit | kITSHits) | kInAcceptanceTracks (kPtRange | kEtaRange)
109109 Configurable<float > cBetaCutTOF{" cBetaCutTOF" , 0.0 , " cut TOF beta" };
110110 Configurable<bool > cFakeTrack{" cFakeTrack" , true , " Fake track selection" };
111111 Configurable<float > cFakeTrackCutKa{" cFakeTrackCutKa" , 0.5 , " Cut based on momentum difference in global and TPC tracks for Kaons" };
@@ -232,9 +232,9 @@ struct Kstarqa {
232232 template <typename T>
233233 bool selectionTrack (const T& candidate)
234234 {
235- if (ismanualDCAcut && !(candidate.isGlobalTrackWoDCA () && candidate.isPVContributor () && std::abs (candidate.dcaXY ()) < cfgCutDCAxy && std::abs (candidate.dcaZ ()) < cfgCutDCAz && candidate.itsNCls () > cfgITScluster)) {
235+ if (isGlobalTracks && !(candidate.isGlobalTrackWoDCA () && candidate.isPVContributor () && std::abs (candidate.dcaXY ()) < cfgCutDCAxy && std::abs (candidate.dcaZ ()) < cfgCutDCAz && candidate.itsNCls () > cfgITScluster) && candidate. tpcNClsFound () > cfgTPCcluster ) {
236236 return false ;
237- } else if (!ismanualDCAcut ) {
237+ } else if (!isGlobalTracks ) {
238238 if (std::abs (candidate.pt ()) < cfgCutPT)
239239 return false ;
240240 if (std::abs (candidate.dcaXY ()) > cfgCutDCAxy)
@@ -255,10 +255,6 @@ struct Kstarqa {
255255 return false ;
256256 if (cfgPrimaryTrack && !candidate.isPrimaryTrack ())
257257 return false ;
258- if (cfgGlobalWoDCATrack && !candidate.isGlobalTrackWoDCA ())
259- return false ;
260- if (cfgGlobalTrack && !candidate.isGlobalTrack ())
261- return false ;
262258 }
263259
264260 return true ;
@@ -333,6 +329,34 @@ struct Kstarqa {
333329 return false ;
334330 }
335331
332+ template <typename T>
333+ bool selectionPIDNew (const T& candidate, int PID)
334+ {
335+ if (PID == 0 ) {
336+ if (candidate.pt () < 0.5 && TMath::Abs (candidate.tpcNSigmaPi ()) < nsigmaCutTPCPi) {
337+ return true ;
338+ }
339+ if (candidate.pt () >= 0.5 && TMath::Abs (candidate.tpcNSigmaPi ()) < nsigmaCutTPCPi && candidate.hasTOF () && TMath::Abs (candidate.tofNSigmaPi ()) < nsigmaCutTOFPi) {
340+ return true ;
341+ }
342+ if (candidate.pt () >= 0.5 && TMath::Abs (candidate.tpcNSigmaPi ()) < nsigmaCutTPCPi && !candidate.hasTOF ()) {
343+ return true ;
344+ }
345+ } else if (PID == 1 ) {
346+ if (candidate.pt () < 0.5 && TMath::Abs (candidate.tpcNSigmaKa ()) < nsigmaCutTPCKa) {
347+ return true ;
348+ }
349+ if (candidate.pt () >= 0.5 && TMath::Abs (candidate.tpcNSigmaKa ()) < nsigmaCutTPCKa && candidate.hasTOF () && TMath::Abs (candidate.tofNSigmaKa ()) < nsigmaCutTOFKa) {
350+ return true ;
351+ }
352+ if (candidate.pt () >= 0.5 && TMath::Abs (candidate.tpcNSigmaKa ()) < nsigmaCutTPCKa && !candidate.hasTOF ()) {
353+ return true ;
354+ }
355+ }
356+
357+ return false ;
358+ }
359+
336360 // template <typename T>
337361 // bool cMIDselectionPID(const T& candidate, int PID)
338362 // {
@@ -647,9 +671,14 @@ struct Kstarqa {
647671 }
648672
649673 // since we are using combinations full index policy, so repeated pairs are allowed, so we can check one with Kaon and other with pion
650- if (!selectionPID (track1, 1 )) // Track 1 is checked with Kaon
674+ if (!applypTdepPID && ! selectionPID (track1, 1 )) // Track 1 is checked with Kaon
651675 continue ;
652- if (!selectionPID (track2, 0 )) // Track 2 is checked with Pion
676+ if (!applypTdepPID && !selectionPID (track2, 0 )) // Track 2 is checked with Pion
677+ continue ;
678+
679+ if (applypTdepPID && !selectionPIDNew (track1, 1 )) // Track 1 is checked with Kaon
680+ continue ;
681+ if (applypTdepPID && !selectionPIDNew (track2, 0 )) // Track 2 is checked with Pion
653682 continue ;
654683
655684 rEventSelection.fill (HIST (" events_check_data" ), 6.5 );
@@ -991,11 +1020,15 @@ struct Kstarqa {
9911020 }
9921021
9931022 if (track1PDG == 211 ) {
994- if (!(selectionPID (track1, 0 ) && selectionPID (track2, 1 ))) { // pion and kaon
1023+ if (!applypTdepPID && !(selectionPID (track1, 0 ) && selectionPID (track2, 1 ))) { // pion and kaon
1024+ continue ;
1025+ } else if (applypTdepPID && !(selectionPIDNew (track1, 0 ) && selectionPIDNew (track2, 1 ))) { // pion and kaon
9951026 continue ;
9961027 }
9971028 } else {
998- if (!(selectionPID (track1, 1 ) && selectionPID (track2, 0 ))) { // kaon and pion
1029+ if (!applypTdepPID && !(selectionPID (track1, 1 ) && selectionPID (track2, 0 ))) { // kaon and pion
1030+ continue ;
1031+ } else if (applypTdepPID && !(selectionPIDNew (track1, 1 ) && selectionPIDNew (track2, 0 ))) { // kaon and pion
9991032 continue ;
10001033 }
10011034 }
0 commit comments