AliRoot Core  3dc7879 (3dc7879)
AliESDv0.h
Go to the documentation of this file.
1 #ifndef ALIESDV0_H
2 #define ALIESDV0_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 /* $Id$ */
8 
9 //-------------------------------------------------------------------------
10 // ESD V0 Vertex Class
11 // This class is part of the Event Summary Data set of classes
12 // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
13 // Modified by: Marian Ivanov, CERN, Marian.Ivanov@cern.ch
14 // and Boris Hippolyte,IPHC, hippolyt@in2p3.fr
15 //-------------------------------------------------------------------------
16 
17 #include <TPDGCode.h>
18 
19 #include "AliExternalTrackParam.h"
20 #include "AliVParticle.h"
21 
22 class AliESDV0Params;
23 
24 class AliESDv0 : public AliVParticle {
25 public:
26  enum {kUsedByCascadeBit = BIT(14)};
27  AliESDv0();
28  AliESDv0(const AliExternalTrackParam &t1, Int_t i1,
29  const AliExternalTrackParam &t2, Int_t i2);
30 
31  AliESDv0(const AliESDv0& v0);
32  virtual ~AliESDv0();
33  Int_t Refit();
34  AliESDv0& operator=(const AliESDv0& v0);
35  virtual void Copy(TObject &obj) const;
36 
37 // Start with AliVParticle functions
38  virtual Double_t Px() const { return fNmom[0]+fPmom[0]; }
39  virtual Double_t Py() const { return fNmom[1]+fPmom[1]; }
40  virtual Double_t Pz() const { return fNmom[2]+fPmom[2]; }
41  virtual Double_t Pt() const { return TMath::Sqrt(Px()*Px()+Py()*Py()); }
42  virtual Double_t P() const {
43  return TMath::Sqrt(Px()*Px()+Py()*Py()+Pz()*Pz());
44  }
45  virtual Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
46  virtual Double_t Xv() const { return fPos[0]; }
47  virtual Double_t Yv() const { return fPos[1]; }
48  virtual Double_t Zv() const { return fPos[2]; }
49  virtual Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
50  virtual Double_t OneOverPt() const { return (Pt() != 0.) ? 1./Pt() : -999.; }
51  virtual Double_t Phi() const {return TMath::Pi()+TMath::ATan2(-Py(),-Px()); }
52  virtual Double_t Theta() const {return 0.5*TMath::Pi()-TMath::ATan(Pz()/(Pt()+1.e-13)); }
53  virtual Double_t E() const; // default is KOs but can be changed via ChangeMassHypothesis (defined in the .cxx)
54  virtual Double_t M() const { return GetEffMass(); }
55  virtual Double_t Eta() const { return 0.5*TMath::Log((P()+Pz())/(P()-Pz()+1.e-13)); }
56  virtual Double_t Y() const;
57  virtual Short_t Charge() const { return 0; }
58  virtual Int_t GetLabel() const { return -1; } // temporary
59  virtual const Double_t *PID() const { return 0; } // return PID object ? (to be discussed!)
60 
61  // Then extend the AliVParticle functions
62  Double_t E(Int_t pdg) const;
63  Double_t Y(Int_t pdg) const;
64 
65  // Now the functions for analysis consistency
66  Double_t RapK0Short() const;
67  Double_t RapLambda() const;
68  Double_t AlphaV0() const;
69  Double_t PtArmV0() const;
70 
71  // Eventually the older functions
72  Double_t ChangeMassHypothesis(Int_t code=kK0Short);
73 
74  Int_t GetPdgCode() const {return fPdgCode;}
75  Double_t GetEffMass(UInt_t p1, UInt_t p2) const;
76  Double_t GetEffMassExplicit(Double_t m1, Double_t m2) const;
77  Double_t GetEffMass() const {return fEffMass;}
78  Double_t GetChi2V0() const {return fChi2V0;}
79  void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
80  void GetNPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
81  void GetPPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
82  void GetXYZ(Double_t &x, Double_t &y, Double_t &z) const;
83  Float_t GetD(Double_t x0,Double_t y0) const;
84  Float_t GetD(Double_t x0,Double_t y0,Double_t z0) const;
85  Int_t GetNindex() const {return fNidx;}
86  Int_t GetPindex() const {return fPidx;}
87  void SetDcaV0Daughters(Double_t rDcaV0Daughters=0.);
88  Double_t GetDcaV0Daughters() const {return fDcaV0Daughters;}
89  Float_t GetV0CosineOfPointingAngle(Double_t refPointX, Double_t refPointY, Double_t refPointZ) const;
90  Double_t GetV0CosineOfPointingAngle() const {return fPointAngle;}
91  void SetV0CosineOfPointingAngle(Double_t cpa) {fPointAngle=cpa;}
92  void SetOnFlyStatus(Bool_t status){fOnFlyStatus=status;}
93  Bool_t GetOnFlyStatus() const {return fOnFlyStatus;}
94  const AliExternalTrackParam *GetParamP() const {return &fParamP;}
95  const AliExternalTrackParam *GetParamN() const {return &fParamN;}
96  AliESDVertex GetVertex() const;
97 
98 
99  // **** The following member functions need to be revised ***
100 
101  void GetPosCov(Double_t cov[6])const ; // getter for the covariance matrix of the V0 position
102  Double_t GetSigmaY(); // sigma of y coordinate at vertex posistion
103  Double_t GetSigmaZ(); // sigma of z coordinate at vertex posistion
104  Double_t GetSigmaAP0(); // calculate sigma of Point angle resolution at vertex pos.
105  Double_t GetSigmaD0(); // calculate sigma of position resolution at vertex pos.
106  Double_t GetEffectiveSigmaAP0(); // calculate sigma of point angle resolution at vertex pos. effecive parameterization
107  Double_t GetEffectiveSigmaD0(); // calculate sigma of position resolution at vertex pos.
108  Double_t GetMinimaxSigmaAP0(); // calculate mini-max sigma of point angle resolution
109  Double_t GetMinimaxSigmaD0(); // calculate mini-max sigma of dca resolution
110  Double_t GetLikelihoodAP(Int_t mode0, Int_t mode1); // get likelihood for point angle
111  Double_t GetLikelihoodD(Int_t mode0, Int_t mode1); // get likelihood for DCA
112  Double_t GetLikelihoodC(Int_t mode0, Int_t mode1) const; // get likelihood for Causality
113  //
114  //
115  static const AliESDV0Params & GetParameterization(){return fgkParams;}
116  void SetParamP(const AliExternalTrackParam & paramP) {fParamP = paramP;}
117  void SetParamN(const AliExternalTrackParam & paramN) {fParamN = paramN;}
118  void SetStatus(Int_t status){fStatus=status;}
119  ULong64_t GetStatus() const {return ULong64_t(fStatus);}
120  Int_t GetIndex(Int_t i) const {return (i==0) ? fNidx : fPidx;}
121  void SetIndex(Int_t i, Int_t ind);
122  const Double_t *GetAnglep() const {return fAngle;}
123  Double_t GetRr() const {return fRr;}
124  Double_t GetDistSigma() const {return fDistSigma;}
125  void SetDistSigma(Double_t ds) {fDistSigma=ds;}
126  Float_t GetChi2Before() const {return fChi2Before;}
127  void SetChi2Before(Float_t cb) {fChi2Before=cb;}
128  Float_t GetChi2After() const {return fChi2After;}
129  void SetChi2After(Float_t ca) {fChi2After=ca;}
130  Float_t GetNAfter() const {return fNAfter;}
131  void SetNAfter(Short_t na) {fNAfter=na;}
132  Short_t GetNBefore() const {return fNBefore;}
133  void SetNBefore(Short_t nb) {fNBefore=nb;}
134  void SetCausality(Float_t pb0, Float_t pb1, Float_t pa0, Float_t pa1);
135  const Double_t * GetCausalityP() const {return fCausality;}
136  void SetClusters(const Int_t *clp, const Int_t *clm);
137  const Int_t * GetClusters(Int_t i) const {return fClusters[i];}
138  void SetNormDCAPrim(Float_t nd0, Float_t nd1){fNormDCAPrim[0] = nd0; fNormDCAPrim[1]=nd1;}
139  const Double_t *GetNormDCAPrimP() const {return fNormDCAPrim;}
140  // Dummy
141  Int_t PdgCode() const {return 0;}
142 
143  //virtual Bool_t GetPxPyPz(Double_t */*p*/) const { return kFALSE; }
144  virtual void SetID(Short_t /*id*/) {;}
145  Double_t GetKFInfo(UInt_t p1, UInt_t p2, Int_t type) const;
146  Double_t GetKFInfoScale(UInt_t p1, UInt_t p2, Int_t type, Double_t d1pt, Double_t s1pt, Double_t eLoss=0, Int_t flag=0x3) const;
147  //
148  void SetUsedByCascade(Bool_t v) {SetBit(kUsedByCascadeBit,v);}
149  Bool_t GetUsedByCascade() const {return TestBit(kUsedByCascadeBit);}
150 
151 protected:
152  AliExternalTrackParam fParamN; // external parameters of negative particle
153  AliExternalTrackParam fParamP; // external parameters of positive particle
154 
155  // CKBrev: tkink about revision
156 
157  Double32_t fEffMass; // reconstructed V0's effective mass
158  Double32_t fDcaV0Daughters; // dca between V0's daughters
159  Double32_t fChi2V0; // V0's chi2 value
160  Double32_t fPos[3]; // V0's position (global)
161  Double32_t fPosCov[6]; // covariance matrix of the vertex position
162  Double32_t fNmom[3]; // momentum of the negative daughter (global)
163  Double32_t fPmom[3]; // momentum of the positive daughter (global)
164  Double32_t fNormDCAPrim[2]; // normalize distance to the primary vertex CKBrev
165  Double32_t fRr; //rec position of the vertex CKBrev
166  Double32_t fDistSigma; //sigma of distance CKBrev
167  Double32_t fChi2Before; //chi2 of the tracks before V0 CKBrev
168  Double32_t fChi2After; // chi2 of the tracks after V0 CKBrev
169 
170 
171  Double32_t fCausality[4]; //[0,1,8] causality information - see comments in SetCausality CKBrev
172  Double32_t fAngle[3]; //[-2*pi,2*pi,16]three angles CKBrev
173  Double32_t fPointAngleFi; //[-1,1,16]point angle fi CKBrev
174  Double32_t fPointAngleTh; //[-1,1,16]point angle theta CKBrev
175  Double32_t fPointAngle; //[-1,1,32] cosine of the pointing angle
176 
177 
178  Int_t fPdgCode; // reconstructed V0's type (PDG code)
179  Int_t fClusters[2][6];
180  Int_t fNidx; // index of the negative daughter
181  Int_t fPidx; // index of the positive daughter
182 
183 
184 
185  Short_t fStatus; //status CKBrev
186  Short_t fNBefore; // number of possible points before V0 CKBrev
187  Short_t fNAfter; // number of possible points after V0 CKBrev
188 
189  Bool_t fOnFlyStatus; // if kTRUE, then this V0 is recontructed
190  // "on fly" during the tracking
191 
192  //
193  // parameterization coefficients
194  static const AliESDV0Params fgkParams;
195 
196 private:
197 
198  ClassDef(AliESDv0,6) // ESD V0 vertex
199 };
200 
201 inline
202 void AliESDv0::GetNPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const {
203 px=fNmom[0]; py=fNmom[1]; pz=fNmom[2];
204 }
205 
206 inline
207 void AliESDv0::GetPPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const {
208 px=fPmom[0]; py=fPmom[1]; pz=fPmom[2];
209 }
210 
211 inline
212 void AliESDv0::SetDcaV0Daughters(Double_t rDcaV0Daughters){
213  fDcaV0Daughters=rDcaV0Daughters;
214 }
215 
216 inline
217 void AliESDv0::SetIndex(Int_t i, Int_t ind) {
218  if(i==0)
219  fNidx=ind;
220  else
221  fPidx=ind;
222 }
223 
224 #endif
void SetDistSigma(Double_t ds)
Definition: AliESDv0.h:125
const Int_t * GetClusters(Int_t i) const
Definition: AliESDv0.h:137
void GetPPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const
Definition: AliESDv0.h:207
virtual Bool_t PxPyPz(Double_t p[3]) const
Definition: AliESDv0.h:45
virtual void SetID(Short_t)
Definition: AliESDv0.h:144
Double32_t fAngle[3]
Definition: AliESDv0.h:172
virtual Double_t Pt() const
Definition: AliESDv0.h:41
const Double_t * GetAnglep() const
Definition: AliESDv0.h:122
void SetNormDCAPrim(Float_t nd0, Float_t nd1)
Definition: AliESDv0.h:138
Int_t fNidx
its clusters CKBrev
Definition: AliESDv0.h:180
Bool_t GetUsedByCascade() const
Definition: AliESDv0.h:149
Double32_t fNormDCAPrim[2]
Definition: AliESDv0.h:164
Float_t GetChi2Before() const
Definition: AliESDv0.h:126
Double32_t fEffMass
Definition: AliESDv0.h:157
Int_t GetPindex() const
Definition: AliESDv0.h:86
Double32_t fNmom[3]
Definition: AliESDv0.h:162
Double_t GetLikelihoodD(Int_t mode0, Int_t mode1)
Definition: AliESDv0.cxx:755
virtual Double_t Phi() const
Definition: AliESDv0.h:51
virtual ~AliESDv0()
Definition: AliESDv0.cxx:399
virtual Double_t M() const
Definition: AliESDv0.h:54
Int_t GetPdgCode() const
Definition: AliESDv0.h:74
Short_t fStatus
Definition: AliESDv0.h:185
virtual Double_t E() const
Definition: AliESDv0.cxx:406
virtual Double_t Y() const
Definition: AliESDv0.cxx:413
Short_t fNBefore
Definition: AliESDv0.h:186
void SetUsedByCascade(Bool_t v)
Definition: AliESDv0.h:148
void GetNPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const
Definition: AliESDv0.h:202
Double32_t fDcaV0Daughters
Definition: AliESDv0.h:158
void SetCausality(Float_t pb0, Float_t pb1, Float_t pa0, Float_t pa1)
Definition: AliESDv0.cxx:819
Double32_t fDistSigma
Definition: AliESDv0.h:166
virtual Double_t Zv() const
Definition: AliESDv0.h:48
Bool_t GetOnFlyStatus() const
Definition: AliESDv0.h:93
void SetNBefore(Short_t nb)
Definition: AliESDv0.h:133
Int_t fClusters[2][6]
Definition: AliESDv0.h:179
const Double_t * GetNormDCAPrimP() const
Definition: AliESDv0.h:139
static const AliESDV0Params & GetParameterization()
Definition: AliESDv0.h:115
Double_t GetSigmaD0()
Definition: AliESDv0.cxx:630
Double_t GetKFInfoScale(UInt_t p1, UInt_t p2, Int_t type, Double_t d1pt, Double_t s1pt, Double_t eLoss=0, Int_t flag=0x3) const
Definition: AliESDv0.cxx:940
AliExternalTrackParam fParamN
Definition: AliESDv0.h:152
Float_t p[]
Definition: kNNTest.C:133
virtual Bool_t XvYvZv(Double_t x[3]) const
Definition: AliESDv0.h:49
virtual void Copy(TObject &obj) const
Definition: AliESDv0.cxx:387
void SetParamP(const AliExternalTrackParam &paramP)
Definition: AliESDv0.h:116
void SetStatus(Int_t status)
Definition: AliESDv0.h:118
Double32_t fChi2Before
Definition: AliESDv0.h:167
void SetOnFlyStatus(Bool_t status)
Definition: AliESDv0.h:92
void GetXYZ(Double_t &x, Double_t &y, Double_t &z) const
Definition: AliESDv0.cxx:541
Int_t PdgCode() const
Definition: AliESDv0.h:141
Double_t AlphaV0() const
Definition: AliESDv0.cxx:451
Int_t fPidx
Definition: AliESDv0.h:181
Double_t GetSigmaZ()
Definition: AliESDv0.cxx:620
Double_t GetRr() const
Definition: AliESDv0.h:123
virtual Double_t Theta() const
Definition: AliESDv0.h:52
Double32_t fPointAngleTh
Definition: AliESDv0.h:174
Double32_t fRr
Definition: AliESDv0.h:165
virtual Short_t Charge() const
Definition: AliESDv0.h:57
Double_t GetLikelihoodAP(Int_t mode0, Int_t mode1)
Definition: AliESDv0.cxx:719
Double_t GetEffMass() const
Definition: AliESDv0.h:77
Double32_t fChi2After
Definition: AliESDv0.h:168
Double_t RapK0Short() const
Definition: AliESDv0.cxx:437
const AliExternalTrackParam * GetParamP() const
Definition: AliESDv0.h:94
virtual Int_t GetLabel() const
Definition: AliESDv0.h:58
virtual const Double_t * PID() const
Definition: AliESDv0.h:59
virtual Double_t Xv() const
Definition: AliESDv0.h:46
Float_t GetNAfter() const
Definition: AliESDv0.h:130
Double_t GetMinimaxSigmaD0()
Definition: AliESDv0.cxx:706
virtual Double_t Yv() const
Definition: AliESDv0.h:47
const Double_t * GetCausalityP() const
Definition: AliESDv0.h:135
Double_t GetV0CosineOfPointingAngle() const
Definition: AliESDv0.h:90
AliESDVertex GetVertex() const
Definition: AliESDv0.cxx:1007
Double_t ChangeMassHypothesis(Int_t code=kK0Short)
Definition: AliESDv0.cxx:477
void SetDcaV0Daughters(Double_t rDcaV0Daughters=0.)
Definition: AliESDv0.h:212
Double32_t fPos[3]
Definition: AliESDv0.h:160
Double32_t fCausality[4]
Definition: AliESDv0.h:171
Double32_t fPointAngle
Definition: AliESDv0.h:175
Int_t fPdgCode
Definition: AliESDv0.h:178
AliExternalTrackParam fParamP
Definition: AliESDv0.h:153
Bool_t fOnFlyStatus
Definition: AliESDv0.h:189
Int_t GetNindex() const
Definition: AliESDv0.h:85
void SetClusters(const Int_t *clp, const Int_t *clm)
Definition: AliESDv0.cxx:829
AliTPCcalibV0 v0
void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const
Definition: AliESDv0.cxx:532
AliESDv0 & operator=(const AliESDv0 &v0)
Definition: AliESDv0.cxx:336
Double32_t fPmom[3]
Definition: AliESDv0.h:163
void SetIndex(Int_t i, Int_t ind)
Definition: AliESDv0.h:217
Short_t GetNBefore() const
Definition: AliESDv0.h:132
Double_t GetDistSigma() const
Definition: AliESDv0.h:124
Double_t GetEffMassExplicit(Double_t m1, Double_t m2) const
Definition: AliESDv0.cxx:881
Int_t Refit()
Definition: AliESDv0.cxx:280
void GetPosCov(Double_t cov[6]) const
Definition: AliESDv0.cxx:604
virtual Double_t Eta() const
Definition: AliESDv0.h:55
Double_t PtArmV0() const
Definition: AliESDv0.cxx:466
Int_t GetIndex(Int_t i) const
Definition: AliESDv0.h:120
Double_t GetKFInfo(UInt_t p1, UInt_t p2, Int_t type) const
Definition: AliESDv0.cxx:904
static const AliESDV0Params fgkParams
Definition: AliESDv0.h:194
void SetNAfter(Short_t na)
Definition: AliESDv0.h:131
Double_t GetMinimaxSigmaAP0()
Definition: AliESDv0.cxx:695
virtual Double_t Px() const
Definition: AliESDv0.h:38
void SetChi2Before(Float_t cb)
Definition: AliESDv0.h:127
Double_t GetSigmaAP0()
Definition: AliESDv0.cxx:648
Double_t GetSigmaY()
Definition: AliESDv0.cxx:610
Double_t GetEffectiveSigmaAP0()
Definition: AliESDv0.cxx:681
virtual Double_t Py() const
Definition: AliESDv0.h:39
AliESDv0()
Definition: AliESDv0.cxx:45
virtual Double_t P() const
Definition: AliESDv0.h:42
virtual Double_t OneOverPt() const
Definition: AliESDv0.h:50
Float_t GetD(Double_t x0, Double_t y0) const
Definition: AliESDv0.cxx:550
Double_t GetEffectiveSigmaD0()
Definition: AliESDv0.cxx:666
virtual Double_t Pz() const
Definition: AliESDv0.h:40
Double_t GetChi2V0() const
Definition: AliESDv0.h:78
void SetChi2After(Float_t ca)
Definition: AliESDv0.h:129
Double32_t fPointAngleFi
Definition: AliESDv0.h:173
Double_t GetLikelihoodC(Int_t mode0, Int_t mode1) const
Definition: AliESDv0.cxx:794
void SetParamN(const AliExternalTrackParam &paramN)
Definition: AliESDv0.h:117
ULong64_t GetStatus() const
Definition: AliESDv0.h:119
void SetV0CosineOfPointingAngle(Double_t cpa)
Definition: AliESDv0.h:91
const AliExternalTrackParam * GetParamN() const
Definition: AliESDv0.h:95
Float_t GetChi2After() const
Definition: AliESDv0.h:128
Double32_t fPosCov[6]
Definition: AliESDv0.h:161
Double32_t fChi2V0
Definition: AliESDv0.h:159
Short_t fNAfter
Definition: AliESDv0.h:187
Double_t RapLambda() const
Definition: AliESDv0.cxx:444
Double_t GetDcaV0Daughters() const
Definition: AliESDv0.h:88