@@ -350,7 +350,7 @@ struct HfDataCreatorCharmResoReduced {
350350 doprocessDstarV0MC || doprocessDstarTrackMC || doprocessDstarV0AndTrackMC || doprocessDstarV0MCWithMl || doprocessDstarTrackMCWithMl || doprocessDstarV0AndTrackMCWithMl ||
351351 doprocessDplusV0MC || doprocessDplusTrackMC || doprocessDplusV0AndTrackMC || doprocessDplusV0MCWithMl || doprocessDplusTrackMCWithMl || doprocessDplusV0AndTrackMCWithMl) {
352352 // MC Rec
353- int nChannels = hf_decay::hf_cand_reso::DecayChannelMain::NChannelsMain;
353+ int const nChannels = hf_decay::hf_cand_reso::DecayChannelMain::NChannelsMain;
354354 registry.add (" hMCRecCounter" , " Number of Reconstructed MC Matched candidates per channel" , {HistType::kTH1D , {{2 * nChannels + 1 , -(nChannels + 0.5 ), nChannels + 0.5 }}});
355355 registry.add (" hMCRecDebug" , " Debug of MC Reco" , {HistType::kTH1D , {{551 , -0.5 , 550.5 }}});
356356 registry.add (" hMCRecOrigin" , " Origin of Matched particles" , {HistType::kTH1D , {{3 , -0.5 , 2.5 }}});
@@ -425,9 +425,9 @@ struct HfDataCreatorCharmResoReduced {
425425 // Utility to find which v0 daughter carries the largest fraction of the mother longitudinal momentum
426426 float alphaAP (std::array<float , 3 > const & momA, std::array<float , 3 > const & momB, std::array<float , 3 > const & momC)
427427 {
428- float momTot = std::sqrt (std::pow (momA[0 ], 2 .) + std::pow (momA[1 ], 2 .) + std::pow (momA[2 ], 2 .));
429- float lQlPos = (momB[0 ] * momA[0 ] + momB[1 ] * momA[1 ] + momB[2 ] * momA[2 ]) / momTot;
430- float lQlNeg = (momC[0 ] * momA[0 ] + momC[1 ] * momA[1 ] + momC[2 ] * momA[2 ]) / momTot;
428+ float const momTot = std::sqrt (std::pow (momA[0 ], 2 .) + std::pow (momA[1 ], 2 .) + std::pow (momA[2 ], 2 .));
429+ float const lQlPos = (momB[0 ] * momA[0 ] + momB[1 ] * momA[1 ] + momB[2 ] * momA[2 ]) / momTot;
430+ float const lQlNeg = (momC[0 ] * momA[0 ] + momC[1 ] * momA[1 ] + momC[2 ] * momA[2 ]) / momTot;
431431 return (lQlPos - lQlNeg) / (lQlPos + lQlNeg);
432432 }
433433 // Utility to find DCA of V0 to Primary vertex
@@ -510,7 +510,7 @@ struct HfDataCreatorCharmResoReduced {
510510 return false ;
511511 }
512512 // v0 cosine of pointing angle
513- std::array<float , 3 > primVtx = {collision.posX (), collision.posY (), collision.posZ ()};
513+ std::array<float , 3 > const primVtx = {collision.posX (), collision.posY (), collision.posZ ()};
514514 candidateV0.cosPA = RecoDecay::cpa (primVtx, vtx, candidateV0.mom );
515515 if (candidateV0.cosPA < cfgV0Cuts.cosPa ) {
516516 return false ;
@@ -519,7 +519,7 @@ struct HfDataCreatorCharmResoReduced {
519519 candidateV0.v0Type = {BIT (BachelorType::K0s) | BIT (BachelorType::Lambda) | BIT (BachelorType::AntiLambda)};
520520 // for lambda hypotesys define if its lambda or anti-lambda
521521 candidateV0.alpha = alphaAP (candidateV0.mom , candidateV0.momPos , candidateV0.momNeg );
522- bool matter = candidateV0.alpha > 0 ;
522+ bool const matter = candidateV0.alpha > 0 ;
523523 CLRBIT (candidateV0.v0Type , matter ? BachelorType::AntiLambda : BachelorType::Lambda);
524524 auto massPos = matter ? o2::constants::physics::MassProton : o2::constants::physics::MassPionCharged;
525525 auto massNeg = matter ? o2::constants::physics::MassPionCharged : o2::constants::physics::MassProton;
@@ -593,9 +593,9 @@ struct HfDataCreatorCharmResoReduced {
593593 if (!track.hasTPC ()) {
594594 return false ;
595595 }
596- bool isPion = std::abs (track.tpcNSigmaPi ()) < cfgSingleTrackCuts.maxNsigmaTpcPi ;
597- bool isKaon = std::abs (track.tpcNSigmaKa ()) < cfgSingleTrackCuts.maxNsigmaTpcKa ;
598- bool isProton = std::abs (track.tpcNSigmaPr ()) < cfgSingleTrackCuts.maxNsigmaTpcPr ;
596+ bool const isPion = std::abs (track.tpcNSigmaPi ()) < cfgSingleTrackCuts.maxNsigmaTpcPi ;
597+ bool const isKaon = std::abs (track.tpcNSigmaKa ()) < cfgSingleTrackCuts.maxNsigmaTpcKa ;
598+ bool const isProton = std::abs (track.tpcNSigmaPr ()) < cfgSingleTrackCuts.maxNsigmaTpcPr ;
599599 if (!isPion && !isKaon && !isProton) { // we keep the track if is it compatible with at least one of the PID hypotheses selected
600600 return false ;
601601 }
@@ -664,7 +664,7 @@ struct HfDataCreatorCharmResoReduced {
664664 }
665665 // If both D* and K0s are matched, try to match resonance
666666 if (flagCharmBach != 0 && flagV0 == hf_decay::hf_cand_reso::PartialMatchMc::K0Matched) {
667- std::array<int , 5 > pdgCodesDaughters = {+kPiPlus , -kKPlus , +kPiPlus , +kPiPlus , -kPiPlus };
667+ std::array<int , 5 > const pdgCodesDaughters = {+kPiPlus , -kKPlus , +kPiPlus , +kPiPlus , -kPiPlus };
668668 auto arrDaughtersReso = std::array{vecDaughtersReso[0 ], vecDaughtersReso[1 ], vecDaughtersReso[2 ], vecDaughtersReso[3 ], vecDaughtersReso[4 ]};
669669 for (const auto & [decayChannelFlag, pdgCodeReso] : hf_decay::hf_cand_reso::particlesToDstarK0s) {
670670 indexRec = RecoDecay::getMatchedMCRec<false , true , true , true , true >(particlesMc, arrDaughtersReso, pdgCodeReso, pdgCodesDaughters, true , &sign, 3 , &nKinkedTracks);
@@ -674,7 +674,7 @@ struct HfDataCreatorCharmResoReduced {
674674 }
675675 }
676676 } else if (flagCharmBachInterm != 0 && flagV0 == hf_decay::hf_cand_reso::PartialMatchMc::K0Matched) {
677- std::array<int , 4 > pdgCodesDaughters = {+kPiPlus , -kKPlus , +kPiPlus , -kPiPlus };
677+ std::array<int , 4 > const pdgCodesDaughters = {+kPiPlus , -kKPlus , +kPiPlus , -kPiPlus };
678678 auto arrDaughtersReso = std::array{vecDaughtersReso[0 ], vecDaughtersReso[1 ], vecDaughtersReso[3 ], vecDaughtersReso[4 ]};
679679 // Peaking background of D0K0s <- Ds* with spurious soft pion
680680 for (const auto & [decayChannelFlag, pdgCodeReso] : hf_decay::hf_cand_reso::particlesToDstarK0s) {
@@ -830,8 +830,8 @@ struct HfDataCreatorCharmResoReduced {
830830 CCand const & candCharmBach,
831831 BBachTr const & bachelorTrack,
832832 Tr const & tracks,
833- int & indexHfCandCharm,
834- int64_t & indexCandTrBach)
833+ const int64_t indexHfCandCharm,
834+ const int64_t indexCandTrBach)
835835 {
836836 std::vector<typename Tr::iterator> vecDaughtersReso{};
837837 int8_t sign{0 }, nKinkedTracks{0 }, origin{0 }, flagCharmBach{0 }, flagCharmBachInterm{0 }, flagTrack{0 }, flagReso{0 };
@@ -996,7 +996,7 @@ struct HfDataCreatorCharmResoReduced {
996996 if (rejectCollisionsWithBadEvSel && hfRejMap != 0 ) {
997997 return ;
998998 }
999- int indexHfReducedCollision = hfReducedCollision.lastIndex () + 1 ;
999+ int const indexHfReducedCollision = hfReducedCollision.lastIndex () + 1 ;
10001000 // std::map where the key is the V0.globalIndex() and
10011001 // the value is the V0 index in the table of the selected v0s
10021002 std::map<int64_t , int64_t > selectedV0s;
@@ -1140,7 +1140,7 @@ struct HfDataCreatorCharmResoReduced {
11401140 }
11411141 // propagate V0 to primary vertex (if enabled)
11421142 if (propagateV0toPV) {
1143- std::array<float , 3 > pVecV0Orig = {candidateV0.mom [0 ], candidateV0.mom [1 ], candidateV0.mom [2 ]};
1143+ std::array<float , 3 > const pVecV0Orig = {candidateV0.mom [0 ], candidateV0.mom [1 ], candidateV0.mom [2 ]};
11441144 std::array<float , 2 > dcaInfo;
11451145 auto trackParK0 = o2::track::TrackPar (candidateV0.pos , pVecV0Orig, 0 , true );
11461146 trackParK0.setPID (o2::track::PID::K0);
@@ -1182,8 +1182,8 @@ struct HfDataCreatorCharmResoReduced {
11821182 break ; // no other D meson types expected
11831183 } // end of dType switch
11841184 } // matched with K0s
1185- bool isLambda = TESTBIT (candidateV0.v0Type , BachelorType::Lambda);
1186- bool isAntiLambda = TESTBIT (candidateV0.v0Type , BachelorType::AntiLambda);
1185+ bool const isLambda = TESTBIT (candidateV0.v0Type , BachelorType::Lambda);
1186+ bool const isAntiLambda = TESTBIT (candidateV0.v0Type , BachelorType::AntiLambda);
11871187 if (isLambda || isAntiLambda) {
11881188 registry.fill (HIST (" hMassVsPtLambda" ), candidateV0.pT , candidateV0.mLambda );
11891189 switch (dType) {
@@ -1539,15 +1539,15 @@ struct HfDataCreatorCharmResoReduced {
15391539 McCollisions const & mcCollisions,
15401540 BCsInfo const &)
15411541 {
1542- bool doV0s = (pairingType == PairingType::V0Only || pairingType == PairingType::V0AndTrack);
1543- bool doTracks = (pairingType == PairingType::TrackOnly || pairingType == PairingType::V0AndTrack);
1542+ bool const doV0s = (pairingType == PairingType::V0Only || pairingType == PairingType::V0AndTrack);
1543+ bool const doTracks = (pairingType == PairingType::TrackOnly || pairingType == PairingType::V0AndTrack);
15441544 for (const auto & mcCollision : mcCollisions) {
15451545 // Slice the particles table to get the particles for the current MC collision
15461546 const auto mcParticlesPerMcColl = mcParticles.sliceBy (mcParticlesPerMcCollision, mcCollision.globalIndex ());
15471547 // Slice the collisions table to get the collision info for the current MC collision
15481548 float centrality{-1 .f };
15491549 o2::hf_evsel::HfCollisionRejectionMask rejectionMask{};
1550- int nSplitColl = 0 ;
1550+ int const nSplitColl = 0 ;
15511551 const auto collSlice = collInfos.sliceBy (colPerMcCollision, mcCollision.globalIndex ());
15521552 rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask <BCsInfo, o2::hf_centrality::CentralityEstimator::None>(mcCollision, collSlice, centrality);
15531553 hfEvSelMc.fillHistograms <o2::hf_centrality::CentralityEstimator::None>(mcCollision, rejectionMask, nSplitColl);
0 commit comments