@@ -177,6 +177,8 @@ struct NucleitpcPbPb {
177177 Configurable<float > cfgmaxmassrejection{" cfgmaxmassrejection" , 9.138 , " Max side of He3 particle rejection" };
178178 Configurable<float > correctionsigma{" correctionsigma" , 2 , " Max sigma value outside which correction is require" };
179179 Configurable<bool > cfghe3massrejreq{" cfghe3massrejreq" , true , " Require mass cut on He4 particles" };
180+ Configurable<bool > cfgUseNewDCAxyCut{" cfgUseNewDCAxyCut" , false , " Use new pT-dependent DCAxy sigma cut for He3" };
181+ Configurable<bool > cfgUseNewDCAzCut{" cfgUseNewDCAzCut" , false , " Use new pT-dependent DCAz sigma cut for He3" };
180182
181183 o2::track::TrackParametrizationWithError<float > mTrackParCov ;
182184 // Binning configuration
@@ -185,10 +187,10 @@ struct NucleitpcPbPb {
185187 ConfigurableAxis axisRigidity{" axisRigidity" , {4000 , -10 ., 10 .}, " #it{p}^{TPC}/#it{z}" };
186188 ConfigurableAxis axisdEdx{" axisdEdx" , {4000 , 0 , 4000 }, " d#it{E}/d#it{x}" };
187189 ConfigurableAxis axisCent{" axisCent" , {100 , 0 , 100 }, " centrality" };
188- ConfigurableAxis axisVtxZ{" axisVtxZ" , {120 , -20 , 20 }, " z" };
189190
191+ ConfigurableAxis axisOccupancy{" axisOccupancy" , {5000 , 0 , 50000 }, " axis for Occupancy of event" };
192+ ConfigurableAxis axisVtxZ{" axisVtxZ" , {120 , -20 , 20 }, " z" };
190193 ConfigurableAxis ptAxis{" ptAxis" , {200 , 0 , 10 }, " #it{p}_{T} (GeV/#it{c})" };
191-
192194 ConfigurableAxis ptAxisa{" ptAxisa" , {20 , 0 , 10 }, " #it{p}_{T} (GeV/#it{c})" }; // just check
193195
194196 ConfigurableAxis axiseta{" axiseta" , {100 , -1 , 1 }, " eta" };
@@ -241,9 +243,10 @@ struct NucleitpcPbPb {
241243 histos.add (" histCentFT0C" , " histCentFT0C" , kTH1F , {axisCent});
242244 histos.add (" histCentFT0M" , " histCentFT0M" , kTH1F , {axisCent});
243245 histos.add (" histCentFTOC_cut" , " histCentFTOC_cut" , kTH1F , {axisCent});
244- histos.add <THnSparse>(" hSpectra" , " " , HistType::kTHnSparseF , {speciesBitAxis, ptAxis, nsigmaAxis, {5 , -2.5 , 2.5 }, axisCent, axisDCA, axisDCA});
246+ histos.add <THnSparse>(" hSpectra" , " " , HistType::kTHnSparseF , {speciesBitAxis, ptAxis, nsigmaAxis, {5 , -2.5 , 2.5 }, axisCent, axisDCA, axisDCA, axisOccupancy });
245247 }
246248 histos.add (" histeta" , " histeta" , kTH1F , {axiseta});
249+ histos.add (" histEvents" , " histEvents" , kTH2F , {axisCent, axisOccupancy});
247250 histos.add (" dcaZ" , " dcaZ" , kTH2F , {ptAxis, axisDCA});
248251 histos.add (" dcaXY" , " dcaXY" , kTH2F , {ptAxis, axisDCA});
249252 histos.add (" Tofsignal" , " Tofsignal" , kTH2F , {axisRigidity, {4000 , 0.2 , 1.2 , " #beta" }});
@@ -376,7 +379,7 @@ struct NucleitpcPbPb {
376379 float tpcNsigma = getTPCnSigma (track, primaryParticles.at (i));
377380 if ((std::abs (tpcNsigma) > cfgTrackPIDsettings->get (i, " maxTPCnSigma" )) && cfgmaxTPCnSigmaRequire)
378381 continue ;
379- if (std::abs ( tpcNsigma) > correctionsigma) {
382+ if (tpcNsigma < correctionsigma && cfgmccorrectionhe4Require ) {
380383 double a = 0 , b = 0 , c = 0 ;
381384
382385 int param = -1 ;
@@ -397,11 +400,7 @@ struct NucleitpcPbPb {
397400 }
398401
399402 if (i == he3 && cfgmccorrectionhe4Require) {
400- int pidGuess = track.pidForTracking ();
401- int antitriton = 6 ;
402- if (pidGuess == antitriton) {
403- ptMomn = ptMomn - a + b * ptMomn - c * ptMomn * ptMomn;
404- }
403+ ptMomn = ptMomn - a + b * ptMomn - c * ptMomn * ptMomn;
405404 }
406405 }
407406 int sign = (track.sign () > 0 ) ? 1 : ((track.sign () < 0 ) ? -1 : 0 );
@@ -431,11 +430,46 @@ struct NucleitpcPbPb {
431430 if (getMeanItsClsSize (track) < cfgTrackPIDsettings->get (i, " minITSclsSize" ) && cfgminGetMeanItsClsSizeRequire)
432431 continue ;
433432
434- // DCA XY cut
435- bool insideDCAxy = cfgdcaxynopt ? (std::abs (track.dcaXY ()) <= cfgTrackPIDsettings->get (i, " maxDcaXY" )) : (std::abs (track.dcaXY ()) <= (cfgTrackPIDsettings->get (i, " maxDcaXY" ) * (0 .0105f + 0 .0350f / std::pow (ptMomn, 1 .1f ))));
433+ // --- DCAxy cut with configurable new cut and configurable sigma factor ---
434+ bool insideDCAxy = false ;
435+
436+ if (cfgUseNewDCAxyCut) {
437+ double sigmaFactor = cfgTrackPIDsettings->get (i, " maxDcaXY" );
438+ double sigma_base = (0.0118 * std::exp (-0.6889 * ptMomn) + 0.0017 );
439+ double sigma_new = sigmaFactor * sigma_base;
440+
441+ insideDCAxy = (std::abs (track.dcaXY ()) <= sigma_new);
442+ } else {
443+ insideDCAxy =
444+ cfgdcaxynopt
445+ ? (std::abs (track.dcaXY ()) <= cfgTrackPIDsettings->get (i, " maxDcaXY" ))
446+ : (std::abs (track.dcaXY ()) <=
447+ (cfgTrackPIDsettings->get (i, " maxDcaXY" ) *
448+ (0 .0105f + 0 .0350f / std::pow (ptMomn, 1 .1f ))));
449+ }
450+
451+ bool insideDCAz = false ;
452+
453+ if (cfgUseNewDCAzCut) {
454+
455+ double sigmaFactorZ = cfgTrackPIDsettings->get (i, " maxDcaZ" );
456+
457+ double p0 = 0.1014 ;
458+ double p1 = 1.7512 ;
459+ double p2 = 0.0024 ;
436460
437- // DCA Z cut
438- bool insideDCAz = cfgdcaznopt ? (std::abs (track.dcaZ ()) <= cfgTrackPIDsettings->get (i, " maxDcaZ" )) : (std::abs (track.dcaZ ()) <= dcazSigma (ptMomn, cfgTrackPIDsettings->get (i, " maxDcaZ" )));
461+ double sigma_base_z = p0 * std::exp (-p1 * ptMomn) + p2;
462+
463+ double sigma_new_z = sigmaFactorZ * sigma_base_z;
464+
465+ insideDCAz = (std::abs (track.dcaZ ()) <= sigma_new_z);
466+ } else {
467+ insideDCAz =
468+ cfgdcaznopt
469+ ? (std::abs (track.dcaZ ()) <= cfgTrackPIDsettings->get (i, " maxDcaZ" ))
470+ : (std::abs (track.dcaZ ()) <=
471+ dcazSigma (ptMomn, cfgTrackPIDsettings->get (i, " maxDcaZ" )));
472+ }
439473
440474 if ((!insideDCAxy || !insideDCAz)) {
441475 continue ;
@@ -455,11 +489,11 @@ struct NucleitpcPbPb {
455489 if (cfgFillhspectra && cfgTrackPIDsettings2->get (i, " fillsparsh" ) == 1 ) {
456490
457491 if (i != he4) {
458- histos.fill (HIST (" hSpectra" ), i, ptMomn, tpcNsigma, sign, collision.centFT0C (), track.dcaZ (), track.dcaXY ());
492+ histos.fill (HIST (" hSpectra" ), i, ptMomn, tpcNsigma, sign, collision.centFT0C (), track.dcaZ (), track.dcaXY (), collision. trackOccupancyInTimeRange () );
459493 } else {
460494 if (!track.hasTOF ()) {
461495 // Fill without TOF
462- histos.fill (HIST (" hSpectra" ), i, ptMomn, tpcNsigma, sign, collision.centFT0C (), track.dcaZ (), track.dcaXY ());
496+ histos.fill (HIST (" hSpectra" ), i, ptMomn, tpcNsigma, sign, collision.centFT0C (), track.dcaZ (), track.dcaXY (), collision. trackOccupancyInTimeRange () );
463497 } else {
464498 // Has TOF - apply mass cut
465499 float beta = o2::pid::tof::Beta::GetBeta (track);
@@ -476,7 +510,7 @@ struct NucleitpcPbPb {
476510 continue ; // Skip if mass cut fails
477511 }
478512
479- histos.fill (HIST (" hSpectra" ), i, ptMomn, tpcNsigma, sign, collision.centFT0C (), track.dcaZ (), track.dcaXY ());
513+ histos.fill (HIST (" hSpectra" ), i, ptMomn, tpcNsigma, sign, collision.centFT0C (), track.dcaZ (), track.dcaXY (), collision. trackOccupancyInTimeRange () );
480514 }
481515 }
482516 }
@@ -807,11 +841,46 @@ struct NucleitpcPbPb {
807841 if (getMeanItsClsSize (track) < cfgTrackPIDsettings->get (i, " minITSclsSize" ) && cfgminGetMeanItsClsSizeRequire)
808842 continue ;
809843
810- // DCA XY cut
811- bool insideDCAxy = cfgdcaxynopt ? (std::abs (track.dcaXY ()) <= cfgTrackPIDsettings->get (i, " maxDcaXY" )) : (std::abs (track.dcaXY ()) <= (cfgTrackPIDsettings->get (i, " maxDcaXY" ) * (0 .0105f + 0 .0350f / std::pow (ptReco, 1 .1f ))));
844+ // --- DCAxy cut with configurable new cut and configurable sigma factor ---
845+ bool insideDCAxy = false ;
846+
847+ if (cfgUseNewDCAxyCut) {
848+ double sigmaFactor = cfgTrackPIDsettings->get (i, " maxDcaXY" );
849+ double sigma_base = (0.0118 * std::exp (-0.6889 * ptReco) + 0.0017 );
850+ double sigma_new = sigmaFactor * sigma_base;
851+
852+ insideDCAxy = (std::abs (track.dcaXY ()) <= sigma_new);
853+ } else {
854+ insideDCAxy =
855+ cfgdcaxynopt
856+ ? (std::abs (track.dcaXY ()) <= cfgTrackPIDsettings->get (i, " maxDcaXY" ))
857+ : (std::abs (track.dcaXY ()) <=
858+ (cfgTrackPIDsettings->get (i, " maxDcaXY" ) *
859+ (0 .0105f + 0 .0350f / std::pow (ptReco, 1 .1f ))));
860+ }
861+
862+ bool insideDCAz = false ;
863+
864+ if (cfgUseNewDCAzCut) {
812865
813- // DCA Z cut
814- bool insideDCAz = cfgdcaznopt ? (std::abs (track.dcaZ ()) <= cfgTrackPIDsettings->get (i, " maxDcaZ" )) : (std::abs (track.dcaZ ()) <= dcazSigma (ptReco, cfgTrackPIDsettings->get (i, " maxDcaZ" )));
866+ double sigmaFactorZ = cfgTrackPIDsettings->get (i, " maxDcaZ" );
867+
868+ double p0 = 0.1014 ;
869+ double p1 = 1.7512 ;
870+ double p2 = 0.0024 ;
871+
872+ double sigma_base_z = p0 * std::exp (-p1 * ptReco) + p2;
873+
874+ double sigma_new_z = sigmaFactorZ * sigma_base_z;
875+
876+ insideDCAz = (std::abs (track.dcaZ ()) <= sigma_new_z);
877+ } else {
878+ insideDCAz =
879+ cfgdcaznopt
880+ ? (std::abs (track.dcaZ ()) <= cfgTrackPIDsettings->get (i, " maxDcaZ" ))
881+ : (std::abs (track.dcaZ ()) <=
882+ dcazSigma (ptReco, cfgTrackPIDsettings->get (i, " maxDcaZ" )));
883+ }
815884
816885 if ((!insideDCAxy || !insideDCAz)) {
817886 continue ;
@@ -1046,11 +1115,46 @@ struct NucleitpcPbPb {
10461115 if (getMeanItsClsSize (track) < cfgTrackPIDsettings->get (i, " minITSclsSize" ) && cfgminGetMeanItsClsSizeRequire)
10471116 continue ;
10481117
1049- // DCA XY cut
1050- bool insideDCAxy = cfgdcaxynopt ? (std::abs (track.dcaXY ()) <= cfgTrackPIDsettings->get (i, " maxDcaXY" )) : (std::abs (track.dcaXY ()) <= (cfgTrackPIDsettings->get (i, " maxDcaXY" ) * (0 .0105f + 0 .0350f / std::pow (ptReco, 1 .1f ))));
1118+ // --- DCAxy cut with configurable new cut and configurable sigma factor ---
1119+ bool insideDCAxy = false ;
1120+
1121+ if (cfgUseNewDCAxyCut) {
1122+ double sigmaFactor = cfgTrackPIDsettings->get (i, " maxDcaXY" );
1123+ double sigma_base = (0.0118 * std::exp (-0.6889 * ptReco) + 0.0017 );
1124+ double sigma_new = sigmaFactor * sigma_base;
1125+
1126+ insideDCAxy = (std::abs (track.dcaXY ()) <= sigma_new);
1127+ } else {
1128+ insideDCAxy =
1129+ cfgdcaxynopt
1130+ ? (std::abs (track.dcaXY ()) <= cfgTrackPIDsettings->get (i, " maxDcaXY" ))
1131+ : (std::abs (track.dcaXY ()) <=
1132+ (cfgTrackPIDsettings->get (i, " maxDcaXY" ) *
1133+ (0 .0105f + 0 .0350f / std::pow (ptReco, 1 .1f ))));
1134+ }
1135+
1136+ bool insideDCAz = false ;
1137+
1138+ if (cfgUseNewDCAzCut) {
1139+
1140+ double sigmaFactorZ = cfgTrackPIDsettings->get (i, " maxDcaZ" );
1141+
1142+ double p0 = 0.1014 ;
1143+ double p1 = 1.7512 ;
1144+ double p2 = 0.0024 ;
10511145
1052- // DCA Z cut
1053- bool insideDCAz = cfgdcaznopt ? (std::abs (track.dcaZ ()) <= cfgTrackPIDsettings->get (i, " maxDcaZ" )) : (std::abs (track.dcaZ ()) <= dcazSigma (ptReco, cfgTrackPIDsettings->get (i, " maxDcaZ" )));
1146+ double sigma_base_z = p0 * std::exp (-p1 * ptReco) + p2;
1147+
1148+ double sigma_new_z = sigmaFactorZ * sigma_base_z;
1149+
1150+ insideDCAz = (std::abs (track.dcaZ ()) <= sigma_new_z);
1151+ } else {
1152+ insideDCAz =
1153+ cfgdcaznopt
1154+ ? (std::abs (track.dcaZ ()) <= cfgTrackPIDsettings->get (i, " maxDcaZ" ))
1155+ : (std::abs (track.dcaZ ()) <=
1156+ dcazSigma (ptReco, cfgTrackPIDsettings->get (i, " maxDcaZ" )));
1157+ }
10541158
10551159 if ((!insideDCAxy || !insideDCAz)) {
10561160 continue ;
@@ -1144,6 +1248,7 @@ struct NucleitpcPbPb {
11441248 histos.fill (HIST (" histVtxZ" ), collision.posZ ());
11451249 histos.fill (HIST (" histCentFT0C" ), collision.centFT0C ());
11461250 histos.fill (HIST (" histCentFT0M" ), collision.centFT0M ());
1251+ histos.fill (HIST (" histEvents" ), collision.centFT0C (), occupancy);
11471252 }
11481253 primVtx.assign ({collision.posX (), collision.posY (), collision.posZ ()});
11491254 cents.assign ({collision.centFT0A (), collision.centFT0C (), collision.centFT0M ()});
0 commit comments