Skip to content

Commit b19417e

Browse files
committed
fix o2linter issues
1 parent dc1e29d commit b19417e

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

PWGLF/TableProducer/Nuspex/ebyeMaker.cxx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ using BCsWithRun2Info = soa::Join<aod::BCs, aod::Run2BCInfos, aod::Timestamps>;
6262
namespace
6363
{
6464
constexpr int kNpart = 2;
65-
constexpr float trackSels[12]{/* 60, */ 80, 100, 2, 3, /* 4, */ 0.05, 0.1, /* 0.15, */ 0.5, 1, /* 1.5, */ 2, 3 /* , 4 */, 2, 3, /*, 4 */};
66-
constexpr float dcaSels[3]{10., 10., 10.};
67-
constexpr double betheBlochDefault[kNpart][6]{{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}, {-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}};
68-
constexpr double betheBlochDefaultITS[6]{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32};
69-
constexpr double estimatorsCorrelationCoef[2]{-0.669108, 1.04489};
70-
constexpr double estimatorsSigmaPars[4]{0.933321, 0.0416976, -0.000936344, 8.92179e-06};
71-
constexpr double deltaEstimatorNsigma[2]{5.5, 5.};
72-
constexpr double partMass[kNpart]{o2::constants::physics::MassProton, o2::constants::physics::MassDeuteron};
73-
constexpr double partPdg[kNpart]{2212, o2::constants::physics::kDeuteron};
65+
constexpr float kTrackSels[12]{/* 60, */ 80, 100, 2, 3, /* 4, */ 0.05, 0.1, /* 0.15, */ 0.5, 1, /* 1.5, */ 2, 3 /* , 4 */, 2, 3, /*, 4 */};
66+
constexpr float kDcaSels[3]{10., 10., 10.};
67+
constexpr double kBetheBlochDefault[kNpart][6]{{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}, {-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}};
68+
constexpr double kBetheBlochDefaultITS[6]{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32};
69+
constexpr double kEstimatorsCorrelationCoef[2]{-0.669108, 1.04489};
70+
constexpr double kEstimatorsSigmaPars[4]{0.933321, 0.0416976, -0.000936344, 8.92179e-06};
71+
constexpr double kDeltaEstimatorNsigma[2]{5.5, 5.};
72+
constexpr double kPartMass[kNpart]{o2::constants::physics::MassProton, o2::constants::physics::MassDeuteron};
73+
constexpr double kPartPdg[kNpart]{PDG_t::kProton, o2::constants::physics::kDeuteron};
7474
static const std::vector<std::string> betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"};
7575
static const std::vector<std::string> particleNamesPar{"p", "d"};
7676
static const std::vector<std::string> trackSelsNames{"tpcClsMid", "tpcClsTight", "chi2TpcTight", "chi2TpcMid", "dcaxyTight", "dcaxyMid", "dcazTight", "dcazMid", "tpcNsigmaTight", "tpcNsigmaMid", "itsNsigmaTight", "itsNsigmaMid"};
@@ -210,8 +210,8 @@ struct EbyeMaker {
210210
uint8_t nTracksColl;
211211

212212
Configurable<int> cfgMaterialCorrection{"cfgMaterialCorrection", static_cast<int>(o2::base::Propagator::MatCorrType::USEMatCorrNONE), "Type of material correction"};
213-
Configurable<LabeledArray<double>> cfgBetheBlochParams{"cfgBetheBlochParams", {betheBlochDefault[0], 2, 6, particleNamesPar, betheBlochParNames}, "TPC Bethe-Bloch parameterisation for deuteron"};
214-
Configurable<LabeledArray<double>> cfgBetheBlochParamsITS{"cfgBetheBlochParamsITS", {betheBlochDefaultITS, 1, 6, particleName, betheBlochParNames}, "ITS Bethe-Bloch parameterisation for deuteron"};
213+
Configurable<LabeledArray<double>> cfgBetheBlochParams{"cfgBetheBlochParams", {kBetheBlochDefault[0], 2, 6, particleNamesPar, betheBlochParNames}, "TPC Bethe-Bloch parameterisation for deuteron"};
214+
Configurable<LabeledArray<double>> cfgBetheBlochParamsITS{"cfgBetheBlochParamsITS", {kBetheBlochDefaultITS, 1, 6, particleName, betheBlochParNames}, "ITS Bethe-Bloch parameterisation for deuteron"};
215215

216216
ConfigurableAxis centAxis{"centAxis", {106, 0, 106}, "binning for the centrality"};
217217
ConfigurableAxis zVtxAxis{"zVtxBins", {100, -20.f, 20.f}, "Binning for the vertex z in cm"};
@@ -253,7 +253,7 @@ struct EbyeMaker {
253253
Configurable<float> trackNclusItsCut{"trackNclusITScut", 2, "Minimum number of ITS clusters"};
254254
Configurable<float> trackNclusTpcCut{"trackNclusTPCcut", 60, "Minimum number of TPC clusters"};
255255
Configurable<float> trackChi2Cut{"trackChi2Cut", 4.f, "Maximum chi2/ncls in TPC"};
256-
Configurable<LabeledArray<float>> cfgDcaSels{"cfgDcaSels", {dcaSels, 1, 3, particleName, dcaSelsNames}, "DCA selections"};
256+
Configurable<LabeledArray<float>> cfgDcaSels{"cfgDcaSels", {kDcaSels, 1, 3, particleName, dcaSelsNames}, "DCA selections"};
257257

258258
Configurable<float> v0trackNcrossedRows{"v0trackNcrossedRows", 100, "Minimum number of crossed TPC rows for V0 daughter"};
259259
Configurable<float> v0trackNclusItsCut{"v0trackNclusITScut", 0, "Minimum number of ITS clusters for V0 daughter"};
@@ -289,7 +289,7 @@ struct EbyeMaker {
289289
Configurable<float> antidPtItsClsSizeCut{"antidPtItsClsSizeCut", 10.f, "pt for cluster size cut for antideuterons"};
290290

291291
Configurable<float> trklEtaMax{"trklEtaMax", 0.8f, "maximum eta for run 2 tracklets"};
292-
Configurable<LabeledArray<float>> cfgTrackSels{"cfgTrackSels", {trackSels, 1, 12, particleName, trackSelsNames}, "Track selections"};
292+
Configurable<LabeledArray<float>> cfgTrackSels{"cfgTrackSels", {kTrackSels, 1, 12, particleName, trackSelsNames}, "Track selections"};
293293

294294
std::array<float, kNpart> ptMin;
295295
std::array<float, kNpart> ptTof;
@@ -456,7 +456,7 @@ struct EbyeMaker {
456456
{
457457
if ((doprocessMiniRun2 || doprocessMiniMcRun2) && track.hasITS()) {
458458
auto extra = trackExtraRun2.rawIteratorAt(track.globalIndex());
459-
double expBethe{tpc::BetheBlochAleph(static_cast<double>(track.p() / partMass[0]), cfgBetheBlochParamsITS->get("p0"), cfgBetheBlochParamsITS->get("p1"), cfgBetheBlochParamsITS->get("p2"), cfgBetheBlochParamsITS->get("p3"), cfgBetheBlochParamsITS->get("p4"))};
459+
double expBethe{tpc::BetheBlochAleph(static_cast<double>(track.p() / kPartMass[0]), cfgBetheBlochParamsITS->get("p0"), cfgBetheBlochParamsITS->get("p1"), cfgBetheBlochParamsITS->get("p2"), cfgBetheBlochParamsITS->get("p3"), cfgBetheBlochParamsITS->get("p4"))};
460460
double expSigma{expBethe * cfgBetheBlochParamsITS->get("resolution")};
461461
auto nSigmaITS = static_cast<float>((extra.itsSignal() - expBethe) / expSigma);
462462
return std::make_pair(extra.itsSignal(), nSigmaITS);
@@ -617,7 +617,7 @@ struct EbyeMaker {
617617
}
618618
}
619619

620-
double expBethe{tpc::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() / partMass[iP]), cfgBetheBlochParams->get(iP, "p0"), cfgBetheBlochParams->get(iP, "p1"), cfgBetheBlochParams->get(iP, "p2"), cfgBetheBlochParams->get(iP, "p3"), cfgBetheBlochParams->get(iP, "p4"))};
620+
double expBethe{tpc::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() / kPartMass[iP]), cfgBetheBlochParams->get(iP, "p0"), cfgBetheBlochParams->get(iP, "p1"), cfgBetheBlochParams->get(iP, "p2"), cfgBetheBlochParams->get(iP, "p3"), cfgBetheBlochParams->get(iP, "p4"))};
621621
double expSigma{expBethe * cfgBetheBlochParams->get(iP, "resolution")};
622622
auto nSigmaTPC = static_cast<float>((track.tpcSignal() - expBethe) / expSigma);
623623

@@ -627,7 +627,7 @@ struct EbyeMaker {
627627
const float maxTofChi2 = 3.f; // TODO: check if this is still needed
628628
bool hasTof = track.hasTOF() && track.tofChi2() < maxTofChi2;
629629

630-
if (trackPt <= ptTof[iP] || (trackPt > ptTof[iP] && hasTof && std::abs(mass - partMass[iP]) < tofMassMaxQA)) { // for QA histograms
630+
if (trackPt <= ptTof[iP] || (trackPt > ptTof[iP] && hasTof && std::abs(mass - kPartMass[iP]) < tofMassMaxQA)) { // for QA histograms
631631
if (nSigmaTPC > nSigmaTpcCutLow[iP] && nSigmaTPC < nSigmaTpcCutUp[iP]) {
632632
tofMass[iP]->Fill(centrality, trackPt, mass);
633633
}
@@ -645,7 +645,7 @@ struct EbyeMaker {
645645
continue;
646646
}
647647

648-
if (trackPt <= ptTof[iP] || (trackPt > ptTof[iP] && hasTof && std::abs(mass - partMass[iP]) < tofMassMax[iP])) {
648+
if (trackPt <= ptTof[iP] || (trackPt > ptTof[iP] && hasTof && std::abs(mass - kPartMass[iP]) < tofMassMax[iP])) {
649649
CandidateTrack candTrack;
650650
candTrack.pt = track.sign() > 0. ? trackPt : -trackPt;
651651
candTrack.eta = trackEta;
@@ -834,7 +834,7 @@ struct EbyeMaker {
834834
}
835835
if (mcLab.has_mcParticle()) {
836836
auto mcTrack = mcLab.template mcParticle_as<aod::McParticles>();
837-
if (std::abs(mcTrack.pdgCode()) != partPdg[iP])
837+
if (std::abs(mcTrack.pdgCode()) != kPartPdg[iP])
838838
continue;
839839
if (((mcTrack.flags() & 0x8) && (doprocessMcRun2 || doprocessMiniMcRun2)) || (mcTrack.flags() & 0x2) || ((mcTrack.flags() & 0x1) && !doprocessMiniMcRun2))
840840
continue;
@@ -925,9 +925,9 @@ struct EbyeMaker {
925925
LOGF(debug, "not found!");
926926
candidateV0s.emplace_back(candV0);
927927
}
928-
} else if (std::abs(pdgCode) == partPdg[0] || std::abs(pdgCode) == partPdg[1]) {
928+
} else if (std::abs(pdgCode) == kPartPdg[0] || std::abs(pdgCode) == kPartPdg[1]) {
929929
int iP = 1;
930-
if (std::abs(pdgCode) == partPdg[0]) {
930+
if (std::abs(pdgCode) == kPartPdg[0]) {
931931
iP = 0;
932932
}
933933
if ((!mcPart.isPhysicalPrimary() && !doprocessMiniMcRun2))
@@ -1035,9 +1035,9 @@ struct EbyeMaker {
10351035
float centralityCl0 = collision.centRun2CL0();
10361036
if (kUseEstimatorsCorrelationCut) {
10371037
const auto& x = centralityCl0;
1038-
const double center = estimatorsCorrelationCoef[0] + estimatorsCorrelationCoef[1] * x;
1039-
const double sigma = estimatorsSigmaPars[0] + estimatorsSigmaPars[1] * x + estimatorsSigmaPars[2] * std::pow(x, 2) + estimatorsSigmaPars[3] * std::pow(x, 3);
1040-
if (cV0M < center - deltaEstimatorNsigma[0] * sigma || cV0M > center + deltaEstimatorNsigma[1] * sigma) {
1038+
const double center = kEstimatorsCorrelationCoef[0] + kEstimatorsCorrelationCoef[1] * x;
1039+
const double sigma = kEstimatorsSigmaPars[0] + kEstimatorsSigmaPars[1] * x + kEstimatorsSigmaPars[2] * std::pow(x, 2) + kEstimatorsSigmaPars[3] * std::pow(x, 3);
1040+
if (cV0M < center - kDeltaEstimatorNsigma[0] * sigma || cV0M > center + kDeltaEstimatorNsigma[1] * sigma) {
10411041
continue;
10421042
}
10431043
}

0 commit comments

Comments
 (0)