Skip to content

[PWGCF] FemtoDream: add EP-rotated (B-frame) 3D q histogram - #18136

Open
ootaku303 wants to merge 2 commits into
AliceO2Group:masterfrom
ootaku303:femtodream-store-ep-rotated-3dqn
Open

ootaku303 wants to merge 2 commits into
AliceO2Group:masterfrom
ootaku303:femtodream-store-ep-rotated-3dqn

Conversation

@ootaku303

Copy link
Copy Markdown

Add an optional storeEProt toggle to the 3D qn THnSparse in femto-dream-pair-task-track-track. When enabled, the out/side/long momentum-difference axes are replaced by DK_x, DK_y, DK_z rotated into the event-plane (B-field) frame, so DK_y is out-of-plane (||B) for every pair — useful for offline single-component cuts when searching for B-direction-dependent HBT modulation.

Default is false: booking and output are unchanged. Tested: builds clean against latest master, and a full 1-file run with storeEProt=true produces the expected relPair3dEProtRmTMultPercentileQnPairphi histogram (SameEvent 1.4×10⁸ / MixedEvent 2.5×10⁷ entries) with no change when the toggle is off.

Add a storeEProt toggle to the 3D qn THnSparse in FemtoDreamContainer
and femtoDreamPairTaskTrackTrack. When enabled, the out/side/long
momentum-difference axes are replaced by DK_x, DK_y, DK_z rotated into
the event-plane (magnetic-field) frame, so DK_y is out-of-plane (||B)
for every pair. A single-component cut (e.g. on DK_x, DK_z) is applied
offline on the output; this toggle only changes what is histogrammed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 230 warnings, 🔕 0 disabled

Comment thread PWGCF/FemtoDream/Core/femtoDreamContainer.h Outdated
Comment thread PWGCF/FemtoDream/Core/femtoDreamContainer.h Outdated
Comment thread PWGCF/FemtoDream/Core/femtoDreamContainer.h Outdated
Comment thread PWGCF/FemtoDream/Core/femtoDreamContainer.h
Comment thread PWGCF/FemtoDream/Core/femtoDreamContainer.h
@lauraser
lauraser enabled auto-merge (squash) October 7, 2026 14:44
@alibuild

alibuild commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 4b4e24a at 2026-10-07 16:57:

No log files found

Full log here.

Comment on lines +377 to +385
/// Signed φ_pair − Ψ_EP (same as getPairPhiEP without the final |·|); used as the B-frame rotation angle.
template <typename T1, typename T2>
static float getPairPhiEPSigned(const T1& part1, const float mass1, const T2& part2, const float mass2, const float Psi_ep)
{
const ROOT::Math::PtEtaPhiMVector vecpart1(part1.pt(), part1.eta(), part1.phi(), mass1);
const ROOT::Math::PtEtaPhiMVector vecpart2(part2.pt(), part2.eta(), part2.phi(), mass2);
const ROOT::Math::PtEtaPhiMVector trackSum = vecpart1 + vecpart2;
return TVector2::Phi_mpi_pi(trackSum.Phi() - Psi_ep);
}

@vkucera vkucera Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider replacing this with:

RecoDecay::constrainAngle(RecoDecay::phi(RecoDecay::pVec(part1.pVector(), part2.pVector())), -o2::constants::math::PI)

For sure you don't need masses to calculate phi.

Comment on lines +388 to +398
template <typename T1, typename T2>
static float getPairPhiEPSigned(const T1& part1, const float mass1, const T2& part2, const float mass2, const float Psi_ep1, const float Psi_ep2)
{
const ROOT::Math::PtEtaPhiMVector vecpart1(part1.pt(), part1.eta(), part1.phi(), mass1);
const ROOT::Math::PtEtaPhiMVector vecpart2(part2.pt(), part2.eta(), part2.phi(), mass2);
const float psidiff = Psi_ep2 - Psi_ep1;
const float newPhi2 = TVector2::Phi_mpi_pi(vecpart2.Phi() - psidiff);
const ROOT::Math::PtEtaPhiMVector vecpart2_calibd(vecpart2.Pt(), vecpart2.Eta(), newPhi2, vecpart2.M());
const ROOT::Math::PtEtaPhiMVector trackSum = vecpart1 + vecpart2_calibd;
return TVector2::Phi_mpi_pi(trackSum.Phi() - Psi_ep1);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

5 participants