Skip to content

Commit df98911

Browse files
committed
fix linter 2
1 parent 15d1193 commit df98911

2 files changed

Lines changed: 17 additions & 14 deletions

File tree

PWGLF/Tasks/Strangeness/cascpostprocessing.cxx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ using namespace o2;
3838
using namespace o2::framework;
3939
using namespace o2::framework::expressions;
4040

41-
struct cascpostprocessing {
41+
struct LfCascpostprocessing {
42+
static constexpr int OobRejTofOnly = 2;
43+
4244
// Xi or Omega
4345
Configurable<bool> isXi{"isXi", 1, "Apply cuts for Xi identification"};
4446
Configurable<bool> hastof{"hastof", 0, "Apply nsigmaTOF to daughter tracks of cascade"};
@@ -100,10 +102,10 @@ struct cascpostprocessing {
100102
AxisSpec ptAxisPID = {50, 0.0f, 10.0f, "#it{p}_{T} (GeV/#it{c})"};
101103
ConfigurableAxis etaAxis{"etaAxis", {40, -2.0f, 2.0f}, "#eta"};
102104

103-
ConfigurableAxis centFT0MAxis{"FT0M",
105+
ConfigurableAxis centFT0MAxis{"centFT0MAxis",
104106
{VARIABLE_WIDTH, 0., 0.01, 0.05, 0.1, 0.5, 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 101, 105.5},
105107
"FT0M (%)"};
106-
ConfigurableAxis centFV0AAxis{"FV0A",
108+
ConfigurableAxis centFV0AAxis{"centFV0AAxis",
107109
{VARIABLE_WIDTH, 0., 0.01, 0.05, 0.1, 0.5, 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 101, 105.5},
108110
"FV0A (%)"};
109111

@@ -251,7 +253,7 @@ struct cascpostprocessing {
251253
int counter = -1;
252254
bool isCorrectlyRec = 0;
253255

254-
for (auto& candidate : mycascades) {
256+
for (auto const& candidate : mycascades) {
255257
isCandidate = false;
256258
isCorrectlyRec = false;
257259

@@ -426,7 +428,7 @@ struct cascpostprocessing {
426428
if (!kHasTOF && !kHasITS)
427429
continue;
428430
registry.fill(HIST("hCandidate"), ++counter);
429-
} else if (dooobrej == 2) {
431+
} else if (dooobrej == OobRejTofOnly) {
430432
if (!kHasTOF && (candidate.pt() > ptthrtof))
431433
continue;
432434
registry.fill(HIST("hCandidate"), ++counter);
@@ -540,11 +542,11 @@ struct cascpostprocessing {
540542
}
541543
}
542544

543-
PROCESS_SWITCH(cascpostprocessing, processRec, "Process Run 3 reconstructed data", true);
545+
PROCESS_SWITCH(LfCascpostprocessing, processRec, "Process Run 3 reconstructed data", true);
544546

545547
void processGen(aod::MyMCCascades const& myMCcascades)
546548
{
547-
for (auto& genCascade : myMCcascades) {
549+
for (auto const& genCascade : myMCcascades) {
548550
if (genCascade.isPrimary() == 0)
549551
continue; // Consider only primaries
550552

@@ -622,11 +624,11 @@ struct cascpostprocessing {
622624
}
623625
}
624626
}
625-
PROCESS_SWITCH(cascpostprocessing, processGen, "Process Run 3 MC generated data", false);
627+
PROCESS_SWITCH(LfCascpostprocessing, processGen, "Process Run 3 MC generated data", false);
626628
};
627629

628630
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
629631
{
630632
return WorkflowSpec{
631-
adaptAnalysisTask<cascpostprocessing>(cfgc, TaskName{"lf-cascpostprocessing"})};
633+
adaptAnalysisTask<LfCascpostprocessing>(cfgc)};
632634
}

PWGLF/Tasks/Strangeness/derivedupcanalysis.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ struct Derivedupcanalysis {
166166
} casccuts;
167167
Configurable<bool> doBachelorBaryonCut{"doBachelorBaryonCut", false, "Enable Bachelor-Baryon cut "};
168168
static constexpr float kNCtauCutsCasc[1][2] = {{6., 6.}};
169+
static constexpr int kFirstCascadePartID = 3;
169170
Configurable<LabeledArray<float>> nCtauCutCasc{"nCtauCutCasc", {kNCtauCutsCasc[0], 2, {"lifetimecutXi", "lifetimecutOmega"}}, "nCtauCutCasc"};
170171

171172
// UPC selections
@@ -330,7 +331,7 @@ struct Derivedupcanalysis {
330331
template <int partID>
331332
void addTopoHistograms(HistogramRegistry& histos)
332333
{
333-
const bool isCascade = (partID > 2.5) ? true : false;
334+
const bool isCascade = partID >= kFirstCascadePartID;
334335
if (isCascade) {
335336
histos.add(Form("%s/hCascCosPA", kParticlenames[partID].data()), "hCascCosPA", kTH2F, {axisPtCoarse, {100, 0.9f, 1.0f}});
336337
histos.add(Form("%s/hDCACascDaughters", kParticlenames[partID].data()), "hDCACascDaughters", kTH2F, {axisPtCoarse, {44, 0.0f, 2.2f}});
@@ -364,7 +365,7 @@ struct Derivedupcanalysis {
364365
template <int partID>
365366
void addTPCQAHistograms(HistogramRegistry& histos)
366367
{
367-
const bool isCascade = (partID > 2.5) ? true : false;
368+
const bool isCascade = partID >= kFirstCascadePartID;
368369
histos.add(Form("%s/h3dPosNsigmaTPC", kParticlenames[partID].data()), "h3dPosNsigmaTPC", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisNsigmaTPC});
369370
histos.add(Form("%s/h3dNegNsigmaTPC", kParticlenames[partID].data()), "h3dNegNsigmaTPC", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisNsigmaTPC});
370371
histos.add(Form("%s/h3dPosTPCsignal", kParticlenames[partID].data()), "h3dPosTPCsignal", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisTPCsignal});
@@ -395,7 +396,7 @@ struct Derivedupcanalysis {
395396
template <int partID>
396397
void addTOFQAHistograms(HistogramRegistry& histos)
397398
{
398-
const bool isCascade = (partID > 2.5) ? true : false;
399+
const bool isCascade = partID >= kFirstCascadePartID;
399400
histos.add(Form("%s/h3dPosTOFdeltaT", kParticlenames[partID].data()), "h3dPosTOFdeltaT", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisTOFdeltaT});
400401
histos.add(Form("%s/h3dNegTOFdeltaT", kParticlenames[partID].data()), "h3dNegTOFdeltaT", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisTOFdeltaT});
401402
histos.add(Form("%s/h3dPosTOFdeltaTvsTrackPtot", kParticlenames[partID].data()), "h3dPosTOFdeltaTvsTrackPtot", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisTOFdeltaT});
@@ -412,7 +413,7 @@ struct Derivedupcanalysis {
412413
template <int partID>
413414
void addKinematicQAHistograms(HistogramRegistry& histos)
414415
{
415-
const bool isCascade = (partID > 2.5) ? true : false;
416+
const bool isCascade = partID >= kFirstCascadePartID;
416417
histos.add(Form("%s/h3dPosEtaPt", kParticlenames[partID].data()), "h3dPosEtaPt", kTH3F, {axisPtCoarse, axisEta, axisSelGap});
417418
histos.add(Form("%s/h3dNegEtaPt", kParticlenames[partID].data()), "h3dNegEtaPt", kTH3F, {axisPtCoarse, axisEta, axisSelGap});
418419
histos.add(Form("%s/h3dRapPt", kParticlenames[partID].data()), "h3dRapPt", kTH3F, {axisPtCoarse, axisRap, axisSelGap});
@@ -424,7 +425,7 @@ struct Derivedupcanalysis {
424425
template <int partID>
425426
void addDetectorPropHistograms(HistogramRegistry& histos)
426427
{
427-
const bool isCascade = (partID > 2.5) ? true : false;
428+
const bool isCascade = partID >= kFirstCascadePartID;
428429
if (doDetectPropQA == 1) {
429430
if (isCascade) {
430431
histos.add(Form("%s/h8dDetectPropVsCentrality", kParticlenames[partID].data()), "h8dDetectPropVsCentrality", kTHnSparseF, {axisDetectors.axisFT0ampl, axisDetMapCoarse, axisITScluMapCoarse, axisDetMapCoarse, axisITScluMapCoarse, axisDetMapCoarse, axisITScluMapCoarse, axisPtCoarse});

0 commit comments

Comments
 (0)