]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLT3DTrackParam.h
added offline wrapper for HLT TPC CA tracker (Sergey)
[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 i ) const { return fParam[i]; }
55   Double_t GetCovariance( int i ) const { return fCov[i]; }
56   Double_t GetCovariance( int i, int j ) const { return fCov[( j<=i ) ? i*(i+1)/2+j :j*(j+1)/2+i]; }
57
58   //* Accessors with calculations( &value, &estimated sigma )
59   //* error flag returned (0 means no error during calculations) 
60
61
62   //*
63   //*  MODIFIERS
64   //*
65   
66   Double_t *Param()  { return fParam; }
67   Double_t *Cov()    { return fCov;   }
68   Double_t &X()      { return fParam[0]; }
69   Double_t &Y()      { return fParam[1]; }
70   Double_t &Z()      { return fParam[2]; }
71   Double_t &Px()     { return fParam[3]; }
72   Double_t &Py()     { return fParam[4]; }
73   Double_t &Pz()     { return fParam[5]; }
74   Double_t &Chi2()   { return fChi2;  }
75   Int_t    &NDF()    { return fNDF;   }
76   Int_t    &Charge() { return fSignQ; }
77
78
79   //*
80   //*  UTILITIES
81   //*
82   
83   //* Transport utilities
84   
85   Double_t GetDStoPoint( Double_t Bz, const Double_t xyz[3], const Double_t *T0=0 ) const;
86
87   void TransportToDS( Double_t Bz, Double_t DS, Double_t *T0=0 );
88
89   void TransportToPoint( Double_t Bz, const Double_t xyz[3], Double_t *T0=0 )
90     { 
91       TransportToDS( Bz,GetDStoPoint(Bz, xyz, T0), T0 ) ; 
92     }
93
94   void TransportToPoint( Double_t Bz, Double_t x, Double_t y, Double_t z, Double_t *T0=0 )
95     { 
96       Double_t xyz[3] = {x,y,z};
97       TransportToPoint( Bz, xyz, T0 );
98     }
99
100   //* Fit utilities 
101
102   void InitializeCovarianceMatrix();
103
104   void GetGlueMatrix( const Double_t p[3], Double_t G[6], const Double_t *T0=0  ) const ;
105
106   void Filter( const Double_t m[3], const Double_t V[6], const Double_t G[6] );
107
108   //* Other utilities
109
110   void SetDirection( Double_t Direction[3] );
111
112   void RotateCoordinateSystem( Double_t alpha );
113
114   void Get5Parameters( Double_t alpha, Double_t T[6], Double_t C[15] ) const;
115
116  protected:
117
118   Double_t fParam[6]; // Parameters ( x, y, z, px, py, pz ): 3-position and 3-momentum
119   Double_t fCov[21];  // Covariance matrix
120   Double_t fChi2;     // Chi^2
121   Int_t    fNDF;      // Number of Degrees of Freedom
122   Int_t    fSignQ;    // Charge
123
124   ClassDef(AliHLT3DTrackParam, 1);
125
126 };
127
128
129 #endif