Skip to content

Commit 40b2b6d

Browse files
author
Christopher Klumm
committed
Updated implementations for resonances.
format correction via clang and code improvemnts through o2linter.
1 parent 4b61136 commit 40b2b6d

15 files changed

+587
-582
lines changed

PWGCF/FemtoDream/Core/femtoDreamContainer.h

Lines changed: 60 additions & 60 deletions
Large diffs are not rendered by default.

PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class FemtoDreamDetaDphiStar
210210
}
211211
if (sameCharge) {
212212
if (atWhichRadiiToSelect == 1) {
213-
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
213+
if (std::pow(dphiAvg, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
214214
return true;
215215
} else {
216216
if (Q3 == 999) {
@@ -223,7 +223,7 @@ class FemtoDreamDetaDphiStar
223223
return false;
224224
}
225225
} else if (atWhichRadiiToSelect == 0) {
226-
if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
226+
if (std::pow(dphi_AT_PV, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
227227
return true;
228228
} else {
229229
if (Q3 == 999) {
@@ -236,7 +236,7 @@ class FemtoDreamDetaDphiStar
236236
return false;
237237
}
238238
} else if (atWhichRadiiToSelect == 2) {
239-
if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
239+
if (std::pow(dphi_AT_SpecificRadii, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
240240
return true;
241241
} else {
242242
if (Q3 == 999) {
@@ -296,7 +296,7 @@ class FemtoDreamDetaDphiStar
296296
}
297297
if (sameCharge) {
298298
if (atWhichRadiiToSelect == 1) {
299-
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
299+
if (std::pow(dphiAvg, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
300300
pass = true;
301301
} else {
302302
if (Q3 == 999) {
@@ -308,7 +308,7 @@ class FemtoDreamDetaDphiStar
308308
}
309309
}
310310
} else if (atWhichRadiiToSelect == 0) {
311-
if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
311+
if (std::pow(dphi_AT_PV, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
312312
pass = true;
313313
} else {
314314
if (Q3 == 999) {
@@ -320,7 +320,7 @@ class FemtoDreamDetaDphiStar
320320
}
321321
}
322322
} else if (atWhichRadiiToSelect == 2) {
323-
if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
323+
if (std::pow(dphi_AT_SpecificRadii, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
324324
pass = true;
325325
} else {
326326
if (Q3 == 999) {
@@ -376,7 +376,7 @@ class FemtoDreamDetaDphiStar
376376
}
377377
if (sameCharge) {
378378
if (atWhichRadiiToSelect == 1) {
379-
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
379+
if (std::pow(dphiAvg, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
380380
pass = true;
381381
} else {
382382
if (Q3 == 999) {
@@ -388,7 +388,7 @@ class FemtoDreamDetaDphiStar
388388
}
389389
}
390390
} else if (atWhichRadiiToSelect == 0) {
391-
if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
391+
if (std::pow(dphi_AT_PV, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
392392
pass = true;
393393
} else {
394394
if (Q3 == 999) {
@@ -400,7 +400,7 @@ class FemtoDreamDetaDphiStar
400400
}
401401
}
402402
} else if (atWhichRadiiToSelect == 2) {
403-
if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
403+
if (std::pow(dphi_AT_SpecificRadii, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
404404
pass = true;
405405
} else {
406406
if (Q3 == 999) {
@@ -453,7 +453,7 @@ class FemtoDreamDetaDphiStar
453453
}
454454
if (sameCharge) {
455455
if (atWhichRadiiToSelect == 1) {
456-
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
456+
if (std::pow(dphiAvg, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
457457
pass = true;
458458
} else {
459459
if (Q3 == 999) {
@@ -465,7 +465,7 @@ class FemtoDreamDetaDphiStar
465465
}
466466
}
467467
} else if (atWhichRadiiToSelect == 0) {
468-
if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
468+
if (std::pow(dphi_AT_PV, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
469469
pass = true;
470470
} else {
471471
if (Q3 == 999) {
@@ -477,7 +477,7 @@ class FemtoDreamDetaDphiStar
477477
}
478478
}
479479
} else if (atWhichRadiiToSelect == 2) {
480-
if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
480+
if (std::pow(dphi_AT_SpecificRadii, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
481481
pass = true;
482482
} else {
483483
if (Q3 == 999) {
@@ -556,7 +556,7 @@ class FemtoDreamDetaDphiStar
556556
}
557557

558558
if (atWhichRadiiToSelect == 1) {
559-
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
559+
if (std::pow(dphiAvg, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
560560
pass = true;
561561
} else {
562562
if (Q3 == 999) {
@@ -568,7 +568,7 @@ class FemtoDreamDetaDphiStar
568568
}
569569
}
570570
} else if (atWhichRadiiToSelect == 0) {
571-
if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
571+
if (std::pow(dphi_AT_PV, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
572572
pass = true;
573573
} else {
574574
if (Q3 == 999) {
@@ -580,7 +580,7 @@ class FemtoDreamDetaDphiStar
580580
}
581581
}
582582
} else if (atWhichRadiiToSelect == 2) {
583-
if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
583+
if (std::pow(dphi_AT_SpecificRadii, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
584584
pass = true;
585585
} else {
586586
if (Q3 == 999) {
@@ -635,7 +635,7 @@ class FemtoDreamDetaDphiStar
635635
}
636636
if (sameCharge) {
637637
if (atWhichRadiiToSelect == 1) {
638-
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
638+
if (std::pow(dphiAvg, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
639639
pass = true;
640640
} else {
641641
if (Q3 == 999) {
@@ -648,7 +648,7 @@ class FemtoDreamDetaDphiStar
648648
}
649649

650650
} else if (atWhichRadiiToSelect == 0) {
651-
if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
651+
if (std::pow(dphi_AT_PV, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
652652
pass = true;
653653
} else {
654654
if (Q3 == 999) {
@@ -660,7 +660,7 @@ class FemtoDreamDetaDphiStar
660660
}
661661
}
662662
} else if (atWhichRadiiToSelect == 2) {
663-
if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
663+
if (std::pow(dphi_AT_SpecificRadii, 2) / std::pow(deltaPhiMax, 2) + std::pow(deta, 2) / std::pow(deltaEtaMax, 2) < 1.) {
664664
pass = true;
665665
} else {
666666
if (Q3 == 999) {

PWGCF/FemtoDream/Core/femtoDreamObjectSelection.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ class FemtoDreamObjectSelection
6060
}
6161
}
6262

63-
///assigns value from configurbale to protected class member
64-
/// \param selVals o2 configurable containing the values employed for the selection
65-
template<typename V>
63+
/// assigns value from configurbale to protected class member
64+
/// \param selVals o2 configurable containing the values employed for the selection
65+
template <typename V>
6666
void assign(V& selVals)
6767
{
68-
assignedValue = static_cast<selValDataType>(selVals);
68+
assignedValue = static_cast<selValDataType>(selVals);
6969
}
7070

7171
/// Pass the Configurable of selection values in the analysis task to the selection class
@@ -78,7 +78,7 @@ class FemtoDreamObjectSelection
7878
{
7979
std::vector<selValDataType> tmpSelVals = selVals; // necessary due to some features of the Configurable
8080
std::vector<FemtoDreamSelection<selValDataType, selVariable>> tempVec;
81-
for (const selValDataType selVal : tmpSelVals) {
81+
for (const selValDataType& selVal : tmpSelVals) {
8282
tempVec.push_back(FemtoDreamSelection<selValDataType, selVariable>(selVal, selVar, selType));
8383
}
8484
setSelection(tempVec);
@@ -106,7 +106,7 @@ class FemtoDreamObjectSelection
106106
}
107107

108108
/// Then, the sorted selections are added to the overall container of cuts
109-
for (auto& sel : sels) {
109+
for (const auto& sel : sels) {
110110
mSelections.push_back(sel);
111111
}
112112
}
@@ -130,7 +130,7 @@ class FemtoDreamObjectSelection
130130
break;
131131
}
132132

133-
for (auto sel : mSelections) {
133+
for (auto& sel : mSelections) {
134134
if (sel.getSelectionVariable() == selVar) {
135135
switch (sel.getSelectionType()) {
136136
case (femtoDreamSelection::SelectionType::kUpperLimit):
@@ -173,7 +173,7 @@ class FemtoDreamObjectSelection
173173
std::vector<FemtoDreamSelection<selValDataType, selVariable>> getSelections(selVariable selVar)
174174
{
175175
std::vector<FemtoDreamSelection<selValDataType, selVariable>> selValVec;
176-
for (auto it : mSelections) {
176+
for (auto& it : mSelections) {
177177
if (it.getSelectionVariable() == selVar) {
178178
selValVec.push_back(it);
179179
}
@@ -186,7 +186,7 @@ class FemtoDreamObjectSelection
186186
std::vector<selVariable> getSelectionVariables()
187187
{
188188
std::vector<selVariable> selVarVec;
189-
for (auto it : mSelections) {
189+
for (auto& it : mSelections) {
190190
auto selVar = it.getSelectionVariable();
191191
if (std::none_of(selVarVec.begin(), selVarVec.end(), [selVar](selVariable a) { return a == selVar; })) {
192192
selVarVec.push_back(selVar);
@@ -199,7 +199,7 @@ class FemtoDreamObjectSelection
199199
HistogramRegistry* mHistogramRegistry; ///< For Analysis QA output
200200
HistogramRegistry* mQAHistogramRegistry; ///< For QA output
201201
std::vector<FemtoDreamSelection<selValDataType, selVariable>> mSelections; ///< Vector containing all selections
202-
selValDataType assignedValue;
202+
selValDataType assignedValue;
203203
};
204204

205205
} // namespace femtoDream

PWGCF/FemtoDream/Core/femtoDreamParticleHisto.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ class FemtoDreamParticleHisto
447447
float pidTPC = 0.;
448448
float pidTOF = 0.;
449449

450-
switch (abs(mPDG)) {
450+
switch (std::abs(mPDG)) {
451451
case kElectron:
452452
pidTPC = part.tpcNSigmaEl();
453453
pidTOF = part.tofNSigmaEl();
@@ -553,7 +553,7 @@ class FemtoDreamParticleHisto
553553
mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST("_MC/hEta_DiffTruthReco"), MCpart.eta(), (part.eta() - MCpart.eta()));
554554
mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST("_MC/hPhi_DiffTruthReco"), MCpart.phi(), (part.phi() - MCpart.phi()));
555555

556-
if (abs(pdgcode) == mPDG) { // fill this histogramm only for TRUE protons (independently of their origin) for the track purity estimation
556+
if (std::abs(pdgcode) == mPDG) { // fill this histogramm only for TRUE protons (independently of their origin) for the track purity estimation
557557
mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST("_MC/hPt_ReconNoFake"), part.pt());
558558
}
559559
if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kTrack || mParticleType == o2::aod::femtodreamparticle::ParticleType::kV0Child) {

0 commit comments

Comments
 (0)