Skip to content
Open
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
16 changes: 10 additions & 6 deletions PWGHF/D2H/Tasks/taskCharmPolarisation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ struct HfTaskCharmPolarisation {
std::string hAxisName = "Rotated cos(#vartheta_{EP}) with" + std::to_string(axisRotationAngle) + " rad";
const AxisSpec thnAxisCosThetaStarEP{configThnAxisCosThetaStarEP, activateAxisRotation ? hAxisName.c_str() : "cos(#vartheta_{EP})"}; // reaction plane
// const AxisSpec thnAxisCosThetaStarEP{configThnAxisCosThetaStarEP, "cos(#vartheta_{EP})"}; // reaction plane
const AxisSpec thnAxisCosPhiStarEP{configThnAxisCosPhiStarEP, "cos(2#varphi_{EP})"}; // reaction plane
const AxisSpec thnAxisCosPhiStarEP{configThnAxisCosPhiStarEP, "cos(2#varphi_{EP})"}; // reaction plane
const AxisSpec thnAxisCosSqThetaStarEP{configThnAxisCosSqThetaStarEP, "cos^{2}(#vartheta_{EP})"}; // reaction plane
const AxisSpec thnAxisMlBkg{configThnAxisMlBkg, "ML bkg"};
const AxisSpec thnAxisMlNonPrompt{configThnAxisMlNonPrompt, "ML non-prompt"};
Expand Down Expand Up @@ -1987,8 +1987,12 @@ struct HfTaskCharmPolarisation {
bool runPolarisationAnalysis(Cand const& candidate, int bkgRotationId, T numPvContributors, Part const& particles, Trk const& /*tracks*/, float centrality = -999.f, QVecs const* qVecs = nullptr)
{
if constexpr (WithEp && !DoMc) {
assert(qVecs && "EP analysis requested but qVecs == nullptr");
assert(centrality && "EP analysis requested but centrality == nullptr");
if (qVecs == nullptr) {
LOGF(fatal, "EP analysis requested but qVecs == nullptr");
}
if (centrality < -900.f) {
LOGF(fatal, "EP analysis requested but centrality is invalid");
}
}

constexpr std::size_t NScores{3u};
Expand Down Expand Up @@ -2590,9 +2594,9 @@ struct HfTaskCharmPolarisation {
void runMcGenPolarisationAnalysis(Part const& mcParticle, Particles const& mcParticles, T numPvContributors, Cent const* centrality = nullptr)
{
if constexpr (WithCent) {
assert(qVecs && "Centrality analysis requested but Cent == nullptr");
}
if constexpr (WithCent) {
if (centrality == nullptr) {
LOGF(fatal, "Centrality analysis requested but centrality == nullptr");
}
if (*centrality < centralityMin || *centrality > centralityMax) {
return; // skip this collision if outside of the centrality range
}
Expand Down
4 changes: 3 additions & 1 deletion PWGHF/D2H/Utils/utilsFlow.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ class HfQVectorResoHelper
/// Direct array access with simple float return type
float operator[](size_t index) const
{
assert(mResoValues != nullptr && "CCDB resolution array accessed before initialization!");
if (mResoValues == nullptr) {
LOGF(fatal, "CCDB resolution array accessed before initialization!");
}
return (*mResoValues)[index];
}

Expand Down
Loading