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