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