diff --git a/PWGLF/Tasks/GlobalEventProperties/flattenictyPikp.cxx b/PWGLF/Tasks/GlobalEventProperties/flattenictyPikp.cxx index 1bff87777fd..a739c177d53 100644 --- a/PWGLF/Tasks/GlobalEventProperties/flattenictyPikp.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/flattenictyPikp.cxx @@ -69,20 +69,20 @@ using namespace o2; using namespace o2::framework; using namespace o2::constants::math; -auto static constexpr kMinCharge = 3.f; -static constexpr float kNull = 0.0f; -static constexpr float kOne = 1.0f; +auto static constexpr CminCharge = 3.f; +static constexpr float Cnull = 0.0f; +static constexpr float Cone = 1.0f; // FV0 specific constants -static constexpr int kMaxRingsFV0 = 5; -static constexpr int kNCellsFV0 = 48; -static constexpr int kInnerFV0 = 32; -static constexpr float kFV0IndexPhi[5] = {0., 8., 16., 24., 32.}; -static constexpr float kEtaMaxFV0 = 5.1; -static constexpr float kEtaMinFV0 = 2.2; -static constexpr float kDEtaFV0 = (kEtaMaxFV0 - kEtaMinFV0) / kMaxRingsFV0; +static constexpr int CmaxRingsFV0 = 5; +static constexpr int CnCellsFV0 = 48; +static constexpr int CinnerFV0 = 32; +static constexpr float Cfv0IndexPhi[5] = {0., 8., 16., 24., 32.}; +static constexpr float CmaxEtaFV0 = 5.1; +static constexpr float CminEtaFV0 = 2.2; +static constexpr float CdEtaFV0 = (CmaxEtaFV0 - CminEtaFV0) / CmaxRingsFV0; // PID names -static constexpr int kProcessIdWeak = 4; +static constexpr int CprocessIdWeak = 4; static constexpr int Ncharges = 2; static constexpr o2::track::PID::ID Npart = 5; static constexpr o2::track::PID::ID NpartChrg = Npart * Ncharges; @@ -90,29 +90,29 @@ static constexpr int PDGs[] = {11, 13, 211, 321, 2212}; static constexpr int PidSgn[NpartChrg] = {11, 13, 211, 321, 2212, -11, -13, -211, -321, -2212}; static constexpr const char* Pid[Npart] = {"el", "mu", "pi", "ka", "pr"}; static constexpr const char* PidChrg[NpartChrg] = {"e^{-}", "#mu^{-}", "#pi^{+}", "K^{+}", "p", "e^{+}", "#mu^{+}", "#pi^{-}", "K^{-}", "#bar{p}"}; -static constexpr std::string_view kSpecies[NpartChrg] = {"Elminus", "Muplus", "PiPlus", "KaPlus", "Pr", "ElPlus", "MuMinus", "PiMinus", "KaMinus", "PrBar"}; -static constexpr std::string_view kSpeciesAll[Npart] = {"El", "Mu", "Pi", "Ka", "Pr"}; +static constexpr std::string_view Cspecies[NpartChrg] = {"Elminus", "Muplus", "PiPlus", "KaPlus", "Pr", "ElPlus", "MuMinus", "PiMinus", "KaMinus", "PrBar"}; +static constexpr std::string_view CspeciesAll[Npart] = {"El", "Mu", "Pi", "Ka", "Pr"}; // histogram naming -static constexpr std::string_view kCharge[] = {"all/", "pos/", "neg/"}; -static constexpr std::string_view kPrefix = "Tracks/"; -static constexpr std::string_view kPrefixCleanTof = "Tracks/CleanTof/"; -static constexpr std::string_view kPrefixCleanV0 = "Tracks/CleanV0/"; -static constexpr std::string_view kStatus[] = {"preSel/", "postSel/"}; -static constexpr std::string_view kStatCalib[] = {"preCalib/", "postCalib/"}; -static constexpr std::string_view kPtGenPrimSgn = "/hPtGenPrimSgn"; -static constexpr std::string_view kPtGenPrimSgnF = "Tracks/{}/hPtGenPrimSgn"; -static constexpr std::string_view kPtGenPrimSgnINEL = "/hPtGenPrimSgnINEL"; -static constexpr std::string_view kPtGenPrimSgnINELF = "Tracks/{}/hPtGenPrimSgnINEL"; -static constexpr std::string_view kPtRecCollPrimSgn = "/hPtRecCollPrimSgn"; -static constexpr std::string_view kPtRecCollPrimSgnF = "Tracks/{}/hPtRecCollPrimSgn"; -static constexpr std::string_view kPtRecCollPrimSgnINEL = "/hPtRecCollPrimSgnINEL"; -static constexpr std::string_view kPtRecCollPrimSgnINELF = "Tracks/{}/hPtRecCollPrimSgnINEL"; -static constexpr std::string_view kPtGenRecCollPrimSgn = "/hPtGenRecCollPrimSgn"; -static constexpr std::string_view kPtGenRecCollPrimSgnF = "Tracks/{}/hPtGenRecCollPrimSgn"; -static constexpr std::string_view kPtGenRecCollPrimSgnINEL = "/hPtGenRecCollPrimSgnINEL"; -static constexpr std::string_view kPtGenRecCollPrimSgnINELF = "Tracks/{}/hPtGenRecCollPrimSgnINEL"; -static constexpr std::string_view kPtMCclosurePrim = "/hPtMCclosurePrim"; -static constexpr std::string_view kPtMCclosurePrimF = "Tracks/{}/hPtMCclosurePrim"; +static constexpr std::string_view Ccharge[] = {"all/", "pos/", "neg/"}; +static constexpr std::string_view Cprefix = "Tracks/"; +static constexpr std::string_view CprefixCleanTof = "Tracks/CleanTof/"; +static constexpr std::string_view CprefixCleanV0 = "Tracks/CleanV0/"; +static constexpr std::string_view Cstatus[] = {"preSel/", "postSel/"}; +static constexpr std::string_view CstatCalib[] = {"preCalib/", "postCalib/"}; +static constexpr std::string_view CpTgenPrimSgn = "/hPtGenPrimSgn"; +static constexpr std::string_view CpTgenPrimSgnF = "Tracks/{}/hPtGenPrimSgn"; +static constexpr std::string_view CpTgenPrimSgnINEL = "/hPtGenPrimSgnINEL"; +static constexpr std::string_view CpTgenPrimSgnINELF = "Tracks/{}/hPtGenPrimSgnINEL"; +static constexpr std::string_view CpTrecCollPrimSgn = "/hPtRecCollPrimSgn"; +static constexpr std::string_view CpTrecCollPrimSgnF = "Tracks/{}/hPtRecCollPrimSgn"; +static constexpr std::string_view CpTrecCollPrimSgnINEL = "/hPtRecCollPrimSgnINEL"; +static constexpr std::string_view CpTrecCollPrimSgnINELF = "Tracks/{}/hPtRecCollPrimSgnINEL"; +static constexpr std::string_view CpTGenRecCollPrimSgn = "/hPtGenRecCollPrimSgn"; +static constexpr std::string_view CpTGenRecCollPrimSgnF = "Tracks/{}/hPtGenRecCollPrimSgn"; +static constexpr std::string_view CpTGenRecCollPrimSgnINEL = "/hPtGenRecCollPrimSgnINEL"; +static constexpr std::string_view CpTGenRecCollPrimSgnINELF = "Tracks/{}/hPtGenRecCollPrimSgnINEL"; +static constexpr std::string_view CpTmcClosurePrim = "/hPtMCclosurePrim"; +static constexpr std::string_view CpTmcClosurePrimF = "Tracks/{}/hPtMCclosurePrim"; enum V0sSel { kNaN = -1, @@ -175,13 +175,13 @@ enum EvtSel { }; struct MultE { - static constexpr int kNoMult = 0; - static constexpr int kMultFT0M = 1; - static constexpr int kMultTPC = 2; + static constexpr int CnoMult = 0; + static constexpr int CmultFT0M = 1; + static constexpr int CmultTPC = 2; }; -std::array rhoLatticeFV0{0}; -std::array fv0AmplitudeWoCalib{0}; +std::array rhoLatticeFV0{0}; +std::array fv0AmplitudeWoCalib{0}; std::array, NpartChrg> hPtEffRecPrim{}; std::array, NpartChrg> hPtEffRecWeak{}; @@ -485,12 +485,12 @@ struct FlattenictyPikp { AxisSpec multAxis{binOpt.axisMultPerc, "multiplicity estimator"}; switch (multEst) { - case MultE::kNoMult: + case MultE::CnoMult: break; - case MultE::kMultFT0M: + case MultE::CmultFT0M: multAxis.name = "multFT0M"; break; - case MultE::kMultTPC: + case MultE::CmultTPC: multAxis.name = "multTPC"; break; default: @@ -687,6 +687,9 @@ struct FlattenictyPikp { flatchrg.get(HIST("hEvtMcGenColls"))->GetXaxis()->SetBinLabel(3, "Reco. coll."); flatchrg.get(HIST("hEvtMcGenColls"))->GetXaxis()->SetBinLabel(4, "Reco. good coll."); + flatchrg.add("Events/hVtxZRec", "MC Rec vertex z position", kTH1F, {vtxzAxis}); + flatchrg.add("Events/hVtxZGen", "Generated vertex z position", kTH1F, {vtxzAxis}); + for (int i = 0; i < NpartChrg; i++) { const std::string strID = Form("/%s/%s", (i < Npart) ? "pos" : "neg", Pid[i % Npart]); hPtGenRecEvt[i] = flatchrg.add("Tracks/hPtGenRecEvt" + strID, " ; p_{T} (GeV/c)", kTH1F, {ptAxis}); @@ -730,7 +733,7 @@ struct FlattenictyPikp { if (doprocessMCclosure) { for (int i = 0; i < Npart; i++) { - flatchrg.add({fmt::format(kPtMCclosurePrimF.data(), kSpeciesAll[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); + flatchrg.add({fmt::format(CpTmcClosurePrimF.data(), CspeciesAll[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); } } @@ -753,12 +756,12 @@ struct FlattenictyPikp { flatchrg.add("hFlatGenINELgt0", "hFlatGenINELgt0", {kTH1F, {flatAxis}}); for (int i = 0; i < NpartChrg; ++i) { - flatchrg.add({fmt::format(kPtGenPrimSgnF.data(), kSpecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); - flatchrg.add({fmt::format(kPtGenPrimSgnINELF.data(), kSpecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); - flatchrg.add({fmt::format(kPtRecCollPrimSgnF.data(), kSpecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); - flatchrg.add({fmt::format(kPtRecCollPrimSgnINELF.data(), kSpecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); - flatchrg.add({fmt::format(kPtGenRecCollPrimSgnF.data(), kSpecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); - flatchrg.add({fmt::format(kPtGenRecCollPrimSgnINELF.data(), kSpecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); + flatchrg.add({fmt::format(CpTgenPrimSgnF.data(), Cspecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); + flatchrg.add({fmt::format(CpTgenPrimSgnINELF.data(), Cspecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); + flatchrg.add({fmt::format(CpTrecCollPrimSgnF.data(), Cspecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); + flatchrg.add({fmt::format(CpTrecCollPrimSgnINELF.data(), Cspecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); + flatchrg.add({fmt::format(CpTGenRecCollPrimSgnF.data(), Cspecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); + flatchrg.add({fmt::format(CpTGenRecCollPrimSgnINELF.data(), Cspecies[i]).c_str(), " ; p_{T} (GeV/c)", {kTH3F, {multAxis, flatAxis, ptAxis}}}); } } @@ -790,7 +793,7 @@ struct FlattenictyPikp { fullPathCalibGain += "/FV0"; auto objfv0Gain = getForTsOrRun>(fullPathCalibGain, timestamp, runnumber); if (!objfv0Gain) { - for (auto i{0u}; i < kNCellsFV0; i++) { + for (auto i{0u}; i < CnCellsFV0; i++) { fv0AmplCorr.push_back(1.); LOGF(warning, "Setting FV0 calibration object values to 1"); } @@ -870,10 +873,10 @@ struct FlattenictyPikp { template bool isPID(const P& mcParticle) { - static_assert(pidSgn == kNull || pidSgn == 1); - static_assert(id > kNull || id < Npart); - constexpr int kIdx = id + pidSgn * Npart; - return mcParticle.pdgCode() == PidSgn[kIdx]; + static_assert(pidSgn == Cnull || pidSgn == 1); + static_assert(id > Cnull || id < Npart); + constexpr int Cidx = id + pidSgn * Npart; + return mcParticle.pdgCode() == PidSgn[Cidx]; } template @@ -894,10 +897,10 @@ struct FlattenictyPikp { const float tTOF = track.tofSignal(); const float trkLength = track.length(); const float tExpPiTOF = track.tofExpSignalPi(tTOF); - if (track.p() >= trkSelOpt.cfgMomSelPiTOF && trkLength > kNull && tTOF > kNull) { - flatchrg.fill(HIST(kPrefixCleanTof) + HIST(kCharge[chrg]) + HIST("hTofExpPi"), track.p(), tExpPiTOF / tTOF); - if (std::abs((tExpPiTOF / tTOF) - kOne) < trkSelOpt.cfgTofBetaPiMax) { - flatchrg.fill(HIST(kPrefixCleanTof) + HIST(kCharge[chrg]) + HIST("hBetaVsP"), track.p(), track.beta()); + if (track.p() >= trkSelOpt.cfgMomSelPiTOF && trkLength > Cnull && tTOF > Cnull) { + flatchrg.fill(HIST(CprefixCleanTof) + HIST(Ccharge[chrg]) + HIST("hTofExpPi"), track.p(), tExpPiTOF / tTOF); + if (std::abs((tExpPiTOF / tTOF) - Cone) < trkSelOpt.cfgTofBetaPiMax) { + flatchrg.fill(HIST(CprefixCleanTof) + HIST(Ccharge[chrg]) + HIST("hBetaVsP"), track.p(), track.beta()); // if (std::abs(track.tpcNSigmaPi()) < v0SelOpt.cfgNsigmaPiTPC && std::abs(track.tofNSigmaPi()) < v0SelOpt.cfgNsigmaPiTOF) { return true; // } @@ -946,7 +949,7 @@ struct FlattenictyPikp { } if (cfgFilldEdxCalibHist && cfgFilldEdxQaHist) { if (cfgFillChrgType) { - if (track.sign() * track.tpcInnerParam() > kNull) { + if (track.sign() * track.tpcInnerParam() > Cnull) { filldEdxQA(track, collision, dEdx); } else { filldEdxQA(track, collision, dEdx); @@ -957,7 +960,7 @@ struct FlattenictyPikp { } if (applyCalibDeDx) { if (cfgFillChrgType) { - if (track.sign() * track.tpcInnerParam() > kNull) { + if (track.sign() * track.tpcInnerParam() > Cnull) { if (applyCalibDeDxFromCCDB) { dEdx *= (50.0 / dedxcalib.hMIPcalibPos->GetBinContent(dedxcalib.hMIPcalibPos->FindBin(track.eta()))); } else { @@ -990,37 +993,37 @@ struct FlattenictyPikp { // PID TPC dEdx if (cfgFillChrgType) { - if (track.sign() * track.tpcInnerParam() > kNull) { - flatchrg.fill(HIST(kPrefix) + HIST(kCharge[kPos]) + HIST("hdEdx"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); + if (track.sign() * track.tpcInnerParam() > Cnull) { + flatchrg.fill(HIST(Cprefix) + HIST(Ccharge[kPos]) + HIST("hdEdx"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); } else { - flatchrg.fill(HIST(kPrefix) + HIST(kCharge[kNeg]) + HIST("hdEdx"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); + flatchrg.fill(HIST(Cprefix) + HIST(Ccharge[kNeg]) + HIST("hdEdx"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); } } else { - flatchrg.fill(HIST(kPrefix) + HIST(kCharge[kAll]) + HIST("hdEdx"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); + flatchrg.fill(HIST(Cprefix) + HIST(Ccharge[kAll]) + HIST("hdEdx"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); } // TOF pions if (cfgFillV0Hist) { if (selTOFPi(track)) { if (cfgFillChrgType) { - if (track.sign() * track.tpcInnerParam() > kNull) { + if (track.sign() * track.tpcInnerParam() > Cnull) { if (cfgStoreThnSparse) { - flatchrg.fill(HIST(kPrefixCleanTof) + HIST(kCharge[kPos]) + HIST("hPiTof"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); + flatchrg.fill(HIST(CprefixCleanTof) + HIST(Ccharge[kPos]) + HIST("hPiTof"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); } else { - flatchrg.fill(HIST(kPrefixCleanTof) + HIST(kCharge[kPos]) + HIST("hPiTof"), track.eta(), track.tpcInnerParam(), dEdx); + flatchrg.fill(HIST(CprefixCleanTof) + HIST(Ccharge[kPos]) + HIST("hPiTof"), track.eta(), track.tpcInnerParam(), dEdx); } } else { if (cfgStoreThnSparse) { - flatchrg.fill(HIST(kPrefixCleanTof) + HIST(kCharge[kNeg]) + HIST("hPiTof"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); + flatchrg.fill(HIST(CprefixCleanTof) + HIST(Ccharge[kNeg]) + HIST("hPiTof"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); } else { - flatchrg.fill(HIST(kPrefixCleanTof) + HIST(kCharge[kNeg]) + HIST("hPiTof"), track.eta(), track.tpcInnerParam(), dEdx); + flatchrg.fill(HIST(CprefixCleanTof) + HIST(Ccharge[kNeg]) + HIST("hPiTof"), track.eta(), track.tpcInnerParam(), dEdx); } } } else { if (cfgStoreThnSparse) { - flatchrg.fill(HIST(kPrefixCleanTof) + HIST(kCharge[kAll]) + HIST("hPiTof"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); + flatchrg.fill(HIST(CprefixCleanTof) + HIST(Ccharge[kAll]) + HIST("hPiTof"), track.eta(), mult, flat, track.tpcInnerParam(), dEdx); } else { - flatchrg.fill(HIST(kPrefixCleanTof) + HIST(kCharge[kAll]) + HIST("hPiTof"), track.eta(), track.tpcInnerParam(), dEdx); + flatchrg.fill(HIST(CprefixCleanTof) + HIST(Ccharge[kAll]) + HIST("hPiTof"), track.eta(), track.tpcInnerParam(), dEdx); } } } @@ -1069,38 +1072,38 @@ struct FlattenictyPikp { } } if (cfgStoreThnSparse) { - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kPos]) + HIST("hEV0"), posTrack.eta(), mult, flat, posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kNeg]) + HIST("hEV0"), negTrack.eta(), mult, flat, negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kPos]) + HIST("hEV0"), posTrack.eta(), mult, flat, posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kNeg]) + HIST("hEV0"), negTrack.eta(), mult, flat, negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); } else { - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kPos]) + HIST("hEV0"), posTrack.eta(), posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kNeg]) + HIST("hEV0"), negTrack.eta(), negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kPos]) + HIST("hEV0"), posTrack.eta(), posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kNeg]) + HIST("hEV0"), negTrack.eta(), negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); } } if (selectTypeV0s(collision, v0, posTrack, negTrack) == kKz) { // K0S -> pi + pi if (cfgStoreThnSparse) { - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kPos]) + HIST("hPiV0"), posTrack.eta(), mult, flat, posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), mult, flat, negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kPos]) + HIST("hPiV0"), posTrack.eta(), mult, flat, posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), mult, flat, negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); } else { - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kPos]) + HIST("hPiV0"), posTrack.eta(), posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kPos]) + HIST("hPiV0"), posTrack.eta(), posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); } } if (selectTypeV0s(collision, v0, posTrack, negTrack) == kLam) { // L -> p + pi- if (cfgStoreThnSparse) { - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kPos]) + HIST("hPV0"), posTrack.eta(), mult, flat, posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), mult, flat, negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kPos]) + HIST("hPV0"), posTrack.eta(), mult, flat, posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), mult, flat, negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); } else { - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kPos]) + HIST("hPV0"), posTrack.eta(), posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kPos]) + HIST("hPV0"), posTrack.eta(), posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); } } if (selectTypeV0s(collision, v0, posTrack, negTrack) == kaLam) { // L -> p + pi- if (cfgStoreThnSparse) { - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kPos]) + HIST("hPV0"), posTrack.eta(), mult, flat, posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), mult, flat, negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kPos]) + HIST("hPV0"), posTrack.eta(), mult, flat, posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), mult, flat, negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); } else { - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kPos]) + HIST("hPV0"), posTrack.eta(), posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); - flatchrg.fill(HIST(kPrefixCleanV0) + HIST(kCharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kPos]) + HIST("hPV0"), posTrack.eta(), posTrack.sign() * posTrack.tpcInnerParam(), dEdxPos); + flatchrg.fill(HIST(CprefixCleanV0) + HIST(Ccharge[kNeg]) + HIST("hPiV0"), negTrack.eta(), negTrack.sign() * negTrack.tpcInnerParam(), dEdxNeg); } } } @@ -1112,7 +1115,7 @@ struct FlattenictyPikp { { float valCalib = -1.; if constexpr (isChrg) { - if (track.sign() * track.tpcInnerParam() > kNull) { + if (track.sign() * track.tpcInnerParam() > Cnull) { valCalib = fCalib.at(0)->Eval(track.eta()); } else { valCalib = fCalib.at(1)->Eval(track.eta()); @@ -1130,7 +1133,7 @@ struct FlattenictyPikp { if (p != nullptr) { charge = p->Charge(); } - return std::abs(charge) >= kMinCharge; + return std::abs(charge) >= CminCharge; } template @@ -1140,12 +1143,12 @@ struct FlattenictyPikp { return true; // cut to remove tracks at TPC boundaries double phimodn = track.phi(); - if (mag < kNull) // for negative polarity field + if (mag < Cnull) // for negative polarity field phimodn = o2::constants::math::TwoPI - phimodn; - if (track.sign() < kNull) // for negative charge + if (track.sign() < Cnull) // for negative charge phimodn = o2::constants::math::TwoPI - phimodn; - if (phimodn < kNull) - LOGF(warning, "phi < kNull: %g", phimodn); + if (phimodn < Cnull) + LOGF(warning, "phi < Cnull: %g", phimodn); phimodn += o2::constants::math::PI / 18.0f; // to center gap in the middle phimodn = std::fmod(phimodn, o2::constants::math::PI / 9.0f); @@ -1351,7 +1354,7 @@ struct FlattenictyPikp { } } flatchrg.fill(HIST("Tracks/V0qa/hV0Sel"), v0SelRejectV0sAtTPCSector); - if (posTrack.sign() * negTrack.sign() > kNull) { // reject same sign pair + if (posTrack.sign() * negTrack.sign() > Cnull) { // reject same sign pair return false; } flatchrg.fill(HIST("Tracks/V0qa/hV0Sel"), v0SelRejectSameSign); @@ -1412,7 +1415,7 @@ struct FlattenictyPikp { break; } - if (track.sign() > kNull) { + if (track.sign() > Cnull) { if (cfgStoreThnSparse) { hThPtNsigmaTPC[pid]->Fill(track.pt(), valTPCnsigma, mult, flat); } else { @@ -1428,7 +1431,7 @@ struct FlattenictyPikp { if (!track.hasTOF()) { return; } - if (track.sign() > kNull) { + if (track.sign() > Cnull) { hPtNsigmaTOF[pid]->Fill(track.pt(), valTOFnsigma); hPtNsigmaTPCTOF[pid]->Fill(valTPCnsigma, valTOFnsigma); } else { @@ -1441,36 +1444,36 @@ struct FlattenictyPikp { inline void fillTrackQA(T const& track) { if constexpr (fillHist) { - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hPt"), track.pt()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hPhi"), track.phi()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hEta"), track.eta()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hDCAXYvsPt"), track.pt(), track.dcaXY()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hDCAZvsPt"), track.pt(), track.dcaZ()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hPt"), track.pt()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hPhi"), track.phi()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hEta"), track.eta()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hDCAXYvsPt"), track.pt(), track.dcaXY()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hDCAZvsPt"), track.pt(), track.dcaZ()); if (track.hasTPC() && track.hasITS()) { - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hTPCCluster"), track.tpcNClsFindable() - track.tpcNClsFindableMinusFound()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hShTpcClvsPt"), track.pt(), track.tpcFractionSharedCls()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hNclTPCFoundvsPt"), track.pt(), track.tpcNClsFound()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hNClTPCPidvsPt"), track.pt(), track.tpcNClsPID()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hTPCnClsShared"), track.tpcNClsShared()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hTPCcrossedRows"), track.tpcNClsCrossedRows()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hTPCcrossedRowsOverFindableCls"), track.tpcCrossedRowsOverFindableCls()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hChi2ITSTrkSegment"), track.itsChi2NCl()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hITSnCls"), track.itsNCls()); - } - - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hTOFPvsBeta"), track.tpcInnerParam(), track.beta()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hTPCCluster"), track.tpcNClsFindable() - track.tpcNClsFindableMinusFound()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hShTpcClvsPt"), track.pt(), track.tpcFractionSharedCls()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hNclTPCFoundvsPt"), track.pt(), track.tpcNClsFound()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hNClTPCPidvsPt"), track.pt(), track.tpcNClsPID()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hTPCnClsShared"), track.tpcNClsShared()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hTPCcrossedRows"), track.tpcNClsCrossedRows()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hTPCcrossedRowsOverFindableCls"), track.tpcCrossedRowsOverFindableCls()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hChi2ITSTrkSegment"), track.itsChi2NCl()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hITSnCls"), track.itsNCls()); + } + + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hTOFPvsBeta"), track.tpcInnerParam(), track.beta()); if (track.beta() > trkSelOpt.cfgTOFBetaPion && track.beta() < trkSelOpt.cfgTOFBetaPion + 0.05) { // TOF pions - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hTOFpi"), track.eta(), track.tpcInnerParam(), track.tpcSignal()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hTOFpi"), track.eta(), track.tpcInnerParam(), track.tpcSignal()); } if (std::abs(track.eta()) < trkSelOpt.cfgTrkEtaMax) { if (isDCAxyWoCut(track)) { - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hPtVsWOcutDCA"), track.pt(), track.dcaXY()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hPtVsWOcutDCA"), track.pt(), track.dcaXY()); } } } - flatchrg.fill(HIST(kPrefix) + HIST(kStatus[ft]) + HIST("hPVsPtEta"), track.tpcInnerParam(), track.pt(), track.eta()); + flatchrg.fill(HIST(Cprefix) + HIST(Cstatus[ft]) + HIST("hPVsPtEta"), track.tpcInnerParam(), track.pt(), track.eta()); } template @@ -1482,24 +1485,24 @@ struct FlattenictyPikp { if (track.tpcInnerParam() >= trkSelOpt.cfgMomMIPMin && track.tpcInnerParam() <= trkSelOpt.cfgMomMIPMax) { if (dEdx > trkSelOpt.cfgDeDxMIPMin && dEdx < trkSelOpt.cfgDeDxMIPMax) { // MIP pions if (cfgStoreThnSparse) { - flatchrg.fill(HIST(kPrefix) + HIST(kStatCalib[ft]) + HIST(kCharge[chrg]) + HIST("hMIP"), mult, flat, track.eta(), dEdx); + flatchrg.fill(HIST(Cprefix) + HIST(CstatCalib[ft]) + HIST(Ccharge[chrg]) + HIST("hMIP"), mult, flat, track.eta(), dEdx); } else { - flatchrg.fill(HIST(kPrefix) + HIST(kStatCalib[ft]) + HIST(kCharge[chrg]) + HIST("hMIP"), track.eta(), dEdx); + flatchrg.fill(HIST(Cprefix) + HIST(CstatCalib[ft]) + HIST(Ccharge[chrg]) + HIST("hMIP"), track.eta(), dEdx); } - flatchrg.fill(HIST(kPrefix) + HIST(kStatCalib[ft]) + HIST(kCharge[chrg]) + HIST("hMIPVsPhi"), track.phi(), dEdx); - flatchrg.fill(HIST(kPrefix) + HIST(kStatCalib[ft]) + HIST(kCharge[chrg]) + HIST("hMIPVsPhiVsEta"), track.phi(), dEdx, track.eta()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatCalib[ft]) + HIST(kCharge[chrg]) + HIST("pMIPVsPhi"), track.phi(), dEdx); + flatchrg.fill(HIST(Cprefix) + HIST(CstatCalib[ft]) + HIST(Ccharge[chrg]) + HIST("hMIPVsPhi"), track.phi(), dEdx); + flatchrg.fill(HIST(Cprefix) + HIST(CstatCalib[ft]) + HIST(Ccharge[chrg]) + HIST("hMIPVsPhiVsEta"), track.phi(), dEdx, track.eta()); + flatchrg.fill(HIST(Cprefix) + HIST(CstatCalib[ft]) + HIST(Ccharge[chrg]) + HIST("pMIPVsPhi"), track.phi(), dEdx); } if (dEdx > trkSelOpt.cfgDeDxMIPMax + 10. && dEdx < trkSelOpt.cfgDeDxMIPMax + 30.) { // Plateau electrons if (std::abs(track.beta() - 1) < trkSelOpt.cfgBetaPlateuMax) { if (cfgStoreThnSparse) { - flatchrg.fill(HIST(kPrefix) + HIST(kStatCalib[ft]) + HIST(kCharge[chrg]) + HIST("hPlateau"), mult, flat, track.eta(), dEdx); + flatchrg.fill(HIST(Cprefix) + HIST(CstatCalib[ft]) + HIST(Ccharge[chrg]) + HIST("hPlateau"), mult, flat, track.eta(), dEdx); } else { - flatchrg.fill(HIST(kPrefix) + HIST(kStatCalib[ft]) + HIST(kCharge[chrg]) + HIST("hPlateau"), track.eta(), dEdx); + flatchrg.fill(HIST(Cprefix) + HIST(CstatCalib[ft]) + HIST(Ccharge[chrg]) + HIST("hPlateau"), track.eta(), dEdx); } - flatchrg.fill(HIST(kPrefix) + HIST(kStatCalib[ft]) + HIST(kCharge[chrg]) + HIST("hPlateauVsPhi"), track.phi(), dEdx); - flatchrg.fill(HIST(kPrefix) + HIST(kStatCalib[ft]) + HIST(kCharge[chrg]) + HIST("hPlateauVsPhiVsEta"), track.phi(), dEdx, track.eta()); - flatchrg.fill(HIST(kPrefix) + HIST(kStatCalib[ft]) + HIST(kCharge[chrg]) + HIST("pPlateauVsPhi"), track.phi(), dEdx); + flatchrg.fill(HIST(Cprefix) + HIST(CstatCalib[ft]) + HIST(Ccharge[chrg]) + HIST("hPlateauVsPhi"), track.phi(), dEdx); + flatchrg.fill(HIST(Cprefix) + HIST(CstatCalib[ft]) + HIST(Ccharge[chrg]) + HIST("hPlateauVsPhiVsEta"), track.phi(), dEdx, track.eta()); + flatchrg.fill(HIST(Cprefix) + HIST(CstatCalib[ft]) + HIST(Ccharge[chrg]) + HIST("pPlateauVsPhi"), track.phi(), dEdx); } } } @@ -1580,93 +1583,93 @@ struct FlattenictyPikp { { int iRing = -1; - if (i_ch >= kFV0IndexPhi[0] && i_ch < kFV0IndexPhi[1]) { - if (i_ch < kFV0IndexPhi[0] + 4) { + if (i_ch >= Cfv0IndexPhi[0] && i_ch < Cfv0IndexPhi[1]) { + if (i_ch < Cfv0IndexPhi[0] + 4) { iRing = i_ch; } else { - if (i_ch == kFV0IndexPhi[1] - 1) { + if (i_ch == Cfv0IndexPhi[1] - 1) { iRing = i_ch - 3; // 4; - } else if (i_ch == kFV0IndexPhi[1] - 2) { + } else if (i_ch == Cfv0IndexPhi[1] - 2) { iRing = i_ch - 1; // 5; - } else if (i_ch == kFV0IndexPhi[1] - 3) { + } else if (i_ch == Cfv0IndexPhi[1] - 3) { iRing = i_ch + 1; // 6; - } else if (i_ch == kFV0IndexPhi[1] - 4) { + } else if (i_ch == Cfv0IndexPhi[1] - 4) { iRing = i_ch + 3; // 7; } } - } else if (i_ch >= kFV0IndexPhi[1] && i_ch < kFV0IndexPhi[2]) { - if (i_ch < kFV0IndexPhi[2] - 4) { + } else if (i_ch >= Cfv0IndexPhi[1] && i_ch < Cfv0IndexPhi[2]) { + if (i_ch < Cfv0IndexPhi[2] - 4) { iRing = i_ch; } else { - if (i_ch == kFV0IndexPhi[2] - 1) { + if (i_ch == Cfv0IndexPhi[2] - 1) { iRing = i_ch - 3; // 12; - } else if (i_ch == kFV0IndexPhi[2] - 2) { + } else if (i_ch == Cfv0IndexPhi[2] - 2) { iRing = i_ch - 1; // 13; - } else if (i_ch == kFV0IndexPhi[2] - 3) { + } else if (i_ch == Cfv0IndexPhi[2] - 3) { iRing = i_ch + 1; // 14; - } else if (i_ch == kFV0IndexPhi[2] - 4) { + } else if (i_ch == Cfv0IndexPhi[2] - 4) { iRing = i_ch + 3; // 15; } } - } else if (i_ch >= kFV0IndexPhi[2] && i_ch < kFV0IndexPhi[3]) { - if (i_ch < kFV0IndexPhi[3] - 4) { + } else if (i_ch >= Cfv0IndexPhi[2] && i_ch < Cfv0IndexPhi[3]) { + if (i_ch < Cfv0IndexPhi[3] - 4) { iRing = i_ch; } else { - if (i_ch == kFV0IndexPhi[3] - 1) { + if (i_ch == Cfv0IndexPhi[3] - 1) { iRing = i_ch - 3; // 20; - } else if (i_ch == kFV0IndexPhi[3] - 2) { + } else if (i_ch == Cfv0IndexPhi[3] - 2) { iRing = i_ch - 1; // 21; - } else if (i_ch == kFV0IndexPhi[3] - 3) { + } else if (i_ch == Cfv0IndexPhi[3] - 3) { iRing = i_ch + 1; // 22; - } else if (i_ch == kFV0IndexPhi[3] - 4) { + } else if (i_ch == Cfv0IndexPhi[3] - 4) { iRing = i_ch + 3; // 23; } } - } else if (i_ch >= kFV0IndexPhi[3] && i_ch < kFV0IndexPhi[4]) { - if (i_ch < kFV0IndexPhi[3] + 4) { + } else if (i_ch >= Cfv0IndexPhi[3] && i_ch < Cfv0IndexPhi[4]) { + if (i_ch < Cfv0IndexPhi[3] + 4) { iRing = i_ch; } else { - if (i_ch == kFV0IndexPhi[4] - 5) { + if (i_ch == Cfv0IndexPhi[4] - 5) { iRing = i_ch - 3; // 28; - } else if (i_ch == kFV0IndexPhi[4] - 6) { + } else if (i_ch == Cfv0IndexPhi[4] - 6) { iRing = i_ch - 1; // 29; - } else if (i_ch == kFV0IndexPhi[4] - 7) { + } else if (i_ch == Cfv0IndexPhi[4] - 7) { iRing = i_ch + 1; // 30; - } else if (i_ch == kFV0IndexPhi[4] - 8) { + } else if (i_ch == Cfv0IndexPhi[4] - 8) { iRing = i_ch + 3; // 31; } } - } else if (i_ch == kFV0IndexPhi[4]) { - iRing = kFV0IndexPhi[4]; - } else if (i_ch == kFV0IndexPhi[4] + 8) { + } else if (i_ch == Cfv0IndexPhi[4]) { + iRing = Cfv0IndexPhi[4]; + } else if (i_ch == Cfv0IndexPhi[4] + 8) { iRing = i_ch - 7; // 33; - } else if (i_ch == kFV0IndexPhi[4] - 3) { + } else if (i_ch == Cfv0IndexPhi[4] - 3) { iRing = i_ch + 1; // 34; - } else if (i_ch == kFV0IndexPhi[4] + 5) { + } else if (i_ch == Cfv0IndexPhi[4] + 5) { iRing = i_ch - 6; // 35; - } else if (i_ch == kFV0IndexPhi[4] - 2) { + } else if (i_ch == Cfv0IndexPhi[4] - 2) { iRing = i_ch + 2; // 36; - } else if (i_ch == kFV0IndexPhi[4] + 6) { + } else if (i_ch == Cfv0IndexPhi[4] + 6) { iRing = i_ch - 5; // 37; - } else if (i_ch == kFV0IndexPhi[4] - 1) { + } else if (i_ch == Cfv0IndexPhi[4] - 1) { iRing = i_ch + 3; // 38; - } else if (i_ch == kFV0IndexPhi[4] + 7) { + } else if (i_ch == Cfv0IndexPhi[4] + 7) { iRing = i_ch - 4; // 39; - } else if (i_ch == kFV0IndexPhi[4] + 11) { + } else if (i_ch == Cfv0IndexPhi[4] + 11) { iRing = i_ch + 7; // 40; - } else if (i_ch == kFV0IndexPhi[4] + 3) { + } else if (i_ch == Cfv0IndexPhi[4] + 3) { iRing = i_ch + 2; // 41; - } else if (i_ch == kFV0IndexPhi[4] + 10) { + } else if (i_ch == Cfv0IndexPhi[4] + 10) { iRing = i_ch - 4; // 42; - } else if (i_ch == kFV0IndexPhi[4] + 1) { + } else if (i_ch == Cfv0IndexPhi[4] + 1) { iRing = i_ch + 5; // 43; - } else if (i_ch == kFV0IndexPhi[4] + 9) { + } else if (i_ch == Cfv0IndexPhi[4] + 9) { iRing = i_ch - 1; // 44; - } else if (i_ch == kFV0IndexPhi[4] + 1) { + } else if (i_ch == Cfv0IndexPhi[4] + 1) { iRing = i_ch + 8; // 45; - } else if (i_ch == kFV0IndexPhi[4] + 8) { + } else if (i_ch == Cfv0IndexPhi[4] + 8) { iRing = i_ch + 2; // 46; - } else if (i_ch == kFV0IndexPhi[4]) { + } else if (i_ch == Cfv0IndexPhi[4]) { iRing = i_ch + 11; // 47; } return iRing; @@ -1677,13 +1680,13 @@ struct FlattenictyPikp { { float val = -999.0; switch (multEst) { - case MultE::kNoMult: + case MultE::CnoMult: return val; break; - case MultE::kMultFT0M: + case MultE::CmultFT0M: return collision.centFT0M(); break; - case MultE::kMultTPC: + case MultE::CmultTPC: if constexpr (!isMC) { return collision.multTPC(); } else { @@ -1711,7 +1714,7 @@ struct FlattenictyPikp { float flat{-1}; float mRho{0}; for (int iCell = 0; iCell < entries; ++iCell) { - if (signals[iCell] > kNull) { + if (signals[iCell] > Cnull) { mRho += 1.0 * signals[iCell]; } } @@ -1724,13 +1727,13 @@ struct FlattenictyPikp { float sRhoTmp{0}; float sRho{0}; for (int iCell = 0; iCell < entries; ++iCell) { - if (signals[iCell] > kNull) { + if (signals[iCell] > Cnull) { sRhoTmp += std::pow(1.0 * signals[iCell] - mRho, 2); } } sRhoTmp /= (1.0 * entries * entries); sRho = std::sqrt(sRhoTmp); - if (mRho > kNull) { + if (mRho > Cnull) { flat = sRho / mRho; } else { flat = -1; @@ -1760,16 +1763,16 @@ struct FlattenictyPikp { flatchrg.fill(HIST("FV0/hFV0ampCorr"), chv0, amplCh / fv0AmplCorr[chv0]); } } - if (amplCh > kNull) { + if (amplCh > Cnull) { if (applyCalibGain) { // equalize gain channel-by-channel amplCh /= fv0AmplCorr[chv0]; } - if (chv0phi > kNull) { + if (chv0phi > Cnull) { fv0AmplitudeWoCalib[chv0phi] = amplCh; if constexpr (fillHist) { flatchrg.fill(HIST("FV0/hFV0AmplWCalib"), ich, fv0AmplitudeWoCalib[ich]); } - if (chv0 < kInnerFV0) { + if (chv0 < CinnerFV0) { rhoLatticeFV0[chv0phi] += amplCh; } else { // two channels per bin rhoLatticeFV0[chv0phi] += amplCh / 2.; @@ -1877,14 +1880,14 @@ struct FlattenictyPikp { float maxPhi = 0; float dPhi = 0; - double etaMinFV0bins[kMaxRingsFV0] = {0.0}; - double etaMaxFV0bins[kMaxRingsFV0] = {0.0}; - for (int i = 0; i < kMaxRingsFV0; ++i) { - etaMaxFV0bins[i] = kEtaMaxFV0 - i * kDEtaFV0; - if (i < kMaxRingsFV0 - 1) { - etaMinFV0bins[i] = kEtaMaxFV0 - (i + 1) * kDEtaFV0; + double etaMinFV0bins[CmaxRingsFV0] = {0.0}; + double etaMaxFV0bins[CmaxRingsFV0] = {0.0}; + for (int i = 0; i < CmaxRingsFV0; ++i) { + etaMaxFV0bins[i] = CmaxEtaFV0 - i * CdEtaFV0; + if (i < CmaxRingsFV0 - 1) { + etaMinFV0bins[i] = CmaxEtaFV0 - (i + 1) * CdEtaFV0; } else { - etaMinFV0bins[i] = kEtaMinFV0; + etaMinFV0bins[i] = CminEtaFV0; } } @@ -1899,11 +1902,11 @@ struct FlattenictyPikp { auto phiMc = mcPart.phi(); int isegment = 0; - for (int ieta = 0; ieta < kMaxRingsFV0; ieta++) { + for (int ieta = 0; ieta < CmaxRingsFV0; ieta++) { - nFV0sectors = kNCellsFV0 / 6.; - if (ieta == kMaxRingsFV0 - 1) { - nFV0sectors = kNCellsFV0 / 3.; + nFV0sectors = CnCellsFV0 / 6.; + if (ieta == CmaxRingsFV0 - 1) { + nFV0sectors = CnCellsFV0 / 3.; } for (int iphi = 0; iphi < nFV0sectors; iphi++) { @@ -1913,7 +1916,7 @@ struct FlattenictyPikp { dPhi = std::abs(maxPhi - minPhi); if (etaMc >= etaMinFV0bins[ieta] && etaMc < etaMaxFV0bins[ieta] && phiMc >= minPhi && phiMc < maxPhi) { - rhoLatticeFV0[isegment] += 1. / std::abs(kDEtaFV0 * dPhi); + rhoLatticeFV0[isegment] += 1. / std::abs(CdEtaFV0 * dPhi); } isegment++; } @@ -1936,20 +1939,20 @@ struct FlattenictyPikp { void bookMcHist() { AxisSpec ptAxis{binOpt.axisPt, "#it{p}_{T} (GeV/#it{c})"}; - constexpr int kHistIdx = id + pidSgn * Npart; - auto kIdx = static_cast(id); - const std::string strID = Form("/%s/%s", (pidSgn == kNull && id < Npart) ? "pos" : "neg", Pid[kIdx]); - hPtEffRec[kHistIdx] = flatchrg.add("Tracks/hPtEffRec" + strID, " ; p_{T} (GeV/c)", kTH1F, {ptAxis}); - hPtEffGen[kHistIdx] = flatchrg.add("Tracks/hPtEffGen" + strID, " ; p_{T} (GeV/c)", kTH1F, {ptAxis}); + constexpr int ChistIdx = id + pidSgn * Npart; + auto idx = static_cast(id); + const std::string strID = Form("/%s/%s", (pidSgn == Cnull && id < Npart) ? "pos" : "neg", Pid[idx]); + hPtEffRec[ChistIdx] = flatchrg.add("Tracks/hPtEffRec" + strID, " ; p_{T} (GeV/c)", kTH1F, {ptAxis}); + hPtEffGen[ChistIdx] = flatchrg.add("Tracks/hPtEffGen" + strID, " ; p_{T} (GeV/c)", kTH1F, {ptAxis}); } template void initEfficiency() { - static_assert(pidSgn == kNull || pidSgn == 1); - static_assert(id > kNull || id < Npart); - constexpr int kIdx = id + pidSgn * Npart; - const TString partName = PidChrg[kIdx]; + static_assert(pidSgn == Cnull || pidSgn == 1); + static_assert(id > Cnull || id < Npart); + constexpr int Cidx = id + pidSgn * Npart; + const TString partName = PidChrg[Cidx]; THashList* lhash = new THashList(); lhash->SetName(partName); listEfficiency->Add(lhash); @@ -1962,16 +1965,16 @@ struct FlattenictyPikp { lhash->Add(new TEfficiency(eName, eTitle, axis->GetNbins(), axis->GetXbins()->GetArray())); }; - const int kHistIdx = id + pidSgn * Npart; - bookEff("hEffvsPt", hPtEffRec[kHistIdx]); + const int idx = id + pidSgn * Npart; + bookEff("hEffvsPt", hPtEffRec[idx]); } template void fillEfficiency() { - static_assert(pidSgn == kNull || pidSgn == 1); - constexpr int kHistIdx = id + pidSgn * Npart; - const char* partName = PidChrg[kHistIdx]; + static_assert(pidSgn == Cnull || pidSgn == 1); + constexpr int ChistIdx = id + pidSgn * Npart; + const char* partName = PidChrg[ChistIdx]; THashList* lhash = static_cast(listEfficiency->FindObject(partName)); if (!lhash) { LOG(warning) << "No efficiency object found for particle " << partName; @@ -1987,14 +1990,14 @@ struct FlattenictyPikp { eff->SetTotalHistogram(*den, "f"); eff->SetPassedHistogram(*num, "f"); }; - fillEff("hEffvsPt", hPtEffRec[kHistIdx], hPtEffGen[kHistIdx]); + fillEff("hEffvsPt", hPtEffRec[ChistIdx], hPtEffGen[ChistIdx]); } template void fillMCRecTrack(MyLabeledPIDTracks::iterator const& track, const float mult, const float flat) { - static_assert(pidSgn == kNull || pidSgn == 1); - constexpr int kHistIdx = id + pidSgn * Npart; + static_assert(pidSgn == Cnull || pidSgn == 1); + constexpr int ChistIdx = id + pidSgn * Npart; const aod::McParticles::iterator& mcParticle = track.mcParticle(); const CollsGen::iterator& collision = track.collision_as(); @@ -2011,13 +2014,13 @@ struct FlattenictyPikp { if ((collision.has_mcCollision() && (mcParticle.mcCollisionId() != collision.mcCollisionId())) || !collision.has_mcCollision()) { if (!mcParticle.isPhysicalPrimary()) { - if (mcParticle.getProcess() == kProcessIdWeak) { - hDCAxyBadCollWeak[kHistIdx]->Fill(track.pt(), track.dcaXY()); + if (mcParticle.getProcess() == CprocessIdWeak) { + hDCAxyBadCollWeak[ChistIdx]->Fill(track.pt(), track.dcaXY()); } else { - hDCAxyBadCollMat[kHistIdx]->Fill(track.pt(), track.dcaXY()); + hDCAxyBadCollMat[ChistIdx]->Fill(track.pt(), track.dcaXY()); } } else { - hDCAxyBadCollPrim[kHistIdx]->Fill(track.pt(), track.dcaXY()); + hDCAxyBadCollPrim[ChistIdx]->Fill(track.pt(), track.dcaXY()); } } @@ -2027,22 +2030,22 @@ struct FlattenictyPikp { flatchrg.fill(HIST("hPtVsDCAxyAll"), track.pt(), track.dcaXY()); if (selTPCtrack(track)) { - hPtEffRec[kHistIdx]->Fill(mcParticle.pt()); + hPtEffRec[ChistIdx]->Fill(mcParticle.pt()); } if (!mcParticle.isPhysicalPrimary()) { - if (mcParticle.getProcess() == kProcessIdWeak) { - hPtEffRecWeak[kHistIdx]->Fill(mult, flat, track.pt()); - hPtVsDCAxyWeak[kHistIdx]->Fill(track.pt(), track.dcaXY()); + if (mcParticle.getProcess() == CprocessIdWeak) { + hPtEffRecWeak[ChistIdx]->Fill(mult, flat, track.pt()); + hPtVsDCAxyWeak[ChistIdx]->Fill(track.pt(), track.dcaXY()); flatchrg.fill(HIST("hPtVsDCAxyWeakAll"), track.pt(), track.dcaXY()); } else { - hPtEffRecMat[kHistIdx]->Fill(mult, flat, track.pt()); - hPtVsDCAxyMat[kHistIdx]->Fill(track.pt(), track.dcaXY()); + hPtEffRecMat[ChistIdx]->Fill(mult, flat, track.pt()); + hPtVsDCAxyMat[ChistIdx]->Fill(track.pt(), track.dcaXY()); flatchrg.fill(HIST("hPtVsDCAxyMatAll"), track.pt(), track.dcaXY()); } } else { - hPtEffRecPrim[kHistIdx]->Fill(mult, flat, track.pt()); - hPtVsDCAxyPrim[kHistIdx]->Fill(track.pt(), track.dcaXY()); + hPtEffRecPrim[ChistIdx]->Fill(mult, flat, track.pt()); + hPtVsDCAxyPrim[ChistIdx]->Fill(track.pt(), track.dcaXY()); flatchrg.fill(HIST("hPtVsDCAxyPrimAll"), track.pt(), track.dcaXY()); } } @@ -2050,30 +2053,30 @@ struct FlattenictyPikp { template void fillMCGen(aod::McParticles::iterator const& mcParticle, const float mult, const float flat) { - static_assert(pidSgn == kNull || pidSgn == 1); - constexpr int kHistIdx = id + pidSgn * Npart; + static_assert(pidSgn == Cnull || pidSgn == 1); + constexpr int ChistIdx = id + pidSgn * Npart; if (!isPID(mcParticle)) { return; } if constexpr (recoEvt) { - hPtGenRecEvt[kHistIdx]->Fill(mcParticle.pt()); + hPtGenRecEvt[ChistIdx]->Fill(mcParticle.pt()); if (mcParticle.isPhysicalPrimary()) { - hPtGenPrimRecEvt[kHistIdx]->Fill(mcParticle.pt()); + hPtGenPrimRecEvt[ChistIdx]->Fill(mcParticle.pt()); } return; } if (!mcParticle.isPhysicalPrimary()) { - if (mcParticle.getProcess() == kProcessIdWeak) { - hPtEffGenWeak[kHistIdx]->Fill(mult, flat, mcParticle.pt()); + if (mcParticle.getProcess() == CprocessIdWeak) { + hPtEffGenWeak[ChistIdx]->Fill(mult, flat, mcParticle.pt()); } else { - hPtEffGenMat[kHistIdx]->Fill(mult, flat, mcParticle.pt()); + hPtEffGenMat[ChistIdx]->Fill(mult, flat, mcParticle.pt()); } } else { - hPtEffGenPrim[kHistIdx]->Fill(mult, flat, mcParticle.pt()); - hPtEffGen[kHistIdx]->Fill(mcParticle.pt()); + hPtEffGenPrim[ChistIdx]->Fill(mult, flat, mcParticle.pt()); + hPtEffGen[ChistIdx]->Fill(mcParticle.pt()); } } @@ -2125,11 +2128,11 @@ struct FlattenictyPikp { continue; } static_for<0, 5>([&](auto i) { - constexpr int kIdx = i.value; - if (particle.pdgCode() == PidSgn[kIdx]) { - flatchrg.fill(HIST(kPrefix) + HIST(kSpecies[kIdx]) + HIST(kPtGenPrimSgn), mult, flat, particle.pt()); + constexpr int Cidx = i.value; + if (particle.pdgCode() == PidSgn[Cidx]) { + flatchrg.fill(HIST(Cprefix) + HIST(Cspecies[Cidx]) + HIST(CpTgenPrimSgn), mult, flat, particle.pt()); if (isINELgt0mc) { - flatchrg.fill(HIST(kPrefix) + HIST(kSpecies[kIdx]) + HIST(kPtGenPrimSgnINEL), mult, flat, particle.pt()); + flatchrg.fill(HIST(Cprefix) + HIST(Cspecies[Cidx]) + HIST(CpTgenPrimSgnINEL), mult, flat, particle.pt()); } } }); @@ -2160,11 +2163,11 @@ struct FlattenictyPikp { continue; } static_for<0, 5>([&](auto i) { - constexpr int kIdx = i.value; - if (particle.pdgCode() == PidSgn[kIdx]) { - flatchrg.fill(HIST(kPrefix) + HIST(kSpecies[kIdx]) + HIST(kPtRecCollPrimSgn), mult, flat, particle.pt()); + constexpr int Cidx = i.value; + if (particle.pdgCode() == PidSgn[Cidx]) { + flatchrg.fill(HIST(Cprefix) + HIST(Cspecies[Cidx]) + HIST(CpTrecCollPrimSgn), mult, flat, particle.pt()); if (nRecCollINELgt0) { - flatchrg.fill(HIST(kPrefix) + HIST(kSpecies[kIdx]) + HIST(kPtRecCollPrimSgnINEL), mult, flat, particle.pt()); + flatchrg.fill(HIST(Cprefix) + HIST(Cspecies[Cidx]) + HIST(CpTrecCollPrimSgnINEL), mult, flat, particle.pt()); } } }); @@ -2176,7 +2179,7 @@ struct FlattenictyPikp { } // Evt loss num flatchrg.fill(HIST("hEvtMcGenRecColl"), 0.5); - if (nRecCollINELgt0 > kNull) { + if (nRecCollINELgt0 > Cnull) { flatchrg.fill(HIST("hEvtMcGenRecColl"), 1.5); } @@ -2189,11 +2192,11 @@ struct FlattenictyPikp { continue; } static_for<0, 5>([&](auto i) { - constexpr int kIdx = i.value; - if (particle.pdgCode() == PidSgn[kIdx]) { - flatchrg.fill(HIST(kPrefix) + HIST(kSpecies[kIdx]) + HIST(kPtGenRecCollPrimSgn), mult, flat, particle.pt()); + constexpr int Cidx = i.value; + if (particle.pdgCode() == PidSgn[Cidx]) { + flatchrg.fill(HIST(Cprefix) + HIST(Cspecies[Cidx]) + HIST(CpTGenRecCollPrimSgn), mult, flat, particle.pt()); if (nRecCollINELgt0) { - flatchrg.fill(HIST(kPrefix) + HIST(kSpecies[kIdx]) + HIST(kPtGenRecCollPrimSgnINEL), mult, flat, particle.pt()); + flatchrg.fill(HIST(Cprefix) + HIST(Cspecies[Cidx]) + HIST(CpTGenRecCollPrimSgnINEL), mult, flat, particle.pt()); } } }); @@ -2240,10 +2243,10 @@ struct FlattenictyPikp { const auto& mcParticle = particles.iteratorAt(mcLabel.mcParticleId()); static_for<0, 4>([&](auto i) { - constexpr int kIdx = i.value; - if ((std::abs(o2::aod::pidutils::tpcNSigma(track)) < trkSelOpt.cfgNsigmaMax) && std::abs(track.rapidity(o2::track::PID::getMass(kIdx))) <= trkSelOpt.cfgRapMax) { - if (std::fabs(mcParticle.pdgCode()) == PDGs[kIdx]) { - flatchrg.fill(HIST(kPrefix) + HIST(kSpeciesAll[kIdx]) + HIST(kPtMCclosurePrim), multRec, flatRec, track.pt()); + constexpr int Cidx = i.value; + if ((std::abs(o2::aod::pidutils::tpcNSigma(track)) < trkSelOpt.cfgNsigmaMax) && std::abs(track.rapidity(o2::track::PID::getMass(Cidx))) <= trkSelOpt.cfgRapMax) { + if (std::fabs(mcParticle.pdgCode()) == PDGs[Cidx]) { + flatchrg.fill(HIST(Cprefix) + HIST(CspeciesAll[Cidx]) + HIST(CpTmcClosurePrim), multRec, flatRec, track.pt()); } } }); @@ -2309,6 +2312,9 @@ struct FlattenictyPikp { continue; } + flatchrg.fill(HIST("Events/hVtxZRec"), collision.posZ()); + flatchrg.fill(HIST("Events/hVtxZGen"), mcCollision.posZ()); + if (evtSelOpt.cfgINELCut.value) { if (!o2::pwglf::isINELgt0mc(groupedParts, pdg)) { continue;