Skip to content

Commit 91ea153

Browse files
committed
Fix MegaLinter
1 parent 3ef0e3b commit 91ea153

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

PWGEM/PhotonMeson/Core/PairCut.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class PairCut
3333
kNCuts
3434
};
3535

36-
[[nodiscard]] std::string getName() const { return name; }
37-
[[nodiscard]] std::string getTitle() const { return title; }
36+
[[nodiscard]] const std::string& getName() const { return name; }
37+
[[nodiscard]] const std::string& getTitle() const { return title; }
3838

3939
static const std::array<std::string, static_cast<std::size_t>(PairCuts::kNCuts)> mCutNames;
4040

PWGEM/PhotonMeson/Tasks/HeavyNeutralMeson.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ struct HeavyNeutralMeson {
148148
HistogramRegistry mHistManager{"HeavyNeutralMesonHistograms", {}, OutputObjHandlingPolicy::AnalysisObject};
149149

150150
// Prepare vectors for different species
151-
std::vector<hnmutilities::GammaGammaPair> vGGs;
152-
std::vector<hnmutilities::HeavyNeutralMeson> vHNMs;
153-
std::vector<ROOT::Math::PtEtaPhiMVector> etaPrimeEMC, etaPrimePCM, omegaEMC, omegaPCM, proton, antiproton, deuteron, antideuteron, pion, antipion;
151+
std::vector<hnmutilities::GammaGammaPair> mvGGs;
152+
std::vector<hnmutilities::HeavyNeutralMeson> mvHNMs;
153+
std::vector<ROOT::Math::PtEtaPhiMVector> etaPrimeEMC, etaPrimePCM, omegaEMC, omegaPCM, pion, antipion;
154154
float mMassProton = constants::physics::MassProton;
155155
float mMassDeuteron = constants::physics::MassDeuteron;
156156
float mMassOmega = 0.782;
@@ -371,7 +371,7 @@ struct HeavyNeutralMeson {
371371
// clean vecs
372372
pion.clear();
373373
antipion.clear();
374-
vHNMs.clear();
374+
mvHNMs.clear();
375375
// vGGs vector is cleared in reconstructGGs.
376376

377377
// ---------------------------------> EMCal event QA <----------------------------------
@@ -408,9 +408,9 @@ struct HeavyNeutralMeson {
408408

409409
std::vector<hnmutilities::Photon> vGammas;
410410
hnmutilities::storeGammasInVector(clustersInThisCollision, v0sInThisCollision, vGammas, emcEtaShift, emcPhiShift);
411-
hnmutilities::reconstructGGs(vGammas, vGGs);
411+
hnmutilities::reconstructGGs(vGammas, mvGGs);
412412
vGammas.clear();
413-
processGGs(vGGs);
413+
processGGs(mvGGs);
414414

415415
// ------------------------------> Loop over all tracks <-------------------------------
416416
// - Sort them into vectors based on PID ((anti)protons, (anti)deuterons, (anti)pions)
@@ -502,7 +502,7 @@ struct HeavyNeutralMeson {
502502
for (const auto& posPion : pion) {
503503
for (const auto& negPion : antipion) {
504504
ROOT::Math::PtEtaPhiMVector vecPiPlPiMi = posPion + negPion;
505-
hnmutilities::reconstructHeavyNeutralMesons(vecPiPlPiMi, vGGs, vHNMs);
505+
hnmutilities::reconstructHeavyNeutralMesons(vecPiPlPiMi, mvGGs, mvHNMs);
506506

507507
mHistManager.fill(HIST("HNM/Before/PiPlPiMi/fInvMassVsPt"), vecPiPlPiMi.M(), vecPiPlPiMi.pt());
508508
mHistManager.fill(HIST("HNM/Before/PiPlPiMi/fEta"), vecPiPlPiMi.eta());
@@ -523,7 +523,7 @@ struct HeavyNeutralMeson {
523523
// ---------------------------> Process HNM candidates <--------------------------------
524524
// - Fill invMassVsPt histograms separated into HNM types (based on GG mass) and gamma reco method
525525
// -------------------------------------------------------------------------------------
526-
processHNMs(vHNMs);
526+
processHNMs(mvHNMs);
527527
}
528528

529529
/// \brief Loop over the GG candidates, fill the mass/pt histograms and set the isPi0/isEta flags based on the reconstructed mass

PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ struct SinglePhoton {
152152
o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Photon");
153153
auto* list_photon = dynamic_cast<THashList*>(fMainList->FindObject("Photon"));
154154

155-
for (auto& detname : fDetNames) {
155+
for (const auto& detname : fDetNames) {
156156
LOGF(info, "Enabled detector = %s", detname.data());
157157

158158
o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, detname.data());

PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ struct SinglePhotonMC {
8888
THashList* fMainList = new THashList();
8989

9090
std::vector<V0PhotonCut> fPCMCuts;
91-
std::vector<PHOSPhotonCut> fPHOSCuts;
92-
std::vector<EMCPhotonCut> fEMCCuts;
91+
// std::vector<PHOSPhotonCut> fPHOSCuts;
92+
// std::vector<EMCPhotonCut> fEMCCuts;
9393

9494
std::vector<std::string> fDetNames;
9595
void init(InitContext& context)
@@ -138,7 +138,7 @@ struct SinglePhotonMC {
138138
auto* list_gen = dynamic_cast<THashList*>(fMainList->FindObject("Generated"));
139139
o2::aod::pwgem::photon::histogram::DefineHistograms(list_gen, "Generated", "Photon");
140140

141-
for (auto& detname : fDetNames) {
141+
for (const auto& detname : fDetNames) {
142142
LOGF(info, "Enabled detector = %s", detname.data());
143143

144144
o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, detname.data());

PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ struct TagAndProbe {
162162

163163
// create sub lists first.
164164

165-
for (auto& pairname : fPairNames) {
165+
for (const auto& pairname : fPairNames) {
166166
LOGF(info, "Enabled pairs = %s", pairname.data());
167167

168168
THashList* list_ev_pair = o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, pairname.data());

0 commit comments

Comments
 (0)