From b36324ab2518616dec3dfd4ee8936a2c57ee3948 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Fri, 7 Feb 2025 20:39:08 +0000 Subject: [PATCH] Please consider the following formatting changes --- PWGDQ/Core/VarManager.cxx | 2 +- PWGDQ/Core/VarManager.h | 28 +++++++++++++--------------- PWGDQ/Tasks/tableReader.cxx | 3 +-- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/PWGDQ/Core/VarManager.cxx b/PWGDQ/Core/VarManager.cxx index 8133ae3a9b3..929633122f5 100644 --- a/PWGDQ/Core/VarManager.cxx +++ b/PWGDQ/Core/VarManager.cxx @@ -1588,6 +1588,6 @@ void VarManager::SetDefaultVarNames() fgVarNamesMap["kV24p"] = kV24p; fgVarNamesMap["kV22ME"] = kV22ME; fgVarNamesMap["kV24ME"] = kV24ME - fgVarNamesMap["kWV22ME"] = kWV22ME; + fgVarNamesMap["kWV22ME"] = kWV22ME; fgVarNamesMap["kWV24ME"] = kWV24ME; } diff --git a/PWGDQ/Core/VarManager.h b/PWGDQ/Core/VarManager.h index 77491f40cc5..4e9b31eacd9 100644 --- a/PWGDQ/Core/VarManager.h +++ b/PWGDQ/Core/VarManager.h @@ -990,7 +990,7 @@ class VarManager : public TObject template static void FillTwoMixEventsFlowResoFactor(T const& hs_sp, T const& hs_ep, float* values = nullptr); template - static void FillTwoMixEventsCumulants(T const& h_v22m, T const& h_v24m, T const& h_v22p, T const& h_v24p,T1 const& t1, T2 const& t2, float* values = nullptr); + static void FillTwoMixEventsCumulants(T const& h_v22m, T const& h_v24m, T const& h_v22p, T const& h_v24p, T1 const& t1, T2 const& t2, float* values = nullptr); template static void FillTrack(T const& track, float* values = nullptr); template @@ -1932,22 +1932,22 @@ void VarManager::FillTwoMixEventsFlowResoFactor(T const& hs_sp, T const& hs_ep, } template -void VarManager::FillTwoMixEventsCumulants(T const& h_v22m, T const& h_v24m, T const& h_v22p, T const& h_v24p,T1 const& t1, T2 const& t2, float* values) +void VarManager::FillTwoMixEventsCumulants(T const& h_v22m, T const& h_v24m, T const& h_v22p, T const& h_v24p, T1 const& t1, T2 const& t2, float* values) { if (!values) { values = fgValues; } float ptp, ptm, centp, centm; - if (t1.sign()<0) { - ptm = t1.sign(); - ptp = t2.sign(); - centm = values[kTwoEvCentFT0C1]; - centp = values[kTwoEvCentFT0C2]; - }else{ - ptm = t2.sign(); - ptp = t1.sign(); - centm = values[kTwoEvCentFT0C2]; - centp = values[kTwoEvCentFT0C1]; + if (t1.sign() < 0) { + ptm = t1.sign(); + ptp = t2.sign(); + centm = values[kTwoEvCentFT0C1]; + centp = values[kTwoEvCentFT0C2]; + } else { + ptm = t2.sign(); + ptp = t1.sign(); + centm = values[kTwoEvCentFT0C2]; + centp = values[kTwoEvCentFT0C1]; } if (centm >= 0.) { @@ -1967,7 +1967,6 @@ void VarManager::FillTwoMixEventsCumulants(T const& h_v22m, T const& h_v24m, T c } } - template void VarManager::FillTwoEvents(T const& ev1, T const& ev2, float* values) { @@ -3054,14 +3053,13 @@ void VarManager::FillPairME(T1 const& t1, T2 const& t2, float* values) values[kV2ME_EP] = std::isnan(V2ME_EP) || std::isinf(V2ME_EP) ? 0. : V2ME_EP; values[kWV2ME_EP] = std::isnan(V2ME_EP) || std::isinf(V2ME_EP) ? 0. : 1.0; - //Cumulant part + // Cumulant part float V22ME = values[kV22m] * values[kCos2DeltaPhiMu1] + values[kV22p] * values[kCos2DeltaPhiMu2]; float V24ME = values[kV24m] * values[kCos2DeltaPhiMu1] + values[kV24p] * values[kCos2DeltaPhiMu2]; values[kV22ME] = (std::isnan(V22ME) || std::isinf(V22ME) || std::isnan(V24ME) || std::isinf(V24ME)) ? 0. : V22ME; values[kWV22ME] = (std::isnan(V22ME) || std::isinf(V22ME) || std::isnan(V24ME) || std::isinf(V24ME)) ? 0. : 1.0; values[kV24ME] = (std::isnan(V22ME) || std::isinf(V22ME) || std::isnan(V24ME) || std::isinf(V24ME)) ? 0. : V24ME; values[kWV24ME] = (std::isnan(V22ME) || std::isinf(V22ME) || std::isnan(V24ME) || std::isinf(V24ME)) ? 0. : 1.0; - } if constexpr (pairType == kDecayToMuMu) { if (fgUsedVars[kQuadDCAabsXY]) { diff --git a/PWGDQ/Tasks/tableReader.cxx b/PWGDQ/Tasks/tableReader.cxx index ea390e4e93a..accc08d8d67 100644 --- a/PWGDQ/Tasks/tableReader.cxx +++ b/PWGDQ/Tasks/tableReader.cxx @@ -995,7 +995,6 @@ struct AnalysisSameEventPairing { Configurable fConfigCumulants{"cfgCumulants", false, "If true, fill Cumulants with Weights different than 0"}; Configurable fConfigAddJSONHistograms{"cfgAddJSONHistograms", "", "Histograms in JSON format"}; - // Configurables to create output tree (flat tables or minitree) struct : ConfigurableGroup { Configurable fConfigMiniTree{"useMiniTree.cfgMiniTree", false, "Produce a single flat table with minimal information for analysis"}; @@ -1173,7 +1172,7 @@ struct AnalysisSameEventPairing { VarManager::SetCollisionSystem((TString)fCollisionSystem, fCenterMassEnergy); // set collision system and center of mass energy DefineHistograms(fHistMan, histNames.Data(), fConfigAddSEPHistogram); // define all histograms - dqhistograms::AddHistogramsFromJSON(fHistMan, fConfigAddJSONHistograms.value.c_str()); // ad-hoc histograms via JSON + dqhistograms::AddHistogramsFromJSON(fHistMan, fConfigAddJSONHistograms.value.c_str()); // ad-hoc histograms via JSON VarManager::SetUseVars(fHistMan->GetUsedVars()); // provide the list of required variables so that VarManager knows what to fill fOutputList.setObject(fHistMan->GetMainHistogramList()); }