Skip to content

Commit f64f34d

Browse files
committed
More fixes
1 parent 5053cdc commit f64f34d

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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};

PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -511,10 +511,10 @@ struct HfDataCreatorJpsiHadReduced {
511511
/// \param indexHfCandJpsi is the index of the Jpsi candidate
512512
/// \param selectedTracksBach is the map with the indices of selected bachelor pion tracks
513513
template <uint8_t decChannel, typename CColl, typename PParticles, typename TTrack>
514-
void fillMcRecoInfo(const CColl& collision,
515-
const PParticles& particlesMc,
516-
const std::vector<TTrack>& vecDaughtersB,
517-
int& indexHfCandJpsi,
514+
void fillMcRecoInfo(CColl const& collision,
515+
PParticles const& particlesMc,
516+
std::vector<TTrack> const& vecDaughtersB,
517+
const int64_t indexHfCandJpsi,
518518
std::array<std::map<int64_t, int64_t>, 2> selectedTracksBach,
519519
const int64_t indexCollisionMaxNumContrib)
520520
{
@@ -734,7 +734,7 @@ struct HfDataCreatorJpsiHadReduced {
734734
}
735735

736736
// helpers for ReducedTables filling
737-
int indexHfReducedCollision = hfReducedCollision.lastIndex() + 1;
737+
int const indexHfReducedCollision = hfReducedCollision.lastIndex() + 1;
738738
// std::map where the key is the track.globalIndex() and
739739
// the value is the track index in the table of the selected tracks
740740
std::map<int64_t, int64_t> selectedTracksBach;
@@ -797,8 +797,8 @@ struct HfDataCreatorJpsiHadReduced {
797797

798798
// ---------------------------------
799799
// reconstruct J/Psi candidate secondary vertex
800-
o2::track::TrackParCov trackParCovJpsi{};
801-
std::array<float, 3> pVecJpsi{};
800+
o2::track::TrackParCov trackParCovJpsi{}; // FIXME: unused
801+
std::array<float, 3> pVecJpsi{}; // FIXME: unused
802802
registry.fill(HIST("hFitCandidatesJpsi"), SVFitting::BeforeFit);
803803
try {
804804
if (df2.process(trackPosParCov, trackNegParCov) == 0) {
@@ -823,8 +823,8 @@ struct HfDataCreatorJpsiHadReduced {
823823
}
824824
registry.fill(HIST("hSelectionsJpsi"), 2 + aod::SelectionStep::RecoPID, candidate.pt());
825825

826-
int indexHfCandJpsi = hfJpsi.lastIndex() + 1;
827-
float invMassJpsi = runJpsiToee ? hfHelper.invMassJpsiToEE(candidate) : hfHelper.invMassJpsiToMuMu(candidate);
826+
int const indexHfCandJpsi = hfJpsi.lastIndex() + 1;
827+
float const invMassJpsi = runJpsiToee ? hfHelper.invMassJpsiToEE(candidate) : hfHelper.invMassJpsiToMuMu(candidate);
828828
registry.fill(HIST("hMassJpsi"), invMassJpsi);
829829
registry.fill(HIST("hPtJpsi"), candidate.pt());
830830
registry.fill(HIST("hCpaJpsi"), candidate.cpa());
@@ -1189,7 +1189,7 @@ struct HfDataCreatorJpsiHadReduced {
11891189
auto candsJpsiThisColl = candsJpsi.sliceBy(candsJpsiPerCollision, thisCollId);
11901190
auto trackIdsThisCollision = trackIndices.sliceBy(trackIndicesPerCollision, thisCollId);
11911191
auto collsSameMcCollision = collisions.sliceBy(colPerMcCollision, collision.mcCollisionId());
1192-
int64_t indexCollisionMaxNumContrib = getIndexCollisionMaxNumContrib(collsSameMcCollision);
1192+
int64_t const indexCollisionMaxNumContrib = getIndexCollisionMaxNumContrib(collsSameMcCollision);
11931193
runDataCreation<true, DecayChannel::BplusToJpsiK>(collision, candsJpsiThisColl, trackIdsThisCollision, tracks, particlesMc, indexCollisionMaxNumContrib, bcs);
11941194
}
11951195
// handle normalization by the right number of collisions
@@ -1226,7 +1226,7 @@ struct HfDataCreatorJpsiHadReduced {
12261226
auto candsJpsiThisColl = candsJpsi.sliceBy(candsJpsiPerCollision, thisCollId);
12271227
auto trackIdsThisCollision = trackIndices.sliceBy(trackIndicesPerCollision, thisCollId);
12281228
auto collsSameMcCollision = collisions.sliceBy(colPerMcCollision, collision.mcCollisionId());
1229-
int64_t indexCollisionMaxNumContrib = getIndexCollisionMaxNumContrib(collsSameMcCollision);
1229+
int64_t const indexCollisionMaxNumContrib = getIndexCollisionMaxNumContrib(collsSameMcCollision);
12301230
runDataCreation<true, DecayChannel::BsToJpsiPhi>(collision, candsJpsiThisColl, trackIdsThisCollision, tracks, particlesMc, indexCollisionMaxNumContrib, bcs);
12311231
}
12321232
// handle normalization by the right number of collisions

PWGHF/D2H/Tasks/taskFlowCharmHadrons.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,10 @@ struct HfTaskFlowCharmHadrons {
317317
/// \param tracksQy is the Y component of the Q vector for the tracks
318318
/// \param channel is the decay channel
319319
template <DecayChannel channel, typename T1>
320-
void getQvecDtracks(const T1& cand,
320+
void getQvecDtracks(T1 const& cand,
321321
std::vector<float>& tracksQx,
322322
std::vector<float>& tracksQy,
323-
float& ampl)
323+
const float ampl)
324324
{
325325
// TODO: add possibility to consider different weights for the tracks, at the moment only pT is considered;
326326
float pXTrack0 = cand.pxProng0();
@@ -668,7 +668,7 @@ struct HfTaskFlowCharmHadrons {
668668

669669
// If TPC is used for the SP estimation, the tracks of the hadron candidate must be removed from the TPC Q vector to avoid double counting
670670
if (qvecDetector == QvecEstimator::TPCNeg || qvecDetector == QvecEstimator::TPCPos) {
671-
float ampl = amplQVec - static_cast<float>(nProngs);
671+
float const ampl = amplQVec - static_cast<float>(nProngs);
672672
std::vector<float> tracksQx = {};
673673
std::vector<float> tracksQy = {};
674674
if constexpr (std::is_same_v<T1, CandXic0Data> || std::is_same_v<T1, CandXic0DataWMl>) {

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ struct HfCandidateCreator2Prong {
340340
if (indexCollision == track1.collisionId() && track1.isPVContributor()) {
341341
SETBIT(bitmapProngsContributorsPV, 1);
342342
}
343-
uint8_t nProngsContributorsPV = hf_trkcandsel::countOnesInBinary(bitmapProngsContributorsPV);
343+
const auto nProngsContributorsPV = hf_trkcandsel::countOnesInBinary(bitmapProngsContributorsPV);
344344

345345
// fill candidate table rows
346346
rowCandidateBase(indexCollision,
@@ -501,7 +501,7 @@ struct HfCandidateCreator2Prong {
501501
if (indexCollision == track1.collisionId() && track1.isPVContributor()) {
502502
SETBIT(bitmapProngsContributorsPV, 1);
503503
}
504-
uint8_t nProngsContributorsPV = hf_trkcandsel::countOnesInBinary(bitmapProngsContributorsPV);
504+
const auto nProngsContributorsPV = hf_trkcandsel::countOnesInBinary(bitmapProngsContributorsPV);
505505

506506
// fill candidate table rows
507507
rowCandidateBase(indexCollision,

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ struct HfCandidateCreator3Prong {
394394
if (indexCollision == track2.collisionId() && track2.isPVContributor()) {
395395
SETBIT(bitmapProngsContributorsPV, 2);
396396
}
397-
uint8_t nProngsContributorsPV = hf_trkcandsel::countOnesInBinary(bitmapProngsContributorsPV);
397+
const auto nProngsContributorsPV = hf_trkcandsel::countOnesInBinary(bitmapProngsContributorsPV);
398398

399399
// fill candidate table rows
400400
rowCandidateBase(indexCollision,
@@ -635,7 +635,7 @@ struct HfCandidateCreator3Prong {
635635
if (indexCollision == track2.collisionId() && track2.isPVContributor()) {
636636
SETBIT(bitmapProngsContributorsPV, 2);
637637
}
638-
uint8_t nProngsContributorsPV = hf_trkcandsel::countOnesInBinary(bitmapProngsContributorsPV);
638+
const auto nProngsContributorsPV = hf_trkcandsel::countOnesInBinary(bitmapProngsContributorsPV);
639639

640640
// fill candidate table rows
641641
rowCandidateBase(indexCollision,

0 commit comments

Comments
 (0)