@@ -63,6 +63,7 @@ namespace
6363{
6464constexpr int kNpart = 2 ;
6565constexpr float kTrackSels [12 ]{/* 60, */ 80 , 100 , 2 , 3 , /* 4, */ 0.05 , 0.1 , /* 0.15, */ 0.5 , 1 , /* 1.5, */ 2 , 3 /* , 4 */ , 2 , 3 , /* , 4 */ };
66+ constexpr float kDcaSelsParam [3 ][3 ]{{-1 .e32 , -1 .e32 , -1 .e32 }, {-1 .e32 , -1 .e32 , -1 .e32 }, {-1 .e32 , -1 .e32 , -1 .e32 }};
6667constexpr float kDcaSels [3 ]{10 ., 10 ., 10 .};
6768constexpr double kBetheBlochDefault [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 }};
6869constexpr double kBetheBlochDefaultITS [6 ]{-1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 };
@@ -72,11 +73,11 @@ constexpr double kDeltaEstimatorNsigma[2]{5.5, 5.};
7273constexpr double kPartMass [kNpart ]{o2::constants::physics::MassProton, o2::constants::physics::MassDeuteron};
7374constexpr double kPartPdg [kNpart ]{PDG_t::kProton , o2::constants::physics::kDeuteron };
7475static const std::vector<std::string> betheBlochParNames{" p0" , " p1" , " p2" , " p3" , " p4" , " resolution" };
76+ static const std::vector<std::string> dcaParNames{" p0" , " p1" , " p2" };
7577static const std::vector<std::string> particleNamesPar{" p" , " d" };
7678static const std::vector<std::string> trackSelsNames{" tpcClsMid" , " tpcClsTight" , " chi2TpcTight" , " chi2TpcMid" , " dcaxyTight" , " dcaxyMid" , " dcazTight" , " dcazMid" , " tpcNsigmaTight" , " tpcNsigmaMid" , " itsNsigmaTight" , " itsNsigmaMid" };
7779static const std::vector<std::string> dcaSelsNames{" dcaxy" , " dcaz" , " dca" };
7880static const std::vector<std::string> particleName{" p" };
79- std::array<std::shared_ptr<TH3>, kNpart > tofMass;
8081void momTotXYZ (std::array<float , 3 >& momA, std::array<float , 3 > const & momB, std::array<float , 3 > const & momC)
8182{
8283 for (uint64_t i = 0 ; i < momA.size (); ++i) {
@@ -190,17 +191,18 @@ struct EbyeMaker {
190191 Configurable<LabeledArray<double >> cfgBetheBlochParams{" cfgBetheBlochParams" , {kBetheBlochDefault [0 ], 2 , 6 , particleNamesPar, betheBlochParNames}, " TPC Bethe-Bloch parameterisation for deuteron" };
191192 Configurable<LabeledArray<double >> cfgBetheBlochParamsITS{" cfgBetheBlochParamsITS" , {kBetheBlochDefaultITS , 1 , 6 , particleName, betheBlochParNames}, " ITS Bethe-Bloch parameterisation for deuteron" };
192193
193- ConfigurableAxis centAxis{" centAxis" , {106 , 0 , 106 }, " binning for the centrality" };
194- ConfigurableAxis zVtxAxis{" zVtxBins" , {100 , -20 .f , 20 .f }, " Binning for the vertex z in cm" };
195194 ConfigurableAxis multAxis{" multAxis" , {100 , 0 , 10000 }, " Binning for the multiplicity axis" };
195+ const AxisSpec centAxis{106 , 0 , 106 , " centrality" };
196+ const AxisSpec zVtxAxis{100 , -20 .f , 20 .f , " vertex z in cm" };
197+ const AxisSpec nTpcAxis{160 , 0 , 160 , " N TPC" };
198+ const AxisSpec dcaAxis{600 , -3 ., 3 ., " DCA in cm" };
196199
197200 // binning of (anti)lambda mass QA histograms
198201 ConfigurableAxis massLambdaAxis{" massLambdaAxis" , {400 , o2::constants::physics::MassLambda0 - 0 .03f , o2::constants::physics::MassLambda0 + 0 .03f }, " binning for the lambda invariant-mass" };
199202
200203 // binning of PID QA histograms
201204 ConfigurableAxis momAxis{" momAxisFine" , {5 .e2 , 0 .f , 5 .f }, " momentum axis binning" };
202205 ConfigurableAxis tpcAxis{" tpcAxis" , {4 .e2 , 0 .f , 4 .e3f }, " tpc signal axis binning" };
203- ConfigurableAxis tofMassAxis{" tofMassAxis" , {1000 , 0 ., 3 .f }, " tof mass axis" };
204206
205207 Configurable<float > zVtxMax{" zVtxMax" , 10 .0f , " maximum z position of the primary vertex" };
206208 Configurable<float > etaMax{" etaMax" , 0 .8f , " maximum eta" };
@@ -214,7 +216,6 @@ struct EbyeMaker {
214216 Configurable<bool > kUsePileUpCut {" kUsePileUpCut" , false , " toggle strong correlation cuts (Run 2)" };
215217 Configurable<bool > kUseEstimatorsCorrelationCut {" kUseEstimatorsCorrelationCut" , false , " toggle cut on the correlation between centrality estimators (2018 Pb-Pb)" };
216218
217- Configurable<float > kCentCutMin {" kCentCutMin" , 0 , " minimum accepted centrality" };
218219 Configurable<float > kCentCutMax {" kCentCutMax" , 100 , " maximum accepted centrality" };
219220
220221 Configurable<float > antidPtMin{" antidPtMin" , 0 .6f , " minimum antideuteron pT (GeV/c)" };
@@ -232,7 +233,6 @@ struct EbyeMaker {
232233 Configurable<float > trackNclusItsCut{" trackNclusITScut" , 2 , " Minimum number of ITS clusters" };
233234 Configurable<float > trackNclusTpcCut{" trackNclusTPCcut" , 60 , " Minimum number of TPC clusters" };
234235 Configurable<float > trackChi2Cut{" trackChi2Cut" , 4 .f , " Maximum chi2/ncls in TPC" };
235- Configurable<LabeledArray<float >> cfgDcaSels{" cfgDcaSels" , {kDcaSels , 1 , 3 , particleName, dcaSelsNames}, " DCA selections" };
236236
237237 Configurable<float > v0trackNcrossedRows{" v0trackNcrossedRows" , 100 , " Minimum number of crossed TPC rows for V0 daughter" };
238238 Configurable<float > v0trackNclusItsCut{" v0trackNclusITScut" , 0 , " Minimum number of ITS clusters for V0 daughter" };
@@ -244,11 +244,9 @@ struct EbyeMaker {
244244
245245 Configurable<float > antidNsigmaTpcCutLow{" antidNsigmaTpcCutLow" , -4 .f , " TPC PID cut low" };
246246 Configurable<float > antidNsigmaTpcCutUp{" antidNsigmaTpcCutUp" , 4 .f , " TPC PID cut up" };
247- Configurable<float > antidTpcInnerParamMax{" tpcInnerParamMax" , 0 .f , " (temporary) tpc inner param cut" };
248247
249248 Configurable<float > antipNsigmaTpcCutLow{" antipNsigmaTpcCutLow" , -4 .f , " TPC PID cut low" };
250249 Configurable<float > antipNsigmaTpcCutUp{" antipNsigmaTpcCutUp" , 4 .f , " TPC PID cut up" };
251- Configurable<float > antipTpcInnerParamMax{" antipTpcInnerParamMax" , 0 .f , " (temporary) tpc inner param cut" };
252250
253251 Configurable<float > v0settingDcaV0Dau{" v0setting_dcav0dau" , 0 .5f , " DCA V0 Daughters" };
254252 Configurable<float > v0settingDcaV0Pv{" v0setting_dcav0pv" , 1 .f , " DCA V0 to Pv" };
@@ -259,18 +257,15 @@ struct EbyeMaker {
259257 Configurable<float > v0settingNSigmaTpc{" v0setting_nsigmatpc" , 4 .f , " nsigmatpc" };
260258 Configurable<float > lambdaMassCut{" lambdaMassCut" , 0 .02f , " maximum deviation from PDG mass (for QA histograms)" };
261259
262- Configurable<bool > constDCASel{" constDCASel" , true , " use DCA selections independent of pt" };
263- Configurable<float > antidItsClsSizeCut{" antidItsClsSizeCut" , 1 .e -10f , " cluster size cut for antideuterons" };
264- Configurable<float > antidPtItsClsSizeCut{" antidPtItsClsSizeCut" , 10 .f , " pt for cluster size cut for antideuterons" };
265-
266260 Configurable<LabeledArray<float >> cfgTrackSels{" cfgTrackSels" , {kTrackSels , 1 , 12 , particleName, trackSelsNames}, " Track selections" };
261+ Configurable<LabeledArray<float >> cfgDcaSels{" cfgDcaSels" , {kDcaSels , 1 , 3 , particleName, dcaSelsNames}, " DCA selections" };
262+ Configurable<LabeledArray<float >> cfgDcaSelsParam{" cfgDcaSelsParam" , {kDcaSelsParam [0 ], 3 , 3 , dcaSelsNames, dcaParNames}, " DCA threshold settings" };
267263
268264 std::array<float , kNpart > ptMin;
269265 std::array<float , kNpart > ptTof;
270266 std::array<float , kNpart > ptMax;
271267 std::array<float , kNpart > nSigmaTpcCutLow;
272268 std::array<float , kNpart > nSigmaTpcCutUp;
273- std::array<float , kNpart > tpcInnerParamMax;
274269
275270 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
276271
@@ -346,8 +341,6 @@ struct EbyeMaker {
346341 return false ;
347342 }
348343 if (track.itsNCls () < trackNclusItsCut ||
349- track.tpcNClsFound () < trackNclusTpcCut ||
350- track.tpcNClsCrossedRows () < trackNcrossedRows ||
351344 track.tpcNClsCrossedRows () < defNClCROverFind * track.tpcNClsFindable () ||
352345 track.tpcChi2NCl () > trackChi2Cut ||
353346 track.tpcChi2NCl () < defMinChi2Cut ||
@@ -364,20 +357,9 @@ struct EbyeMaker {
364357 return true ;
365358 }
366359
367- template <class T >
368- float getITSClSize (T const & track)
369- {
370- float sum{0 .f };
371- const int nLayers = 7 ;
372- for (int iL{0 }; iL < nLayers; ++iL) {
373- sum += (track.itsClusterSizes () >> (iL * 4 )) & 0xf ;
374- }
375- return sum / track.itsNCls ();
376- }
377-
378- float dcaSigma (float const & pt)
360+ float dcaSigma (float const & pt, const char * var)
379361 {
380- return 0.0105 + 0.0350 / std::pow (std::abs (pt), 1.1 );
362+ return cfgDcaSelsParam-> get (var, " p0 " ) + cfgDcaSelsParam-> get (var, " p1 " ) / std::pow (std::abs (pt), cfgDcaSelsParam-> get (var, " p2 " ) );
381363 }
382364
383365 template <class Bc >
@@ -467,13 +449,13 @@ struct EbyeMaker {
467449 mask |= kChi2TPCTight ;
468450 else if (track.tpcchi2 < cfgTrackSels->get (" chi2TpcMid" ))
469451 mask |= kChi2TPCMid ;
470- if (std::abs (track.dcaxypv ) < cfgTrackSels->get (" dcaxyTight" ) * (constDCASel ? 1 . : dcaSigma (track.pt ) ))
452+ if (std::abs (track.dcaxypv ) < cfgTrackSels->get (" dcaxyTight" ) * dcaSigma (track.pt , " dcaxy " ))
471453 mask |= kDCAxyTight ;
472- else if (std::abs (track.dcaxypv ) < cfgTrackSels->get (" dcaxyMid" ) * (constDCASel ? 1 . : dcaSigma (track.pt ) ))
454+ else if (std::abs (track.dcaxypv ) < cfgTrackSels->get (" dcaxyMid" ) * dcaSigma (track.pt , " dcaxy " ))
473455 mask |= kDCAxyMid ;
474- if (std::abs (track.dcazpv ) < cfgTrackSels->get (" dcazTight" ))
456+ if (std::abs (track.dcazpv ) < cfgTrackSels->get (" dcazTight" ) * dcaSigma (track. pt , " dcaz " ) )
475457 mask |= kDCAzTight ;
476- else if (std::abs (track.dcazpv ) < cfgTrackSels->get (" dcazMid" ))
458+ else if (std::abs (track.dcazpv ) < cfgTrackSels->get (" dcazMid" ) * dcaSigma (track. pt , " dcaz " ) )
477459 mask |= kDCAzMid ;
478460 if (std::abs (track.tpcnsigma ) < cfgTrackSels->get (" tpcNsigmaTight" ))
479461 mask |= kTPCPIDTight ;
@@ -524,16 +506,18 @@ struct EbyeMaker {
524506 histos.add <TH2>(" QA/tpcSignal" , " ;#it{p}_{TPC} (GeV/#it{c});d#it{E}/d#it{x}_{TPC} (a.u.)" , HistType::kTH2F , {momAxis, tpcAxis});
525507 histos.add <TH2>(" QA/tpcSignalPr" , " ;#it{p}_{TPC} (GeV/#it{c});d#it{E}/d#it{x}_{TPC} (a.u.)" , HistType::kTH2F , {momAxis, tpcAxis});
526508 histos.add <TH2>(" QA/itsSignal" , " ;#it{p}_{glo} (GeV/#it{c});d#it{E}/d#it{x}_{ITS} (a.u.)" , HistType::kTH2F , {momAxis, tpcAxis});
527- tofMass[0 ] = histos.add <TH3>(" QA/tofMass_p" , " ;Centrality (%);#it{p}_{T} (GeV/#it{c});Mass (GeV/#it{c}^{2});Entries" , HistType::kTH3F , {centAxis, momAxis, tofMassAxis});
528- tofMass[1 ] = histos.add <TH3>(" QA/tofMass_d" , " ;Centrality (%);#it{p}_{T} (GeV/#it{c});Mass (GeV/#it{c}^{2});Entries" , HistType::kTH3F , {centAxis, momAxis, tofMassAxis});
509+
510+ // tracking variables QA
511+ histos.add <TH2>(" QA/tpcCRvsCls" , " ;#it{N}_{TPCCR};#it{N}_{TPCcls}" , HistType::kTH2F , {nTpcAxis, nTpcAxis});
512+ histos.add <TH1>(" QA/dcaxyVsPt" , " ;#it{p}_{T} (GeV/#it{c});DCA_{#it{xy}} (cm)" , HistType::kTH2F , {momAxis, dcaAxis});
513+ histos.add <TH1>(" QA/dcazVsPt" , " ;#it{p}_{T} (GeV/#it{c});DCA_{#it{z}} (cm)" , HistType::kTH2F , {momAxis, dcaAxis});
529514
530515 ptMin = std::array<float , kNpart >{antipPtMin, antidPtMin};
531516 ptMax = std::array<float , kNpart >{antipPtMax, antidPtMax};
532517 ptTof = std::array<float , kNpart >{antipPtTof, antidPtTof};
533518
534519 nSigmaTpcCutLow = std::array<float , kNpart >{antipNsigmaTpcCutLow, antidNsigmaTpcCutLow};
535520 nSigmaTpcCutUp = std::array<float , kNpart >{antipNsigmaTpcCutUp, antidNsigmaTpcCutUp};
536- tpcInnerParamMax = std::array<float , kNpart >{antipTpcInnerParamMax, antidTpcInnerParamMax};
537521 }
538522
539523 template <class T >
@@ -568,12 +552,18 @@ struct EbyeMaker {
568552 continue ;
569553 }
570554
555+ histos.fill (HIST (" QA/tpcCRvsCls" ), track.tpcNClsCrossedRows (), track.tpcNClsFound ());
556+ if (track.tpcNClsFound () < trackNclusTpcCut || track.tpcNClsCrossedRows () < trackNcrossedRows)
557+ continue ;
558+
571559 auto trackParCov = getTrackParCov (track);
572560 o2::base::Propagator::Instance ()->propagateToDCABxByBz ({collision.posX (), collision.posY (), collision.posZ ()}, trackParCov, 2 .f , fitter.getMatCorrType (), &dcaInfo);
573561 auto dca = std::hypot (dcaInfo[0 ], dcaInfo[1 ]);
574562 auto trackPt = trackParCov.getPt ();
575563 auto trackEta = trackParCov.getEta ();
576- if (std::abs (dcaInfo[0 ]) > cfgDcaSels->get (" dcaxy" ) * (constDCASel ? 1 . : dcaSigma (track.pt ())) || std::abs (dcaInfo[1 ]) > cfgDcaSels->get (" dcaz" ) || dca > cfgDcaSels->get (" dca" )) { // dcaxy
564+ histos.fill (HIST (" QA/dcaxyVsPt" ), track.pt (), dcaInfo[0 ]);
565+ histos.fill (HIST (" QA/dcazVsPt" ), track.pt (), dcaInfo[1 ]);
566+ if (std::abs (dcaInfo[0 ]) > cfgDcaSels->get (" dcaxy" ) * dcaSigma (track.pt (), " dcaxy" ) || std::abs (dcaInfo[1 ]) > cfgDcaSels->get (" dcaz" ) * dcaSigma (track.pt (), " dcaz" ) || dca > cfgDcaSels->get (" dca" ) * dcaSigma (track.pt (), " dca" )) { // dcaxy
577567 continue ;
578568 }
579569 histos.fill (HIST (" QA/tpcSignal" ), track.tpcInnerParam (), track.tpcSignal ());
@@ -585,13 +575,6 @@ struct EbyeMaker {
585575 continue ;
586576 }
587577
588- if (doprocessRun3 || doprocessMcRun3) {
589- float cosL = 1 / std::sqrt (1 .f + track.tgl () * track.tgl ());
590- if (iP && getITSClSize (track) * cosL < antidItsClsSizeCut && trackPt < antidPtItsClsSizeCut) {
591- continue ;
592- }
593- }
594-
595578 auto nSigmaTPC = getCustomTPCPID (track, kPartMass [iP], iP);
596579
597580 float beta{track.hasTOF () ? track.length () / (track.tofSignal () - track.tofEvTime ()) * o2::constants::physics::invLightSpeedCm2PS : -999 .f };
@@ -600,18 +583,10 @@ struct EbyeMaker {
600583 const float maxTofChi2 = 3 .f ; // TODO: check if this is still needed
601584 bool hasTof = track.hasTOF () && track.tofChi2 () < maxTofChi2;
602585
603- if ((trackPt <= ptTof[iP] || (trackPt > ptTof[iP] && hasTof)) && nSigmaTPC > nSigmaTpcCutLow[iP] && nSigmaTPC < nSigmaTpcCutUp[iP]) { // for QA histograms
604- tofMass[iP]->Fill (centrality, trackPt, mass);
605- }
606-
607586 if (nSigmaTPC < nSigmaTpcCutLow[iP] || nSigmaTPC > nSigmaTpcCutUp[iP]) {
608587 continue ;
609588 }
610589
611- // temporary cut to reject fake matches (run 3)
612- if (track.tpcInnerParam () < tpcInnerParamMax[iP]) {
613- continue ;
614- }
615590 if (trackPt > ptTof[iP] && !hasTof) {
616591 continue ;
617592 }
@@ -916,7 +891,7 @@ struct EbyeMaker {
916891 }
917892 }
918893
919- void processRun3 (soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs > const & collisions, TracksFullIUPID const & tracks, aod::V0s const & V0s, aod::BCsWithTimestamps const &)
894+ void processRun3 (soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms > const & collisions, TracksFullIUPID const & tracks, aod::V0s const & V0s, aod::BCsWithTimestamps const &)
920895 {
921896 for (const auto & collision : collisions) {
922897 auto bc = collision.bc_as <aod::BCsWithTimestamps>();
@@ -925,8 +900,8 @@ struct EbyeMaker {
925900 if (std::abs (collision.posZ ()) > zVtxMax || !collision.selection_bit (aod::evsel::kNoITSROFrameBorder ) || !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision.selection_bit (aod::evsel::kIsTriggerTVX ) || ((!collision.selection_bit (aod::evsel::kIsGoodITSLayersAll ) || !collision.selection_bit (aod::evsel::kNoSameBunchPileup ) || !collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV )) && useAllEvSel))
926901 continue ;
927902
928- auto centrality = collision.centFT0C ();
929- if (centrality < kCentCutMin || centrality > kCentCutMax )
903+ auto centrality = collision.centFT0M ();
904+ if (centrality > kCentCutMax )
930905 continue ;
931906
932907 histos.fill (HIST (" QA/zVtx" ), collision.posZ ());
@@ -1097,7 +1072,7 @@ struct EbyeMaker {
10971072 }
10981073 PROCESS_SWITCH (EbyeMaker, processMiniRun2, " process mini tables(Run 2)" , false );
10991074
1100- void processMcRun3 (soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0Cs > const & collisions, aod::McCollisions const & /* mcCollisions*/ , TracksFullIUPID const & tracks, aod::V0s const & V0s, aod::McParticles const & mcParticles, aod::McTrackLabels const & mcLab, aod::BCsWithTimestamps const &)
1075+ void processMcRun3 (soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0Ms > const & collisions, aod::McCollisions const & /* mcCollisions*/ , TracksFullIUPID const & tracks, aod::V0s const & V0s, aod::McParticles const & mcParticles, aod::McTrackLabels const & mcLab, aod::BCsWithTimestamps const &)
11011076 {
11021077 for (const auto & collision : collisions) {
11031078 auto bc = collision.bc_as <aod::BCsWithTimestamps>();
@@ -1106,7 +1081,7 @@ struct EbyeMaker {
11061081 if (std::abs (collision.posZ ()) > zVtxMax || !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision.selection_bit (aod::evsel::kIsTriggerTVX ) || ((!collision.selection_bit (aod::evsel::kIsGoodITSLayersAll ) || !collision.selection_bit (aod::evsel::kNoSameBunchPileup ) || !collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV )) && useAllEvSel))
11071082 continue ;
11081083
1109- auto centrality = collision.centFT0C ();
1084+ auto centrality = collision.centFT0M ();
11101085
11111086 histos.fill (HIST (" QA/zVtx" ), collision.posZ ());
11121087
0 commit comments