]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIMUONTRACKK_H | |
2 | #define ALIMUONTRACKK_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /*$Id$*/ | |
7 | // Revision of includes 07/05/2004 | |
8 | ||
9 | /// \ingroup rec | |
10 | /// \class AliMUONTrackK | |
11 | /// \brief Kalman track in MUON arm of ALICE | |
12 | /// | |
13 | /// \author Alexander Zinchenko, JINR Dubna | |
14 | ||
15 | class AliMUONEventRecoCombi; | |
16 | class AliMUONHitForRec; | |
17 | class AliMUONObjectPair; | |
18 | class AliMUONTrackReconstructorK; | |
19 | #include "AliMUONTrack.h" | |
20 | ||
21 | class TArrayD; | |
22 | class TClonesArray; | |
23 | class TObjArray; | |
24 | ||
25 | #include <TMatrixD.h> | |
26 | #include <TObject.h> | |
27 | ||
28 | class AliMUONTrackK : public AliMUONTrack { | |
29 | ||
30 | public: | |
31 | ||
32 | AliMUONTrackK(); // Default constructor | |
33 | virtual ~AliMUONTrackK(); // Destructor | |
34 | ||
35 | AliMUONTrackK(AliMUONTrackReconstructorK *TrackReconstructor, TClonesArray *hitForRec); // Constructor | |
36 | AliMUONTrackK(AliMUONObjectPair *segment); // Constructor from a segment | |
37 | ||
38 | // Pointer to hits on track | |
39 | TObjArray* GetTrackHits(void) const {return fTrackHits;} // ptr. to hits on track | |
40 | Int_t GetNTrackHits(void) const {return fNmbTrackHits;} // hits on track | |
41 | Double_t GetTrackQuality(void) const {return fChi2;} // track quality | |
42 | TMatrixD* GetTrackParameters(void) const {return fTrackPar;} // track parameters | |
43 | Double_t GetZ(void) const {return fPosition;} // Z-coordinate of track | |
44 | TMatrixD* GetCovariance(void) const {return fCovariance;} // covariance matrix | |
45 | Int_t GetTrackDir(void) const {return fTrackDir;} // get track propagation direction | |
46 | void SetTrackDir(Int_t iDir) {fTrackDir = iDir;} // set track propagation direction | |
47 | Bool_t GetBPFlag(void) const {return fBPFlag;} // get backpropagation flag | |
48 | void SetBPFlag(Bool_t BPFlag) {fBPFlag = BPFlag;} // set backpropagation flag | |
49 | Int_t GetRecover(void) const {return fRecover;} // return recover flag | |
50 | void SetRecover(Int_t iRecover) {fRecover = iRecover;} // set recover flag | |
51 | AliMUONObjectPair* GetStartSegment(void) const {return fStartSegment;} // return seed segment | |
52 | Bool_t KalmanFilter(Int_t ichamBeg, Int_t ichamEnd, Bool_t Back, Double_t zDipole1, Double_t zDipole2); // Kalman filter | |
53 | void StartBack(void); // start backpropagator | |
54 | void SetTrackQuality(Int_t iChi2); // compute track quality or Chi2 | |
55 | Bool_t KeepTrack(AliMUONTrackK* track0) const; // keep or discard track | |
56 | void Kill(void); // kill track candidate | |
57 | void Branson(void); // Branson correction | |
58 | void GoToZ(Double_t zEnd); // propagate track to given Z | |
59 | void GoToVertex(Int_t iflag); // propagate track to the vertex | |
60 | Bool_t Smooth(void); // apply smoother | |
61 | Double_t GetChi2PerPoint(Int_t iPoint) const; // return Chi2 at point | |
62 | void Print(FILE *lun) const; // print track information | |
63 | void Print(const char* /*opt*/) const {return;} // print track information | |
64 | AliMUONHitForRec* GetHitLastOk(void); // get hit before the skipped one | |
65 | Int_t GetStation0(void); // return seed station number | |
66 | Int_t DebugLevel(void) const {return fgDebug;} // return debug level | |
67 | void SetDebugLevel(Int_t iDebug) {fgDebug = iDebug;} // set debug level | |
68 | void FillMUONTrack(void); // set track parameters as for AliMUONTrack | |
69 | void SetTrackParam(AliMUONTrackParam *trackParam, TMatrixD *par, Double_t z); // fill AliMUONTrackParam object | |
70 | ||
71 | // What is necessary for sorting TClonesArray's | |
72 | Bool_t IsSortable() const { return kTRUE; } | |
73 | Int_t Compare(const TObject* trackK) const; // "Compare" function for sorting | |
74 | ||
75 | ||
76 | ||
77 | protected: | |
78 | ||
79 | AliMUONTrackK& operator=(const AliMUONTrackK& source); // assignment operator | |
80 | ||
81 | private: | |
82 | ||
83 | static Int_t fgDebug; ///< debug level | |
84 | static Int_t fgNOfPoints; ///< number of points in event | |
85 | //static AliMUON *fgMUON; ///< pointer to MUON module | |
86 | static AliMUONTrackReconstructorK *fgTrackReconstructor; ///< pointer to event reconstructor | |
87 | static TClonesArray *fgHitForRec; ///< pointer to hits | |
88 | static AliMUONEventRecoCombi *fgCombi; ///< pointer to combined cluster/track finder | |
89 | ||
90 | AliMUONObjectPair *fStartSegment; ///< seed segment | |
91 | Double_t fPosition; ///< Z-coordinate of track | |
92 | Double_t fPositionNew; //!< Z-coordinate of track | |
93 | Double_t fChi2; ///< Chi2 of track | |
94 | TObjArray *fTrackHits; ///< pointer to hits on track | |
95 | Int_t fNmbTrackHits; ///< number of points on track | |
96 | Int_t fTrackDir; ///< track direction (+(-) towards high (low) z) | |
97 | Bool_t fBPFlag; ///< backpropagation flag (TRUE if backpropagation) | |
98 | Int_t fRecover; ///< recover flag (!=0 if recovery procedure was applied) | |
99 | AliMUONHitForRec *fSkipHit; ///< hit to skip during recovery procedure | |
100 | ||
101 | TMatrixD *fTrackPar; ///< track parameters | |
102 | TMatrixD *fTrackParNew; //!< track parameters | |
103 | TMatrixD *fCovariance; ///< covariance matrix | |
104 | TMatrixD *fWeight; //!< weight matrix (inverse of covariance) | |
105 | ||
106 | // For smoother | |
107 | TObjArray *fParExtrap; //!< extrapolated track parameters | |
108 | TObjArray *fParFilter; //!< filtered track parameters | |
109 | TObjArray *fParSmooth; //!< smoothed track parameters | |
110 | ||
111 | TObjArray *fCovExtrap; //!< extrapolated covariance matrices | |
112 | TObjArray *fCovFilter; //!< filtered covariance matrices | |
113 | ||
114 | TObjArray *fJacob; //!< Jacobian matrices | |
115 | Int_t fNSteps; //!< number of the track propagation points | |
116 | TArrayD *fSteps; //!< Z-coordinates of the track propagation points | |
117 | TArrayD *fChi2Array; //!< measurements' contributions to the track Chi2 | |
118 | TArrayD *fChi2Smooth;//!< measurements' contributions to the smoothed track Chi2 | |
119 | ||
120 | // Functions | |
121 | ||
122 | AliMUONTrackK (const AliMUONTrackK& source); // copy constructor | |
123 | void EvalCovariance(Double_t dZ); | |
124 | void ParPropagation(Double_t zEnd); | |
125 | void WeightPropagation(Double_t zEnd, Bool_t smooth); | |
126 | void MSThin(Int_t sign); | |
127 | void MSLine(Double_t dZ, Double_t X0); | |
128 | Bool_t FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int_t iFB, AliMUONHitForRec *&hitAdd, Int_t iz); | |
129 | void TryPoint(TMatrixD &point, const TMatrixD &pointWeight, TMatrixD &trackParTmp, Double_t &dChi2); | |
130 | void SetGeantParam(Double_t *VGeant3, Int_t iFB); | |
131 | void GetFromGeantParam(Double_t *VGeant3, Int_t iFB); | |
132 | Bool_t Recover(void); | |
133 | void AddMatrices(AliMUONTrackK *trackK, Double_t dChi2, AliMUONHitForRec *hitAdd); | |
134 | void CreateMatrix(TObjArray *objArray) const; | |
135 | void RemoveMatrices(Double_t zEnd); | |
136 | void RemoveMatrices(AliMUONTrackK* trackK); | |
137 | void Outlier(); | |
138 | void SortHits(Int_t iflag, TObjArray *array); | |
139 | void DropBranches(Int_t imax, TObjArray *hits); | |
140 | void DropBranches(AliMUONObjectPair *segment); | |
141 | Bool_t ExistDouble(AliMUONHitForRec *hit); | |
142 | Bool_t ExistDouble(void); | |
143 | void CheckBranches(TArrayD &branchChi2, Int_t nBranch); | |
144 | ||
145 | private: | |
146 | // Some constants | |
147 | static const Int_t fgkSize; ///< number of track parameters | |
148 | static const Int_t fgkNSigma; ///< 4; acceptance window width in sigmas | |
149 | static const Double_t fgkChi2max; ///< 25; chi2 cut in smoother for outlier detection | |
150 | static const Int_t fgkTriesMax; ///< max number of attempts to find exact position during tracking | |
151 | static const Double_t fgkEpsilon; ///< tracking precision (cm) | |
152 | ||
153 | ClassDef(AliMUONTrackK,0) // Kalman track in MUON arm of ALICE | |
154 | }; | |
155 | #endif |