Skip to content

Commit 11b14b8

Browse files
author
Cristian Moscatelli
committed
Solving O2 linter errors v1
1 parent 1af883f commit 11b14b8

1 file changed

Lines changed: 25 additions & 24 deletions

File tree

PWGLF/TableProducer/Nuspex/deuteronInTriggeredEvents.cxx

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,31 @@
88
// In applying this license CERN does not waive the privileges and immunities
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
11-
//
12-
// \file deuteronInTriggeredEvents.cxx
13-
//
14-
// \brief (Anti-)nuclei spectra analysis task in jet-triggered events
15-
//
16-
// \author Cristian Moscatelli (cristian.moscatelli@cern.ch)
17-
//
18-
// Based on PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx
11+
///
12+
/// \file deuteronInTriggeredEvents.cxx
13+
///
14+
/// \brief (Anti-)nuclei spectra analysis task in jet-triggered events
15+
/// \author Cristian Moscatelli (cristian.moscatelli@cern.ch)
16+
///
17+
/// Based on PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx
18+
/// \since 05/2026
19+
//
20+
// ================
1921
// Executable + dependencies:
2022
//
21-
// Data (run3):
23+
// data (run3):
2224
// o2-analysis-lf-deuteron-in-triggered-events, o2-analysis-event-selection-service
2325
// o2-analysis-propagationservice, o2-analysis-trackselection, o2-analysis-track-extra-v002-converter
2426
// o2-analysis-pid-tof-merge, o2-analysis-pid-tpc-service, o2-analysis-ft0-corrected-table
2527
//
26-
// MC:
28+
// mc:
2729
// same as Data and o2-analysis-mccollision-converter
28-
//
29-
// \since 05/2026
3030

3131
#include "PWGJE/Core/JetBkgSubUtils.h"
3232
#include "PWGJE/Core/JetUtilities.h"
3333
#include "PWGLF/DataModel/LFSlimNucleiTables.h"
3434

35+
#include "Common/CCDB/EventSelectionParams.h"
3536
#include "Common/Core/EventPlaneHelper.h"
3637
#include "Common/Core/PID/PIDTOF.h"
3738
#include "Common/Core/RecoDecay.h"
@@ -197,7 +198,7 @@ std::vector<NucleusCandidate> candidates;
197198

198199
enum evSel {
199200
kTVX = 0,
200-
kTFborder, // Here we can substitute with sel8
201+
kTFBorder, // Here we can substitute with sel8
201202
kITSROFborder,
202203
kZvtx,
203204
kNoSameBunchPileup,
@@ -363,17 +364,17 @@ struct deuteronInTriggeredEvents {
363364
{
364365
spectra.fill(HIST("hEventSelections"), 0);
365366

366-
if (cfgEventSelections->get(nuclei::evSel::kTVX) && !collision.selection_bit(aod::evsel::kIsTriggerTVX)) {
367+
if (cfgEventSelections->get(nuclei::evSel::kTVX) && !collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) {
367368
return false;
368369
}
369370
spectra.fill(HIST("hEventSelections"), nuclei::evSel::kTVX + 1);
370371

371-
if (cfgEventSelections->get(nuclei::evSel::kTFborder) && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) {
372+
if (cfgEventSelections->get(nuclei::evSel::kTFBorder) && !collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) {
372373
return false;
373374
}
374-
spectra.fill(HIST("hEventSelections"), nuclei::evSel::kTFborder + 1);
375+
spectra.fill(HIST("hEventSelections"), nuclei::evSel::kTFBorder + 1);
375376

376-
if (cfgEventSelections->get(nuclei::evSel::kITSROFborder) && !collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
377+
if (cfgEventSelections->get(nuclei::evSel::kITSROFborder) && !collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) {
377378
return false;
378379
}
379380
spectra.fill(HIST("hEventSelections"), nuclei::evSel::kITSROFborder + 1);
@@ -486,7 +487,7 @@ struct deuteronInTriggeredEvents {
486487
spectra.add("hEventSelections", "hEventSelections", {HistType::kTH1D, {{nuclei::evSel::kNevSels + 1, -0.5f, static_cast<float>(nuclei::evSel::kNevSels) + 0.5f}}});
487488
spectra.get<TH1>(HIST("hEventSelections"))->GetXaxis()->SetBinLabel(1, "all");
488489
spectra.get<TH1>(HIST("hEventSelections"))->GetXaxis()->SetBinLabel(nuclei::evSel::kTVX + 2, "TVX");
489-
spectra.get<TH1>(HIST("hEventSelections"))->GetXaxis()->SetBinLabel(nuclei::evSel::kTFborder + 2, "TFborder");
490+
spectra.get<TH1>(HIST("hEventSelections"))->GetXaxis()->SetBinLabel(nuclei::evSel::kTFBorder + 2, "TFborder");
490491
spectra.get<TH1>(HIST("hEventSelections"))->GetXaxis()->SetBinLabel(nuclei::evSel::kITSROFborder + 2, "ITSROFborder");
491492
spectra.get<TH1>(HIST("hEventSelections"))->GetXaxis()->SetBinLabel(nuclei::evSel::kZvtx + 2, "Zvtx");
492493
spectra.get<TH1>(HIST("hEventSelections"))->GetXaxis()->SetBinLabel(nuclei::evSel::kNoSameBunchPileup + 2, "kNoSameBunchPileup");
@@ -549,7 +550,7 @@ struct deuteronInTriggeredEvents {
549550
}
550551

551552
template <typename Ttrks>
552-
bool IsJetTriggered(Ttrks const& tracks, nuclei::triggerListName triggerCondition)
553+
bool isJetTriggered(Ttrks const& tracks, nuclei::triggerListName triggerCondition)
553554
{
554555
// Defining trigger condition
555556
double jetPtThreshold(0.0);
@@ -608,7 +609,7 @@ struct deuteronInTriggeredEvents {
608609
}
609610

610611
template <typename McParts>
611-
bool IsMCJetTriggered(McParts const& McParticles, aod::McParticles const& particlesMC, nuclei::triggerListName triggerCondition)
612+
bool isMCJetTriggered(McParts const& McParticles, aod::McParticles const& particlesMC, nuclei::triggerListName triggerCondition)
612613
{
613614
// Defining trigger condition
614615
double jetPtThreshold(0.0);
@@ -939,7 +940,7 @@ struct deuteronInTriggeredEvents {
939940
auto mcParticlesPerColl = particlesMC.sliceBy(perMcCollision, c.globalIndex());
940941
auto& mask = eventMask[c.globalIndex()];
941942

942-
if (IsMCJetTriggered(mcParticlesPerColl, particlesMC, trigger))
943+
if (isMCJetTriggered(mcParticlesPerColl, particlesMC, trigger))
943944
mask |= nuclei::kIsJetTriggered;
944945
}
945946

@@ -959,7 +960,7 @@ struct deuteronInTriggeredEvents {
959960
const auto& slicedTracks = tracks.sliceBy(tracksPerCollisions, collision.globalIndex());
960961

961962
if (cfgApplyMCEvSel) {
962-
if (!IsJetTriggered(slicedTracks, trigger))
963+
if (!isJetTriggered(slicedTracks, trigger))
963964
continue;
964965
}
965966

@@ -1054,7 +1055,7 @@ struct deuteronInTriggeredEvents {
10541055
nuclei::hGenNuclei[iS][particle.pdgCode() < 0]->Fill(1., particle.pt());
10551056
// antinuclei from B hadrons are classified as physical primaries
10561057
if (particle.has_mothers()) {
1057-
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
1058+
for (const auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
10581059
if (std::find(nuclei::hfMothCodes.begin(), nuclei::hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != nuclei::hfMothCodes.end()) {
10591060
flags |= kIsSecondaryFromWeakDecay;
10601061
motherPdgCode = motherparticle.pdgCode();
@@ -1097,5 +1098,5 @@ struct deuteronInTriggeredEvents {
10971098
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
10981099
{
10991100
return WorkflowSpec{
1100-
adaptAnalysisTask<deuteronInTriggeredEvents>(cfgc, TaskName{"deuteron-in-triggered-events"})};
1101+
adaptAnalysisTask<deuteronInTriggeredEvents>(cfgc)};
11011102
}

0 commit comments

Comments
 (0)