@@ -59,17 +59,18 @@ using BCsWithRun2Info = soa::Join<aod::BCs, aod::Run2BCInfos, aod::Timestamps>;
5959namespace
6060{
6161constexpr int kNpart = 2 ;
62- constexpr float trackSels[10 ]{/* 60, */ 80 , 100 , 2 , 3 , /* 4, */ 0.05 , 0.1 , /* 0.15, */ 0.5 , 1 , /* 1.5, */ 2 , 3 /* , 4 */ };
62+ constexpr float trackSels[12 ]{/* 60, */ 80 , 100 , 2 , 3 , /* 4, */ 0.05 , 0.1 , /* 0.15, */ 0.5 , 1 , /* 1.5, */ 2 , 3 /* , 4 */ , 2 , 3 , /* , 4 */ };
6363constexpr float dcaSels[3 ]{10 ., 10 ., 10 .};
6464constexpr double betheBlochDefault[kNpart ][6 ]{{-1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 }, {-1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 }};
65+ constexpr double betheBlochDefaultITS[6 ]{-1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 };
6566constexpr double estimatorsCorrelationCoef[2 ]{-0.669108 , 1.04489 };
6667constexpr double estimatorsSigmaPars[4 ]{0.933321 , 0.0416976 , -0.000936344 , 8.92179e-06 };
6768constexpr double deltaEstimatorNsigma[2 ]{5.5 , 5 .};
6869constexpr double partMass[kNpart ]{o2::constants::physics::MassProton, o2::constants::physics::MassDeuteron};
6970constexpr double partPdg[kNpart ]{2212 , o2::constants::physics::kDeuteron };
7071static const std::vector<std::string> betheBlochParNames{" p0" , " p1" , " p2" , " p3" , " p4" , " resolution" };
7172static const std::vector<std::string> particleNamesPar{" p" , " d" };
72- static const std::vector<std::string> trackSelsNames{" tpcClsMid" , " tpcClsTight" , " chi2TpcTight" , " chi2TpcMid" , " dcaxyTight" , " dcaxyMid" , " dcazTight" , " dcazMid" , " tpcNsigmaTight" , " tpcNsigmaMid" };
73+ static const std::vector<std::string> trackSelsNames{" tpcClsMid" , " tpcClsTight" , " chi2TpcTight" , " chi2TpcMid" , " dcaxyTight" , " dcaxyMid" , " dcazTight" , " dcazMid" , " tpcNsigmaTight" , " tpcNsigmaMid" , " itsNsigmaTight " , " itsNsigmaMid " };
7374static const std::vector<std::string> dcaSelsNames{" dcaxy" , " dcaz" , " dca" };
7475static const std::vector<std::string> particleName{" p" };
7576std::array<std::shared_ptr<TH3>, kNpart > tofMass;
@@ -216,6 +217,7 @@ struct ebyeMaker {
216217
217218 Configurable<int > cfgMaterialCorrection{" cfgMaterialCorrection" , static_cast <int >(o2::base::Propagator::MatCorrType::USEMatCorrNONE), " Type of material correction" };
218219 Configurable<LabeledArray<double >> cfgBetheBlochParams{" cfgBetheBlochParams" , {betheBlochDefault[0 ], 2 , 6 , particleNamesPar, betheBlochParNames}, " TPC Bethe-Bloch parameterisation for deuteron" };
220+ Configurable<LabeledArray<double >> cfgBetheBlochParamsITS{" cfgBetheBlochParamsITS" , {betheBlochDefaultITS, 1 , 6 , particleName, betheBlochParNames}, " ITS Bethe-Bloch parameterisation for deuteron" };
219221
220222 ConfigurableAxis centAxis{" centAxis" , {106 , 0 , 106 }, " binning for the centrality" };
221223 ConfigurableAxis zVtxAxis{" zVtxBins" , {100 , -20 .f , 20 .f }, " Binning for the vertex z in cm" };
@@ -235,6 +237,8 @@ struct ebyeMaker {
235237 Configurable<float > etaMaxV0dau{" etaMaxV0dau" , 0 .8f , " maximum eta V0 daughters" };
236238 Configurable<float > outerPIDMin{" outerPIDMin" , -4 .f , " minimum outer PID" };
237239
240+ Configurable<uint8_t > triggerCut{" triggerCut" , 0x1 , " trigger class to select" };
241+
238242 Configurable<bool > fillOnlySignal{" fillOnlySignal" , false , " fill histograms only for true signal candidates (MC)" };
239243 Configurable<std::string> genName{" genname" , " " , " Genearator name: HIJING, PYTHIA8, ... Default: \"\" " };
240244
@@ -292,7 +296,7 @@ struct ebyeMaker {
292296 Configurable<float > antidItsClsSizeCut{" antidItsClsSizeCut" , 1 .e -10f , " cluster size cut for antideuterons" };
293297 Configurable<float > antidPtItsClsSizeCut{" antidPtItsClsSizeCut" , 10 .f , " pt for cluster size cut for antideuterons" };
294298
295- Configurable<LabeledArray<float >> cfgTrackSels{" cfgTrackSels" , {trackSels, 1 , 10 , particleName, trackSelsNames}, " Track selections" };
299+ Configurable<LabeledArray<float >> cfgTrackSels{" cfgTrackSels" , {trackSels, 1 , 12 , particleName, trackSelsNames}, " Track selections" };
296300
297301 std::array<float , kNpart > ptMin;
298302 std::array<float , kNpart > ptTof;
@@ -464,13 +468,16 @@ struct ebyeMaker {
464468 }
465469
466470 template <class T >
467- float getITSSignal (T const & track, aod::Run2TrackExtras const & trackExtraRun2)
471+ std::pair< float , float > getITSSignal (T const & track, aod::Run2TrackExtras const & trackExtraRun2)
468472 {
469473 if ((doprocessMiniRun2 || doprocessMiniMcRun2) && track.hasITS ()) {
470474 auto extra = trackExtraRun2.rawIteratorAt (track.globalIndex ());
471- return extra.itsSignal ();
475+ double expBethe{tpc::BetheBlochAleph (static_cast <double >(track.p () / partMass[0 ]), cfgBetheBlochParamsITS->get (" p0" ), cfgBetheBlochParamsITS->get (" p1" ), cfgBetheBlochParamsITS->get (" p2" ), cfgBetheBlochParamsITS->get (" p3" ), cfgBetheBlochParamsITS->get (" p4" ))};
476+ double expSigma{expBethe * cfgBetheBlochParamsITS->get (" resolution" )};
477+ auto nSigmaITS = static_cast <float >((extra.itsSignal () - expBethe) / expSigma);
478+ return std::make_pair (extra.itsSignal (), nSigmaITS);
472479 }
473- return -999 .f ;
480+ return std::make_pair ( -999 .f , - 999 . f ) ;
474481 }
475482
476483 template <class T >
@@ -535,8 +542,10 @@ struct ebyeMaker {
535542 mask |= kTPCPIDTight ;
536543 else if (std::abs (track.tpcnsigma ) < cfgTrackSels->get (" tpcNsigmaMid" ))
537544 mask |= kTPCPIDMid ;
538- // if (track.itsnsigma < 2) mask |= kITSPIDTight;
539- // else if (track.itsnsigma < 3) mask |= kITSPIDMid;
545+ if (std::abs (track.itsnsigma ) < cfgTrackSels->get (" itsNsigmaTight" ))
546+ mask |= kITSPIDTight ;
547+ else if (std::abs (track.itsnsigma ) < cfgTrackSels->get (" itsNsigmaMid" ))
548+ mask |= kITSPIDMid ;
540549 return mask;
541550 }
542551
@@ -1168,14 +1177,17 @@ struct ebyeMaker {
11681177 if (!hasHMV0M && trigger == 0x0 ) {
11691178 continue ;
11701179 }
1180+ if (trigger != triggerCut && triggerCut != 0x2 ) {
1181+ continue ;
1182+ }
11711183 miniCollTable (static_cast <int8_t >(collision.posZ () * 10 ), trigger, nTrackletsColl, cV0M);
11721184
11731185 for (auto & candidateTrack : candidateTracks[0 ]) { // protons
11741186 auto tk = tracks.rawIteratorAt (candidateTrack.globalIndex );
11751187 float outerPID = getOuterPID (tk);
1176- float itsSignal = getITSSignal (tk, trackExtraRun2);
1188+ auto [ itsSignal, nSigmaITS] = getITSSignal (tk, trackExtraRun2);
11771189 histos.fill (HIST (" QA/itsSignal" ), tk.p (), itsSignal);
1178-
1190+ candidateTrack. itsnsigma = nSigmaITS;
11791191 candidateTrack.outerPID = tk.pt () < antipPtTof ? candidateTrack.outerPID : outerPID;
11801192 int selMask = getTrackSelMask (candidateTrack);
11811193 if (candidateTrack.outerPID < outerPIDMin)
@@ -1367,9 +1379,9 @@ struct ebyeMaker {
13671379 if (candidateTrack.isreco ) {
13681380 auto tk = tracks.rawIteratorAt (candidateTrack.globalIndex );
13691381 float outerPID = getOuterPID (tk);
1370- float itsSignal = getITSSignal (tk, trackExtraRun2);
1382+ auto [ itsSignal, nSigmaITS] = getITSSignal (tk, trackExtraRun2);
13711383 histos.fill (HIST (" QA/itsSignal" ), tk.p (), itsSignal);
1372-
1384+ candidateTrack. itsnsigma = nSigmaITS;
13731385 candidateTrack.outerPID = tk.pt () < antipPtTof ? candidateTrack.outerPID : outerPID;
13741386 selMask = getTrackSelMask (candidateTrack);
13751387 // if (candidateTrack.outerPID < -4)
0 commit comments