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