just one histrogram for now
[u/mrichter/AliRoot.git] / STEER / AliAODv0.h
CommitLineData
61690c9e 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
6//-------------------------------------------------------------------------
7// Analysis Oriented Data (AOD) V0 vertex class
8// Authors: B.Hippolyte, IPHC, hippolyt@in2p3.fr
9// G.Van Buren, BNL, gene@bnl.gov (original STAR MuDsts)
10//-------------------------------------------------------------------------
11
12#include "AliAODRecoDecay.h"
13
14//class AliESDEvent;
15//class AliESDv0;
16
17class AliAODv0 : public AliAODRecoDecay {
18
19public:
20
21 AliAODv0();
22 // AliAODv0(AliESDv0 *rV0Vertex, AliESDEvent *rEvent);
23 AliAODv0(AliAODVertex *rAODVertex, Double_t rDcaV0Daughters, Double_t rDcaV0ToPrimVertex,
24 Double_t *rMomPos, Double_t *rMomNeg, Double_t *rDcaDaughterToPrimVertex);
25 virtual ~AliAODv0();
26
27 AliAODv0(const AliAODv0& rAliAODv0);
28 AliAODv0& operator=(const AliAODv0& rAliAODv0);
29
30 // void Fill(AliESDv0 *rV0Vertex, AliESDEvent *rEvent);
31 void Fill(AliAODVertex *rAODVertex, Double_t rDcaV0Daughters, Double_t rDcaV0ToPrimVertex,
32 Double_t *rMomPos, Double_t *rMomNeg, Double_t *rDcaDaughterToPrimVertex);
33 void ResetV0();
34 void Print(Option_t* option = "") const;
35
36 Double_t DecayVertexV0X() const;
37 Double_t DecayVertexV0Y() const;
38 Double_t DecayVertexV0Z() const;
39
40 Double_t DecayLengthV0(double*) const;
41
42 Double_t DcaV0Daughters() const;
43 Double_t DcaV0ToPrimVertex() const;
44 Double_t DcaPosToPrimVertex() const;
45 Double_t DcaNegToPrimVertex() const;
46 Double_t RadiusV0() const;
47 Double_t OpenAngleV0() const;
48
49 Double_t MomPosX() const;
50 Double_t MomPosY() const;
51 Double_t MomPosZ() const;
52 Double_t MomNegX() const;
53 Double_t MomNegY() const;
54 Double_t MomNegZ() const;
55
56 // Int_t KeyPos() const;
57 // Int_t KeyNeg() const;
58
59 Double_t Chi2V0() const;
60
61 Double_t MomV0X() const;
62 Double_t MomV0Y() const;
63 Double_t MomV0Z() const;
64
65 Double_t Ptot2Pos() const;
66 Double_t Ptot2Neg() const;
67 Double_t Ptot2V0() const;
68 Double_t Pt2V0() const;
69 Double_t MomPosAlongV0() const;
70 Double_t MomNegAlongV0() const;
71 Double_t AlphaV0() const;
72 Double_t PtArmV0() const;
73 Double_t EPosProton() const;
74 Double_t ENegProton() const;
75 Double_t EPosPion() const;
76 Double_t ENegPion() const;
77 Double_t ELambda() const;
78 Double_t EK0Short() const;
79 Double_t MassLambda() const;
80 Double_t MassAntiLambda() const;
81 Double_t MassK0Short() const;
82 Double_t RapK0Short() const;
83 Double_t RapLambda() const;
84 Double_t PseudoRapV0() const;
85 Double_t PseudoRapPos() const;
86 Double_t PseudoRapNeg() const;
87
88
89protected:
90 Double32_t fDcaV0ToPrimVertex; // dca of V0 to primary vertex
91 ClassDef(AliAODv0,1)
92};
93
94inline Double_t AliAODv0::DecayVertexV0X() const {return this->GetSecVtxX();}
95inline Double_t AliAODv0::DecayVertexV0Y() const {return this->GetSecVtxY();}
96inline Double_t AliAODv0::DecayVertexV0Z() const {return this->GetSecVtxZ();}
97
98inline Double_t AliAODv0::DecayLengthV0(double *tParentVertexPosition) const {
99 return ::sqrt(::pow(DecayVertexV0X() - tParentVertexPosition[0],2) +
100 ::pow(DecayVertexV0Y() - tParentVertexPosition[1],2) +
101 ::pow(DecayVertexV0Z() - tParentVertexPosition[2],2));
102}
103
104inline Double_t AliAODv0::DcaV0Daughters() const {return fDCA[0];}
105inline Double_t AliAODv0::DcaV0ToPrimVertex() const {return fDcaV0ToPrimVertex;}
106inline Double_t AliAODv0::DcaPosToPrimVertex() const {return fd0[0];}
107inline Double_t AliAODv0::DcaNegToPrimVertex() const {return fd0[1];}
108
109inline Double_t AliAODv0::RadiusV0() const {
110 return RadiusSecVtx();
111}
112
113inline Double_t AliAODv0::OpenAngleV0() const {
114 Double_t lPtot1xPtot2 = PxProng(0)*PxProng(1)+PyProng(0)*PyProng(1)+PzProng(0)*PzProng(1);
115 Double_t lPtot1Ptot2_2 = Ptot2Pos()*Ptot2Neg();
116 return ::acos(lPtot1xPtot2/::sqrt(lPtot1Ptot2_2) );
117}
118
119inline Double_t AliAODv0::MomPosX() const {return fPx[0];}
120inline Double_t AliAODv0::MomPosY() const {return fPy[0];}
121inline Double_t AliAODv0::MomPosZ() const {return fPz[0];}
122inline Double_t AliAODv0::MomNegX() const {return fPx[1];}
123inline Double_t AliAODv0::MomNegY() const {return fPy[1];}
124inline Double_t AliAODv0::MomNegZ() const {return fPz[1];}
125
126// inline Int_t AliAODv0::KeyPos() const {return fKeyPos;}
127// inline Int_t AliAODv0::KeyNeg() const {return fKeyNeg;}
128
5cc73331 129inline Double_t AliAODv0::Chi2V0() const {return GetSecondaryVtx()->GetChi2perNDF();}
61690c9e 130
131// Compare eventually AliAODv0::MomV0X() and AliAODRecoDecay::Px()
132inline Double_t AliAODv0::MomV0X() const {return MomPosX()+MomNegX();}
133inline Double_t AliAODv0::MomV0Y() const {return MomPosY()+MomNegY();}
134inline Double_t AliAODv0::MomV0Z() const {return MomPosZ()+MomNegZ();}
135
136inline Double_t AliAODv0::Ptot2Pos() const {
137 return (::pow(MomPosX(),2) + ::pow(MomPosY(),2) + ::pow(MomPosZ(),2) );
138}
139inline Double_t AliAODv0::Ptot2Neg() const {
140 return (::pow(MomNegX(),2) + ::pow(MomNegY(),2) + ::pow(MomNegZ(),2) );
141}
142inline Double_t AliAODv0::Ptot2V0() const {return ( Pt2V0() + ::pow(MomV0Z(),2) );}
143inline Double_t AliAODv0::Pt2V0() const {
144 return (::pow(MomV0X(),2) + ::pow(MomV0Y(),2) );
145}
146
147inline Double_t AliAODv0::MomPosAlongV0() const {
148 Double_t lPtot2V0 = Ptot2V0();
149 if (lPtot2V0)
150 return (MomPosX()*MomV0X() +
151 MomPosY()*MomV0Y() +
152 MomPosZ()*MomV0Z()) / ::sqrt(lPtot2V0);
153 return 0.;
154}
155
156inline Double_t AliAODv0::MomNegAlongV0() const {
157 Double_t lPtot2V0 = Ptot2V0();
158 if (lPtot2V0)
159 return (MomNegX()*MomV0X() +
160 MomNegY()*MomV0Y() +
161 MomNegZ()*MomV0Z()) / ::sqrt(lPtot2V0);
162 return 0.;
163}
164
165inline Double_t AliAODv0::AlphaV0() const {
166 return Alpha();
167}
168inline Double_t AliAODv0::PtArmV0() const {
169 return QtProng(0);
170}
171
172inline Double_t AliAODv0::EPosProton() const {
173 return EProng(0,2212);
174}
175
176inline Double_t AliAODv0::ENegProton() const {
177 return EProng(1,2212);
178}
179
180inline Double_t AliAODv0::EPosPion() const {
181 return EProng(0,211);
182}
183
184inline Double_t AliAODv0::ENegPion() const {
185 return EProng(1,211);
186}
187
188inline Double_t AliAODv0::ELambda() const {
189 return E(3122);
190}
191
192inline Double_t AliAODv0::EK0Short() const {
193 return E(310);
194}
195
196inline Double_t AliAODv0::MassLambda() const {
197 return InvMass2Prongs(0,1,2212,211);
198}
199
200inline Double_t AliAODv0::MassAntiLambda() const {
201 return InvMass2Prongs(0,1,211,2212);
202}
203
204inline Double_t AliAODv0::MassK0Short() const {
205 return InvMass2Prongs(0,1,211,211);
206}
207
208inline Double_t AliAODv0::RapK0Short() const {
209 return Y(310);
210}
211
212inline Double_t AliAODv0::RapLambda() const {
213 return Y(3122);
214}
215
216inline Double_t AliAODv0::PseudoRapV0() const {
217 return Eta();
218}
219
220inline Double_t AliAODv0::PseudoRapPos() const {
221 return EtaProng(0);
222}
223
224inline Double_t AliAODv0::PseudoRapNeg() const {
225 return EtaProng(1);
226}
227//----------------------------------------------------------------------------
228
229#endif