]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSTrackV1.h
Coding violations...
[u/mrichter/AliRoot.git] / ITS / AliITSTrackV1.h
1 #ifndef ALIITSTRACKV1_H
2 #define ALIITSTRACKV1_H
3 //   ITS Track Class
4 //Origin  A. Badala' and G.S. Pappalardo:  e-mail Angela.Badala@ct.infn.it, Giuseppe.S.Pappalardo@ct.infn.it
5 // It contain all the usefull information for the track and the method to calculate, modify or extract them
6 #include <TObject.h>
7 #include <TMatrix.h>
8 #include <TVector.h>
9
10 #include "../TPC/AliTPCtrack.h"
11
12 class TObjArray;
13 class AliITSRad;
14
15 class AliITSTrackV1 : public TObject { 
16
17 public:
18
19   AliITSTrackV1();  // default constructor
20   //AliITSTrackV1(const char *opt);  // Standard constructor
21   AliITSTrackV1(Double_t fieldfactor);  // Standard constructor
22   //AliITSTrackV1(AliTPCtrack &obj);  // Standard constructor
23   AliITSTrackV1(AliTPCtrack &obj, Double_t fieldfactor);  // Standard constructor
24   AliITSTrackV1(const AliITSTrackV1 &cobj);  // copy constructor
25   AliITSTrackV1 &operator=(AliITSTrackV1 obj);  // operator =
26   ~AliITSTrackV1(); // default destructor
27   Int_t GetNumClust() const { return fNumClustInTrack;}  // gets the num of cluster in a track
28   void AddClustInTrack() { fNumClustInTrack++;}  // adds a cluster in track
29   TObjArray *GetListOfCluster() const { return flistCluster;}  // gets the list of cluster in the track
30   void SetChi2(Double_t chi2) { fChi2 = chi2;}   // sets the chisquare value for the track
31   Double_t GetChi2() const { return fChi2;}            // gets the chisquare value for the track
32   Double_t GetZ() const {return fX1;}            // gets the Z value for the track
33   Double_t GetTgl() const {return fX3;}          // gets the tgl value for the track
34   Double_t Getrtrack() const{return frtrack;}    // gets the raius value for the current track
35   Double_t Getphi()  const{return fX0;}          // gets the phi value for the track
36   Double_t GetC() const {return fX4;}            // gets the curvature value for the track
37   Double_t GetD() const{return fX2;}             // gets the radial impact parameter for the track
38   Double_t GetPt() const {return 0.299792458*0.2*fFieldFactor/(fX4*100.);} // gets the transvers momentum 
39   Float_t GetdEdx() const {return fdEdx;}        //gets fdEdx    // oggi
40
41                                                                            // value for the track           
42   void SetVertex(TVector &vert) { for(Int_t i=0;i<3;i++) fVertex(i) = vert(i);} // sets the vertex
43                                                                                 // cohordinates
44   void SetErrorVertex(TVector &evert) {for(Int_t i=0;i<3;i++) fErrorVertex(i) = evert(i);} // sets the errors
45                                                                                     //for vertex cohordinates
46
47   void LmTPC(); // trasform state vector and covariance matrix from local TPC to master
48   TVector GetVertex() const { return fVertex;}
49   TVector GetErrorVertex() const { return fErrorVertex;}
50   Long_t  GetLabel() const { return flabel;}
51   void SetLabel(Long_t label) { flabel = label;}
52   Int_t  GetLayer() const { return fLayer;}
53   
54
55   void PutCElements(Double_t C00, Double_t C10, Double_t C11, Double_t C20, Double_t C21, 
56   Double_t C22, Double_t C30, Double_t C31, Double_t C32, Double_t C33, Double_t C40, 
57   Double_t C41, Double_t C42, Double_t C43, Double_t C44);  // put elements of covariance matrix
58   
59   void GetCElements(Double_t &C00, Double_t &C10, Double_t &C11, Double_t &C20, Double_t &C21, 
60   Double_t &C22, Double_t &C30, Double_t &C31, Double_t &C32, Double_t &C33, Double_t &C40, 
61   Double_t &C41, Double_t &C42, Double_t &C43, Double_t &C44) const;  // get elements of covariance matrix
62    
63   void GetXElements(Double_t &X0, Double_t &X1, Double_t &X2, Double_t &X3, Double_t &X4) const; // get elements
64                                                                                            // of state vector
65   void PutXElements(Double_t X0, Double_t X1, Double_t X2, Double_t X3, Double_t X4);  // put elements
66  
67   void PutMass(Double_t mass) {fMass=mass;} // put the particle mass
68   Double_t GetMass() const {return fMass;}  // get the particle mass   // oggi                                                                                      // of state vector
69
70     
71   void SetLayer(Int_t layer) { fLayer = layer;}      // set current layer
72   AliTPCtrack *GetTPCtrack() const { return fTPCtrack;}    // get hte TPC track
73
74   void PutCluster(Int_t layerc, TVector vecclust);   // put information for clusters
75   TVector GetLabTrack(Int_t lay);                    // get the label of the track
76   void Search(TVector VecTotLabref, Long_t &labref, Int_t &freq); // determine the label and the frequency of
77                                                                   // it for the current track
78   Float_t GetZclusterTrack(Int_t lay) {return ((Float_t) (*fClusterInTrack)(lay,2));} // get the Z
79                              //cohordinate of the cluster gelonging to the track for a given layer
80   void GetClusters();     // prints the clusters belonging to the current track
81   Int_t GetLabTPC() const {return (*fTPCtrack).GetLabel();}  // get the TPC label for the current track
82   Int_t GetIdPoint(Int_t lay) {return ((Int_t) (*fClusterInTrack)(lay,4));}  // get the label identifiing the
83                                                                              //point of the track
84   Int_t GetIdModule(Int_t lay) {return ((Int_t) (*fClusterInTrack)(lay,5));} // get the label identifiing the
85                                                                              // module of the track
86   Float_t GetIdParticle(Int_t lay) {return (*fClusterInTrack)(lay,3);}       // get the label to identify
87                                                                              // the particle      
88   Int_t DoNotCross(Double_t rk) const;  // determine if the track cross a layer 
89   Double_t ArgA(Double_t rk) const;     // quantity usefull in propagation
90   Double_t Arga(Double_t rk) const;     // quantity usefull in propagation
91   Double_t ArgB(Double_t rk) const;     // quantity usefull in propagation
92   Double_t ArgC(Double_t rk) const;     // quantity usefull in propagation             
93   void  Propagation(Double_t rk) ;      // propagation of the track to a layer of radius rk
94
95   Double_t GetSigmaphi() const{return fC00;}    // gets the phi variance
96   Double_t GetSigmaZ() const{return  fC11;}     // gets the Z variance
97   void AddEL(Double_t signdE,  Bool_t flagtot, Double_t mass=0.1396);  // adds the energy loss
98   void AddMS(Double_t mass=0.1396);  // modify the covariance matrix to take into account the multiple scattering
99   void Correct(Double_t rk);  // correct the track to take into account the real detector geometry
100   void SetDv(Double_t x) {fDv=x;}  // sets the radial impact parameter for vertex constraint 
101   void SetZv(Double_t x) {fZv=x;}  // sets longitudinal impact parameter for vertex constraint
102   Double_t GetDv() const {return fDv;}   // gets the radial impact parameter for vertex constraint 
103   Double_t GetZv() const {return fZv;}   // gets longitudinal impact parameter for vertex constraint
104   void SetsigmaDv( Double_t x) {fsigmaDv=x;} // sets sigma for Dv extraction
105   void SetsigmaZv( Double_t x) {fsigmaZv=x;} // sets sigma for Zv extraction
106   void Setfnoclust() {fnoclust++;}          //modify fnoclust 
107   Double_t GetsigmaDv() const {return fsigmaDv;}   // gets sigma for Dv extraction
108   Double_t GetsigmaZv() const {return fsigmaZv;}   // gets sigma for Zv extraction
109   void PrimaryTrack();   // calculation of part of covariance matrix for vertex constraint
110   void Setd2(TVector &x) {for(Int_t i=0; i<6; i++){fd2(i)=x(i);}} // sets the vector fd2
111   void Settgl2(TVector &x) {for(Int_t i=0; i<6; i++){ftgl2(i)=x(i);}}  // sets the vector ftgl2
112   void Setdtgl(TVector &x) {for(Int_t i=0; i<6; i++){fdtgl(i)=x(i);}}  // sets the vector fdtgl
113   TVector Getd2() const { return fd2;}  // gets the vector fd2
114   TVector Gettgl2() const { return ftgl2;}  // gets the vector ftgl2
115   TVector Getdtgl() const { return fdtgl;}  // gets the vector dtgl
116   Double_t Getd2(Int_t i){return (Double_t)fd2(i);}     // gets the i element of the vector fd2
117   Double_t Gettgl2(Int_t i){return (Double_t)ftgl2(i);} // gets the i element of the vector tgl2
118   Double_t Getdtgl(Int_t i){return (Double_t)fdtgl(i);} // gets the i element of the vector fdtgl
119   //Double_t GetxoTPC() const {return fxoTPC;}  // gets fxoTPC
120   Int_t  Getfnoclust() const {return fnoclust;}  //gets fnoclust 
121   Double_t GetPredChi2(Double_t m[2], Double_t sigma[2]) const; //get predicted chi2
122   void Setfcor()                  //set correction for layer                // oggi
123    {if(fLayer>=3) fcor[fLayer-3] = 1./TMath::Sqrt(1.+ fX3*fX3);}            // oggi
124   Float_t Getfcor(Int_t i) {return fcor[i];}  //return correction for layer // oggi
125
126                         
127 //////////////////////////////////////////////////////////////////////////////////////// 
128
129  private:  
130    
131   AliTPCtrack     *fTPCtrack;           // reference to TPC track
132
133   Double_t        fX0,fX1,fX2,fX3,fX4;  // state vector: |phi/z/D/tgl/C 
134   Double_t        frtrack;               // radius of courrent layer     
135   
136   Double_t        fC00, fC10, fC11,     // Covariance Matrix
137                   fC20, fC21, fC22,     //      "       "
138                                                 fC30, fC31, fC32,     //      "       " 
139                                                 fC33, fC40, fC41,     //      "       " 
140                                                 fC42, fC43, fC44;     //      "       "
141       
142   Double_t        fChi2;                // fChi^2 of track         
143   TObjArray       *flistCluster;        // list of clusters of the track
144   Int_t           fNumClustInTrack;     // total number of clusters
145   Long_t          flabel;               // label of the track
146   TVector         fVertex;              // vertex coordinates of the track
147   TVector         fErrorVertex;         // error on the vertex coordinates
148   Int_t           fLayer;               // current Layer of the track
149   TMatrix        *fClusterInTrack;      // matrix of clusters belonging to the  track
150                                         // row index = layer-1; 
151                                         // cols index = master coordinates of the clusters
152
153   Double_t        fFieldFactor;         // magnetic field factor
154   Double_t          fDv;                // radial impact parameter for vertex  constraint
155   Double_t          fZv;                // longitudinal impact parameter for vertex constraint
156   Double_t          fsigmaDv;           // sigma for Dv extraction
157   Double_t          fsigmaZv;           // sigma for Zv extraction
158   TVector           fd2;                // C(2,2)  for primary track
159   TVector           ftgl2;              // C(3,3)  for primary track
160   TVector           fdtgl;              // C(2,3)  for primary track
161
162   Double_t          fMass;         //  tracking particle mass
163   
164   Float_t           fdEdx ;         // energy loss                  // oggi
165   Float_t           fcor[4];          // corrections for dE/dx      // oggi
166  
167   
168   Int_t   fnoclust;  //nm of layers in which tracking doesn't add a cluster to the track
169                    
170   
171
172  
173   ClassDef(AliITSTrackV1, 1)
174    
175 };
176
177 #endif
178