]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSNeuralTrack.h
Now the full chain includes raw data.
[u/mrichter/AliRoot.git] / ITS / AliITSNeuralTrack.h
1 #ifndef ALIITSNEURALTRACK_H
2 #define ALIITSNEURALTRACK_H
3
4 #include <TMatrixD.h>
5
6 class TObjArray;
7 class AliITSNeuralPoint;
8 //class AliITSVertex;
9 class AliITSIOTrack;
10
11 class AliITSNeuralTrack : public TObject {
12
13 public:
14                  AliITSNeuralTrack();
15                                 AliITSNeuralTrack(AliITSNeuralTrack &track);
16         virtual ~AliITSNeuralTrack();
17                 
18         // Points insertion and goodness evaluation
19
20         void     AssignLabel();
21         void     CleanSlot(Int_t i, Bool_t del = kFALSE);
22         void     CleanAllSlots(Bool_t del = kFALSE)        {Int_t i; for(i=0;i<6;i++) CleanSlot(i,del);}
23         void     GetModuleData(Int_t i, Int_t &mod, Int_t &pos);
24         void     Insert(AliITSNeuralPoint *point);
25         Bool_t   IsGood(Int_t min)                         {return (fCount >= min);}
26         Int_t    OccupationMask();
27         void     PrintLabels();
28                 
29         // Fit procedures
30                 
31         Bool_t   AddEL(Int_t layer, Double_t sign);
32         Bool_t   AddMS(Int_t layer);
33         void     ForceSign(Double_t sign)            { fC *= sign; }  // externally imposed trach charge
34         void     ResetChi2()                         { fChi2 = fNSteps = 0.0; }
35         Bool_t   SeedCovariance();
36         Int_t    PropagateTo(Double_t r);
37         Bool_t   Filter(AliITSNeuralPoint *test);
38         Bool_t   KalmanFit();
39         Bool_t   RiemannFit();
40         void     PrintState(Bool_t matrix);
41
42         // Getters
43
44         Int_t    GetLabel() const  {return fLabel;}
45         Int_t    GetCount() const  {return fCount;}
46         Double_t GetDt()    const  {return fDt;}
47         Double_t GetDz()    const;          
48         Double_t GetC()     const  {return fC;}
49         Double_t GetR()     const  {return fR;}
50         Double_t GetXC()    const  {return fXC;}
51         Double_t GetYC()    const  {return fYC;}
52         Double_t GetTanL()  const  {return fTanL;}
53         Double_t GetGamma() const;       
54         Double_t GetChi2()  const  {return fChi2;}
55         Double_t GetStateR() const {return fStateR;}
56         Double_t GetStatePhi() const {return fStatePhi;}
57         Double_t GetStateZ() const {return fStateZ;}
58         Double_t GetCovElement(Int_t i, Int_t j) const {return fMatrix(i,j);}
59         Double_t GetPhi(Double_t r) const;  // phi = gamma0 + asin(argphi(rho))
60         Double_t GetZ(Double_t r) const;    // z = dz + (tanl / C) * asin(argz(rho))
61
62         Double_t GetP()       {return GetPt() * (1.0 + fTanL * fTanL);}
63         Double_t GetPt()      {return 0.299792658 * 0.2 * fField * TMath::Abs(1./fC/100.);}
64         Double_t GetPz()      {return GetPt() * fTanL;}
65         Double_t GetE()       {return TMath::Sqrt(fMass*fMass + GetPt()*GetPt());}
66         Double_t GetLambda()  {return TMath::ATan(fTanL);}
67         Int_t    GetPDGcode() const {return fPDG;}
68         Double_t GetdEdX();
69
70         // Setters
71
72         void     SetFieldFactor(Double_t fact) {fField=fact;}
73         void     SetMass(Double_t mass)        {fMass=mass;}
74         void     SetPDGcode(Int_t code)        {fPDG=code;}
75         void     SetVertex(Double_t *pos, Double_t *err);
76         /*
77         void     SetRho(Double_t a)  {fStateR=a;}
78         void     SetPhi(Double_t a)  {fStatePhi=a;}
79         void     SetZ(Double_t a)    {fStateZ=a;}
80         void     SetDt(Double_t a)   {fDt=a;}
81         void     SetTanL(Double_t a) {fTanL=a;}
82         void     SetC(Double_t a)    {fC=a;}
83         void     SetChi2(Double_t a) {fChi2=a;}
84         void     SetGamma(Double_t a){fG0=a;}
85         void     SetDz(Double_t a)   {fDz=a;}
86         void     SetCovElement(Int_t i, Int_t j, Double_t a) {fMatrix(i,j)=a; if(i!=j) fMatrix(j,i)=a;}
87         */
88         AliITSIOTrack* ExportIOtrack(Int_t min);
89
90 private:
91         
92         Double_t ArgPhi(Double_t r) const;
93         Double_t ArgZ  (Double_t r) const;
94         Double_t ArgB  (Double_t r) const;
95         Double_t ArgC  (Double_t r) const;
96
97         Double_t fXC;       // X ofcurvature center
98         Double_t fYC;       // Y of curvature center
99         Double_t fR;        // curvature radius
100         Double_t fC;        // semi-curvature of the projected circle (signed)
101         Double_t fTanL;     // tangent of dip angle
102         Double_t fG0;       // phase coefficient
103         Double_t fDt;       // transverse impact parameter
104         Double_t fDz;       // longitudinal impact parameter
105
106         Double_t fStateR;   // state vector coordinates
107         Double_t fStatePhi; // state vector coordinates
108         Double_t fStateZ;   // state vector coordinates
109         TMatrixD fMatrix;   // covariance matrix
110         Double_t fChi2;     // square chi (calculated by Kalman filter)
111         Double_t fNSteps;   // number of Kalman steps
112
113         Double_t fMass;     // the particle mass
114         Double_t fField;    // B field = 0.2 * fField (Tesla)
115                 
116         Int_t    fPDG;      // PDG code of the recognized particle
117         Int_t    fLabel;    // the GEANT label most appearing among track recpoints
118         Int_t    fCount;    // number of counts of above label
119                 
120         AliITSNeuralPoint  fVertex;   // vertex position data
121         AliITSNeuralPoint *fPoint[6]; // track points
122
123         ClassDef(AliITSNeuralTrack, 1)
124 };
125
126 #endif