Skip to content

Commit bc815d3

Browse files
authored
[PWGCF,/,FemtoUniverse] Adding thetasstar calculation (#8272)
1 parent d93de68 commit bc815d3

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,37 @@ class FemtoUniverseMath
6565
return 0.5 * trackRelK.P();
6666
}
6767

68+
/// \tparam T type of tracks
69+
/// \param part1 Particle 1
70+
/// \param mass1 Mass of particle 1
71+
/// \param part2 Particle 2
72+
/// \param mass2 Mass of particle 2
73+
template <typename T>
74+
static float getthetastar(const T& part1, const float mass1, const T& part2, const float mass2)
75+
{
76+
const ROOT::Math::PtEtaPhiMVector vecpart1(part1.pt(), part1.eta(), part1.phi(), mass1);
77+
const ROOT::Math::PtEtaPhiMVector vecpart2(part2.pt(), part2.eta(), part2.phi(), mass2);
78+
const ROOT::Math::PtEtaPhiMVector trackSum = vecpart1 + vecpart2;
79+
const ROOT::Math::PtEtaPhiMVector trackDiff = vecpart1 - vecpart2;
80+
81+
const float beta = trackSum.Beta();
82+
const float betax = beta * std::cos(trackSum.Phi()) * std::sin(trackSum.Theta());
83+
const float betay = beta * std::sin(trackSum.Phi()) * std::sin(trackSum.Theta());
84+
const float betaz = beta * std::cos(trackSum.Theta());
85+
86+
ROOT::Math::PxPyPzMVector PartOneCMS(vecpart1);
87+
ROOT::Math::PxPyPzMVector PartTwoCMS(vecpart2);
88+
89+
const ROOT::Math::Boost boostPRF = ROOT::Math::Boost(-betax, -betay, -betaz);
90+
PartOneCMS = boostPRF(PartOneCMS);
91+
PartTwoCMS = boostPRF(PartTwoCMS);
92+
93+
const ROOT::Math::PtEtaPhiMVector PartOneCMSGeo(PartOneCMS);
94+
const ROOT::Math::PtEtaPhiMVector PartTwoCMSGeo(PartTwoCMS);
95+
96+
return (PartOneCMSGeo.Theta() - PartTwoCMSGeo.Theta());
97+
}
98+
6899
/// Compute the qij of a pair of particles
69100
/// \tparam T type of tracks
70101
/// \param vecparti Particle i PxPyPzMVector

0 commit comments

Comments
 (0)