Skip to content
Merged
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
26 changes: 14 additions & 12 deletions PWGHF/D2H/Tasks/taskCharmPolarisation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
Configurable<bool> activateTHnSparseCosThStarBeam{"activateTHnSparseCosThStarBeam", true, "Activate the THnSparse with cosThStar w.r.t. beam axis"};
Configurable<bool> activateTHnSparseCosThStarRandom{"activateTHnSparseCosThStarRandom", true, "Activate the THnSparse with cosThStar w.r.t. random axis"};
Configurable<bool> activateTHnSparseCosThStarEP{"activateTHnSparseCosThStarEP", false, "Activate the THnSparse with cosThStar w.r.t. reaction plane axis"};
Configurable<bool> activateTHnSparsePhiAndCosSqStarEP{"activateTHnSparsePhiAndCosSqStar", false, "Activate the THnSparse with cos(2PhiStar) and cosSq(ThStar) w.r.t. reaction plane axis"};

Check failure on line 178 in PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

Configurable<bool> activatePartRecoDstar{"activatePartRecoDstar", false, "Activate the study of partly reconstructed D*+ -> D0 (-> KPiPi0) Pi decays"};
float minInvMass{0.f};
Expand Down Expand Up @@ -357,7 +357,7 @@
const AxisSpec thnAxisCosThetaStarRandom{configThnAxisCosThetaStarRandom, "cos(#vartheta_{random})"};
const AxisSpec thnAxisCosThetaStarBeam{configThnAxisCosThetaStarBeam, "cos(#vartheta_{beam})"};
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 @@ -901,16 +901,17 @@
}; // end init

/// \param ptCharmHad is the pt of the candidate
double sampleDeltaPhi(float ptCharmHad) {
double sampleDeltaPhi(float ptCharmHad)
{

double y0 = 6.49e-2;
double cons = 8.42e-1;
double coef = -3.78e-1;
double cons = 8.42e-1;
double coef = -3.78e-1;
double x0 = -6.37e-1;
double norm = -3.64e-1;
double mu = 4.68e-2;
double norm = -3.64e-1;
double mu = 4.68e-2;
double sigma = 1.513;

double sigmoid = y0 + (cons - y0) / (1 + std::exp(-coef * (ptCharmHad - x0)));
double peak = norm * std::exp(-(ptCharmHad - mu) * (ptCharmHad - mu) / (2 * sigma * sigma));

Expand All @@ -923,12 +924,13 @@

double funcDeltaPhi = 1.0 + 2.0 * v2 * std::cos(2.0 * deltaPhi);

if (funcVal < funcDeltaPhi) return deltaPhi;
if (funcVal < funcDeltaPhi)
return deltaPhi;
}

return -1.;
}

/// \param invMassCharmHad is the invariant-mass of the candidate
/// \param ptCharmHad is the pt of the candidate
/// \param numPvContributors is the number of PV contributors
Expand Down Expand Up @@ -1620,7 +1622,7 @@
if (nBkgRotations > 0) {
registry.fill(HIST("hEP"), invMassCharmHad, ptCharmHad, numPvContributors, std::abs(rapCharmHad), invMassD0, cosThetaStar, outputMl[0], /*outputMl[1],*/ outputMl[2], absEtaMin, numItsClsMin, numTpcClsMin, isRotatedCandidate, centrality);
if (activateTHnSparsePhiAndCosSqStarEP && ptCharmHad > ptMinCosPhiCosSqTheta) {
registry.fill(HIST("hCosPhiCosSqThetaEP"), invMassCharmHad, ptCharmHad, std::abs(rapCharmHad), std::cos(2*phiEuler), cosThetaStar*cosThetaStar, outputMl[0], /*outputMl[1],*/ outputMl[2], centrality);
registry.fill(HIST("hCosPhiCosSqThetaEP"), invMassCharmHad, ptCharmHad, std::abs(rapCharmHad), std::cos(2 * phiEuler), cosThetaStar * cosThetaStar, outputMl[0], /*outputMl[1],*/ outputMl[2], centrality);
}
} else {
registry.fill(HIST("hEP"), invMassCharmHad, ptCharmHad, numPvContributors, std::abs(rapCharmHad), invMassD0, cosThetaStar, outputMl[0], /*outputMl[1],*/ outputMl[2], absEtaMin, numItsClsMin, numTpcClsMin, centrality);
Expand All @@ -1629,7 +1631,7 @@
if (nBkgRotations > 0) {
registry.fill(HIST("hEP"), invMassCharmHad, ptCharmHad, numPvContributors, std::abs(rapCharmHad), invMassD0, cosThetaStar, outputMl[0], /*outputMl[1],*/ outputMl[2], isRotatedCandidate, centrality);
if (activateTHnSparsePhiAndCosSqStarEP && ptCharmHad > ptMinCosPhiCosSqTheta) {
registry.fill(HIST("hCosPhiCosSqThetaEP"), invMassCharmHad, ptCharmHad, std::abs(rapCharmHad), std::cos(2*phiEuler), cosThetaStar*cosThetaStar, outputMl[0], /*outputMl[1],*/ outputMl[2], centrality);
registry.fill(HIST("hCosPhiCosSqThetaEP"), invMassCharmHad, ptCharmHad, std::abs(rapCharmHad), std::cos(2 * phiEuler), cosThetaStar * cosThetaStar, outputMl[0], /*outputMl[1],*/ outputMl[2], centrality);
}
} else {
registry.fill(HIST("hEP"), invMassCharmHad, ptCharmHad, numPvContributors, std::abs(rapCharmHad), invMassD0, cosThetaStar, outputMl[0], /*outputMl[1],*/ outputMl[2], centrality);
Expand Down Expand Up @@ -1810,7 +1812,7 @@
}
}
} else if constexpr (CosThetaStarType == charm_polarisation::CosThetaStarType::EP) { // EP
// Dstar or Lc->pKpi
// Dstar or Lc->pKpi
if (origin == RecoDecay::OriginType::Prompt) {
if (!isPartRecoDstar) {
registry.fill(HIST("hGenPromptEP"), ptCharmHad, numPvContributors, std::abs(rapCharmHad), cosThetaStar, areDausInAcc, resoChannelLc, charge, centrality);
Expand Down
Loading