@@ -64,7 +64,6 @@ struct DedxAnalysis {
6464 float invMassCutGamma = 0.0015 ;
6565 float magField = 1 ;
6666 float pTcut = 2.0 ;
67- float nclCut = 120.0 ;
6867
6968 // Configurable Parameters
7069 // Tracks cuts
@@ -100,6 +99,8 @@ struct DedxAnalysis {
10099 " Minimum Mass Gamma" };
101100 Configurable<float > maxMassGamma{" maxMassGamma" , 0 .002022f ,
102101 " Maximum Mass Gamma" };
102+ Configurable<float > nclCut{" nclCut" , 135 .0f ,
103+ " ncl Cut" };
103104 Configurable<bool > calibrationMode{" calibrationMode" , false , " calibration mode" };
104105 Configurable<bool > additionalCuts{" additionalCuts" , true , " additional cuts" };
105106 // Histograms names
@@ -555,6 +556,38 @@ struct DedxAnalysis {
555556 return true ;
556557 }
557558
559+ // Phi cut Secondaries
560+ template <typename T>
561+ bool passedPhiCutSecondaries (const T& trk, float magField, const TF1& fphiCutLow, const TF1& fphiCutHigh)
562+ {
563+ float pt = trk.pt ();
564+ float phi = trk.phi ();
565+ int charge = trk.sign ();
566+ auto nTPCCl = trk.tpcNClsFindable () - trk.tpcNClsFindableMinusFound ();
567+
568+ if (pt < pTcut)
569+ return true ;
570+
571+ if (magField < 0 ) // for negatve polarity field
572+ phi = o2::constants::math::TwoPI - phi;
573+ if (charge < 0 ) // for negatve charge
574+ phi = o2::constants::math::TwoPI - phi;
575+
576+ // to center gap in the middle
577+ phi += o2::constants::math::PI / 18 .0f ;
578+ phi = std::fmod (phi, o2::constants::math::PI / 9 .0f );
579+
580+ // cut phi
581+ if (phi < fphiCutHigh.Eval (pt) && phi > fphiCutLow.Eval (pt))
582+ return false ; // reject track
583+
584+ // cut Ncl
585+ if (nTPCCl < nclCut)
586+ return false ;
587+
588+ return true ;
589+ }
590+
558591 // Process Data
559592 void process (SelectedCollisions::iterator const & collision,
560593 aod::V0Datas const & fullV0s, PIDTracks const & tracks)
@@ -590,7 +623,7 @@ struct DedxAnalysis {
590623 if (!mySelectionPrim.IsSelected (trk))
591624 continue ;
592625
593- // phi cut
626+ // phi and Ncl cut
594627 if (!passedPhiCut (trk, magField, *fphiCutLow, *fphiCutHigh))
595628 continue ;
596629
@@ -702,6 +735,12 @@ struct DedxAnalysis {
702735 continue ;
703736 if (!negTrack.passedTPCRefit ())
704737 continue ;
738+ // phi and Ncl cut
739+ if (!passedPhiCutSecondaries (posTrack, magField, *fphiCutLow, *fphiCutHigh))
740+ continue ;
741+
742+ if (!passedPhiCutSecondaries (negTrack, magField, *fphiCutLow, *fphiCutHigh))
743+ continue ;
705744
706745 float signedPpos = posTrack.sign () * posTrack.tpcInnerParam ();
707746 float signedPneg = negTrack.sign () * negTrack.tpcInnerParam ();
0 commit comments