AliRoot Core  3dc7879 (3dc7879)
AliAODv0.h
Go to the documentation of this file.
1 #ifndef ALIAODV0_H
2 #define ALIAODV0_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
12 
13 #include "AliAODRecoDecay.h"
14 
15 class AliAODv0 : public AliAODRecoDecay {
16 
17 public:
18 
19  AliAODv0();
20  AliAODv0(AliAODVertex *rAODVertex, Double_t rDcaV0Daughters, Double_t rDcaV0ToPrimVertex,
21  const Double_t *rMomPos, const Double_t *rMomNeg, Double_t *rDcaDaughterToPrimVertex);
22  virtual ~AliAODv0();
23 
24  AliAODv0(const AliAODv0& rAliAODv0);
25  AliAODv0& operator=(const AliAODv0& rAliAODv0);
26 
27  void Fill(AliAODVertex *rAODVertex, Double_t rDcaV0Daughters, Double_t rDcaV0ToPrimVertex,
28  const Double_t *rMomPos, const Double_t *rMomNeg, const Double_t *rDcaDaughterToPrimVertex);
29  void ResetV0();
30  void Print(Option_t* option = "") const;
31 
32  void SetOnFlyStatus(Bool_t status){fOnFlyStatus=status;}
33  Bool_t GetOnFlyStatus() const {return fOnFlyStatus;}
34 
35  Double_t DecayVertexV0X() const;
36  Double_t DecayVertexV0Y() const;
37  Double_t DecayVertexV0Z() const;
38 
39  Double_t DecayLengthV0(const Double_t *) const;
40 
41  Double_t DcaV0Daughters() const;
42  Double_t DcaV0ToPrimVertex() const;
43  Double_t DcaPosToPrimVertex() const;
44  Double_t DcaNegToPrimVertex() const;
45  Double_t RadiusV0() const;
46  Double_t OpenAngleV0() const;
47 
48  Double_t MomPosX() const;
49  Double_t MomPosY() const;
50  Double_t MomPosZ() const;
51  Double_t MomNegX() const;
52  Double_t MomNegY() const;
53  Double_t MomNegZ() const;
54 
55  Double_t Chi2V0() const;
56 
57  Double_t MomV0X() const;
58  Double_t MomV0Y() const;
59  Double_t MomV0Z() const;
60 
61  Double_t Ptot2Pos() const;
62  Double_t Ptot2Neg() const;
63  Double_t Ptot2V0() const;
64  Double_t Pt2V0() const;
65  Double_t MomPosAlongV0() const;
66  Double_t MomNegAlongV0() const;
67  Double_t AlphaV0() const;
68  Double_t PtArmV0() const;
69  Double_t EPosProton() const;
70  Double_t ENegProton() const;
71  Double_t EPosPion() const;
72  Double_t ENegPion() const;
73  Double_t ELambda() const;
74  Double_t EK0Short() const;
75  Double_t MassLambda() const;
76  Double_t MassAntiLambda() const;
77  Double_t MassK0Short() const;
78  Double_t RapK0Short() const;
79  Double_t RapLambda() const;
80  Double_t PseudoRapV0() const;
81  Double_t PseudoRapPos() const;
82  Double_t PseudoRapNeg() const;
83 
84  Short_t GetPosID() const;
85  Short_t GetNegID() const;
86  Int_t GetLabel() const {return -1;} // Dummy
87  Int_t PdgCode() const {return 0;} // Dummy
88 
89  virtual Bool_t GetPxPyPz(Double_t */*p*/) const { return kFALSE; }
90  virtual void SetID(Short_t /*id*/) {;}
91 
92 
93 protected:
94  Double32_t fDcaV0ToPrimVertex;
95  Bool_t fOnFlyStatus;
96  // "on fly" during the tracking
97  ClassDef(AliAODv0,2)
98 };
99 
100 inline Double_t AliAODv0::DecayVertexV0X() const {return this->GetSecVtxX();}
101 inline Double_t AliAODv0::DecayVertexV0Y() const {return this->GetSecVtxY();}
102 inline Double_t AliAODv0::DecayVertexV0Z() const {return this->GetSecVtxZ();}
103 
104 inline Double_t AliAODv0::DecayLengthV0(const Double_t *tParentVertexPosition) const {
105  return ::sqrt(::pow(DecayVertexV0X() - tParentVertexPosition[0],2) +
106  ::pow(DecayVertexV0Y() - tParentVertexPosition[1],2) +
107  ::pow(DecayVertexV0Z() - tParentVertexPosition[2],2));
108 }
109 
110 inline Double_t AliAODv0::DcaV0Daughters() const {return fDCA[0];}
111 inline Double_t AliAODv0::DcaV0ToPrimVertex() const {return fDcaV0ToPrimVertex;}
112 inline Double_t AliAODv0::DcaPosToPrimVertex() const {return fd0[0];}
113 inline Double_t AliAODv0::DcaNegToPrimVertex() const {return fd0[1];}
114 
115 inline Double_t AliAODv0::RadiusV0() const {
116  return RadiusSecVtx();
117 }
118 
119 inline Double_t AliAODv0::OpenAngleV0() const {
120  Double_t lScalPtot1Ptot2 = PxProng(0)*PxProng(1)+PyProng(0)*PyProng(1)+PzProng(0)*PzProng(1);
121  Double_t lPtot1xPtot2 = Ptot2Pos()*Ptot2Neg();
122  return ::acos(lScalPtot1Ptot2/::sqrt(lPtot1xPtot2) );
123 }
124 
125 inline Double_t AliAODv0::MomPosX() const {return fPx[0];}
126 inline Double_t AliAODv0::MomPosY() const {return fPy[0];}
127 inline Double_t AliAODv0::MomPosZ() const {return fPz[0];}
128 inline Double_t AliAODv0::MomNegX() const {return fPx[1];}
129 inline Double_t AliAODv0::MomNegY() const {return fPy[1];}
130 inline Double_t AliAODv0::MomNegZ() const {return fPz[1];}
131 
132 inline Double_t AliAODv0::Chi2V0() const {return GetSecondaryVtx()->GetChi2perNDF();}
133 
134 // Compare eventually AliAODv0::MomV0X() and AliAODRecoDecay::Px()
135 inline Double_t AliAODv0::MomV0X() const {return MomPosX()+MomNegX();}
136 inline Double_t AliAODv0::MomV0Y() const {return MomPosY()+MomNegY();}
137 inline Double_t AliAODv0::MomV0Z() const {return MomPosZ()+MomNegZ();}
138 
139 inline Double_t AliAODv0::Ptot2Pos() const {
140  return (::pow(MomPosX(),2) + ::pow(MomPosY(),2) + ::pow(MomPosZ(),2) );
141 }
142 inline Double_t AliAODv0::Ptot2Neg() const {
143  return (::pow(MomNegX(),2) + ::pow(MomNegY(),2) + ::pow(MomNegZ(),2) );
144 }
145 inline Double_t AliAODv0::Ptot2V0() const {return ( Pt2V0() + ::pow(MomV0Z(),2) );}
146 inline Double_t AliAODv0::Pt2V0() const {
147  return (::pow(MomV0X(),2) + ::pow(MomV0Y(),2) );
148 }
149 
150 inline Double_t AliAODv0::MomPosAlongV0() const {
151  Double_t lPtot2V0 = Ptot2V0();
152  if (lPtot2V0)
153  return (MomPosX()*MomV0X() +
154  MomPosY()*MomV0Y() +
155  MomPosZ()*MomV0Z()) / ::sqrt(lPtot2V0);
156  return 0.;
157 }
158 
159 inline Double_t AliAODv0::MomNegAlongV0() const {
160  Double_t lPtot2V0 = Ptot2V0();
161  if (lPtot2V0)
162  return (MomNegX()*MomV0X() +
163  MomNegY()*MomV0Y() +
164  MomNegZ()*MomV0Z()) / ::sqrt(lPtot2V0);
165  return 0.;
166 }
167 
168 inline Double_t AliAODv0::AlphaV0() const {
169  return Alpha();
170 }
171 inline Double_t AliAODv0::PtArmV0() const {
172  return QtProng(0);
173 }
174 
175 inline Double_t AliAODv0::EPosProton() const {
176  return EProng(0,2212);
177 }
178 
179 inline Double_t AliAODv0::ENegProton() const {
180  return EProng(1,2212);
181 }
182 
183 inline Double_t AliAODv0::EPosPion() const {
184  return EProng(0,211);
185 }
186 
187 inline Double_t AliAODv0::ENegPion() const {
188  return EProng(1,211);
189 }
190 
191 inline Double_t AliAODv0::ELambda() const {
192  return E(3122);
193 }
194 
195 inline Double_t AliAODv0::EK0Short() const {
196  return E(310);
197 }
198 
199 inline Double_t AliAODv0::MassLambda() const {
200  return InvMass2Prongs(0,1,2212,211);
201 }
202 
203 inline Double_t AliAODv0::MassAntiLambda() const {
204  return InvMass2Prongs(0,1,211,2212);
205 }
206 
207 inline Double_t AliAODv0::MassK0Short() const {
208  return InvMass2Prongs(0,1,211,211);
209 }
210 
211 inline Double_t AliAODv0::RapK0Short() const {
212  return Y(310);
213 }
214 
215 inline Double_t AliAODv0::RapLambda() const {
216  return Y(3122);
217 }
218 
219 inline Double_t AliAODv0::PseudoRapV0() const {
220  return Eta();
221 }
222 
223 inline Double_t AliAODv0::PseudoRapPos() const {
224  return EtaProng(0);
225 }
226 
227 inline Double_t AliAODv0::PseudoRapNeg() const {
228  return EtaProng(1);
229 }
230 //----------------------------------------------------------------------------
231 
232 #endif
Double_t MomPosAlongV0() const
Definition: AliAODv0.h:150
Double_t MassLambda() const
Definition: AliAODv0.h:199
Double_t ELambda() const
Definition: AliAODv0.h:191
Double32_t fDcaV0ToPrimVertex
dca of V0 to primary vertex
Definition: AliAODv0.h:94
Double_t EProng(Int_t ip, UInt_t pdg) const
void ResetV0()
Definition: AliAODv0.cxx:105
Double_t RapLambda() const
Definition: AliAODv0.h:215
Double_t OpenAngleV0() const
Definition: AliAODv0.h:119
Double_t MomV0X() const
Definition: AliAODv0.h:135
Double_t MassAntiLambda() const
Definition: AliAODv0.h:203
virtual ~AliAODv0()
Definition: AliAODv0.cxx:79
Double_t DcaNegToPrimVertex() const
Definition: AliAODv0.h:113
Double_t MassK0Short() const
Definition: AliAODv0.h:207
Short_t GetPosID() const
Definition: AliAODv0.cxx:131
Double_t DecayVertexV0Z() const
Definition: AliAODv0.h:102
Double_t DcaV0ToPrimVertex() const
Definition: AliAODv0.h:111
Double_t EPosProton() const
Definition: AliAODv0.h:175
Short_t GetNegID() const
Definition: AliAODv0.cxx:137
Double_t GetSecVtxY() const
Double_t MomNegAlongV0() const
Definition: AliAODv0.h:159
Double_t PxProng(Int_t ip) const
Double_t Ptot2V0() const
Definition: AliAODv0.h:145
Double_t MomNegY() const
Definition: AliAODv0.h:129
Double_t Ptot2Pos() const
Definition: AliAODv0.h:139
Double_t RadiusV0() const
Definition: AliAODv0.h:115
Double_t EtaProng(Int_t ip) const
Double_t MomV0Z() const
Definition: AliAODv0.h:137
virtual void SetID(Short_t)
Definition: AliAODv0.h:90
Int_t PdgCode() const
Definition: AliAODv0.h:87
void SetOnFlyStatus(Bool_t status)
Definition: AliAODv0.h:32
Double_t ENegPion() const
Definition: AliAODv0.h:187
Double_t MomPosZ() const
Definition: AliAODv0.h:127
Double_t DecayVertexV0X() const
Definition: AliAODv0.h:100
Double_t EPosPion() const
Definition: AliAODv0.h:183
Double_t MomV0Y() const
Definition: AliAODv0.h:136
void Print(Option_t *option="") const
Definition: AliAODv0.cxx:143
AliAODv0()
Definition: AliAODv0.cxx:21
Bool_t GetOnFlyStatus() const
Definition: AliAODv0.h:33
Double_t PzProng(Int_t ip) const
Double_t PtArmV0() const
Definition: AliAODv0.h:171
Double_t Alpha() const
Double_t E() const
Double_t Chi2V0() const
Definition: AliAODv0.h:132
Double_t Y() const
Double_t Ptot2Neg() const
Definition: AliAODv0.h:142
Double_t ENegProton() const
Definition: AliAODv0.h:179
AliAODVertex * GetSecondaryVtx() const
Double_t PseudoRapV0() const
Definition: AliAODv0.h:219
Double_t DcaPosToPrimVertex() const
Definition: AliAODv0.h:112
void Fill(AliAODVertex *rAODVertex, Double_t rDcaV0Daughters, Double_t rDcaV0ToPrimVertex, const Double_t *rMomPos, const Double_t *rMomNeg, const Double_t *rDcaDaughterToPrimVertex)
Definition: AliAODv0.cxx:84
Double_t Pt2V0() const
Definition: AliAODv0.h:146
Double_t AlphaV0() const
Definition: AliAODv0.h:168
AliAODv0 & operator=(const AliAODv0 &rAliAODv0)
Definition: AliAODv0.cxx:68
Double_t MomPosY() const
Definition: AliAODv0.h:126
Double_t PseudoRapPos() const
Definition: AliAODv0.h:223
Double_t EK0Short() const
Definition: AliAODv0.h:195
Double32_t * fDCA
prong-to-prong DCA [cm]
Double_t PyProng(Int_t ip) const
Double_t InvMass2Prongs(Int_t ip1, Int_t ip2, UInt_t pdg1, UInt_t pdg2) const
Analysis Oriented Data (AOD) V0 vertex class.
Definition: AliAODv0.h:15
Double_t MomNegX() const
Definition: AliAODv0.h:128
Double32_t * fPz
pz of tracks at the vertex [GeV/c]
Double_t RadiusSecVtx() const
Bool_t fOnFlyStatus
if kTRUE, then this V0 is recontructed
Definition: AliAODv0.h:95
Class AliAODRecoDecay.
Double32_t * fPx
px of tracks at the vertex [GeV/c]
Double_t DecayLengthV0(const Double_t *) const
Definition: AliAODv0.h:104
Double_t Eta() const
virtual Bool_t GetPxPyPz(Double_t *) const
Definition: AliAODv0.h:89
Double_t GetSecVtxX() const
Double_t QtProng(Int_t ip=0) const
Double32_t * fd0
rphi impact params w.r.t. Primary Vtx [cm]
Double_t MomPosX() const
Definition: AliAODv0.h:125
Double_t GetChi2perNDF() const
Definition: AliAODVertex.h:92
Double32_t * fPy
py of tracks at the vertex [GeV/c]
AOD vertex base class.
Definition: AliAODVertex.h:23
Int_t GetLabel() const
Definition: AliAODv0.h:86
Double_t PseudoRapNeg() const
Definition: AliAODv0.h:227
Double_t DcaV0Daughters() const
Definition: AliAODv0.h:110
Double_t RapK0Short() const
Definition: AliAODv0.h:211
Double_t DecayVertexV0Y() const
Definition: AliAODv0.h:101
Double_t MomNegZ() const
Definition: AliAODv0.h:130
Double_t GetSecVtxZ() const