]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 1 | #ifndef ALIMUONTRACK_H |
2 | #define ALIMUONTRACK_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /*$Id$*/ | |
30178c30 | 7 | // Revision of includes 07/05/2004 |
8 | ||
692de412 | 9 | /// \ingroup rec |
10 | /// \class AliMUONTrack | |
11 | /// \brief Reconstructed track in ALICE dimuon spectrometer | |
12 | /// | |
13 | //////////////////////////////////////////////////// | |
14 | /// Reconstructed track in ALICE dimuon spectrometer | |
15 | //////////////////////////////////////////////////// | |
3831f268 | 16 | |
c1a185bf | 17 | #include "AliMUONTrackParam.h" // object belongs to the class |
ea94c18b | 18 | #include <TClonesArray.h> |
a9e2aefa | 19 | |
a9e2aefa | 20 | class AliMUONHitForRec; |
ea94c18b | 21 | class AliMUONObjectPair; |
a9e2aefa | 22 | |
30178c30 | 23 | class AliMUONTrack : public TObject |
24 | { | |
a9e2aefa | 25 | public: |
d837040f | 26 | AliMUONTrack(); // Default constructor |
ea94c18b | 27 | AliMUONTrack(AliMUONObjectPair *segment); // Constructor from a segment |
8429a5e4 | 28 | virtual ~AliMUONTrack(); // Destructor |
ea94c18b | 29 | AliMUONTrack (const AliMUONTrack& track); // copy constructor |
30 | AliMUONTrack& operator=(const AliMUONTrack& track); // assignment operator | |
a9e2aefa | 31 | |
a9e2aefa | 32 | |
2457f726 | 33 | /// return pointeur to track parameters at vertex |
ea94c18b | 34 | AliMUONTrackParam* GetTrackParamAtVertex() {return &fTrackParamAtVertex;} |
2457f726 | 35 | /// set track parameters at vertex |
ea94c18b | 36 | void SetTrackParamAtVertex(const AliMUONTrackParam* trackParam) {fTrackParamAtVertex = *trackParam;} |
de2cd600 | 37 | |
2457f726 | 38 | /// return array of track parameters at hit |
ea94c18b | 39 | TClonesArray* GetTrackParamAtHit() const {return fTrackParamAtHit;} |
2457f726 | 40 | /// reset array of track parameters at hit |
ea94c18b | 41 | void ResetTrackParamAtHit() { fTrackParamAtHit->Delete(); } |
42 | void AddTrackParamAtHit(const AliMUONTrackParam *trackParam, AliMUONHitForRec *hitForRec); | |
43 | void RemoveTrackParamAtHit(AliMUONTrackParam *trackParam); | |
44 | void UpdateTrackParamAtHit(); | |
45 | void UpdateCovTrackParamAtHit(); | |
de2cd600 | 46 | |
2457f726 | 47 | /// return array of hitForRec at hit |
ea94c18b | 48 | TClonesArray* GetHitForRecAtHit() const {return fHitForRecAtHit;} |
2457f726 | 49 | /// reset array of hitForRec at hit |
ea94c18b | 50 | void ResetHitForRecAtHit() { fHitForRecAtHit->Delete(); } |
6464217e | 51 | void AddHitForRecAtHit(const AliMUONHitForRec *hitForRec); |
52 | ||
2457f726 | 53 | /// return the number of hits attached to the track |
ea94c18b | 54 | Int_t GetNTrackHits() const {return fNTrackHits;} |
2457f726 | 55 | /// set the number of hits attached to the track |
6464217e | 56 | void SetNTrackHits(Int_t nTrackHits) {fNTrackHits = nTrackHits;} |
de2cd600 | 57 | |
208f139e | 58 | /// return kTrue if the vertex must be used to constrain the fit, kFalse if not |
ea94c18b | 59 | Bool_t GetFitWithVertex() const {return fFitWithVertex;} |
208f139e | 60 | /// set the flag telling whether the vertex must be used to constrain the fit or not |
61 | void SetFitWithVertex(Bool_t fitWithVertex) { fFitWithVertex = fitWithVertex; } | |
62 | /// return the vertex used during the tracking procedure | |
ea94c18b | 63 | AliMUONHitForRec* GetVertex() const {return fVertex;} |
64 | void SetVertex(const AliMUONHitForRec* vertex); | |
65 | ||
66 | /// return kTrue if the multiple scattering must be accounted for in the fit, kFalse if not | |
67 | Bool_t GetFitWithMCS() const {return fFitWithMCS;} | |
68 | /// set the flag telling whether the multiple scattering must be accounted for in the fit or not | |
69 | void SetFitWithMCS(Bool_t fitWithMCS) {fFitWithMCS = fitWithMCS;} | |
70 | ||
71 | Bool_t ComputeHitWeights(TMatrixD* mcsCovariances = 0); | |
72 | Bool_t ComputeLocalChi2(Bool_t accountForMCS); | |
73 | Double_t ComputeGlobalChi2(Bool_t accountForMCS); | |
208f139e | 74 | |
2457f726 | 75 | /// return the minimum value of the function minimized by the fit |
ea94c18b | 76 | Double_t GetFitFMin() const {return fGlobalChi2;} |
2457f726 | 77 | /// set the minimum value of the function minimized by the fit |
ea94c18b | 78 | void SetFitFMin(Double_t chi2) { fGlobalChi2 = chi2;} |
79 | ||
80 | /// return kTRUE if the track has been improved | |
81 | Bool_t IsImproved() const {return fImproved;} | |
82 | /// set the flag telling whether the track has been improved or not | |
83 | void SetImproved(Bool_t improved) { fImproved = improved;} | |
84 | ||
423b32ca | 85 | /// return 1,2,3 if track matches with trigger track, 0 if not |
ea94c18b | 86 | Int_t GetMatchTrigger(void) const {return fMatchTrigger;} |
c6ba19f7 | 87 | /// returns the local trigger number corresponding to the trigger track |
88 | Int_t GetLoTrgNum(void) const {return floTrgNum;} | |
2457f726 | 89 | /// set the flag telling whether track matches with trigger track or not |
7771752e | 90 | void SetMatchTrigger(Int_t matchTrigger) {fMatchTrigger = matchTrigger;} |
c6ba19f7 | 91 | /// set the local trigger number corresponding to the trigger track |
92 | void SetLoTrgNum(Int_t loTrgNum) {floTrgNum = loTrgNum;} | |
2457f726 | 93 | /// return the chi2 of trigger/track matching |
6464217e | 94 | Double_t GetChi2MatchTrigger(void) const {return fChi2MatchTrigger;} |
2457f726 | 95 | /// set the chi2 of trigger/track matching |
208f139e | 96 | void SetChi2MatchTrigger(Double_t chi2MatchTrigger) {fChi2MatchTrigger = chi2MatchTrigger;} |
ea94c18b | 97 | |
208f139e | 98 | Int_t HitsInCommon(AliMUONTrack* track) const; |
ea94c18b | 99 | |
100 | Double_t GetNormalizedChi2() const; | |
101 | ||
208f139e | 102 | Bool_t* CompatibleTrack(AliMUONTrack* track, Double_t sigma2Cut) const; // return array of compatible chamber |
b8dc484b | 103 | |
2457f726 | 104 | /// return track number in TrackRefs |
6464217e | 105 | Int_t GetTrackID() const {return fTrackID;} |
2457f726 | 106 | /// set track number in TrackRefs |
6464217e | 107 | void SetTrackID(Int_t trackID) {fTrackID = trackID;} |
108 | ||
7771752e | 109 | /// set word telling which trigger chambers where hit by track |
110 | UShort_t GetHitsPatternInTrigCh() const {return fHitsPatternInTrigCh;} | |
111 | /// set word telling which trigger chambers where hit by track | |
112 | void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) {fHitsPatternInTrigCh = hitsPatternInTrigCh;} | |
113 | ||
423b32ca | 114 | /// set local trigger information for the matched trigger track |
115 | void SetLocalTrigger(Int_t loCirc, Int_t loStripX, Int_t loStripY, Int_t loDev, Int_t loLpt, Int_t loHpt); | |
116 | /// return local trigger information for the matched trigger track | |
117 | Int_t GetLocalTrigger(void) const { return fLocalTrigger; } | |
4a335550 | 118 | /// number of triggering circuit |
423b32ca | 119 | Int_t LoCircuit(void) const |
120 | { Int_t circ = fLocalTrigger & 0xFF; return (circ == 234) ? -1 : circ; } | |
4a335550 | 121 | /// x-strip local trigger |
423b32ca | 122 | Int_t LoStripX(void) const { return fLocalTrigger >> 8 & 0x1F; } |
4a335550 | 123 | /// y-strip local trigger |
423b32ca | 124 | Int_t LoStripY(void) const { return fLocalTrigger >> 13 & 0x0F; } |
4a335550 | 125 | /// deviation local trigger |
423b32ca | 126 | Int_t LoDev(void) const { return fLocalTrigger >> 17 & 0x1F; } |
4a335550 | 127 | /// low pt decision local trigger |
423b32ca | 128 | Int_t LoLpt(void) const { return fLocalTrigger >> 22 & 0x03; } |
4a335550 | 129 | /// high pt decision local trigger |
423b32ca | 130 | Int_t LoHpt(void) const { return fLocalTrigger >> 24 & 0x03; } |
131 | ||
de2cd600 | 132 | void RecursiveDump(void) const; // Recursive dump (with track hits) |
6464217e | 133 | |
de2cd600 | 134 | virtual void Print(Option_t* opt="") const; |
a9e2aefa | 135 | |
d2b1e7bb | 136 | virtual void Clear(Option_t* opt=""); |
956019b6 | 137 | |
ea94c18b | 138 | |
a9e2aefa | 139 | private: |
ea94c18b | 140 | |
8cde4af5 | 141 | AliMUONTrackParam fTrackParamAtVertex; //!< Track parameters at vertex |
829425a5 | 142 | TClonesArray *fTrackParamAtHit; ///< Track parameters at hit |
143 | TClonesArray *fHitForRecAtHit; ///< Cluster parameters at hit | |
2457f726 | 144 | Int_t fNTrackHits; ///< Number of hits attached to the track |
de2cd600 | 145 | |
ea94c18b | 146 | Bool_t fFitWithVertex; //!< kTRUE if using the vertex to constrain the fit, kFALSE if not |
208f139e | 147 | AliMUONHitForRec *fVertex; //!< Vertex used during the tracking procedure if required |
148 | ||
ea94c18b | 149 | Bool_t fFitWithMCS; //!< kTRUE if accounting for multiple scattering in the fit, kFALSE if not |
150 | ||
151 | TMatrixD* fHitWeightsNonBending; //!< weights matrix, in non bending direction, of hits attached to the track | |
152 | //!< (accounting for multiple scattering and hits resolution) | |
153 | TMatrixD* fHitWeightsBending; //!< weights matrix, in bending direction, of hits attached to the track | |
154 | //!< (accounting for multiple scattering and hits resolution) | |
155 | ||
156 | Double_t fGlobalChi2; ///< Global chi2 of the track | |
157 | ||
158 | Bool_t fImproved; //!< kTRUE if the track has been improved | |
159 | ||
423b32ca | 160 | Int_t fMatchTrigger; ///< 0 track does not match trigger |
161 | ///< 1 track match but does not pass pt cut | |
162 | ///< 2 track match Low pt cut | |
163 | ///< 3 track match High pt cut | |
c6ba19f7 | 164 | Int_t floTrgNum; ///< the number of the corresponding loTrg, -1 if no matching |
829425a5 | 165 | Double_t fChi2MatchTrigger; ///< chi2 of trigger/track matching |
de2cd600 | 166 | |
829425a5 | 167 | Int_t fTrackID; ///< track ID = track number in TrackRefs |
7771752e | 168 | UShort_t fHitsPatternInTrigCh; ///< Word containing info on the hits left in trigger chambers |
423b32ca | 169 | |
170 | Int_t fLocalTrigger; ///< packed local trigger information | |
de2cd600 | 171 | |
ea94c18b | 172 | |
173 | // methods | |
174 | Bool_t ComputeHitWeights(TMatrixD& hitWeightsNB, TMatrixD& hitWeightsB, TMatrixD* mcsCovariances = 0, AliMUONHitForRec* discardedHit = 0) const; | |
175 | void ComputeMCSCovariances(TMatrixD& mcsCovariances) const; | |
176 | ||
177 | ||
178 | ClassDef(AliMUONTrack, 7) // Reconstructed track in ALICE dimuon spectrometer | |
de2cd600 | 179 | }; |
a9e2aefa | 180 | |
181 | #endif |