@@ -66,7 +66,7 @@ constexpr double betheBlochDefault[nParticles][nBetheParams]{
6666 {-126.557359 , -0.858569 , 1.111643 , 1.210323 , 2.656374 , 0.09 }, // helion
6767 {-126.557359 , -0.858569 , 1.111643 , 1.210323 , 2.656374 , 0.09 }}; // alpha
6868const int nTrkSettings = 19 ;
69- static const std::vector<std::string> trackPIDsettingsNames{" useBBparams" , " minITSnCls" , " minITSnClscos" , " minTPCnCls" , " maxTPCchi2" , " minTPCchi2" , " maxITSchi2" , " minRigidity" , " maxRigidity" , " maxTPCnSigma" , " TOFrequiredabove" , " minTOFmass" , " maxTOFmass" , " maxDcaXY" , " maxDcaZ" , " minITSclsSize" , " maxITSclsSize" , " minTPCnClsCrossedRows" ," minReqClusterITSib" };
69+ static const std::vector<std::string> trackPIDsettingsNames{" useBBparams" , " minITSnCls" , " minITSnClscos" , " minTPCnCls" , " maxTPCchi2" , " minTPCchi2" , " maxITSchi2" , " minRigidity" , " maxRigidity" , " maxTPCnSigma" , " TOFrequiredabove" , " minTOFmass" , " maxTOFmass" , " maxDcaXY" , " maxDcaZ" , " minITSclsSize" , " maxITSclsSize" , " minTPCnClsCrossedRows" , " minReqClusterITSib" };
7070constexpr double trackPIDsettings[nParticles][nTrkSettings]{
7171 {0 , 0 , 4 , 60 , 4.0 , 0.5 , 100 , 0.15 , 1.2 , 2.5 , -1 , 0 , 100 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
7272 {1 , 0 , 4 , 70 , 4.0 , 0.5 , 100 , 0.20 , 4.0 , 3.0 , -1 , 0 , 100 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
@@ -135,8 +135,7 @@ struct NucleitpcPbPb {
135135 Configurable<bool > cfgTwicemass{" cfgTwicemass" , true , " multiply mass by its charge" };
136136 Configurable<bool > cfgRequirebetaplot{" cfgRequirebetaplot" , true , " Require beta plot" };
137137 Configurable<bool > cfgRequireMCposZ{" cfgRequireMCposZ" , true , " Require beta plot" };
138-
139-
138+
140139 Configurable<LabeledArray<double >> cfgBetheBlochParams{" cfgBetheBlochParams" , {betheBlochDefault[0 ], nParticles, nBetheParams, particleNames, betheBlochParNames}, " TPC Bethe-Bloch parameterisation for light nuclei" };
141140 Configurable<LabeledArray<double >> cfgTrackPIDsettings{" cfgTrackPIDsettings" , {trackPIDsettings[0 ], nParticles, nTrkSettings, particleNames, trackPIDsettingsNames}, " track selection and PID criteria" };
142141 Configurable<bool > cfgFillDeDxWithCut{" cfgFillDeDxWithCut" , true , " Fill with cut beth bloch" };
@@ -149,7 +148,7 @@ struct NucleitpcPbPb {
149148 Configurable<float > cfgtpcNClsFound{" cfgtpcNClsFound" , 100 .0f , " min. no. of tpcNClsFound" };
150149 Configurable<float > cfgitsNCls{" cfgitsNCls" , 2 .0f , " min. no. of itsNCls" };
151150 o2::track::TrackParametrizationWithError<float > mTrackParCov ;
152- // Binning configuration
151+ // Binning configuration
153152 ConfigurableAxis axisMagField{" axisMagField" , {10 , -10 ., 10 .}, " magnetic field" };
154153 ConfigurableAxis axisNev{" axisNev" , {3 , 0 ., 3 .}, " Number of events" };
155154 ConfigurableAxis axisRigidity{" axisRigidity" , {4000 , -10 ., 10 .}, " #it{p}^{TPC}/#it{z}" };
@@ -192,9 +191,9 @@ struct NucleitpcPbPb {
192191 ccdb->setFatalWhenNull (false );
193192 for (int i = 0 ; i < nParticles; i++) { // create primaryParticles
194193 primaryParticles.push_back (PrimParticles (particleNames.at (i), particlePdgCodes.at (i), particleMasses.at (i), particleCharge.at (i), cfgBetheBlochParams));
195- }
196- // create histograms
197- if (doprocessData){
194+ }
195+ // create histograms
196+ if (doprocessData) {
198197 histos.add (" histMagField" , " histMagField" , kTH1F , {axisMagField});
199198 histos.add (" histNev" , " histNev" , kTH1F , {axisNev});
200199 histos.add (" histVtxZ" , " histVtxZ" , kTH1F , {axisVtxZ});
@@ -228,15 +227,15 @@ struct NucleitpcPbPb {
228227 hmass[2 * i + 1 ] = histos.add <TH2>(Form (" histmass_ptanti/histmass_%s" , histName.Data ()), " ;p_T{TPC} (GeV/#it{c}); mass^{2}" , HistType::kTH2F , {ptAxis, axismass});
229228 }
230229 }
231-
232- if (doprocessMC){
230+
231+ if (doprocessMC) {
233232 histomc.add (" histVtxZgen" , " histVtxZgen" , kTH1F , {axisVtxZ});
234233 histomc.add (" histEtagen" , " histEtagen" , kTH1F , {axiseta});
235234 histomc.add (" histPtgenHe3" , " histPtgenHe3" , kTH1F , {ptAxis});
236235 histomc.add (" histPtgenAntiHe3" , " histPtgenAntiHe3" , kTH1F , {ptAxis});
237236 histomc.add (" histPtgenHe4" , " histPtgenHe4" , kTH1F , {ptAxis});
238237 histomc.add (" histPtgenAntiHe4" , " histPtgenAntiHe4" , kTH1F , {ptAxis});
239- // Reconstrcuted eta
238+ // Reconstrcuted eta
240239 histomc.add (" histNevReco" , " histNevReco" , kTH1F , {axisNev});
241240 histomc.add (" histVtxZReco" , " histVtxZReco" , kTH1F , {axisVtxZ});
242241 histomc.add (" histCentFT0CReco" , " histCentFT0CReco" , kTH1F , {axisCent});
@@ -246,7 +245,7 @@ struct NucleitpcPbPb {
246245 histomc.add (" histPtRecoHe4" , " histPtgenHe4" , kTH1F , {ptAxis});
247246 histomc.add (" histPtRecoAntiHe4" , " histPtgenAntiHe4" , kTH1F , {ptAxis});
248247 histomc.add (" histDeltaPtVsPtGen" , " delta pt vs pt rec" , HistType::kTH2F , {{1000 , 0 , 10 }, {1000 , -0.5 , 0.5 , " p_{T}(reco) - p_{T}(gen);p_{T}(reco)" }});
249- histomc.add (" histPIDtrack" , " delta pt vs pt rec" , HistType::kTH2F , {{1000 , 0 , 10 ," p_{T}(reco)" }, {9 , -0.5 , 8.5 , " p_{T}(reco) - p_{T}(gen)" }});
248+ histomc.add (" histPIDtrack" , " delta pt vs pt rec" , HistType::kTH2F , {{1000 , 0 , 10 , " p_{T}(reco)" }, {9 , -0.5 , 8.5 , " p_{T}(reco) - p_{T}(gen)" }});
250249 histomc.add (" histDeltaPtVsPtGenHe4" , " delta pt vs pt rec" , HistType::kTH2F , {{1000 , 0 , 10 }, {1000 , -0.5 , 0.5 , " p_{T}(reco) - p_{T}(gen);p_{T}(reco)" }});
251250 }
252251 }
@@ -283,7 +282,7 @@ struct NucleitpcPbPb {
283282 double cosheta = std::cosh (track.eta ());
284283 if ((track.itsNCls () / cosheta) < cfgTrackPIDsettings->get (i, " minITSnClscos" ) && cfgminITSnClscosRequire)
285284 continue ;
286- if ((track.itsNClsInnerBarrel () < cfgTrackPIDsettings->get (i, " minReqClusterITSib" )) && cfgminReqClusterITSibRequire)
285+ if ((track.itsNClsInnerBarrel () < cfgTrackPIDsettings->get (i, " minReqClusterITSib" )) && cfgminReqClusterITSibRequire)
287286 continue ;
288287 if (track.itsChi2NCl () > cfgTrackPIDsettings->get (i, " maxITSchi2" ) && cfgmaxITSchi2Require)
289288 continue ;
@@ -327,7 +326,9 @@ struct NucleitpcPbPb {
327326 fillhmass (track, i);
328327 }
329328 histos.fill (HIST (" histeta" ), track.eta ());
330- if (cfgRequirebetaplot) {histos.fill (HIST (" Tofsignal" ),getRigidity (track), o2::pid::tof::Beta::GetBeta (track));}
329+ if (cfgRequirebetaplot) {
330+ histos.fill (HIST (" Tofsignal" ), getRigidity (track), o2::pid::tof::Beta::GetBeta (track));
331+ }
331332 filldedx (track, nParticles);
332333 } // track loop
333334 }
@@ -375,7 +376,7 @@ struct NucleitpcPbPb {
375376 (void )bcs;
376377 mcCollInfos.clear ();
377378 mcCollInfos.resize (mcCollisions.size ());
378- // ----------------------------- Generated particles loop -----------------------------
379+ // ----------------------------- Generated particles loop -----------------------------
379380 for (auto const & mcColl : mcCollisions) {
380381 if (std::abs (mcColl.posZ ()) > cfgZvertex)
381382 continue ;
@@ -401,9 +402,9 @@ struct NucleitpcPbPb {
401402 } else if (pdgCode == -1000020040 ) {
402403 histomc.fill (HIST (" histPtgenAntiHe4" ), ptScaled);
403404 }
404- } // mc track loop generated
405- } // mc collision loop generated
406- // ----------------------------- Reconstructed track loop -----------------------------
405+ } // mc track loop generated
406+ } // mc collision loop generated
407+ // ----------------------------- Reconstructed track loop -----------------------------
407408 for (auto const & collision : collisions) {
408409 auto mcCollIdx = collision.mcCollisionId ();
409410 if (mcCollIdx < 0 || mcCollIdx >= mcCollisions.size ())
@@ -415,7 +416,7 @@ struct NucleitpcPbPb {
415416 collPassedEvSel = collision.sel8 () && std::abs (collision.posZ ()) < cfgZvertex;
416417 occupancy = collision.trackOccupancyInTimeRange ();
417418 if (!collPassedEvSel)
418- continue ;
419+ continue ;
419420 histomc.fill (HIST (" histNevReco" ), 1.5 );
420421 histomc.fill (HIST (" histVtxZReco" ), collision.posZ ());
421422 histomc.fill (HIST (" histCentFT0CReco" ), collision.centFT0C ());
@@ -454,9 +455,9 @@ struct NucleitpcPbPb {
454455 if (!track.passedTPCRefit () && cfgPassedTPCRefit)
455456 continue ;
456457 if (std::abs (track.eta ()) > cfgCutEta)
457- continue ;
458- if (!matchedMCParticle.isPhysicalPrimary ())
459- continue ;
458+ continue ;
459+ if (!matchedMCParticle.isPhysicalPrimary ())
460+ continue ;
460461 for (size_t i = 0 ; i < primaryParticles.size (); i++) {
461462 if (std::abs (pdg) != std::abs (particlePdgCodes.at (i)))
462463 continue ;
@@ -475,7 +476,7 @@ struct NucleitpcPbPb {
475476 double cosheta = std::cosh (track.eta ());
476477 if ((track.itsNCls () / cosheta) < cfgTrackPIDsettings->get (i, " minITSnClscos" ) && cfgminITSnClscosRequire)
477478 continue ;
478- if ((track.itsNClsInnerBarrel () < cfgTrackPIDsettings->get (i, " minReqClusterITSib" )) && cfgminReqClusterITSibRequire)
479+ if ((track.itsNClsInnerBarrel () < cfgTrackPIDsettings->get (i, " minReqClusterITSib" )) && cfgminReqClusterITSibRequire)
479480 continue ;
480481 if (track.itsChi2NCl () > cfgTrackPIDsettings->get (i, " maxITSchi2" ) && cfgmaxITSchi2Require)
481482 continue ;
@@ -518,32 +519,37 @@ struct NucleitpcPbPb {
518519 fillhmass (track, i);
519520 }
520521 histos.fill (HIST (" histeta" ), track.eta ());
521- if (cfgRequirebetaplot) {histos.fill (HIST (" Tofsignal" ),getRigidity (track), o2::pid::tof::Beta::GetBeta (track));}
522+ if (cfgRequirebetaplot) {
523+ histos.fill (HIST (" Tofsignal" ), getRigidity (track), o2::pid::tof::Beta::GetBeta (track));
524+ }
522525 filldedx (track, nParticles);
523- /* ----------------------------------------------------------------------------------------------------------------*/
524- float ptReco;
526+ /* ----------------------------------------------------------------------------------------------------------------*/
527+ float ptReco;
525528 setTrackParCov (track, mTrackParCov );
526529 mTrackParCov .setPID (track.pidForTracking ());
527530 ptReco = (std::abs (pdg) == 1000020030 || std::abs (pdg) == 1000020040 ) ? 2 * mTrackParCov .getPt () : mTrackParCov .getPt ();
528- if (pdg == -1000020040 && cfgmccorrectionhe4Require) {ptReco = ptReco + 0.00765 + 0.503791 * std::exp (-1.10517 * ptReco);}
529-
530- if (pdg == -1000020030 && cfgmccorrectionhe4Require) {
531- int pidGuess = track.pidForTracking ();
532- if ( pidGuess == 6 ){ptReco = ptReco - 0.464215 + 0.195771 * ptReco - 0.0183111 * ptReco * ptReco;
533- // LOG(info) << "we have he3" << pidGuess;
531+ if (pdg == -1000020040 && cfgmccorrectionhe4Require) {
532+ ptReco = ptReco + 0.00765 + 0.503791 * std::exp (-1.10517 * ptReco);
533+ }
534+
535+ if (pdg == -1000020030 && cfgmccorrectionhe4Require) {
536+ int pidGuess = track.pidForTracking ();
537+ if (pidGuess == 6 ) {
538+ ptReco = ptReco - 0.464215 + 0.195771 * ptReco - 0.0183111 * ptReco * ptReco;
539+ // LOG(info) << "we have he3" << pidGuess;
534540 }
535- }
541+ }
536542 float ptGen = matchedMCParticle.pt ();
537543 float deltaPt = ptReco - ptGen;
538-
539- if (pdg == -1000020030 ) {
544+
545+ if (pdg == -1000020030 ) {
540546 histomc.fill (HIST (" histDeltaPtVsPtGen" ), ptReco, deltaPt);
541547 histomc.fill (HIST (" histPIDtrack" ), ptReco, track.pidForTracking ());
542548 }
543549 if (pdg == -1000020040 ) {
544550 histomc.fill (HIST (" histDeltaPtVsPtGenHe4" ), ptReco, deltaPt);
545551 }
546- if (pdg == 1000020030 ) {
552+ if (pdg == 1000020030 ) {
547553 histomc.fill (HIST (" histPtRecoHe3" ), ptReco);
548554 } else if (pdg == -1000020030 ) {
549555 histomc.fill (HIST (" histPtRecoAntiHe3" ), ptReco);
@@ -552,11 +558,11 @@ struct NucleitpcPbPb {
552558 } else if (pdg == -1000020040 ) {
553559 histomc.fill (HIST (" histPtRecoAntiHe4" ), ptReco);
554560 }
555- } // Track loop
556- } // Collision loop
561+ } // Track loop
562+ } // Collision loop
557563 }
558564 PROCESS_SWITCH (NucleitpcPbPb, processMC, " MC reco+gen analysis" , true );
559- // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
565+ // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
560566 void initCCDB (aod::BCsWithTimestamps::iterator const & bc)
561567 {
562568 if (mRunNumber == bc.runNumber ()) {
0 commit comments