Skip to content

Commit f55d76d

Browse files
authored
Added enum for Event and Track selection bins
Mega Linter failed for cppcheck in the previous push commit, no clue for the error coming from where. Just checked with updating in the Hologram filling for hEventSel and hMuTrkSel with float values. Locally, the o2_linter.py test is successful, compiled in O2Physics and executed the code with the output AnalysisResults.root without any issue.
1 parent f5fcbd1 commit f55d76d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

PWGHF/HFL/Tasks/taskSingleMuonMult.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ using namespace o2::aod::fwdtrack;
5353
struct HfTaskSingleMuonMult {
5454

5555
// enum for event selection bins
56-
enum EventSelectionBins : int {
56+
enum EventSelectionBinsEnum {
5757
AllEvents = 1,
5858
Sel8,
5959
VtxZAfterSel
6060
};
6161

6262
// enum for muon track selection bins
63-
enum MuonTrackSelectionBinsEnum : int {
63+
enum MuonTrackSelectionBinsEnum {
6464
NoCut = 1,
6565
EtaCut,
6666
RAbsorbCut,
@@ -156,18 +156,18 @@ struct HfTaskSingleMuonMult {
156156
MyTracks const& tracks,
157157
MyMuons const& muons)
158158
{
159-
registry.fill(HIST("hEventSel"), AllEvents);
159+
registry.fill(HIST("hEventSel"), 1.);
160160

161161
if (!collision.sel8()) {
162162
return;
163163
}
164-
registry.fill(HIST("hEventSel"), Sel8);
164+
registry.fill(HIST("hEventSel"), 2.);
165165
registry.fill(HIST("hVtxZBeforeSel"), collision.posZ());
166166

167167
if (std::abs(collision.posZ()) > zVtxMax) {
168168
return;
169169
}
170-
registry.fill(HIST("hEventSel"), VtxZAfterSel);
170+
registry.fill(HIST("hEventSel"), 3.);
171171
registry.fill(HIST("hVtxZAfterSel"), collision.posZ());
172172

173173
// T0M centrality
@@ -203,7 +203,7 @@ struct HfTaskSingleMuonMult {
203203
registry.fill(HIST("hMuBeforeMatchMFT"), cent, nCh, pt, eta, theta, rAbsorb, dcaXY, pDca, chi2, muTrackType);
204204

205205
// histograms before the acceptance cuts
206-
registry.fill(HIST("hMuTrkSel"), NoCut);
206+
registry.fill(HIST("hMuTrkSel"), 1.);
207207
registry.fill(HIST("hMuBeforeAccCuts"), cent, nCh, pt, eta, theta, rAbsorb, dcaXY, pDca, chi2, muTrackType);
208208
registry.fill(HIST("h3DCABeforeAccCuts"), muon.fwdDcaX(), muon.fwdDcaY(), muTrackType);
209209

@@ -220,14 +220,14 @@ struct HfTaskSingleMuonMult {
220220
if ((eta >= etaMax) || (eta < etaMin)) {
221221
continue;
222222
}
223-
registry.fill(HIST("hMuTrkSel"), EtaCut);
223+
registry.fill(HIST("hMuTrkSel"), 2.);
224224
registry.fill(HIST("hMuAfterEtaCuts"), cent, nCh, pt, eta, theta, rAbsorb, dcaXY, pDca, chi2, muTrackType);
225225

226226
// Rabsorb cuts
227227
if ((rAbsorb < rAbsorbMin) || (rAbsorb >= rAbsorbMax)) {
228228
continue;
229229
}
230-
registry.fill(HIST("hMuTrkSel"), RAbsorbCut);
230+
registry.fill(HIST("hMuTrkSel"), 3.);
231231
registry.fill(HIST("hMuAfterRAbsorbCuts"), cent, nCh, pt, eta, theta, rAbsorb, dcaXY, pDca, chi2, muTrackType);
232232

233233
if ((rAbsorb < rAbsorbMid) && (pDca >= pDcaMin)) {
@@ -236,14 +236,14 @@ struct HfTaskSingleMuonMult {
236236
if ((rAbsorb >= rAbsorbMid) && (pDca >= pDcaMax)) {
237237
continue;
238238
}
239-
registry.fill(HIST("hMuTrkSel"), PDcaCut);
239+
registry.fill(HIST("hMuTrkSel"), 4.);
240240
registry.fill(HIST("hMuAfterPdcaCuts"), cent, nCh, pt, eta, theta, rAbsorb, dcaXY, pDca, chi2, muTrackType);
241241

242242
// MCH-MFT matching chi2
243243
if (muon.chi2() >= 1e6) {
244244
continue;
245245
}
246-
registry.fill(HIST("hMuTrkSel"), Chi2Cut);
246+
registry.fill(HIST("hMuTrkSel"), 5.);
247247

248248
// histograms after acceptance cuts
249249
registry.fill(HIST("hMuAfterAccCuts"), cent, nCh, pt, eta, theta, rAbsorb, dcaXY, pDca, chi2, muTrackType);

0 commit comments

Comments
 (0)