]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLT3DTrackParam.h
Update of the HLT CA tracker
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLT3DTrackParam.h
1 //-*- Mode: C++ -*-
2 // @(#) $Id$
3
4 //* This file is property of and copyright by the ALICE HLT Project           * 
5 //* ALICE Experiment at CERN, All rights reserved.                            *
6 //* See cxx source for full Copyright notice                                  *
7
8 //*                                                                           *
9 //* AliHLT3DTrackParam class is under development and currently not in use    *
10 //*                                                                           *
11
12 #ifndef ALIHLT3DTRACKPARAM_H
13 #define ALIHLT3DTRACKPARAM_H
14
15 #include "Rtypes.h"
16 #include "TObject.h"
17
18 /**
19  * @class AliHLT3DTrackParam
20  */
21 class AliHLT3DTrackParam :public TObject
22 {
23  public:
24
25   //*
26   //*  INITIALIZATION
27   //*
28
29   //* Constructor 
30
31   AliHLT3DTrackParam(): fChi2(0),fNDF(0),fSignQ(0){} 
32
33   //* Destructor (empty)
34
35   virtual ~AliHLT3DTrackParam(){}
36
37   //*
38   //*  ACCESSORS
39   //*
40
41
42   //* Simple accessors 
43
44   Double_t GetX()      const { return fParam[0]; }
45   Double_t GetY()      const { return fParam[1]; }
46   Double_t GetZ()      const { return fParam[2]; }
47   Double_t GetPx()     const { return fParam[3]; }
48   Double_t GetPy()     const { return fParam[4]; }
49   Double_t GetPz()     const { return fParam[5]; }
50   Double_t GetChi2()   const { return fChi2;  }
51   Int_t    GetNDF()    const { return fNDF;   }
52   Int_t    GetCharge() const { return fSignQ; }
53   
54   Double_t GetParameter ( Int_t i ) const { return fParam[i]; }
55   Double_t GetCovariance( Int_t i ) const { return fCov[i]; }
56   Double_t GetCovariance( Int_t i, Int_t j ) const { return fCov[( j<=i ) ? i*(i+1)/2+j :j*(j+1)/2+i]; }
57
58   //*
59   //* Accessors
60   //*
61   
62   const Double_t *Param()  const { return fParam; }
63   const Double_t *Cov() const   { return fCov;   }
64   Double_t X()      const  { return fParam[0]; }
65   Double_t Y()      const  { return fParam[1]; }
66   Double_t Z()      const  { return fParam[2]; }
67   Double_t Px()     const  { return fParam[3]; }
68   Double_t Py()     const  { return fParam[4]; }
69   Double_t Pz()     const  { return fParam[5]; }
70   Double_t Chi2()   const  { return fChi2;  }
71   Int_t    NDF()    const  { return fNDF;   }
72   Int_t    Charge()  const { return fSignQ; }
73
74   //* Accessors with calculations( &value, &estimated sigma )
75   //* error flag returned (0 means no error during calculations) 
76
77
78   //*
79   //*  MODIFIERS
80   //*
81   
82   void SetParam( Int_t i, Double_t v )  { fParam[i] = v; }
83   void SetCov( Int_t i, Double_t v ){ fCov[i] = v;   }
84   void SetX( Double_t v )      { fParam[0] = v; }
85   void SetY( Double_t v )      { fParam[1] = v; }
86   void SetZ( Double_t v )      { fParam[2] = v; }
87   void SetPx( Double_t v )     { fParam[3] = v; }
88   void SetPy( Double_t v )     { fParam[4] = v; }
89   void SetPz( Double_t v )     { fParam[5] = v; }
90   void SetChi2( Double_t v )   { fChi2 = v;  }
91   void SetNDF( Int_t v )       { fNDF = v;   }
92   void SetCharge( Int_t v )    { fSignQ = v; }
93   
94
95   //*
96   //*  UTILITIES
97   //*
98   
99   //* Transport utilities
100   
101   Double_t GetDStoPoint( Double_t Bz, const Double_t xyz[3], const Double_t *T0=0 ) const;
102
103   void TransportToDS( Double_t Bz, Double_t DS, Double_t *T0=0 );
104
105   void TransportToPoint( Double_t Bz, const Double_t xyz[3], Double_t *T0=0 )
106     { 
107       TransportToDS( Bz,GetDStoPoint(Bz, xyz, T0), T0 ) ; 
108     }
109
110   void TransportToPoint( Double_t Bz, Double_t x, Double_t y, Double_t z, Double_t *T0=0 )
111     { 
112       Double_t xyz[3] = {x,y,z};
113       TransportToPoint( Bz, xyz, T0 );
114     }
115
116   //* Fit utilities 
117
118   void InitializeCovarianceMatrix();
119
120   void GetGlueMatrix( const Double_t p[3], Double_t G[6], const Double_t *T0=0  ) const ;
121
122   void Filter( const Double_t m[3], const Double_t V[6], const Double_t G[6] );
123
124   //* Other utilities
125
126   void SetDirection( Double_t Direction[3] );
127
128   void RotateCoordinateSystem( Double_t alpha );
129
130   void Get5Parameters( Double_t alpha, Double_t T[6], Double_t C[15] ) const;
131
132  protected:
133
134   Double_t fParam[6]; // Parameters ( x, y, z, px, py, pz ): 3-position and 3-momentum
135   Double_t fCov[21];  // Covariance matrix
136   Double_t fChi2;     // Chi^2
137   Int_t    fNDF;      // Number of Degrees of Freedom
138   Int_t    fSignQ;    // Charge
139
140   ClassDef(AliHLT3DTrackParam, 1);
141
142 };
143
144
145 #endif