@@ -86,8 +86,8 @@ static const bool doprocessLfFullParticle[Np] = {doprocessLfFullEl, doprocessLfF
8686
8787// Spectra task
8888struct SpectraTOF {
89- static constexpr int kEvSelInelGt0Cut = 1 ;
90- static constexpr int kEvSelInelGt1Cut = 2 ;
89+ static constexpr int EvSelInelGt0Cut = 1 ;
90+ static constexpr int EvSelInelGt1Cut = 2 ;
9191
9292 struct : ConfigurableGroup {
9393 Configurable<float > cfgCutVertex{" cfgCutVertex" , 10 .0f , " Accepted z-vertex range" };
@@ -338,8 +338,8 @@ struct SpectraTOF {
338338 h->GetXaxis ()->SetBinLabel (kInelGt0FracRepeat , " INEL>0 (fraction)" );
339339 h->GetXaxis ()->SetBinLabel (kInelGt1FracRepeat , " INEL>1 (fraction)" );
340340 h->GetXaxis ()->SetBinLabel (kPosZPassed , " posZ passed" );
341- h->GetXaxis ()->SetBinLabel (kInelGt0Final , evselOptions.cfgINELCut .value == kEvSelInelGt0Cut ? " INEL>0" : " INEL>0 (fraction)" );
342- h->GetXaxis ()->SetBinLabel (kInelGt1Final , evselOptions.cfgINELCut .value == kEvSelInelGt1Cut ? " INEL>1" : " INEL>1 (fraction)" );
341+ h->GetXaxis ()->SetBinLabel (kInelGt0Final , evselOptions.cfgINELCut .value == EvSelInelGt0Cut ? " INEL>0" : " INEL>0 (fraction)" );
342+ h->GetXaxis ()->SetBinLabel (kInelGt1Final , evselOptions.cfgINELCut .value == EvSelInelGt1Cut ? " INEL>1" : " INEL>1 (fraction)" );
343343
344344 h = histos.add <TH1>(" tracksel" , " tracksel" , HistType::kTH1D , {{10 , 0.5 , 10.5 }});
345345 h->GetXaxis ()->SetBinLabel (1 , " Tracks read" );
@@ -1083,17 +1083,17 @@ struct SpectraTOF {
10831083 }
10841084 }
10851085 // Filling DCA info with the TPC+TOF PID
1086- static constexpr float kDcaMaxCombinedSigma = 2 .f ;
1087- static constexpr float kDcaMaxTPCSigma = 1 .f ;
1088- static constexpr float kDcaTrkPtCut = 0 .4f ;
1089- static constexpr float kDcaPhiPtMin = 0 .9f ;
1090- static constexpr float kDcaPhiPtMax = 1 .1f ;
1091- bool isDCAPureSample = (std::sqrt (nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < kDcaMaxCombinedSigma );
1092- if (track.pt () <= kDcaTrkPtCut ) {
1093- isDCAPureSample = (nsigmaTPC < kDcaMaxTPCSigma );
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 ;
1091+ bool isDCAPureSample = (std::sqrt (nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < DcaMaxCombinedSigma );
1092+ if (track.pt () <= DcaTrkPtCut ) {
1093+ isDCAPureSample = (nsigmaTPC < DcaMaxTPCSigma );
10941094 }
10951095 if (isDCAPureSample) {
1096- const bool isInPtRangeForPhi = track.pt () < kDcaPhiPtMax && track.pt () > kDcaPhiPtMin ;
1096+ const bool isInPtRangeForPhi = track.pt () < DcaPhiPtMax && track.pt () > DcaPhiPtMin ;
10971097 if (enableDCAxyzHistograms) {
10981098 if (track.sign () > 0 ) {
10991099 hDcaXYZ[id]->Fill (track.pt (), track.dcaXY (), track.dcaZ ());
@@ -1213,12 +1213,12 @@ struct SpectraTOF {
12131213 histos.fill (HIST (" evsel" ), 13 .f );
12141214 if (collision.isInelGt0 ()) {
12151215 histos.fill (HIST (" evsel" ), 14 .f );
1216- } else if (evselOptions.cfgINELCut == kEvSelInelGt0Cut ) {
1216+ } else if (evselOptions.cfgINELCut == EvSelInelGt0Cut ) {
12171217 return false ;
12181218 }
12191219 if (collision.isInelGt1 ()) {
12201220 histos.fill (HIST (" evsel" ), 15 .f );
1221- } else if (evselOptions.cfgINELCut == kEvSelInelGt1Cut ) {
1221+ } else if (evselOptions.cfgINELCut == EvSelInelGt1Cut ) {
12221222 return false ;
12231223 }
12241224 histos.fill (HIST (" event/vertexz" ), collision.posZ ());
@@ -1442,43 +1442,43 @@ struct SpectraTOF {
14421442 return true ;
14431443 }
14441444
1445- static constexpr int kItsMaxLayer = 7 ; // bit runs from 0-6
1446- static constexpr int kTrdBit = 10 ;
1447- static constexpr int kTofBit = 11 ;
1448- static constexpr int kGlobalMismatchBit = 15 ;
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 ;
14491449 template <typename ParticleType>
14501450 bool isMismatchedTrack (const ParticleType& track, const int detector)
14511451 {
14521452 switch (detector) {
14531453 case 0 : // ITS
1454- for (int i = 0 ; i < kItsMaxLayer ; i++) {
1454+ for (int i = 0 ; i < ItsMaxLayer ; i++) {
14551455 if (track.mcMask () & 1 << i) {
14561456 return true ;
14571457 }
14581458 }
14591459 return false ;
14601460 break ;
14611461 case 1 : // TPC
1462- for (int i = kItsMaxLayer ; i < kTrdBit ; i++) {
1462+ for (int i = ItsMaxLayer ; i < TrdBit ; i++) {
14631463 if (track.mcMask () & 1 << i) {
14641464 return true ;
14651465 }
14661466 }
14671467 break ;
14681468 case 2 : // TRD
1469- if (track.mcMask () & 1 << kTrdBit ) {
1469+ if (track.mcMask () & 1 << TrdBit ) {
14701470 return true ;
14711471 }
14721472 return false ;
14731473 break ;
14741474 case 3 : // TOF
1475- if (track.mcMask () & 1 << kTofBit ) {
1475+ if (track.mcMask () & 1 << TofBit ) {
14761476 return true ;
14771477 }
14781478 return false ;
14791479 break ;
14801480 default : // All
1481- if (track.mcMask () & 1 << kGlobalMismatchBit ) {
1481+ if (track.mcMask () & 1 << GlobalMismatchBit ) {
14821482 return true ;
14831483 }
14841484 return false ;
@@ -1889,9 +1889,9 @@ struct SpectraTOF {
18891889 template <std::size_t id>
18901890 bool isParticleEnabled ()
18911891 {
1892- static_assert (id < 2 * Np , " Unknown particle id!" );
1893- constexpr std::size_t idx = id % Np;
1894- if (doprocessFullParticle[idx ] || doprocessLfFullParticle[idx ]){
1892+ static_assert (id < NpCharge , " Unknown particle id!" );
1893+ constexpr std::size_t Idx = id % Np;
1894+ if (doprocessFullParticle[Idx ] || doprocessLfFullParticle[Idx ]){
18951895 return true ;
18961896 }
18971897 return false ;
@@ -1933,9 +1933,9 @@ struct SpectraTOF {
19331933 const auto & nsigmaTOFKa = o2::aod::pidutils::tofNSigma<3 >(track);
19341934
19351935 // Filling DCA info with the TPC+TOF PID
1936- bool isDCAPureSample = (std::sqrt (nsigmaTOFKa * nsigmaTOFKa + nsigmaTPCKa * nsigmaTPCKa) < kDcaMaxCombinedSigma );
1937- if (track.pt () <= kDcaTrkPtCut ) {
1938- isDCAPureSample = (nsigmaTPCKa < kDcaMaxTPCSigma );
1936+ bool isDCAPureSample = (std::sqrt (nsigmaTOFKa * nsigmaTOFKa + nsigmaTPCKa * nsigmaTPCKa) < DcaMaxCombinedSigma );
1937+ if (track.pt () <= DcaTrkPtCut ) {
1938+ isDCAPureSample = (nsigmaTPCKa < DcaMaxTPCSigma );
19391939 }
19401940
19411941 if (isDCAPureSample) {
@@ -2603,12 +2603,12 @@ struct SpectraTOF {
26032603 }
26042604 const auto & mcCollision = collision.mcCollision_as <GenMCCollisions>();
26052605 const auto & particlesInCollision = mcParticles.sliceByCached (aod::mcparticle::mcCollisionId, mcCollision.globalIndex (), cache);
2606- if (evselOptions.cfgINELCut .value == kEvSelInelGt0Cut ) {
2606+ if (evselOptions.cfgINELCut .value == EvSelInelGt0Cut ) {
26072607 if (!o2::pwglf::isINELgt0mc (particlesInCollision, pdgDB)) {
26082608 continue ;
26092609 }
26102610 }
2611- if (evselOptions.cfgINELCut .value == kEvSelInelGt1Cut ) {
2611+ if (evselOptions.cfgINELCut .value == EvSelInelGt1Cut ) {
26122612 if (!o2::pwglf::isINELgt1mc (particlesInCollision, pdgDB)) {
26132613 continue ;
26142614 }
@@ -2636,13 +2636,13 @@ struct SpectraTOF {
26362636 const auto & particlesInCollision = mcParticles.sliceByCached (aod::mcparticle::mcCollisionId, mcCollision.globalIndex (), cache);
26372637 bool hasParticleInFT0C = false ;
26382638 bool hasParticleInFT0A = false ;
2639- if (evselOptions.cfgINELCut .value == kEvSelInelGt0Cut ) {
2639+ if (evselOptions.cfgINELCut .value == EvSelInelGt0Cut ) {
26402640 if (!o2::pwglf::isINELgt0mc (particlesInCollision, pdgDB)) {
26412641 continue ;
26422642 }
26432643 }
26442644 histos.fill (HIST (" MC/MultiplicityMCINELgt0" ), getMultiplicityMC (mcCollision));
2645- if (evselOptions.cfgINELCut .value == kEvSelInelGt1Cut ) {
2645+ if (evselOptions.cfgINELCut .value == EvSelInelGt1Cut ) {
26462646 if (!o2::pwglf::isINELgt1mc (particlesInCollision, pdgDB)) {
26472647 continue ;
26482648 }
0 commit comments