Skip to content

Commit 5c1c0fa

Browse files
authored
Update function signatures for const correctness
1 parent a297181 commit 5c1c0fa

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ struct HfCorrelatorLcScHadronsSelection {
195195
}
196196

197197
template <typename TCollision>
198-
bool eventSelV0(TCollision collision)
198+
bool eventSelV0(TCollision const& collision)
199199
{
200200
if (!collision.sel8()) {
201201
return 0;
@@ -597,7 +597,7 @@ struct HfCorrelatorLcScHadrons {
597597
}
598598

599599
template <typename Tracktype, typename V0Type>
600-
bool isSelectedV0Daughter(Tracktype const& track, V0Type v0, int pid)
600+
bool isSelectedV0Daughter(Tracktype const& track, V0Type const& v0, int pid)
601601
{
602602
if (std::abs(track.eta()) > cfgCharmCand.etaTrackMax) {
603603
return false;
@@ -1153,8 +1153,9 @@ struct HfCorrelatorLcScHadrons {
11531153
entryLcHadronInvMass(massCandHadron, ptCombined);
11541154
entryPairCandCharge(signCand);
11551155
if constexpr (LambdaPart == 0) {
1156-
if (trkPidFill)
1156+
if (trkPidFill) {
11571157
entryCandHadronPairTrkPID(assoc.tpcNSigmaPr(), assoc.tpcNSigmaKa(), assoc.tpcNSigmaPi(), assoc.tofNSigmaPr(), assoc.tofNSigmaKa(), assoc.tofNSigmaPi());
1158+
}
11581159
}
11591160
if constexpr (IsMcRec) {
11601161
if (assoc.has_mcParticle()) {
@@ -1853,8 +1854,8 @@ struct HfCorrelatorLcScHadrons {
18531854
if (cfgCharmCand.pidTrkApplied && (std::abs(particleAssoc.pdgCode()) != kProton)) {
18541855
continue; // proton PID
18551856
}
1856-
int8_t const chargeLc = pdg->GetParticle(candidate.pdgCode())->Charge(); // Retrieve charge
1857-
int8_t const chargeAssoc = pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
1857+
int8_t const chargeLc = static_cast<int8_t>pdg->GetParticle(candidate.pdgCode())->Charge(); // Retrieve charge
1858+
int8_t const chargeAssoc = static_cast<int8_t>pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
18581859
float cent = 100.0; // will be updated later
18591860

18601861
int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);

0 commit comments

Comments
 (0)