Updated comments for Doxygen
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackK.h
CommitLineData
83dbc640 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
30178c30 6/*$Id$*/
7// Revision of includes 07/05/2004
8
692de412 9/// \ingroup rec
090443dd 10/// \class AliMUONTrackK
692de412 11/// \brief Kalman track in MUON arm of ALICE
585d648a 12///
13/// \author: Alexander Zinchenko, JINR Dubna
692de412 14
b035a148 15class TArrayD;
83dbc640 16class TClonesArray;
30178c30 17class TObjArray;
243b68c3 18#include <TMatrixDfwd.h>
19#include <TObject.h>
20
cc87ebcd 21class AliMUONEventRecoCombi;
243b68c3 22class AliMUONHitForRec;
23class AliMUONSegment;
24class AliMUONTrackReconstructor;
25#include "AliMUONTrack.h"
83dbc640 26
b035a148 27class AliMUONTrackK : public AliMUONTrack {
83dbc640 28
29 public:
30
31 AliMUONTrackK(); // Default constructor
32 virtual ~AliMUONTrackK(); // Destructor
83dbc640 33
29f1b13a 34 AliMUONTrackK(AliMUONTrackReconstructor *TrackReconstructor, TClonesArray *hitForRec); // Constructor
83dbc640 35 AliMUONTrackK(AliMUONSegment *segment); // Constructor from a segment
36
37 // Pointer to hits on track
1ffe5558 38 TObjArray* GetTrackHits(void) const {return fTrackHits;} // ptr. to hits on track
39 Int_t GetNTrackHits(void) const {return fNmbTrackHits;} // hits on track
83dbc640 40 Double_t GetTrackQuality(void) const {return fChi2;} // track quality
41 TMatrixD* GetTrackParameters(void) const {return fTrackPar;} // track parameters
42 Double_t GetZ(void) const {return fPosition;} // Z-coordinate of track
43 TMatrixD* GetCovariance(void) const {return fCovariance;} // covariance matrix
44 Int_t GetTrackDir(void) const {return fTrackDir;} // get track propagation direction
45 void SetTrackDir(Int_t iDir) {fTrackDir = iDir;} // set track propagation direction
46 Bool_t GetBPFlag(void) const {return fBPFlag;} // get backpropagation flag
47 void SetBPFlag(Bool_t BPFlag) {fBPFlag = BPFlag;} // set backpropagation flag
48 Int_t GetRecover(void) const {return fRecover;} // return recover flag
49 void SetRecover(Int_t iRecover) {fRecover = iRecover;} // set recover flag
50 AliMUONSegment* GetStartSegment(void) const {return fStartSegment;} // return seed segment
51 Bool_t KalmanFilter(Int_t ichamBeg, Int_t ichamEnd, Bool_t Back, Double_t zDipole1, Double_t zDipole2); // Kalman filter
52 void StartBack(void); // start backpropagator
53 void SetTrackQuality(Int_t iChi2); // compute track quality or Chi2
30178c30 54 Bool_t KeepTrack(AliMUONTrackK* track0) const; // keep or discard track
83dbc640 55 void Kill(void); // kill track candidate
56 void Branson(void); // Branson correction
57 void GoToZ(Double_t zEnd); // propagate track to given Z
b035a148 58 void GoToVertex(Int_t iflag); // propagate track to the vertex
59 Bool_t Smooth(void); // apply smoother
60 Double_t GetChi2PerPoint(Int_t iPoint) const; // return Chi2 at point
61 void Print(FILE *lun) const; // print track information
337c9041 62 void Print(const char* /*opt*/) const {return;} // print track information
b035a148 63 AliMUONHitForRec* GetHitLastOk(void); // get hit before the skipped one
64 Int_t GetStation0(void); // return seed station number
65 Int_t DebugLevel(void) const {return fgDebug;} // return debug level
66 void SetDebugLevel(Int_t iDebug) {fgDebug = iDebug;} // set debug level
67 void FillMUONTrack(void); // set track parameters as for AliMUONTrack
68 void SetTrackParam(AliMUONTrackParam *trackParam, TMatrixD *par, Double_t z); // fill AliMUONTrackParam object
83dbc640 69
70 // What is necessary for sorting TClonesArray's
71 Bool_t IsSortable() const { return kTRUE; }
72 Int_t Compare(const TObject* trackK) const; // "Compare" function for sorting
73
74
75
76 protected:
77
30178c30 78 AliMUONTrackK (const AliMUONTrackK& source); // copy constructor
79 AliMUONTrackK& operator=(const AliMUONTrackK& source); // assignment operator
80
83dbc640 81 private:
82
829425a5 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 AliMUONTrackReconstructor *fgTrackReconstructor; ///< pointer to event reconstructor
87 static TClonesArray *fgHitForRec; ///< pointer to hits
88 static AliMUONEventRecoCombi *fgCombi; ///< pointer to combined cluster/track finder
89
90 AliMUONSegment *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)
83dbc640 105
b035a148 106 // For smoother
829425a5 107 TObjArray *fParExtrap; //!< extrapolated track parameters
108 TObjArray *fParFilter; //!< filtered track parameters
109 TObjArray *fParSmooth; //!< smoothed track parameters
b035a148 110
829425a5 111 TObjArray *fCovExtrap; //!< extrapolated covariance matrices
112 TObjArray *fCovFilter; //!< filtered covariance matrices
b035a148 113
829425a5 114 TObjArray *fJacob; //!< Jacobian matrices
115 Int_t fNSteps; //!<
116 TArrayD *fSteps; //!<
117 TArrayD *fChi2Array; //!<
118 TArrayD *fChi2Smooth; //!<
b035a148 119
83dbc640 120 // Functions
121
122 void EvalCovariance(Double_t dZ);
123 void ParPropagation(Double_t zEnd);
b035a148 124 void WeightPropagation(Double_t zEnd, Bool_t smooth);
83dbc640 125 void MSThin(Int_t sign);
126 void MSLine(Double_t dZ, Double_t X0);
cc87ebcd 127 Bool_t FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int_t iFB, AliMUONHitForRec *&hitAdd, Int_t iz);
83dbc640 128 void TryPoint(TMatrixD &point, const TMatrixD &pointWeight, TMatrixD &trackParTmp, Double_t &dChi2);
129 void SetGeantParam(Double_t *VGeant3, Int_t iFB);
130 void GetFromGeantParam(Double_t *VGeant3, Int_t iFB);
b035a148 131 Bool_t Recover(void);
132 void AddMatrices(AliMUONTrackK *trackK, Double_t dChi2, AliMUONHitForRec *hitAdd);
1ffe5558 133 void CreateMatrix(TObjArray *objArray) const;
b035a148 134 void RemoveMatrices(Double_t zEnd);
135 void RemoveMatrices(AliMUONTrackK* trackK);
136 void Outlier();
137 void SortHits(Int_t iflag, TObjArray *array);
138 void DropBranches(Int_t imax, TObjArray *hits);
139 void DropBranches(AliMUONSegment *segment);
140 Bool_t ExistDouble(AliMUONHitForRec *hit);
141 Bool_t ExistDouble(void);
83dbc640 142
343146bf 143 private:
144 // Some constants
829425a5 145 static const Int_t fgkSize; ///< number of track parameters
146 static const Int_t fgkNSigma; ///< 4; acceptance window width in sigmas
147 static const Double_t fgkChi2max; ///< 25; chi2 cut in smoother for outlier detection
148 static const Int_t fgkTriesMax; ///< max number of attempts to find exact position during tracking
149 static const Double_t fgkEpsilon; ///< tracking precision (cm)
343146bf 150
83dbc640 151 ClassDef(AliMUONTrackK,0) // Kalman track in MUON arm of ALICE
152 };
153#endif