]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESDv0.h
Compilation on Windoiws/Cygwin
[u/mrichter/AliRoot.git] / STEER / AliESDv0.h
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 <TObject.h>
18 #include <TPDGCode.h>
19 #include "AliESDV0Params.h"
20 #include "AliExternalTrackParam.h"
21
22 class AliESDv0 : public TObject {
23 public:
24   AliESDv0();
25   AliESDv0(const AliExternalTrackParam &t1, Int_t i1,
26            const AliExternalTrackParam &t2, Int_t i2);
27
28   AliESDv0(const AliESDv0&);
29   virtual ~AliESDv0();
30   AliESDv0& operator=(const AliESDv0&);
31   virtual void Copy(TObject &obj) const;
32
33   Double_t ChangeMassHypothesis(Int_t code=kK0Short); 
34
35   Int_t    GetPdgCode() const {return fPdgCode;}
36   Float_t  GetEffMass(UInt_t p1, UInt_t p2);
37   Double_t  GetEffMass() const {return fEffMass;}
38   Double_t  GetChi2V0()  const {return fChi2V0;}
39   void     GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
40   void     GetNPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
41   void     GetPPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
42   void     GetXYZ(Double_t &x, Double_t &y, Double_t &z) const;
43   Float_t  GetD(Double_t x0=0.,Double_t y0=0.,Double_t z0=0.) const;
44   Int_t    GetNindex() const {return fNidx;}
45   Int_t    GetPindex() const {return fPidx;}
46   void     SetDcaV0Daughters(Double_t rDcaV0Daughters=0.);
47   Double_t  GetDcaV0Daughters() {return fDcaV0Daughters;}
48   Float_t  GetV0CosineOfPointingAngle(Double_t&, Double_t&, Double_t&) const;
49   Double_t  GetV0CosineOfPointingAngle() const {return fPointAngle;}
50   void     SetV0CosineOfPointingAngle(Double_t cpa) {fPointAngle=cpa;}
51   void     SetOnFlyStatus(Bool_t status){fOnFlyStatus=status;}
52   Bool_t   GetOnFlyStatus() const {return fOnFlyStatus;}
53   const AliExternalTrackParam *GetParamP() const {return &fParamP;}
54   const AliExternalTrackParam *GetParamN() const {return &fParamN;}
55
56
57
58   // **** The following member functions need to be revised ***
59
60   void GetPosCov(Double_t cov[6])const ; // getter for the covariance matrix of the V0 position 
61   Double_t GetSigmaY();     // sigma of y coordinate at vertex posistion
62   Double_t GetSigmaZ();     // sigma of z coordinate at vertex posistion
63   Double_t GetSigmaAP0();   // calculate sigma of Point angle resolution at vertex pos.
64   Double_t GetSigmaD0();    // calculate sigma of position resolution at vertex pos.
65   Double_t GetEffectiveSigmaAP0();   // calculate sigma of point angle resolution at vertex pos. effecive parameterization
66   Double_t GetEffectiveSigmaD0();    // calculate sigma of position resolution at vertex pos.
67   Double_t GetMinimaxSigmaAP0();    // calculate mini-max sigma of point angle resolution
68   Double_t GetMinimaxSigmaD0();     // calculate mini-max sigma of dca resolution
69   Double_t GetLikelihoodAP(Int_t mode0, Int_t mode1);   // get likelihood for point angle
70   Double_t GetLikelihoodD(Int_t mode0, Int_t mode1);    // get likelihood for DCA
71   Double_t GetLikelihoodC(Int_t mode0, Int_t mode1);    // get likelihood for Causality
72   //
73   //
74   static const AliESDV0Params & GetParameterization(){return fgkParams;}
75   void SetParamP(const AliExternalTrackParam & paramP) {fParamP = paramP;}
76   void SetParamN(const AliExternalTrackParam & paramN) {fParamN = paramN;}
77   void SetStatus(Int_t status){fStatus=status;}
78   Int_t GetStatus() const {return fStatus;}
79   Int_t GetIndex(Int_t i) const {return (i==0) ? fNidx : fPidx;}
80   void SetIndex(Int_t i, Int_t ind) {(i==0) ? (fNidx=ind) : (fPidx=ind);}
81   Double_t *GetAnglep() {return fAngle;}
82   Double_t GetRr() const {return fRr;}
83   Double_t GetDistSigma() const {return fDistSigma;}
84   void SetDistSigma(Double_t ds) {fDistSigma=ds;}
85   Float_t GetChi2Before() const {return fChi2Before;}
86   void SetChi2Before(Float_t cb) {fChi2Before=cb;}
87   Float_t GetChi2After() const {return fChi2After;}
88   void SetChi2After(Float_t ca) {fChi2After=ca;}
89   Float_t GetNAfter() const {return fNAfter;}
90   void SetNAfter(Short_t na) {fNAfter=na;}
91   Short_t GetNBefore() const {return fNBefore;}
92   void SetNBefore(Short_t nb) {fNBefore=nb;}  
93   void SetCausality(Float_t pb0, Float_t pb1, Float_t pa0, Float_t pa1);
94   const Double_t * GetCausalityP() const {return fCausality;}
95   void SetClusters(Int_t *clp, Int_t *clm);
96   const Int_t * GetClusters(Int_t i) const {return fClusters[i];}
97   void SetNormDCAPrim(Float_t nd0, Float_t nd1){fNormDCAPrim[0] = nd0; fNormDCAPrim[1]=nd1;}
98   const Double_t  *GetNormDCAPrimP() const {return fNormDCAPrim;}
99
100 protected:
101   AliExternalTrackParam fParamN;  // external parameters of negative particle
102   AliExternalTrackParam fParamP;  // external parameters of positive particle
103
104   // CKBrev: tkink about revision
105
106   Double32_t   fEffMass;          // reconstructed V0's effective mass
107   Double32_t   fDcaV0Daughters;   // dca between V0's daughters
108   Double32_t   fChi2V0;           // V0's chi2 value
109   Double32_t   fPos[3];         // V0's position (global)
110   Double32_t   fPosCov[6];      // covariance matrix of the vertex position
111   Double32_t   fNmom[3];        // momentum of the negative daughter (global)
112   Double32_t   fPmom[3];        // momentum of the positive daughter (global)
113   Double32_t   fNormDCAPrim[2];  // normalize distance to the priary vertex CKBrev
114   Double32_t   fRr;         //rec position of the vertex CKBrev
115   Double32_t   fDistSigma; //sigma of distance CKBrev
116   Double32_t        fChi2Before;   //chi2 of the tracks before V0 CKBrev
117   Double32_t        fChi2After;   // chi2 of the tracks after V0 CKBrev
118
119
120   Double32_t        fCausality[4]; //[0,1,8] causality information - see comments in SetCausality CKBrev
121   Double32_t        fAngle[3];   //[-2*pi,2*pi,16]three angles CKBrev
122   Double32_t        fPointAngleFi; //[-1,1,16]point angle fi CKBrev
123   Double32_t        fPointAngleTh; //[-1,1,16]point angle theta CKBrev
124   Double32_t        fPointAngle;   //[-1,1,16] cosine of the pointing angle
125
126
127   Int_t fPdgCode;             // reconstructed V0's type (PDG code)
128   Int_t fClusters[2][6];      //! its clusters CKBrev  
129   Int_t fNidx;                // index of the negative daughter
130   Int_t fPidx;                // index of the positive daughter
131
132
133
134   Short_t    fStatus;     //status CKBrev
135   Short_t    fNBefore;      // number of possible points before V0 CKBrev
136   Short_t    fNAfter;      // number of possible points after V0 CKBrev
137
138   Bool_t     fOnFlyStatus;    // if kTRUE, then this V0 is recontructed
139                             // "on fly" during the tracking
140
141   //
142   // parameterization coefficients
143   static const AliESDV0Params fgkParams;  //! resolution and likelihood parameterization  
144
145 private:
146
147   ClassDef(AliESDv0,4)      // ESD V0 vertex
148 };
149
150 inline 
151 void AliESDv0::GetNPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const {
152 px=fNmom[0]; py=fNmom[1]; pz=fNmom[2];
153 }
154
155 inline 
156 void AliESDv0::GetPPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const {
157 px=fPmom[0]; py=fPmom[1]; pz=fPmom[2];
158 }
159
160 inline
161 void AliESDv0::SetDcaV0Daughters(Double_t rDcaV0Daughters){
162   fDcaV0Daughters=rDcaV0Daughters;
163 }
164
165 #endif