From 40d7d43adb04f1100e9810a0c00db0fadb3b8161 Mon Sep 17 00:00:00 2001 From: Marvin Hemmer Date: Mon, 27 Jan 2025 15:31:49 +0100 Subject: [PATCH 1/2] [PWGEM,PWGEM-36] Pi0Flow - Fix TanTheta cut being applied most of the time - Fix missing `mesonConfig.enableTanThetadPhi` for rotation background and mixed event method --- PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx b/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx index 666b7b716a3..14def65bce1 100644 --- a/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx @@ -689,7 +689,7 @@ struct TaskPi0FlowEMC { if (mesonConfig.enableTanThetadPhi) { float dTheta = photon1.Theta() - photon3.Theta(); float dPhi = photon1.Phi() - photon3.Phi(); - if (mesonConfig.minTanThetadPhi > std::fabs(getAngleDegree(std::atan(dTheta / dPhi)))) { + if (mesonConfig.enableTanThetadPhi && mesonConfig.minTanThetadPhi > std::fabs(getAngleDegree(std::atan(dTheta / dPhi)))) { registry.fill(HIST("hSparseBkgFlow"), mother1.M(), mother1.Pt(), cent, scalprodCand1); } } else { @@ -712,7 +712,7 @@ struct TaskPi0FlowEMC { if (mesonConfig.enableTanThetadPhi) { float dTheta = photon2.Theta() - photon3.Theta(); float dPhi = photon2.Phi() - photon3.Phi(); - if (mesonConfig.minTanThetadPhi > std::fabs(getAngleDegree(std::atan(dTheta / dPhi)))) { + if (mesonConfig.enableTanThetadPhi && mesonConfig.minTanThetadPhi > std::fabs(getAngleDegree(std::atan(dTheta / dPhi)))) { registry.fill(HIST("hSparseBkgFlow"), mother2.M(), mother2.Pt(), cent, scalprodCand2); } } else { @@ -772,7 +772,7 @@ struct TaskPi0FlowEMC { if (mesonConfig.enableTanThetadPhi) { float dTheta = photon1.Theta() - photon3.Theta(); float dPhi = photon1.Phi() - photon3.Phi(); - if (mesonConfig.minTanThetadPhi > std::fabs(getAngleDegree(std::atan(dTheta / dPhi)))) { + if (mesonConfig.enableTanThetadPhi && mesonConfig.minTanThetadPhi > std::fabs(getAngleDegree(std::atan(dTheta / dPhi)))) { registry.fill(HIST("hSparseCalibBack"), mother1.M(), mother1.E() / 2., cent); } } else { @@ -790,7 +790,7 @@ struct TaskPi0FlowEMC { if (mesonConfig.enableTanThetadPhi) { float dTheta = photon2.Theta() - photon3.Theta(); float dPhi = photon2.Phi() - photon3.Phi(); - if (mesonConfig.minTanThetadPhi > std::fabs(getAngleDegree(std::atan(dTheta / dPhi)))) { + if (mesonConfig.enableTanThetadPhi && mesonConfig.minTanThetadPhi > std::fabs(getAngleDegree(std::atan(dTheta / dPhi)))) { registry.fill(HIST("hSparseCalibBack"), mother2.M(), mother2.E() / 2., cent); } } else { @@ -1030,7 +1030,7 @@ struct TaskPi0FlowEMC { registry.fill(HIST("hTanThetaPhi"), vMeson.M(), getAngleDegree(std::atan(dTheta / dPhi))); registry.fill(HIST("hAlphaPt"), (v1.E() - v2.E()) / (v1.E() + v2.E()), vMeson.Pt()); } - if (mesonConfig.minTanThetadPhi > std::fabs(getAngleDegree(std::atan(dTheta / dPhi)))) { + if (mesonConfig.enableTanThetadPhi && mesonConfig.minTanThetadPhi > std::fabs(getAngleDegree(std::atan(dTheta / dPhi)))) { registry.fill(HIST("hClusterCuts"), 5); continue; } From f23e849cbec65c606dcb3db88222aaca53ee8ec4 Mon Sep 17 00:00:00 2001 From: Marvin Hemmer Date: Mon, 27 Jan 2025 16:34:27 +0100 Subject: [PATCH 2/2] [PWGEM,PWGEM-36] Pi0Flow - Mixed event fills background histo - This commit enables mixed event to now fill the correct background histo instead of the same event histo. --- PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx b/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx index 14def65bce1..251c7d535e3 100644 --- a/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx @@ -410,12 +410,14 @@ struct TaskPi0FlowEMC { /// \param pt is the transverse momentum of the candidate /// \param cent is the centrality of the collision /// \param sp is the scalar product + template void fillThn(float& mass, float& pt, float& cent, float& sp) { - registry.fill(HIST("hSparsePi0Flow"), mass, pt, cent, sp); + static constexpr std::string_view HistTypes[2] = {"hSparsePi0Flow", "hSparseBkgFlow"}; + registry.fill(HIST(HistTypes[histType]), mass, pt, cent, sp); } /// Get the centrality @@ -806,6 +808,7 @@ struct TaskPi0FlowEMC { /// Compute the scalar product /// \param collision is the collision with the Q vector information and event plane /// \param meson are the selected candidates + template void runFlowAnalysis(CollsWithQvecs::iterator const& collision, ROOT::Math::PtEtaPhiMVector const& meson) { auto [xQVec, yQVec] = getQvec(collision, qvecDetector); @@ -823,7 +826,7 @@ struct TaskPi0FlowEMC { scalprodCand = scalprodCand / h1SPResolution->GetBinContent(h1SPResolution->FindBin(cent + epsilon)); } - fillThn(massCand, ptCand, cent, scalprodCand); + fillThn(massCand, ptCand, cent, scalprodCand); return; } @@ -950,7 +953,7 @@ struct TaskPi0FlowEMC { continue; } registry.fill(HIST("hClusterCuts"), 6); - runFlowAnalysis(collision, vMeson); + runFlowAnalysis<0>(collision, vMeson); } if (cfgDoRotation) { if (nColl % cfgDownsampling.value == 0) { @@ -1035,7 +1038,7 @@ struct TaskPi0FlowEMC { continue; } registry.fill(HIST("hClusterCuts"), 6); - runFlowAnalysis(c1, vMeson); + runFlowAnalysis<1>(c1, vMeson); } } }