@@ -35,41 +35,71 @@ struct V0PhotonCandidate {
3535 // Empty Constructor
3636 V0PhotonCandidate () = default ;
3737 // Set method for photonconversionbuilder
38- void setPhotonCandidate (const KFParticle& v0, const KFParticle& pos, const KFParticle& ele, const auto & collision, float cospa, float psipair, float phiv, CentType centType)
38+ template <class TTrack >
39+ void setPhotonCandidate (const KFParticle& v0_DecayVtx, const KFParticle& v0_PV, const TTrack& pos, const KFParticle& pos_DecayVtx, const TTrack& ele, const KFParticle& ele_DecayVtx, const auto & collision, float cospa, float cospaRZ, float cospaXY, float psipair, float phiv, CentType centType, auto posdcaXY, auto eledcaXY, auto posdcaZ, auto eledcaZ)
3940 {
40- px = v0.GetPx ();
41- py = v0.GetPy ();
42- pz = v0.GetPz ();
41+ x = v0_DecayVtx.GetX ();
42+ y = v0_DecayVtx.GetY ();
43+ z = v0_DecayVtx.GetZ ();
44+ px = v0_PV.GetPx ();
45+ py = v0_PV.GetPy ();
46+ pz = v0_PV.GetPz ();
4347 pT = RecoDecay::sqrtSumOfSquares (px, py);
4448
45- posPx = pos .GetPx ();
46- posPy = pos .GetPy ();
47- posPz = pos .GetPz ();
48- elePx = ele .GetPx ();
49- elePy = ele .GetPy ();
50- elePz = ele .GetPz ();
49+ posPx = pos_DecayVtx .GetPx ();
50+ posPy = pos_DecayVtx .GetPy ();
51+ posPz = pos_DecayVtx .GetPz ();
52+ elePx = ele_DecayVtx .GetPx ();
53+ elePy = ele_DecayVtx .GetPy ();
54+ elePz = ele_DecayVtx .GetPz ();
5155 posPT = RecoDecay::sqrtSumOfSquares (posPx, posPy);
5256 elePT = RecoDecay::sqrtSumOfSquares (elePx, elePy);
57+ posEta = RecoDecay::eta (std::array{posPx, posPy, posPz});
58+ eleEta = RecoDecay::eta (std::array{elePx, elePy, elePz});
5359
54- chi2ndf = v0.GetChi2 () / v0.GetNDF ();
55- pca = pos.GetDistanceFromParticle (ele);
60+ posTPCNClsShared = pos.tpcNClsShared ();
61+ posTPCNClsFindable = pos.tpcNClsFindable ();
62+ posTPCNClsFindableMinusShared = pos.tpcNClsFindableMinusFound ();
63+ posTPCNClsFindableMinusCrossedRows = pos.tpcNClsFindableMinusCrossedRows ();
64+ posTPCChi2NCl = pos.tpcChi2NCl ();
65+ posTPCSignal = pos.tpcSignal ();
66+ posITSClusterSizes = pos.itsClusterSizes ();
67+ eleTPCNClsShared = ele.tpcNClsShared ();
68+ eleTPCNClsFindable = ele.tpcNClsFindable ();
69+ eleTPCNClsFindableMinusShared = ele.tpcNClsFindableMinusFound ();
70+ eleTPCNClsFindableMinusCrossedRows = ele.tpcNClsFindableMinusCrossedRows ();
71+ eleTPCChi2NCl = ele.tpcChi2NCl ();
72+ eleTPCSignal = ele.tpcSignal ();
73+ eleITSClusterSizes = ele.itsClusterSizes ();
5674
57- float v0mom = RecoDecay::sqrtSumOfSquares (v0.GetPx (), v0.GetPy (), v0.GetPz ());
58- float length = RecoDecay::sqrtSumOfSquares (v0.GetX () - collision.posX (), v0.GetY () - collision.posY (), v0.GetZ () - collision.posZ ());
59- float dcaXV0ToPV = (v0.GetX () - v0.GetPx () * cospa * length / v0mom) - collision.posX ();
60- float dcaYV0ToPV = (v0.GetY () - v0.GetPy () * cospa * length / v0mom) - collision.posY ();
75+ chi2ndf = v0_DecayVtx.GetChi2 () / v0_DecayVtx.GetNDF ();
76+ pca = pos_DecayVtx.GetDistanceFromParticle (ele_DecayVtx);
77+ eta = RecoDecay::eta (std::array{px, py, pz});
78+ posEta = RecoDecay::eta (std::array{posPx, posPy, posPz});
79+ eleEta = RecoDecay::eta (std::array{elePx, elePy, elePz});
80+
81+ float v0mom = RecoDecay::sqrtSumOfSquares (v0_DecayVtx.GetPx (), v0_DecayVtx.GetPy (), v0_DecayVtx.GetPz ());
82+ float length = RecoDecay::sqrtSumOfSquares (v0_DecayVtx.GetX () - collision.posX (), v0_DecayVtx.GetY () - collision.posY (), v0_DecayVtx.GetZ () - collision.posZ ());
83+ float dcaXV0ToPV = (v0_DecayVtx.GetX () - v0_DecayVtx.GetPx () * cospa * length / v0mom) - collision.posX ();
84+ float dcaYV0ToPV = (v0_DecayVtx.GetY () - v0_DecayVtx.GetPy () * cospa * length / v0mom) - collision.posY ();
6185 float tmpSign = (dcaXV0ToPV * dcaYV0ToPV > 0 .f ) ? +1 .f : -1 .f ;
6286
6387 dcaXYV0ToPV = RecoDecay::sqrtSumOfSquares (dcaXV0ToPV, dcaYV0ToPV) * tmpSign;
64- dcaZV0ToPV = (v0 .GetZ () - v0 .GetPz () * cospa * length / v0mom) - collision.posZ ();
88+ dcaZV0ToPV = (v0_DecayVtx .GetZ () - v0_DecayVtx .GetPz () * cospa * length / v0mom) - collision.posZ ();
6589
6690 alpha = v0_alpha (posPx, posPy, posPz, elePx, elePy, elePz);
6791 qt = v0_qt (posPx, posPy, posPz, elePx, elePy, elePz);
6892
6993 this ->cospa = cospa;
94+ this ->cospaRZ = cospaRZ;
95+ this ->cospaXY = cospaXY;
7096 this ->psipair = psipair;
7197 this ->phiv = phiv;
7298 this ->centType = centType;
99+ this ->posdcaXY = posdcaXY;
100+ this ->eledcaXY = eledcaXY;
101+ this ->posdcaZ = posdcaZ;
102+ this ->eledcaZ = eledcaZ;
73103
74104 switch (centType) {
75105 case CentType::CentFT0A:
@@ -87,6 +117,9 @@ struct V0PhotonCandidate {
87117 // Set-Method for V0PhotonCut
88118 void setPhoton (const auto & v0, const auto & pos, const auto & ele, float cent, CentType centType)
89119 {
120+ x = v0.vx ();
121+ y = v0.vy ();
122+ z = v0.vz ();
90123 px = v0.px ();
91124 py = v0.py ();
92125 pz = v0.pz ();
@@ -100,14 +133,37 @@ struct V0PhotonCandidate {
100133 elePz = ele.pz ();
101134 posPT = pos.pt ();
102135 elePT = ele.pt ();
136+ posEta = pos.eta ();
137+ eleEta = ele.eta ();
138+ posdcaXY = pos.dcaXY ();
139+ posdcaZ = pos.dcaZ ();
140+ eledcaXY = ele.dcaXY ();
141+ eledcaZ = ele.dcaZ ();
142+ posTPCNClsShared = pos.tpcNClsShared ();
143+ posTPCNClsFindable = pos.tpcNClsFindable ();
144+ posTPCNClsFindableMinusShared = pos.tpcNClsFindableMinusFound ();
145+ posTPCNClsFindableMinusCrossedRows = pos.tpcNClsFindableMinusCrossedRows ();
146+ posTPCChi2NCl = pos.tpcChi2NCl ();
147+ posTPCSignal = pos.tpcSignal ();
148+ posITSClusterSizes = pos.itsClusterSizes ();
149+ eleTPCNClsShared = ele.tpcNClsShared ();
150+ eleTPCNClsFindable = ele.tpcNClsFindable ();
151+ eleTPCNClsFindableMinusShared = ele.tpcNClsFindableMinusFound ();
152+ eleTPCNClsFindableMinusCrossedRows = ele.tpcNClsFindableMinusCrossedRows ();
153+ eleTPCChi2NCl = ele.tpcChi2NCl ();
154+ eleTPCSignal = ele.tpcSignal ();
155+ eleITSClusterSizes = ele.itsClusterSizes ();
103156
104157 chi2ndf = v0.chiSquareNDF ();
105158 pca = v0.pca ();
159+ eta = v0.eta ();
106160
107161 dcaXYV0ToPV = v0.dcaXYtopv ();
108162 dcaZV0ToPV = v0.dcaZtopv ();
109163
110164 cospa = v0.cospa ();
165+ cospaRZ = v0.cospaRZ ();
166+ cospaXY = v0.cospaXY ();
111167 alpha = v0.alpha ();
112168 qt = v0.qtarm ();
113169 psipair = 999 .f ; // default if V0PhotonPhiVPsi table is not included
@@ -131,6 +187,14 @@ struct V0PhotonCandidate {
131187 float getPhiV () const { return phiv; }
132188 float getPsiPair () const { return psipair; }
133189 float getCosPA () const { return cospa; }
190+ float getCosPARZ () const { return cospaRZ; }
191+ float getCosPAXY () const { return cospaXY; }
192+ float getEta () const { return eta; }
193+ float getPosEta () const { return posEta; }
194+ float getEleEta () const { return eleEta; }
195+ float getX () const { return x; }
196+ float getY () const { return y; }
197+ float getZ () const { return z; }
134198 float getPx () const { return px; }
135199 float getPy () const { return py; }
136200 float getPz () const { return pz; }
@@ -141,11 +205,32 @@ struct V0PhotonCandidate {
141205 float getElePx () const { return elePx; }
142206 float getElePy () const { return elePy; }
143207 float getElePz () const { return elePz; }
208+ float getPosDcaXY () const { return posdcaXY; }
209+ float getPosDcaZ () const { return posdcaZ; }
210+ float getEleDcaXY () const { return eledcaXY; }
211+ float getEleDcaZ () const { return eledcaZ; }
212+ float getPosTPCNClsShared () const { return posTPCNClsShared; }
213+ float getPosTPCNClsFindable () const { return posTPCNClsFindable; }
214+ float getPosTPCNClsFindableMinusShared () const { return posTPCNClsFindableMinusShared; }
215+ float getPosTPCNClsFindableMinusCrossedRows () const { return posTPCNClsFindableMinusCrossedRows; }
216+ float getPosTPCChi2NCl () const { return posTPCChi2NCl; }
217+ float getPosTPCSignal () const { return posTPCSignal; }
218+ float getPosITSClusterSizes () const { return posITSClusterSizes; }
219+ float getEleTPCNClsShared () const { return eleTPCNClsShared; }
220+ float getEleTPCNClsFindable () const { return eleTPCNClsFindable; }
221+ float getEleTPCNClsFindableMinusShared () const { return eleTPCNClsFindableMinusShared; }
222+ float getEleTPCNClsFindableMinusCrossedRows () const { return eleTPCNClsFindableMinusCrossedRows; }
223+ float getEleTPCChi2NCl () const { return eleTPCChi2NCl; }
224+ float getEleTPCSignal () const { return eleTPCSignal; }
225+ float getEleITSClusterSizes () const { return eleITSClusterSizes; }
144226 float getCent () const { return cent; }
145227 float getPCA () const { return pca; }
146228 CentType getCentType () const { return centType; }
147229
148230 private:
231+ float x;
232+ float y;
233+ float z;
149234 float px;
150235 float py;
151236 float pz;
@@ -165,9 +250,32 @@ struct V0PhotonCandidate {
165250 float phiv;
166251 float psipair;
167252 float cospa;
253+ float cospaRZ;
254+ float cospaXY;
168255 float chi2ndf;
169256 float cent;
170257 float pca;
258+ float eta;
259+ float posEta;
260+ float eleEta;
261+ float posdcaXY;
262+ float posdcaZ;
263+ float eledcaXY;
264+ float eledcaZ;
265+ float posTPCNClsShared;
266+ float posTPCNClsFindable;
267+ float posTPCNClsFindableMinusShared;
268+ float posTPCNClsFindableMinusCrossedRows;
269+ float posTPCChi2NCl;
270+ float posTPCSignal;
271+ float posITSClusterSizes;
272+ float eleTPCNClsShared;
273+ float eleTPCNClsFindable;
274+ float eleTPCNClsFindableMinusShared;
275+ float eleTPCNClsFindableMinusCrossedRows;
276+ float eleTPCChi2NCl;
277+ float eleTPCSignal;
278+ float eleITSClusterSizes;
171279 CentType centType;
172280};
173281
0 commit comments