@@ -86,9 +86,8 @@ static const bool doprocessLfFullParticle[Np] = {doprocessLfFullEl, doprocessLfF
8686
8787// Spectra task
8888struct SpectraTOF {
89- static constexpr int EvSelInelGt0Cut = 1 ;
90- static constexpr int EvSelInelGt1Cut = 2 ;
91-
89+ static constexpr int EvSelInelGt0Cut = 1 ;
90+ static constexpr int EvSelInelGt1Cut = 2 ;
9291 struct : ConfigurableGroup {
9392 Configurable<float > cfgCutVertex{" cfgCutVertex" , 10 .0f , " Accepted z-vertex range" };
9493 Configurable<int > cfgINELCut{" cfgINELCut" , 0 , " INEL event selection: 0 no sel, 1 INEL>0, 2 INEL>1" };
@@ -304,27 +303,24 @@ struct SpectraTOF {
304303
305304 histos.add (" event/vertexz" , " " , HistType::kTH1D , {vtxZAxis});
306305 histos.add (" test_occupancy/event/vertexz" , " " , HistType::kTH1D , {vtxZAxis});
307-
308- enum EEvSelBin {
309- kEventsRead = 1 ,
310- kInelGt0Frac ,
311- kInelGt1Frac ,
312- kEvSelPassed ,
313- kNoITSROFrameBorder1 ,
314- kNoITSROFrameBorder2 ,
315- kNoSameBunchPileup ,
316- kIsGoodZvtxFT0vsPV ,
317- kIsVertexITSTPC ,
318- kNoTimeFrameBorder ,
319- kInelGt0FracRepeat ,
320- kInelGt1FracRepeat ,
321- kPosZPassed ,
322- kInelGt0Final ,
323- kInelGt1Final
324- }
325-
306+ enum EEvSelBin {
307+ kEventsRead = 1 ,
308+ kInelGt0Frac ,
309+ kInelGt1Frac ,
310+ kEvSelPassed ,
311+ kNoITSROFrameBorder1 ,
312+ kNoITSROFrameBorder2 ,
313+ kNoSameBunchPileup ,
314+ kIsGoodZvtxFT0vsPV ,
315+ kIsVertexITSTPC ,
316+ kNoTimeFrameBorder ,
317+ kInelGt0FracRepeat ,
318+ kInelGt1FracRepeat ,
319+ kPosZPassed ,
320+ kInelGt0Final ,
321+ kInelGt1Final
322+ }
326323 auto h = histos.add <TH1>(" evsel" , " evsel" , HistType::kTH1D , {{20 , 0.5 , 20.5 }});
327-
328324 h->GetXaxis ()->SetBinLabel (kEventsRead , " Events read" );
329325 h->GetXaxis ()->SetBinLabel (kInelGt0Frac , " INEL>0 (fraction)" );
330326 h->GetXaxis ()->SetBinLabel (kInelGt1Frac , " INEL>1 (fraction)" );
@@ -615,13 +611,12 @@ struct SpectraTOF {
615611 histos.add (" MC/MultiplicityMCINELgt1" , " MC multiplicity" , kTH1D , {multAxis});
616612 }
617613 if (doprocessTrackMCLabels) {
618-
619614 for (int par = 0 ; par < Np; par++) {
620- if (doprocessFullParticle[par]){ // executes only for the enabled particles
621- for (int i = 0 ; i < NpCharge; i++) {
622- hMCPdgNsigmaTPC[par - 2 ][i] = histos.add <TH3>(Form (" test_mclabels/nsigmatpc/%s/%s/pdg_%i" , (i < Np) ? " pos" : " neg" , pN[par], PDGs[i % Np]), Form (" True %s (%i) in %s selection" , pTCharge[i], PDGs[i], (i < Np) ? pTCharge[par] : pTCharge[par + Np]), kTH3D , {ptAxis, nsigmaTPCAxisOccupancy, multAxis});
623- }
624- }
615+ if (doprocessFullParticle[par]) { // executes only for the enabled particles
616+ for (int i = 0 ; i < NpCharge; i++) {
617+ hMCPdgNsigmaTPC[par - 2 ][i] = histos.add <TH3>(Form (" test_mclabels/nsigmatpc/%s/%s/pdg_%i" , (i < Np) ? " pos" : " neg" , pN[par], PDGs[i % Np]), Form (" True %s (%i) in %s selection" , pTCharge[i], PDGs[i], (i < Np) ? pTCharge[par] : pTCharge[par + Np]), kTH3D , {ptAxis, nsigmaTPCAxisOccupancy, multAxis});
618+ }
619+ }
625620 }
626621 }
627622
@@ -1083,11 +1078,11 @@ struct SpectraTOF {
10831078 }
10841079 }
10851080 // Filling DCA info with the TPC+TOF PID
1086- static constexpr float DcaMaxCombinedSigma = 2 .f ;
1087- static constexpr float DcaMaxTPCSigma = 1 .f ;
1088- static constexpr float DcaTrkPtCut = 0 .4f ;
1089- static constexpr float DcaPhiPtMin = 0 .9f ;
1090- static constexpr float DcaPhiPtMax = 1 .1f ;
1081+ static constexpr float DcaMaxCombinedSigma = 2 .f ;
1082+ static constexpr float DcaMaxTPCSigma = 1 .f ;
1083+ static constexpr float DcaTrkPtCut = 0 .4f ;
1084+ static constexpr float DcaPhiPtMin = 0 .9f ;
1085+ static constexpr float DcaPhiPtMax = 1 .1f ;
10911086 bool isDCAPureSample = (std::sqrt (nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < DcaMaxCombinedSigma);
10921087 if (track.pt () <= DcaTrkPtCut) {
10931088 isDCAPureSample = (nsigmaTPC < DcaMaxTPCSigma);
@@ -1442,10 +1437,10 @@ struct SpectraTOF {
14421437 return true ;
14431438 }
14441439
1445- static constexpr int ItsMaxLayer = 7 ; // bit runs from 0-6
1446- static constexpr int TrdBit = 10 ;
1447- static constexpr int TofBit = 11 ;
1448- static constexpr int GlobalMismatchBit = 15 ;
1440+ static constexpr int ItsMaxLayer = 7 ; // bit runs from 0-6
1441+ static constexpr int TrdBit = 10 ;
1442+ static constexpr int TofBit = 11 ;
1443+ static constexpr int GlobalMismatchBit = 15 ;
14491444 template <typename ParticleType>
14501445 bool isMismatchedTrack (const ParticleType& track, const int detector)
14511446 {
@@ -1762,7 +1757,7 @@ struct SpectraTOF {
17621757 } // end of the process function
17631758 PROCESS_SWITCH (SpectraTOF, processDerived, " Derived data processor" , false );
17641759
1765- #define MAKE_PROCESS_FUNCTION (processorName, inputPid, particleId, isFull, tofTable, tpcTable ) \
1760+ #define MAKE_PROCESS_FUNCTION (processorName, inputPid, particleId, isFull, tofTable, tpcTable ) \
17661761 void process##processorName##inputPid(CollisionCandidates::iterator const & collision, \
17671762 soa::Join<TrackCandidates, \
17681763 aod::pid##tofTable##inputPid, \
@@ -1889,20 +1884,20 @@ struct SpectraTOF {
18891884 template <std::size_t id>
18901885 bool isParticleEnabled ()
18911886 {
1892- static_assert (id < NpCharge, " Unknown particle id!" );
1893- constexpr std::size_t Idx = id % Np;
1894- if (doprocessFullParticle[Idx] || doprocessLfFullParticle[Idx]){
1895- return true ;
1896- }
1887+ static_assert (id < NpCharge, " Unknown particle id!" );
1888+ constexpr std::size_t Idx = id % Np;
1889+ if (doprocessFullParticle[Idx] || doprocessLfFullParticle[Idx]) {
1890+ return true ;
1891+ }
18971892 return false ;
18981893 }
18991894
19001895 using RecoMCCollisions = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0As, aod::CentFT0Cs, aod::TPCMults, aod::PVMults, aod::MultZeqs, aod::CentFT0Ms>; // RD
19011896 template <std::size_t i, typename TrackType, typename ParticleType>
19021897 void fillTrackHistogramsMC (TrackType const & track,
1903- ParticleType::iterator const & mcParticle,
1904- RecoMCCollisions::iterator const & collision,
1905- ParticleType const & mcParticles)
1898+ ParticleType::iterator const & mcParticle,
1899+ RecoMCCollisions::iterator const & collision,
1900+ ParticleType const & mcParticles)
19061901 {
19071902 if (!isParticleEnabled<i>()) { // Check if the particle is enabled
19081903 return ;
@@ -1944,8 +1939,8 @@ struct SpectraTOF {
19441939 hDcaZMC[i]->Fill (track.pt (), track.dcaZ ());
19451940 }
19461941
1947- if (!mcParticle.isPhysicalPrimary ()) { // Secondaries (weak decays and material)
1948- if (mcParticle.getProcess () == kPDecay ) { // Particles from decay
1942+ if (!mcParticle.isPhysicalPrimary ()) { // Secondaries (weak decays and material)
1943+ if (mcParticle.getProcess () == kPDecay ) { // Particles from decay
19491944 if (enableDCAxyzHistograms) {
19501945 hDcaXYZStr[i]->Fill (track.pt (), track.dcaXY (), track.dcaZ ());
19511946 } else {
@@ -2094,8 +2089,8 @@ struct SpectraTOF {
20942089 const bool isKaonTOF = std::abs (nsigmaTOFKa) < trkselOptions.cfgCutNsigma ;
20952090 const bool isProtonTOF = std::abs (nsigmaTOFPr) < trkselOptions.cfgCutNsigma ;
20962091
2097- if (!mcParticle.isPhysicalPrimary ()) { // Is not physical primary
2098- if (mcParticle.getProcess () == kPDecay ) { // Is from decay
2092+ if (!mcParticle.isPhysicalPrimary ()) { // Is not physical primary
2093+ if (mcParticle.getProcess () == kPDecay ) { // Is from decay
20992094 if (includeCentralityMC) {
21002095 if (includeCentralityMC) {
21012096 histos.fill (HIST (hpt_num_str[i]), track.pt (), multiplicity, track.dcaXY ());
@@ -2701,12 +2696,12 @@ struct SpectraTOF {
27012696 }
27022697 PROCESS_SWITCH (SpectraTOF, processMCgen, " process generated MC" , false );
27032698 void processMCgenRecoEvs (soa::Join<TrackCandidates,
2704- aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr,
2705- aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr> const & tracks,
2706- aod::McTrackLabels const & mcTrackLabels,
2707- GenMCCollisions const &,
2708- RecoMCCollisions const & collisions,
2709- aod::McParticles const & mcParticles)
2699+ aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr,
2700+ aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr> const & tracks,
2701+ aod::McTrackLabels const & mcTrackLabels,
2702+ GenMCCollisions const &,
2703+ RecoMCCollisions const & collisions,
2704+ aod::McParticles const & mcParticles)
27102705 {
27112706 for (const auto & collision : collisions) {
27122707 if (!collision.has_mcCollision ()) {
@@ -2820,7 +2815,7 @@ struct SpectraTOF {
28202815 const auto & mcLabel = mcTrackLabels.iteratorAt (track.globalIndex ());
28212816 const auto & mcParticle = mcParticles.iteratorAt (mcLabel.mcParticleId ());
28222817 int pdgCode = mcParticle.pdgCode ();
2823- static_for<2 , 4 >([&](auto par) { // for pi, K, p only
2818+ static_for<2 , 4 >([&](auto par) { // for pi, K, p only
28242819 const auto & nsigmaTPCpar = o2::aod::pidutils::tpcNSigma<par>(track);
28252820 bool isTPCpar = std::abs (nsigmaTPCpar) < trkselOptions.cfgCutNsigma ;
28262821 // Precompute rapidity values to avoid redundant calculations
0 commit comments