Skip to content

Commit 4b515a9

Browse files
NucleiTask - Fix O2Lint errors
1 parent af3c71c commit 4b515a9

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

PWGLF/DataModel/LFNucleiTables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ DECLARE_SOA_DYNAMIC_COLUMN(IsInelGt0, isInelGt0, // is INEL > 0
3838
[](int multPveta1) -> bool { return multPveta1 > 0; });
3939
DECLARE_SOA_DYNAMIC_COLUMN(IsInelGt1, isInelGt1, // is INEL > 1
4040
[](int multPveta1) -> bool { return multPveta1 > 1; });
41-
DECLARE_SOA_DYNAMIC_COLUMN(Selection_Bit, selection_bit, //! Dummy
41+
DECLARE_SOA_DYNAMIC_COLUMN(Selection_Bit, selection_bit, // o2-linter: disable=name/o2-column
4242
[](o2::aod::evsel::EventSelectionFlags /*v*/) -> bool { return true; });
4343
} // namespace fullEvent
4444
DECLARE_SOA_TABLE(LfNuclEvents, "AOD", "LFNUCLEvent",

PWGLF/TableProducer/Nuspex/LFTreeCreatorNuclei.cxx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ struct LfTreeCreatorNuclei {
9494
Configurable<float> cfgHighCutVertex{"cfgHighCutVertex", 10.0f, "Accepted z-vertex range"};
9595
Configurable<float> cfgLowCutVertex{"cfgLowCutVertex", -10.0f, "Accepted z-vertex range"};
9696
Configurable<bool> useSel8{"useSel8", true, "Use Sel8 for run3 Event Selection"};
97-
Configurable<bool> TvxTrigger{"TvxTrigger", false, "Use TVX for Event Selection (default w/ Sel8)"};
97+
Configurable<bool> useTVXtrigger{"useTVXtrigger", false, "Use TVX for Event Selection (default w/ Sel8)"};
9898
Configurable<bool> removeTFBorder{"removeTFBorder", false, "Remove TimeFrame border (default w/ Sel8)"};
9999
Configurable<bool> removeITSROFBorder{"removeITSROFBorder", false, "Remove ITS Read-Out Frame border (default w/ Sel8)"};
100100

@@ -119,7 +119,7 @@ struct LfTreeCreatorNuclei {
119119
(trackSelType.value == 1 && requireGlobalTrackInFilter()) || // o2-linter: disable=magic-number (filters)
120120
(trackSelType.value == 2) || // o2-linter: disable=magic-number (filters)
121121
(trackSelType.value == 3); // o2-linter: disable=magic-number (filters)
122-
Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
122+
Filter dcaFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
123123
using EventCandidates = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Ms, aod::CentFV0As>;
124124
using TrackCandidates = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::TrackSelectionExtension,
125125
aod::pidTOFbeta, aod::TOFSignal, aod::pidEvTimeFlags,
@@ -143,7 +143,7 @@ struct LfTreeCreatorNuclei {
143143
if (!track.hasTPC()) {
144144
continue;
145145
}
146-
if (track.tpcNClsCrossedRows() < 90) {
146+
if (track.tpcNClsCrossedRows() < 90) { // o2-linter: disable=magic-number (filters)
147147
continue;
148148
}
149149
if ((track.pt() < ptcutLow.value) || (track.pt() > ptcutHigh.value)) {
@@ -218,16 +218,16 @@ struct LfTreeCreatorNuclei {
218218
if (track.itsNClsInnerBarrel() < nITSInnerBarrelHits) {
219219
continue;
220220
}
221-
if (trackSelType.value == 2) { // custom track selection mode
221+
if (trackSelType.value == 2) { // custom track selection mode // o2-linter: disable=magic-number (filters)
222222
if (!customTrackSelection.IsSelected(track)) {
223223
continue;
224224
}
225225
}
226-
if (trackSelType.value == 3) { // Filtering mode
226+
if (trackSelType.value == 3) { // Filtering mode // o2-linter: disable=magic-number (filters)
227227
if (!track.hasTPC()) {
228228
continue;
229229
}
230-
if (track.tpcNClsCrossedRows() < 90) {
230+
if (track.tpcNClsCrossedRows() < 90) { // o2-linter: disable=magic-number (filters)
231231
continue;
232232
}
233233
if ((track.pt() < ptcutLow.value) || (track.pt() > ptcutHigh.value)) {
@@ -277,7 +277,7 @@ struct LfTreeCreatorNuclei {
277277
bool itsPassed = isITStrack(track);
278278
bool tpcPassed = isTPCtrack(track);
279279
bool hasFakeHit = false;
280-
for (int i = 0; i < 10; i++) { // From ITS to TPC
280+
for (int i = 0; i < 10; i++) { // From ITS to TPC // o2-linter: disable=magic-number (fake hit loop)
281281
if (track.mcMask() & 1 << i) {
282282
hasFakeHit = true;
283283
break;
@@ -313,7 +313,7 @@ struct LfTreeCreatorNuclei {
313313
hEvents.fill(HIST("eventSelection"), 0);
314314

315315
if (!collision.selection_bit(aod::evsel::kIsTriggerTVX)) {
316-
if (TvxTrigger)
316+
if (useTVXtrigger)
317317
continue;
318318
} else {
319319
hEvents.fill(HIST("eventSelection"), 1);
@@ -349,11 +349,11 @@ struct LfTreeCreatorNuclei {
349349
hEvents.fill(HIST("eventSelection"), 6);
350350

351351
// Fill the norm. column with good events with |z| < 10 cm before skimming
352-
if (collision.posZ() < 10 && collision.posZ() > -10) { // o2-linter: disable=magic-number (10 cm vertex cut)
352+
if (collision.posZ() < cfgHighCutVertex && collision.posZ() > cfgLowCutVertex) {
353353
hEvents.fill(HIST("eventSelection"), 7);
354354
}
355355

356-
if (doSkim && (trackSelType.value == 3) && !checkQuality<false>(collision, tracksInCollision))
356+
if (doSkim && (trackSelType.value == 3) && !checkQuality<false>(collision, tracksInCollision)) // o2-linter: disable=magic-number (filters)
357357
continue;
358358
fillForOneEvent<false>(collision, tracksInCollision);
359359
hEvents.fill(HIST("eventSelection"), 8);
@@ -371,7 +371,7 @@ struct LfTreeCreatorNuclei {
371371
hEvents.fill(HIST("eventSelection"), 0);
372372

373373
if (!collision.selection_bit(aod::evsel::kIsTriggerTVX)) {
374-
if (TvxTrigger)
374+
if (useTVXtrigger)
375375
continue;
376376
} else {
377377
hEvents.fill(HIST("eventSelection"), 1);
@@ -402,7 +402,7 @@ struct LfTreeCreatorNuclei {
402402
hEvents.fill(HIST("eventSelection"), 5);
403403

404404
// Fill the norm. column with good events with |z| < 10 cm before skimming
405-
if (collision.posZ() < 10 && collision.posZ() > -10) {
405+
if (collision.posZ() < cfgHighCutVertex && collision.posZ() > cfgLowCutVertex) {
406406
hEvents.fill(HIST("eventSelection"), 7);
407407
}
408408

PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ struct LFNucleiBATask {
238238

239239
Configurable<bool> enablePtShiftPID{"enablePtShiftPID", true, "Flag to enable wrong PID in tracking pT correction shift"};
240240
Configurable<std::vector<float>> parShiftPtPID{"parShiftPtPID", {0.0f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f}, "Parameters for helium3-Pt wrong pid shift (if enabled)."};
241+
Configurable<float> CfgPtShiftPID{"CfgPtShiftPID", 1.25f, "Default upper limit for PID pt-shift correction"};
241242

242243
Configurable<bool> enableCentrality{"enableCentrality", true, "Flag to enable centrality 3D histos)"};
243244

@@ -2577,7 +2578,7 @@ struct LFNucleiBATask {
25772578
}
25782579
if (enablePtShiftPID && fShiftPtPID) {
25792580
shiftPtPID = fShiftPtPID->Eval(2 * track.pt());
2580-
if (tritonPID && (track.pt() <= 1.25f)) {
2581+
if (tritonPID && (track.pt() <= CfgPtShiftPID)) {
25812582
hePt = track.pt() - shiftPtPID / 2.f;
25822583
antihePt = track.pt() - shiftPtPID / 2.f;
25832584
}

0 commit comments

Comments
 (0)