Skip to content

Commit f952d6b

Browse files
authored
Replaced nTrackTypes > NTrackTypes
i) Replaced nTrackTypes > NTrackTypes (line #136) ii) Loop over the muon TrackTypes to fill the histogram hMultNchNmuTrackType is updated. (line #245)
1 parent c266b64 commit f952d6b

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

PWGHF/HFL/Tasks/taskSingleMuonMult.cxx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ struct HfTaskSingleMuonMult {
133133
xMu->SetBinLabel(5, "chi2Cut");
134134

135135
// Number the types of muon tracks
136-
constexpr uint8_t nTrackTypes{static_cast<uint8_t>(ForwardTrackTypeEnum::MCHStandaloneTrack)};
136+
constexpr uint8_t NTrackTypes{static_cast<uint8_t>(ForwardTrackTypeEnum::MCHStandaloneTrack)};
137137
}
138138

139139
void process(MyCollisions::iterator const& collision,
@@ -171,7 +171,7 @@ struct HfTaskSingleMuonMult {
171171

172172
// muons per event
173173
int nMu{0};
174-
int nMuType[nTrackTypes + 1] = {0};
174+
int nMuType[NTrackTypes + 1] = {0};
175175

176176
for (const auto& muon : muons) {
177177
const auto pt{muon.pt()}, eta{muon.eta()}, theta{90.0f - ((std::atan(muon.tgl())) * constants::math::Rad2Deg)}, pDca{muon.pDca()}, rAbsorb{muon.rAtAbsorberEnd()}, chi2{muon.chi2MatchMCHMFT()};
@@ -242,12 +242,11 @@ struct HfTaskSingleMuonMult {
242242
registry.fill(HIST("h3MultNchNmu"), cent, nCh, nMu);
243243

244244
// Fill number of muons of various types with multiplicity
245-
static_for<0u, nTrackTypes>([&](auto i) {
246-
constexpr int iType{i.value};
247-
if (nMuType[iType] > 0) {
248-
registry.fill(std::string(HIST("hMultNchNmuTrackType")), cent, nCh, nMuType[iType], iType);
245+
for (auto indexType{0u}; indexType <= NTrackTypes; ++indexType) {
246+
if (nMuType[indexType] > 0) {
247+
registry.fill(HIST("hMultNchNmuTrackType"), cent, nCh, nMuType[indexType], indexType);
249248
}
250-
});
249+
};
251250
chTracks.clear();
252251
}
253252
};

0 commit comments

Comments
 (0)