]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/global/AliFlatExternalTrackParam.h
added this pointer to special constructor, first version of esd to flat conversion...
[u/mrichter/AliRoot.git] / HLT / global / AliFlatExternalTrackParam.h
1 #ifndef ALIFLATEXTERNALTRACKPARAM_H
2 #define ALIFLATEXTERNALTRACKPARAM_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               *
6  * Primary Authors : Sergey Gorbunov, Jochen Thaeder, Chiara Zampolli     */
7
8 /**
9  * >> Flat structure representing parameters of an external track  <<
10  */
11
12 #include "Rtypes.h"
13 #include "AliVVexternalTrackParam.h"
14 #include "AliFlatESDMisc.h"
15
16
17 class AliFlatExternalTrackParam: public AliVVexternalTrackParam
18 {
19  public:
20   AliFlatExternalTrackParam()   
21         : fAlpha(0.), fX(0.), fY(0.), fZ(0.), fSnp(0.), fTgl(0.), fSigned1Pt(0.) {
22     for( int i=0; i<15; i++) fC[i] = 0;
23         }
24   virtual ~AliFlatExternalTrackParam() {}
25   Float_t fAlpha;     // azimuthal angle of reference frame
26   Float_t fX;         // x: radial distance
27   Float_t fY;         // local Y-coordinate of a track (cm)
28   Float_t fZ;         // local Z-coordinate of a track (cm)
29   Float_t fSnp;       // local sine of the track momentum azimuthal angle
30   Float_t fTgl;       // tangent of the track momentum dip angle
31   Float_t fSigned1Pt; // 1/pt (1/(GeV/c))
32   Float_t fC[15];     // covariance matrix
33
34   void SetAlpha(Float_t alpha)             {fAlpha = alpha;}
35   void SetX(Float_t x)                     {fX = x;}
36   void SetY(Float_t y)                     {fY = y;}
37   void SetZ(Float_t z)                     {fZ = z;}
38   void SetSnp(Float_t snp)                 {fSnp = snp;}
39   void SetTgl(Float_t tgl)                 {fTgl = tgl;}
40   void SetSigned1Pt(Float_t signed1Pt)     {fSigned1Pt = signed1Pt;}
41   void SetCovEntry(Int_t idx, Float_t cov) {(idx >= 0 && idx < 15) ? fC[idx] = cov : 0.;}
42   
43   void Reinitialize(){
44         new (this) AliFlatExternalTrackParam(AliFlatESDReinitialize);
45   }
46
47   Float_t  GetAlpha()             const {return fAlpha;}
48   Float_t  GetX()                 const {return fX;}
49   Float_t  GetY()                 const {return fY;}
50   Float_t  GetZ()                 const {return fZ;}
51   Float_t  GetSnp()               const {return fSnp;}
52   Float_t  GetTgl()               const {return fTgl;}
53   Float_t  GetSigned1Pt()         const {return fSigned1Pt;}
54   Float_t* GetCov()               const {return const_cast<Float_t*>(fC);}
55   Float_t  GetCovEntry(Int_t idx) const {return (idx >= 0 && idx < 15) ? fC[idx] : 0.;}
56   
57  private:
58         AliFlatExternalTrackParam(AliFlatESDSpecialConstructorFlag)
59         : fAlpha(this->fAlpha), fX(this->fX), fY(this->fY), fZ(this->fZ), fSnp(this->fSnp), fTgl(this->fTgl), fSigned1Pt(this->fSigned1Pt) {}
60 };
61
62 //typedef struct AliFlatExternalTrackParam AliFlatExternalTrackParam;
63
64 #endif