Skip to content

Commit

Permalink
Add Armenteros-Podolanski parameters calculation methods to V0
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed Jul 8, 2024
1 parent 7bcd950 commit 8298819
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ class V0 : public o2::track::TrackParCov
float calcMass2AsAntiHyperTriton() const { return calcMass2PID(PID::Pion, PID::Helium3); }
float calcMass2AsHyperhydrog4() const { return calcMass2PID(PID::Alpha, PID::Pion); }
float calcMass2AsAntiHyperhydrog4() const { return calcMass2PID(PID::Pion, PID::Alpha); }

float calcAPQt() const;
float calcAPAlpha() const;
float calcR2() const { return getX() * getX() + getY() * getY(); }

protected:
Expand Down
33 changes: 33 additions & 0 deletions DataFormats/Reconstruction/src/V0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,36 @@ float V0::calcMass2(float massPos2, float massNeg2) const
auto energy = std::sqrt(massPos2 + p2pos) + std::sqrt(massNeg2 + p2neg);
return energy * energy - p2;
}

float V0::calcAPAlpha() const
{
// calculate Armenteros-Podolanski alpha
std::array<float, 3> pP, pN, pV0;
float alp = 0.f, pV0tot2 = 0.f;
getProng(0).getPxPyPzGlo(pP);
getProng(1).getPxPyPzGlo(pN);
for (int i = 0; i < 3; i++) {
pV0[i] = pP[i] + pN[i];
alp += pV0[i] * (pP[i] - pN[i]);
pV0tot2 += pV0[i] * pV0[i];
}
alp /= pV0tot2;
return alp;
}

float V0::calcAPQt() const
{
// calculate Armenteros-Podolanski qt
std::array<float, 3> pP, pN, pV0;
float pPtot2 = 0.f, pV0tot2 = 0.f, cross = 0.f;
getProng(0).getPxPyPzGlo(pP);
getProng(1).getPxPyPzGlo(pN);
for (int i = 0; i < 3; i++) {
pV0[i] = pP[i] + pN[i];
pPtot2 += pP[i] * pP[i];
pV0tot2 += pV0[i] * pV0[i];
cross += pV0[i] * pP[i]; // -> pP * pV0 * cos
}
float qt = pPtot2 - (cross * cross) / pV0tot2;
return qt > 0 ? std::sqrt(qt) : 0;
}

0 comments on commit 8298819

Please sign in to comment.