Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider the following formatting changes to #9832 #16

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
28 changes: 13 additions & 15 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ class VarManager : public TObject
template <typename T>
static void FillTwoMixEventsFlowResoFactor(T const& hs_sp, T const& hs_ep, float* values = nullptr);
template <typename T, typename T1, typename T2>
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 <uint32_t fillMap, typename T>
static void FillTrack(T const& track, float* values = nullptr);
template <uint32_t fillMap, typename T>
Expand Down Expand Up @@ -1932,22 +1932,22 @@ void VarManager::FillTwoMixEventsFlowResoFactor(T const& hs_sp, T const& hs_ep,
}

template <typename T, typename T1, typename T2>
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.) {
Expand All @@ -1967,7 +1967,6 @@ void VarManager::FillTwoMixEventsCumulants(T const& h_v22m, T const& h_v24m, T c
}
}


template <typename T>
void VarManager::FillTwoEvents(T const& ev1, T const& ev2, float* values)
{
Expand Down Expand Up @@ -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]) {
Expand Down
3 changes: 1 addition & 2 deletions PWGDQ/Tasks/tableReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,6 @@ struct AnalysisSameEventPairing {
Configurable<bool> fConfigCumulants{"cfgCumulants", false, "If true, fill Cumulants with Weights different than 0"};
Configurable<std::string> fConfigAddJSONHistograms{"cfgAddJSONHistograms", "", "Histograms in JSON format"};


// Configurables to create output tree (flat tables or minitree)
struct : ConfigurableGroup {
Configurable<bool> fConfigMiniTree{"useMiniTree.cfgMiniTree", false, "Produce a single flat table with minimal information for analysis"};
Expand Down Expand Up @@ -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());
}
Expand Down
Loading