@@ -87,11 +87,6 @@ struct DedxPidAnalysis {
8787 static constexpr int EtaIntervals = 8 ;
8888 static constexpr int ParticlesType = 4 ;
8989 static constexpr int CentralityClasses = 10 ;
90- float pionMin = 0.35 ;
91- float pionMax = 0.45 ;
92- float elTofCut = 0.1 ;
93- float pionTofCut = 1.0 ;
94- float pTcut = 2.0 ;
9590
9691 bool fillHist = false ;
9792
@@ -116,6 +111,12 @@ struct DedxPidAnalysis {
116111
117112 };
118113
114+ enum V0SigmaMode {
115+ V0NoSigmaCut = 0 ,
116+ V0SigmaOnly = 1 ,
117+ V0TOFAndSigma = 2
118+ };
119+
119120 enum NINELSelectionMode : int {
120121 NoSelINEL = 1 ,
121122 SelINELgt0 = 2 ,
@@ -203,9 +204,17 @@ struct DedxPidAnalysis {
203204 Configurable<float > nSigmaDCAxy{" nSigmaDCAxy" , 3.0 , " nSigma DCAxy selection" };
204205 Configurable<float > dcaXYp0{" dcaXYp0" , 0 .0105f , " DCAxy formula: p0 + p1/pt^p2" };
205206 Configurable<float > dcaXYp1{" dcaXYp1" , 0 .0350f , " DCAxy p1 parameter" };
206- Configurable<float > dcaXYp2{" dcaXYp2" , 1 .1f , " DCA_xy p2 parameter" };
207+ Configurable<float > dcaXYp2{" dcaXYp2" , 1 .1f , " DCAxy p2 parameter" };
208+ Configurable<float > dcaZp0{" dcaZp0" , 0 .0105f , " DCAz formula: p0 + p1/pt^p2" };
209+ Configurable<float > dcaZp1{" dcaZp1" , 0 .0350f , " DCAz p1 parameter" };
210+ Configurable<float > dcaZp2{" dcaZp2" , 1 .1f , " DCAz p2 parameter" };
207211 Configurable<float > nSigmaDCAz{" nSigmaDCAz" , 3.0 , " nSigma DCAz selection" };
208- Configurable<float > maxDCAz{" maxDCAz" , 0 .1f , " maxDCAz" };
212+ // Configurable<float> maxDCAz{"maxDCAz", 0.1f, "maxDCAz"};
213+ Configurable<float > pionMin{" pionMin" , 0 .35f , " pionMin" };
214+ Configurable<float > pionMax{" pionMax" , 0 .45f , " pionMax" };
215+ Configurable<float > elTofCut{" elTofCut" , 0 .1f , " elTofCut" };
216+ Configurable<float > pionTofCut{" pionTofCut" , 1 .0f , " pionTofCut" };
217+ Configurable<float > pTcut{" pTcut" , 2 .f , " pTcut" };
209218 // v0 cuts
210219 Configurable<float > v0cospaMin{" v0cospaMin" , 0 .999f , " Minimum V0 CosPA" };
211220 Configurable<float > minimumV0Radius{" minimumV0Radius" , 1 .2f ,
@@ -225,6 +234,7 @@ struct DedxPidAnalysis {
225234 Configurable<float > v0ProperLifetimeCutLambda{" v0ProperLifetimeCutLambda" , 30 .f , " V0 proper lifetime cut for Lambda" };
226235 Configurable<float > nsigmaMax{" nsigmaMax" , 3 .0f , " Maximum nsigma cut" };
227236 Configurable<float > tpcMomentumCut{" tpcMomentumCut" , 0 .6f , " Momentum threshold above which TOF is required" };
237+ Configurable<int > v0SigmaMode{" v0SigmaMode" , 0 , " 0: no cut, 1: sigma only, 2: TOF + sigma above tpcMomentumCut" };
228238 Configurable<float > invMassCutK0s{" invMassCutK0s" , 0 .015f , " invariant Mass Cut for K0s" };
229239 Configurable<float > invMassCutLambda{" invMassCutLambda" , 0 .015f , " invariant Mass Cut for Lambda" };
230240 Configurable<float > invMassCutGamma{" invMassCutGamma" , 0 .015f , " invariant Mass Cut for Gamma" };
@@ -271,9 +281,10 @@ struct DedxPidAnalysis {
271281 Configurable<std::vector<float >> calibrationFactorNeg{" calibrationFactorNeg" , {50.4011 , 50.4764 , 50.186 , 49.2955 , 48.8222 , 49.4273 , 49.9292 , 50.0556 }, " negative calibration factors" };
272282 Configurable<std::vector<float >> calibrationFactorPos{" calibrationFactorPos" , {50.5157 , 50.6359 , 50.3198 , 49.3345 , 48.9197 , 49.4931 , 50.0188 , 50.1406 }, " positive calibration factors" };
273283 ConfigurableAxis binP{" binP" , {VARIABLE_WIDTH , 0.1 , 0.12 , 0.14 , 0.16 , 0.18 , 0.2 , 0.25 , 0.3 , 0.35 , 0.4 , 0.45 , 0.5 , 0.55 , 0.6 , 0.65 , 0.7 , 0.75 , 0.8 , 0.85 , 0.9 , 0.95 , 1.0 , 1.1 , 1.2 , 1.3 , 1.4 , 1.5 , 1.6 , 1.7 , 1.8 , 1.9 , 2.0 , 2.1 , 2.2 , 2.3 , 2.4 , 2.5 , 2.6 , 2.7 , 2.8 , 2.9 , 3.0 , 3.2 , 3.4 , 3.6 , 3.8 , 4.0 , 4.5 , 5.0 , 5.5 , 6.0 , 6.5 , 7.0 , 8.0 , 9.0 , 10.0 , 11.0 , 12.0 , 13.0 , 14.0 , 15.0 , 16.0 , 18.0 , 20.0 }, " " };
274- ConfigurableAxis centBins{" centBins" , {100 , 0 , 100 }, " Binning for centralidad" };
275- ConfigurableAxis dedxBins{" dedxBins" , {100 , 0 , 100 }, " Binning for dedx" };
276- ConfigurableAxis pFineBins{" pFineBins" , {1995 , 0.1 , 40 }, " Binning for momentum" };
284+ ConfigurableAxis centBins{" centBins" , {100 , 0 , 100 }, " Binning for centralidad plots" };
285+ ConfigurableAxis dedxBins{" dedxBins" , {100 , 0 , 100 }, " Binning for dedx plots" };
286+ ConfigurableAxis pFineBins{" pFineBins" , {1995 , 0.1 , 40 }, " Binning for momentum plots" };
287+ ConfigurableAxis dcaBins{" dcaBins" , {500 , -0.5 , 0.5 }, " Binning for DCA plots" };
277288
278289 // phi cut fits
279290 TF1 * fphiCutHigh = nullptr ;
@@ -331,6 +342,13 @@ struct DedxPidAnalysis {
331342 } else if (v0SelectionMode == V0TPCTOF ) {
332343 LOGF (info, " V0 seleccion using TOF + TPC" );
333344 }
345+ if (v0SigmaMode == V0NoSigmaCut) {
346+ LOGF (info, " V0 sigma mode: no cut" );
347+ } else if (v0SigmaMode == V0SigmaOnly) {
348+ LOGF (info, " V0 sigma mode: sigma only" );
349+ } else if (v0SigmaMode == V0TOFAndSigma) {
350+ LOGF (info, " V0 sigma mode: TOF + sigma above tpcMomentumCut" );
351+ }
334352 if (calibrationMode) {
335353 LOGF (info, " Calibration mode activated" );
336354 } else {
@@ -369,6 +387,7 @@ struct DedxPidAnalysis {
369387 AxisSpec centAxis{centBins, " Undefined multiplicity estimator" };
370388 AxisSpec pFineAxis{pFineBins, " #it{p} (GeV/c)" };
371389 AxisSpec pTFineAxis{pFineBins, " #it{p}_{T} (GeV/c)" };
390+ AxisSpec dcaAxis{dcaBins, " " };
372391 switch (multiplicityEstimator) {
373392 case MultSelectionMode::NoMultiplicity: // No multiplicity
374393 LOGF (info, " No multiplicity estimator applied" );
@@ -718,14 +737,18 @@ struct DedxPidAnalysis {
718737 registryDeDx.add (" hTPCPIDAfter" , " N clusters TPC PID After" , HistType::kTH1F , {{200 , 0 , 200 , " N_{cl,PID, After}" }});
719738
720739 // DCA cut
740+ registryDeDx.add (" hDCAxyVsPt_beforeAnyCut" , " DCAxy vs pT before any tkr cut;#it{p}_{T} (GeV/c);DCA_{xy} (cm)" ,
741+ HistType::kTH2F , {{ptAxis}, {dcaAxis}});
742+ registryDeDx.add (" hDCAzVsPt_beforeAnyCut" , " DCAz vs pT before any tkr cut;#it{p}_{T} (GeV/c);DCA_{z} (cm)" ,
743+ HistType::kTH2F , {{ptAxis}, {dcaAxis}});
721744 registryDeDx.add (" hDCAxyVsPt_before" , " DCAxy vs pT before cut;#it{p}_{T} (GeV/c);DCA_{xy} (cm)" ,
722- HistType::kTH2F , {{ptAxis}, {200 , - 0.5 , 0.5 }});
745+ HistType::kTH2F , {{ptAxis}, {dcaAxis }});
723746 registryDeDx.add (" hDCAzVsPt_before" , " DCAz vs pT before cut;#it{p}_{T} (GeV/c);DCA_{z} (cm)" ,
724- HistType::kTH2F , {{ptAxis}, {200 , - 0.5 , 0.5 }});
747+ HistType::kTH2F , {{ptAxis}, {dcaAxis }});
725748 registryDeDx.add (" hDCAxyVsPt_after" , " DCAxy vs pT after cut;#it{p}_{T} (GeV/c);DCA_{xy} (cm)" ,
726- HistType::kTH2F , {{ptAxis}, {200 , - 0.5 , 0.5 }});
749+ HistType::kTH2F , {{ptAxis}, {dcaAxis }});
727750 registryDeDx.add (" hDCAzVsPt_after" , " DCAz vs pT after cut;#it{p}_{T} (GeV/c);DCA_{z} (cm)" ,
728- HistType::kTH2F , {{ptAxis}, {200 , - 0.5 , 0.5 }});
751+ HistType::kTH2F , {{ptAxis}, {dcaAxis }});
729752
730753 // Event Counter
731754 registryDeDx.add (" evsel" , " events selected" , HistType::kTH1F , {{6 , 0.5 , 6.5 , " " }});
@@ -816,7 +839,7 @@ struct DedxPidAnalysis {
816839 template <typename T1 >
817840 bool passesDCAzCut (const T1 & track) const
818841 {
819- const float maxiDcaZ = nSigmaDCAz.value * (maxDCAz .value ) / 3.0 ;
842+ const float maxiDcaZ = nSigmaDCAz.value * (dcaZp0 .value + dcaZp1. value / std::pow (track. pt (), dcaZp2. value ) ) / 3.0 ;
820843 return std::abs (track.dcaZ ()) < maxiDcaZ;
821844 }
822845 // Momentum
@@ -872,16 +895,24 @@ struct DedxPidAnalysis {
872895 sigman = std::hypot (ntrack.tpcNSigmaPi (), ntrack.tofNSigmaPi ());
873896 }
874897
875- if (ptrack.tpcInnerParam () > tpcMomentumCut) {
876- if (!ptrack.hasTOF ())
877- return false ;
898+ if (v0SigmaMode == V0TOFAndSigma) {
899+ // TOF + sigma
900+ if (ptrack.tpcInnerParam () > tpcMomentumCut) {
901+ if (!ptrack.hasTOF ())
902+ return false ;
903+ if (std::abs (sigmap) > nsigmaMax)
904+ return false ;
905+ }
906+ if (ntrack.tpcInnerParam () > tpcMomentumCut) {
907+ if (!ntrack.hasTOF ())
908+ return false ;
909+ if (std::abs (sigman) > nsigmaMax)
910+ return false ;
911+ }
912+ } else if (v0SigmaMode == V0SigmaOnly) {
913+ // sigma only
878914 if (std::abs (sigmap) > nsigmaMax)
879915 return false ;
880- }
881-
882- if (ntrack.tpcInnerParam () > tpcMomentumCut) {
883- if (!ntrack.hasTOF ())
884- return false ;
885916 if (std::abs (sigman) > nsigmaMax)
886917 return false ;
887918 }
@@ -953,16 +984,24 @@ struct DedxPidAnalysis {
953984 sigman = std::hypot (ntrack.tpcNSigmaPi (), ntrack.tofNSigmaPi ());
954985 }
955986
956- if (ptrack.tpcInnerParam () > tpcMomentumCut) {
957- if (!ptrack.hasTOF ())
958- return false ;
987+ if (v0SigmaMode == V0TOFAndSigma) {
988+ // TOF + sigma
989+ if (ptrack.tpcInnerParam () > tpcMomentumCut) {
990+ if (!ptrack.hasTOF ())
991+ return false ;
992+ if (std::abs (sigmap) > nsigmaMax)
993+ return false ;
994+ }
995+ if (ntrack.tpcInnerParam () > tpcMomentumCut) {
996+ if (!ntrack.hasTOF ())
997+ return false ;
998+ if (std::abs (sigman) > nsigmaMax)
999+ return false ;
1000+ }
1001+ } else if (v0SigmaMode == V0SigmaOnly) {
1002+ // sigma only
9591003 if (std::abs (sigmap) > nsigmaMax)
9601004 return false ;
961- }
962-
963- if (ntrack.tpcInnerParam () > tpcMomentumCut) {
964- if (!ntrack.hasTOF ())
965- return false ;
9661005 if (std::abs (sigman) > nsigmaMax)
9671006 return false ;
9681007 }
@@ -1027,15 +1066,24 @@ struct DedxPidAnalysis {
10271066 sigmap = std::hypot (ptrack.tpcNSigmaPi (), ptrack.tofNSigmaPi ());
10281067 sigman = std::hypot (ntrack.tpcNSigmaPr (), ntrack.tofNSigmaPr ());
10291068 }
1030- if (ptrack.tpcInnerParam () > tpcMomentumCut) {
1031- if (!ptrack.hasTOF ())
1032- return false ;
1033- if (std::abs (sigmap) > nsigmaMax)
1034- return false ;
1035- }
10361069
1037- if (ntrack.tpcInnerParam () > tpcMomentumCut) {
1038- if (!ntrack.hasTOF ())
1070+ if (v0SigmaMode == V0TOFAndSigma) {
1071+ // TOF + sigma
1072+ if (ptrack.tpcInnerParam () > tpcMomentumCut) {
1073+ if (!ptrack.hasTOF ())
1074+ return false ;
1075+ if (std::abs (sigmap) > nsigmaMax)
1076+ return false ;
1077+ }
1078+ if (ntrack.tpcInnerParam () > tpcMomentumCut) {
1079+ if (!ntrack.hasTOF ())
1080+ return false ;
1081+ if (std::abs (sigman) > nsigmaMax)
1082+ return false ;
1083+ }
1084+ } else if (v0SigmaMode == V0SigmaOnly) {
1085+ // sigma only
1086+ if (std::abs (sigmap) > nsigmaMax)
10391087 return false ;
10401088 if (std::abs (sigman) > nsigmaMax)
10411089 return false ;
@@ -1104,19 +1152,28 @@ struct DedxPidAnalysis {
11041152 sigman = std::hypot (ntrack.tpcNSigmaEl (), ntrack.tofNSigmaEl ());
11051153 }
11061154
1107- if (ptrack.tpcInnerParam () > tpcMomentumCut) {
1108- if (!ptrack.hasTOF ())
1109- return false ;
1155+ if (v0SigmaMode == V0TOFAndSigma) {
1156+ // TOF + sigma
1157+ if (ptrack.tpcInnerParam () > tpcMomentumCut) {
1158+ if (!ptrack.hasTOF ())
1159+ return false ;
1160+ if (std::abs (sigmap) > nsigmaMax)
1161+ return false ;
1162+ }
1163+ if (ntrack.tpcInnerParam () > tpcMomentumCut) {
1164+ if (!ntrack.hasTOF ())
1165+ return false ;
1166+ if (std::abs (sigman) > nsigmaMax)
1167+ return false ;
1168+ }
1169+ } else if (v0SigmaMode == V0SigmaOnly) {
1170+ // sigma only
11101171 if (std::abs (sigmap) > nsigmaMax)
11111172 return false ;
1112- }
1113-
1114- if (ntrack.tpcInnerParam () > tpcMomentumCut) {
1115- if (!ntrack.hasTOF ())
1116- return false ;
11171173 if (std::abs (sigman) > nsigmaMax)
11181174 return false ;
11191175 }
1176+
11201177 const float gammaMass = 2 * MassElectron; // GeV/c^2
11211178
11221179 if (fillHist)
@@ -1574,6 +1631,10 @@ struct DedxPidAnalysis {
15741631 registryDeDx.fill (HIST (" hTPCClustersBefore" ), trk.tpcNClsFound ());
15751632 registryDeDx.fill (HIST (" hTPCPIDBefore" ), trk.tpcNClsPID ());
15761633
1634+ // Before DCA any tkr cuts
1635+ registryDeDx.fill (HIST (" hDCAxyVsPt_beforeAnyCut" ), trk.pt (), trk.dcaXY ());
1636+ registryDeDx.fill (HIST (" hDCAzVsPt_beforeAnyCut" ), trk.pt (), trk.dcaZ ());
1637+
15771638 // track Selection wo DCA
15781639 if (!mySelectionPrim.IsSelected (trk))
15791640 continue ;
0 commit comments