Skip to content

Commit 3b1388c

Browse files
committed
Linter fixes
1 parent 38e2530 commit 3b1388c

1 file changed

Lines changed: 51 additions & 52 deletions

File tree

PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx

Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,8 @@ struct PhiStrangenessCorrelation {
262262
using BinningTypeVertexCent = ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentFT0M>;
263263
BinningTypeVertexCent binningOnVertexAndCent{{axisVertexMixing, axisCentralityMixing}, true};
264264

265-
static constexpr std::array<std::string_view, 2> phiMassRegionLabels{"Signal", "Sideband"};
266-
// static constexpr std::array<std::string_view, ParticleOfInterestSize> particleOfInterestLabels{"Phi", "K0S", "Pion" /*"PionTPC", "PionTPCTOF"*/};
267-
static constexpr std::array<std::string_view, kAssocPartSize> assocParticleLabels{"K0S", "Xi", "Pi"};
265+
static constexpr std::array<std::string_view, 2> PhiMassRegionLabels{"Signal", "Sideband"};
266+
static constexpr std::array<std::string_view, kAssocPartSize> AssocParticleLabels{"K0S", "Xi", "Pi"};
268267

269268
// Light structures to store only the necessary information for the correlation analysis at MCGen level
270269
struct MiniParticle {
@@ -315,7 +314,7 @@ struct PhiStrangenessCorrelation {
315314
histos.add("phiPi/h6PhiPiTPCDataME", "Invariant mass of Phi vs nSigmaTPC Pion in Data ME", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTPiAxis, deltayAxis, massPhiAxis, nSigmaPiAxis});
316315
histos.add("phiPi/h6PhiPiTOFDataME", "Invariant mass of Phi vs nSigmaTOF Pion in Data ME", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTPiAxis, deltayAxis, massPhiAxis, nSigmaPiAxis});
317316

318-
for (const auto& label : phiMassRegionLabels) {
317+
for (const auto& label : PhiMassRegionLabels) {
319318
histos.add(fmt::format("phiK0S/h5PhiK0SData{}", label).c_str(), "Deltay vs deltaphi for Phi and K0Short in Data", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTK0SAxis, deltayAxis, deltaphiAxis});
320319
histos.add(fmt::format("phiPi/h5PhiPiData{}", label).c_str(), "Deltay vs deltaphi for Phi and Pion in Data", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTPiAxis, deltayAxis, deltaphiAxis});
321320

@@ -397,7 +396,7 @@ struct PhiStrangenessCorrelation {
397396
// Only load the associated maps that are explicitly enabled
398397
for (size_t i = 0; i < kAssocPartSize; ++i) {
399398
if (doAssocCorrelations[i])
400-
fetchSingleEfficiencyMapFromCCDB(effMapsAssoc[i], assocParticleLabels[i]);
399+
fetchSingleEfficiencyMapFromCCDB(effMapsAssoc[i], AssocParticleLabels[i]);
401400
}
402401
}
403402

@@ -508,7 +507,7 @@ struct PhiStrangenessCorrelation {
508507

509508
// Find the bin number.
510509
// The 'true' flag is mandatory: it allocates the bin in memory if it doesn't exist yet.
511-
long bin = hist->GetBin(coordArray, true);
510+
auto bin = hist->GetBin(coordArray, true);
512511

513512
// Retrieve the previous content and the squared error (variance)
514513
double prevContent = hist->GetBinContent(bin);
@@ -614,34 +613,34 @@ struct PhiStrangenessCorrelation {
614613
auto k0sHistID = std::make_tuple(HIST("phiK0S/h5PhiK0SDataSignal"), HIST("phiK0S/h5PhiK0SDataSideband"));
615614
auto piHistID = std::make_tuple(HIST("phiPi/h5PhiPiDataSignal"), HIST("phiPi/h5PhiPiDataSideband"));
616615

617-
static_for<0, phiMassRegionLabels.size() - 1>([&](auto i_idx) {
618-
constexpr unsigned int i = i_idx.value;
616+
static_for<0, PhiMassRegionLabels.size() - 1>([&](auto i_idx) {
617+
constexpr unsigned int Idx = i_idx.value;
619618

620-
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[i];
619+
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx];
621620
if (!phiCand.inMassRegion(minMassPhi, maxMassPhi))
622621
return;
623622

624-
// auto k0sHistID = HIST("phiK0S/h5PhiK0SData") + HIST(phiMassRegionLabels[i]);
625-
// auto piHistID = HIST("phiPi/h5PhiPiData") + HIST(phiMassRegionLabels[i]);
623+
// auto k0sHistID = HIST("phiK0S/h5PhiK0SData") + HIST(PhiMassRegionLabels[Idx]);
624+
// auto piHistID = HIST("phiPi/h5PhiPiData") + HIST(PhiMassRegionLabels[Idx]);
626625

627626
processCorrelations(
628627
//[&](const auto& k0s, float w) {
629-
// histos.fill(std::get<i>(k0sHistID), multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()), w);
628+
// histos.fill(std::get<Idx>(k0sHistID), multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()), w);
630629
[&](const auto& k0s, const std::pair<float, float>& w) {
631-
customFillTHn(std::get<i>(k0sHistID), w, multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()));
630+
customFillTHn(std::get<Idx>(k0sHistID), w, multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()));
632631
},
633632
//[&](const auto& pion, float w) {
634-
// histos.fill(std::get<i>(piHistID), multiplicity, phiCand.pt(), pion.pt(), phiCand.y() - pion.y(), getDeltaPhi(phiCand.phi(), pion.phi()), w);
633+
// histos.fill(std::get<Idx>(piHistID), multiplicity, phiCand.pt(), pion.pt(), phiCand.y() - pion.y(), getDeltaPhi(phiCand.phi(), pion.phi()), w);
635634
[&](const auto& pion, const std::pair<float, float>& w) {
636-
customFillTHn(std::get<i>(piHistID), w, multiplicity, phiCand.pt(), pion.pt(), phiCand.y() - pion.y(), getDeltaPhi(phiCand.phi(), pion.phi()));
635+
customFillTHn(std::get<Idx>(piHistID), w, multiplicity, phiCand.pt(), pion.pt(), phiCand.y() - pion.y(), getDeltaPhi(phiCand.phi(), pion.phi()));
637636
});
638637
});
639638
}
640639

641-
/*static_for<0, phiMassRegionLabels.size() - 1>([&](auto i_idx) {
642-
constexpr unsigned int i = i_idx.value;
640+
/*static_for<0, PhiMassRegionLabels.size() - 1>([&](auto i_idx) {
641+
constexpr unsigned int Idx = i_idx.value;
643642
644-
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[i];
643+
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx];
645644
if (!phiCand.inMassRegion(minMassPhi, maxMassPhi))
646645
return;
647646
@@ -656,15 +655,15 @@ struct PhiStrangenessCorrelation {
656655
float weightPhiK0S = computeWeight(BoundEfficiencyMap(effMaps[Phi], multiplicity, phiCand.pt(), phiCand.y()),
657656
BoundEfficiencyMap(effMaps[K0S], multiplicity, k0s.pt(), k0s.y()));
658657
659-
histos.fill(HIST("phiK0S/h5PhiK0SData") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()), weightPhiK0S);
658+
histos.fill(HIST("phiK0S/h5PhiK0SData") + HIST(PhiMassRegionLabels[Idx]), multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()), weightPhiK0S);
660659
}
661660
662661
// Loop over all primary pion candidates
663662
for (const auto& pionTrack : pionTracks) {
664663
float weightPhiPion = computeWeight(BoundEfficiencyMap(effMaps[Phi], multiplicity, phiCand.pt(), phiCand.y()),
665664
BoundEfficiencyMap(effMaps[Pion], multiplicity, pionTrack.pt(), pionTrack.y()));
666665
667-
histos.fill(HIST("phiPi/h5PhiPiData") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), pionTrack.pt(), phiCand.y() - pionTrack.y(), getDeltaPhi(phiCand.phi(), pionTrack.phi()), weightPhiPion);
666+
histos.fill(HIST("phiPi/h5PhiPiData") + HIST(PhiMassRegionLabels[Idx]), multiplicity, phiCand.pt(), pionTrack.pt(), phiCand.y() - pionTrack.y(), getDeltaPhi(phiCand.phi(), pionTrack.phi()), weightPhiPion);
668667
}
669668
});*/
670669
}
@@ -731,26 +730,26 @@ struct PhiStrangenessCorrelation {
731730
} else if (analysisMode == kDeltaYvsDeltaPhi) {
732731
auto k0sHistID = std::make_tuple(HIST("phiK0S/h5PhiK0SDataMESignal"), HIST("phiK0S/h5PhiK0SDataMESideband"));
733732

734-
static_for<0, phiMassRegionLabels.size() - 1>([&](auto i_idx) {
735-
constexpr unsigned int i = i_idx.value;
733+
static_for<0, PhiMassRegionLabels.size() - 1>([&](auto i_idx) {
734+
constexpr unsigned int Idx = i_idx.value;
736735

737-
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[i];
736+
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx];
738737
if (!phiCand.inMassRegion(minMassPhi, maxMassPhi))
739738
return;
740739

741740
processCorrelations(
742741
//[&](const auto& k0s, float w) {
743-
// histos.fill(std::get<i>(k0sHistID), multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()), w);
742+
// histos.fill(std::get<Idx>(k0sHistID), multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()), w);
744743
[&](const auto& k0s, const std::pair<float, float>& w) {
745-
customFillTHn(std::get<i>(k0sHistID), w, multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()));
744+
customFillTHn(std::get<Idx>(k0sHistID), w, multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()));
746745
});
747746
});
748747
}
749748

750-
/*static_for<0, phiMassRegionLabels.size() - 1>([&](auto i_idx) {
751-
constexpr unsigned int i = i_idx.value;
749+
/*static_for<0, PhiMassRegionLabels.size() - 1>([&](auto i_idx) {
750+
constexpr unsigned int Idx = i_idx.value;
752751
753-
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[i];
752+
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx];
754753
if (!phiCand.inMassRegion(minMassPhi, maxMassPhi))
755754
return;
756755
@@ -763,7 +762,7 @@ struct PhiStrangenessCorrelation {
763762
float weightPhiK0S = computeWeight(BoundEfficiencyMap(effMaps[Phi], multiplicity, phiCand.pt(), phiCand.y()),
764763
BoundEfficiencyMap(effMaps[K0S], multiplicity, k0s.pt(), k0s.y()));
765764
766-
histos.fill(HIST("phiK0S/h5PhiK0SDataME") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()), weightPhiK0S);
765+
histos.fill(HIST("phiK0S/h5PhiK0SDataME") + HIST(PhiMassRegionLabels[Idx]), multiplicity, phiCand.pt(), k0s.pt(), phiCand.y() - k0s.y(), getDeltaPhi(phiCand.phi(), k0s.phi()), weightPhiK0S);
767766
});*/
768767
}
769768
}
@@ -835,33 +834,33 @@ struct PhiStrangenessCorrelation {
835834
} else if (analysisMode == kDeltaYvsDeltaPhi) {
836835
auto piHistID = std::make_tuple(HIST("phiPi/h5PhiPiDataMESignal"), HIST("phiPi/h5PhiPiDataMESideband"));
837836

838-
static_for<0, phiMassRegionLabels.size() - 1>([&](auto i_idx) {
839-
constexpr unsigned int i = i_idx.value;
837+
static_for<0, PhiMassRegionLabels.size() - 1>([&](auto i_idx) {
838+
constexpr unsigned int Idx = i_idx.value;
840839

841-
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[i];
840+
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx];
842841
if (!phiCand.inMassRegion(minMassPhi, maxMassPhi))
843842
return;
844843

845844
processCorrelations(
846845
//[&](const auto& pion, float w) {
847-
// histos.fill(std::get<i>(piHistID), multiplicity, phiCand.pt(), pion.pt(), phiCand.y() - pion.y(), getDeltaPhi(phiCand.phi(), pion.phi()), w);
846+
// histos.fill(std::get<Idx>(piHistID), multiplicity, phiCand.pt(), pion.pt(), phiCand.y() - pion.y(), getDeltaPhi(phiCand.phi(), pion.phi()), w);
848847
[&](const auto& pion, const std::pair<float, float>& w) {
849-
customFillTHn(std::get<i>(piHistID), w, multiplicity, phiCand.pt(), pion.pt(), phiCand.y() - pion.y(), getDeltaPhi(phiCand.phi(), pion.phi()));
848+
customFillTHn(std::get<Idx>(piHistID), w, multiplicity, phiCand.pt(), pion.pt(), phiCand.y() - pion.y(), getDeltaPhi(phiCand.phi(), pion.phi()));
850849
});
851850
});
852851
}
853852

854-
/*static_for<0, phiMassRegionLabels.size() - 1>([&](auto i_idx) {
855-
constexpr unsigned int i = i_idx.value;
853+
/*static_for<0, PhiMassRegionLabels.size() - 1>([&](auto i_idx) {
854+
constexpr unsigned int Idx = i_idx.value;
856855
857-
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[i];
856+
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx];
858857
if (!phiCand.inMassRegion(minMassPhi, maxMassPhi))
859858
return;
860859
861860
float weightPhiPion = computeWeight(BoundEfficiencyMap(effMaps[Phi], multiplicity, phiCand.pt(), phiCand.y()),
862861
BoundEfficiencyMap(effMaps[Pion], multiplicity, piTrack.pt(), piTrack.y()));
863862
864-
histos.fill(HIST("phiPi/h5PhiPiDataME") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), piTrack.pt(), phiCand.y() - piTrack.y(), getDeltaPhi(phiCand.phi(), piTrack.phi()), weightPhiPion);
863+
histos.fill(HIST("phiPi/h5PhiPiDataME") + HIST(PhiMassRegionLabels[Idx]), multiplicity, phiCand.pt(), piTrack.pt(), phiCand.y() - piTrack.y(), getDeltaPhi(phiCand.phi(), piTrack.phi()), weightPhiPion);
865864
});*/
866865
}
867866
}
@@ -1056,12 +1055,12 @@ struct PhiStrangenessCorrelation {
10561055
auto& phiParticle = mcParticles.rawIteratorAt(phiIndices[iTrigg]);
10571056
10581057
static_for<0, assocIndices.size() - 1>([&](auto i_idx) {
1059-
constexpr unsigned int i = i_idx.value;
1058+
constexpr unsigned int Idx = i_idx.value;
10601059
1061-
for (std::size_t iAssoc{0}; iAssoc < assocIndices[i].size(); ++iAssoc) {
1062-
auto& assocParticle = mcParticles.rawIteratorAt(assocIndices[i][iAssoc]);
1060+
for (std::size_t iAssoc{0}; iAssoc < assocIndices[Idx].size(); ++iAssoc) {
1061+
auto& assocParticle = mcParticles.rawIteratorAt(assocIndices[Idx][iAssoc]);
10631062
1064-
histos.fill(HIST("mcGenClosure/h5Phi") + HIST(assocParticleLabels[i]) + HIST("ClosureGenSE"), multiplicity, phiParticle.pt(), assocParticle.pt(), phiParticle.y() - assocParticle.y(), getDeltaPhi(phiParticle.phi(), assocParticle.phi()));
1063+
histos.fill(HIST("mcGenClosure/h5Phi") + HIST(AssocParticleLabels[Idx]) + HIST("ClosureGenSE"), multiplicity, phiParticle.pt(), assocParticle.pt(), phiParticle.y() - assocParticle.y(), getDeltaPhi(phiParticle.phi(), assocParticle.phi()));
10651064
}
10661065
});
10671066
}
@@ -1187,13 +1186,13 @@ struct PhiStrangenessCorrelation {
11871186
for (const auto& phiParticle : phiParticles) {
11881187
histos.fill(HIST("phi/h3PhiMCClosureGen"), multiplicity, phiParticle.pt, phiParticle.y);
11891188

1190-
static_for<0, assocParticleLabels.size() - 1>([&](auto i_idx) {
1191-
constexpr unsigned int i = i_idx.value;
1192-
if (!doAssocCorrelations[i])
1189+
static_for<0, AssocParticleLabels.size() - 1>([&](auto i_idx) {
1190+
constexpr unsigned int Idx = i_idx.value;
1191+
if (!doAssocCorrelations[Idx])
11931192
return;
11941193

1195-
for (const auto& assocParticle : *(currentAssocParticles[i])) {
1196-
histos.fill(HIST("phi") + HIST(assocParticleLabels[i]) + HIST("/h5Phi") + HIST(assocParticleLabels[i]) + HIST("ClosureMCGen"),
1194+
for (const auto& assocParticle : *(currentAssocParticles[Idx])) {
1195+
histos.fill(HIST("phi") + HIST(AssocParticleLabels[Idx]) + HIST("/h5Phi") + HIST(AssocParticleLabels[Idx]) + HIST("ClosureMCGen"),
11971196
multiplicity, phiParticle.pt, assocParticle.pt,
11981197
phiParticle.y - assocParticle.y,
11991198
getDeltaPhi(phiParticle.phi, assocParticle.phi));
@@ -1207,13 +1206,13 @@ struct PhiStrangenessCorrelation {
12071206

12081207
// Loop over past events in the same multiplicity bin and fill histograms with all combinations of current phi particles and past associated particles
12091208
for (const auto& phiParticle : phiParticles) {
1210-
static_for<0, assocParticleLabels.size() - 1>([&](auto i_idx) {
1211-
constexpr unsigned int i = i_idx.value;
1212-
if (!doAssocCorrelations[i])
1209+
static_for<0, AssocParticleLabels.size() - 1>([&](auto i_idx) {
1210+
constexpr unsigned int Idx = i_idx.value;
1211+
if (!doAssocCorrelations[Idx])
12131212
return;
12141213

1215-
for (const auto& assocParticle : *(pastAssocParticles[i])) {
1216-
histos.fill(HIST("phi") + HIST(assocParticleLabels[i]) + HIST("/h5Phi") + HIST(assocParticleLabels[i]) + HIST("ClosureMCGenME"),
1214+
for (const auto& assocParticle : *(pastAssocParticles[Idx])) {
1215+
histos.fill(HIST("phi") + HIST(AssocParticleLabels[Idx]) + HIST("/h5Phi") + HIST(AssocParticleLabels[Idx]) + HIST("ClosureMCGenME"),
12171216
multiplicity, phiParticle.pt, assocParticle.pt,
12181217
phiParticle.y - assocParticle.y,
12191218
getDeltaPhi(phiParticle.phi, assocParticle.phi));

0 commit comments

Comments
 (0)