]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSNeuralTrack.h
Macros to run the neural ITS standalone tracking
[u/mrichter/AliRoot.git] / ITS / AliITSNeuralTrack.h
CommitLineData
b9d722bc 1#ifndef ALIITSNEURALTRACK_H
2#define ALIITSNEURALTRACK_H
3
4#include <TMatrixD.h>
5
6class TObjArray;
7class AliITSNeuralPoint;
8//class AliITSVertex;
9class AliITSIOTrack;
10
11class AliITSNeuralTrack : public TObject {
12
13public:
14 AliITSNeuralTrack();
15 virtual ~AliITSNeuralTrack();
16
17 // Points insertion and goodness evaluation
18
19 void AssignLabel();
20 void CleanSlot(Int_t i, Bool_t del = kFALSE);
21 void CleanAllSlots(Bool_t del = kFALSE) {Int_t i; for(i=0;i<6;i++) CleanSlot(i,del);}
22 void GetModuleData(Int_t i, Int_t &mod, Int_t &pos);
23 void Insert(AliITSNeuralPoint *point);
24 Bool_t IsGood(Int_t min) {return (fCount >= min);}
25 Int_t OccupationMask();
26 void PrintLabels();
27
28 // Fit procedures
29
30 Bool_t AddEL(Int_t layer, Double_t sign);
31 Bool_t AddMS(Int_t layer);
32 void ForceSign(Double_t sign) { fC *= sign; } // externally imposed trach charge
33 void ResetChi2() { fChi2 = fNSteps = 0.0; }
34 Bool_t SeedCovariance();
35 Int_t PropagateTo(Double_t r);
36 Bool_t Filter(AliITSNeuralPoint *test);
37 Bool_t KalmanFit();
38 Bool_t RiemannFit();
39 void PrintState(Bool_t matrix);
40
41 // Getters
42
43 Int_t GetLabel() {return fLabel;}
44 Int_t GetCount() {return fCount;}
45 Double_t GetDt() {return fDt;}
46 Double_t GetDz();
47 Double_t GetC() {return fC;}
48 Double_t GetR() {return fR;}
49 Double_t GetXC() {return fXC;}
50 Double_t GetYC() {return fYC;}
51 Double_t GetTanL() {return fTanL;}
52 Double_t GetGamma();
53 Double_t GetChi2() {return fChi2;}
54 Double_t GetStateR() {return fStateR;}
55 Double_t GetStatePhi() {return fStatePhi;}
56 Double_t GetStateZ() {return fStateZ;}
57 Double_t GetCovElement(Int_t i, Int_t j) {return fMatrix(i,j);}
58 Double_t GetPhi(Double_t r); // phi = gamma0 + asin(argphi(rho))
59 Double_t GetZ(Double_t r); // z = dz + (tanl / C) * asin(argz(rho))
60
61
62 Double_t GetP() {return GetPt() * (1.0 + fTanL * fTanL);}
63 Double_t GetPt() {return 0.299792658 * 0.2 * fField * fabs(1./fC/100.);}
64 Double_t GetPz() {return GetPt() * fTanL;}
65 Double_t GetE() {return sqrt(fMass*fMass + GetPt()*GetPt());}
66 Double_t GetLambda() {return atan(fTanL);}
67 Int_t GetPDGcode() {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
90private:
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; //
107 Double_t fStatePhi; // state vector coordinates
108 Double_t fStateZ; //
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