Skip to content

Commit 8298819

Browse files
committed
Add Armenteros-Podolanski parameters calculation methods to V0
1 parent 7bcd950 commit 8298819

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

  • DataFormats/Reconstruction

DataFormats/Reconstruction/include/ReconstructionDataFormats/V0.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ class V0 : public o2::track::TrackParCov
5858
float calcMass2AsAntiHyperTriton() const { return calcMass2PID(PID::Pion, PID::Helium3); }
5959
float calcMass2AsHyperhydrog4() const { return calcMass2PID(PID::Alpha, PID::Pion); }
6060
float calcMass2AsAntiHyperhydrog4() const { return calcMass2PID(PID::Pion, PID::Alpha); }
61-
61+
float calcAPQt() const;
62+
float calcAPAlpha() const;
6263
float calcR2() const { return getX() * getX() + getY() * getY(); }
6364

6465
protected:

DataFormats/Reconstruction/src/V0.cxx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,36 @@ float V0::calcMass2(float massPos2, float massNeg2) const
3535
auto energy = std::sqrt(massPos2 + p2pos) + std::sqrt(massNeg2 + p2neg);
3636
return energy * energy - p2;
3737
}
38+
39+
float V0::calcAPAlpha() const
40+
{
41+
// calculate Armenteros-Podolanski alpha
42+
std::array<float, 3> pP, pN, pV0;
43+
float alp = 0.f, pV0tot2 = 0.f;
44+
getProng(0).getPxPyPzGlo(pP);
45+
getProng(1).getPxPyPzGlo(pN);
46+
for (int i = 0; i < 3; i++) {
47+
pV0[i] = pP[i] + pN[i];
48+
alp += pV0[i] * (pP[i] - pN[i]);
49+
pV0tot2 += pV0[i] * pV0[i];
50+
}
51+
alp /= pV0tot2;
52+
return alp;
53+
}
54+
55+
float V0::calcAPQt() const
56+
{
57+
// calculate Armenteros-Podolanski qt
58+
std::array<float, 3> pP, pN, pV0;
59+
float pPtot2 = 0.f, pV0tot2 = 0.f, cross = 0.f;
60+
getProng(0).getPxPyPzGlo(pP);
61+
getProng(1).getPxPyPzGlo(pN);
62+
for (int i = 0; i < 3; i++) {
63+
pV0[i] = pP[i] + pN[i];
64+
pPtot2 += pP[i] * pP[i];
65+
pV0tot2 += pV0[i] * pV0[i];
66+
cross += pV0[i] * pP[i]; // -> pP * pV0 * cos
67+
}
68+
float qt = pPtot2 - (cross * cross) / pV0tot2;
69+
return qt > 0 ? std::sqrt(qt) : 0;
70+
}

0 commit comments

Comments
 (0)