]>
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 | |
ea94c18b | 17 | #include <TClonesArray.h> |
933daf4c | 18 | #include <TMatrixD.h> |
a9e2aefa | 19 | |
96ebe67e | 20 | class AliMUONVCluster; |
ea94c18b | 21 | class AliMUONObjectPair; |
933daf4c | 22 | class AliMUONTrackParam; |
a9e2aefa | 23 | |
30178c30 | 24 | class AliMUONTrack : public TObject |
25 | { | |
a9e2aefa | 26 | public: |
d837040f | 27 | AliMUONTrack(); // Default constructor |
a0dc65b4 | 28 | AliMUONTrack(AliMUONObjectPair *segment, Double_t bendingVertexDispersion); // Constructor from a segment |
8429a5e4 | 29 | virtual ~AliMUONTrack(); // Destructor |
ea94c18b | 30 | AliMUONTrack (const AliMUONTrack& track); // copy constructor |
31 | AliMUONTrack& operator=(const AliMUONTrack& track); // assignment operator | |
a9e2aefa | 32 | |
b1fea02e | 33 | void Reset(); |
34 | ||
7332f213 | 35 | TClonesArray* GetTrackParamAtCluster() const; |
96ebe67e | 36 | void AddTrackParamAtCluster(const AliMUONTrackParam &trackParam, AliMUONVCluster &cluster, Bool_t copy = kFALSE); |
37 | void RemoveTrackParamAtCluster(AliMUONTrackParam *trackParam); | |
4ea3f013 | 38 | Bool_t UpdateTrackParamAtCluster(); |
39 | Bool_t UpdateCovTrackParamAtCluster(); | |
96ebe67e | 40 | |
f202486b | 41 | Bool_t IsValid(UInt_t requestedStationMask, Bool_t request2ChInSameSt45 = kFALSE); |
7332f213 | 42 | |
a0dc65b4 | 43 | void TagRemovableClusters(UInt_t requestedStationMask); |
7332f213 | 44 | |
96ebe67e | 45 | /// return the number of clusters attached to the track |
7332f213 | 46 | Int_t GetNClusters() const {return fTrackParamAtCluster ? fTrackParamAtCluster->GetEntriesFast() : 0;} |
96ebe67e | 47 | |
48 | /// return kTrue if the vertex must be used to constrain the fit, kFalse if not | |
49 | Bool_t FitWithVertex() const {return fFitWithVertex;} | |
50 | /// set the flag telling whether the vertex must be used to constrain the fit or not | |
51 | void FitWithVertex(Bool_t fitWithVertex) { fFitWithVertex = fitWithVertex; } | |
52 | /// return the vertex resolution square used during the tracking procedure | |
53 | void GetVertexErrXY2(Double_t &nonBendingErr2, Double_t &bendingErr2) const | |
54 | { nonBendingErr2 = fVertexErrXY2[0]; bendingErr2 = fVertexErrXY2[1]; } | |
55 | /// set the vertex resolution square used during the tracking procedure | |
56 | void SetVertexErrXY2(Double_t nonBendingErr2, Double_t bendingErr2) | |
57 | { fVertexErrXY2[0] = nonBendingErr2; fVertexErrXY2[1] = bendingErr2; } | |
58 | ||
59 | /// return kTrue if the multiple scattering must be accounted for in the fit, kFalse if not | |
60 | Bool_t FitWithMCS() const {return fFitWithMCS;} | |
61 | /// set the flag telling whether the multiple scattering must be accounted for in the fit or not | |
62 | void FitWithMCS(Bool_t fitWithMCS) {fFitWithMCS = fitWithMCS;} | |
63 | ||
64 | Bool_t ComputeClusterWeights(TMatrixD* mcsCovariances = 0); | |
65 | Bool_t ComputeLocalChi2(Bool_t accountForMCS); | |
66 | Double_t ComputeGlobalChi2(Bool_t accountForMCS); | |
67 | ||
68 | /// return the minimum value of the function minimized by the fit | |
69 | Double_t GetGlobalChi2() const {return fGlobalChi2;} | |
70 | /// set the minimum value of the function minimized by the fit | |
71 | void SetGlobalChi2(Double_t chi2) { fGlobalChi2 = chi2;} | |
72 | ||
73 | /// return kTRUE if the track has been improved | |
74 | Bool_t IsImproved() const {return fImproved;} | |
75 | /// set the flag telling whether the track has been improved or not | |
76 | void SetImproved(Bool_t improved) { fImproved = improved;} | |
77 | ||
78 | /// return 1,2,3 if track matches with trigger track, 0 if not | |
79 | Int_t GetMatchTrigger(void) const {return fMatchTrigger;} | |
c6ba19f7 | 80 | /// returns the local trigger number corresponding to the trigger track |
96ebe67e | 81 | Int_t GetLoTrgNum(void) const {return floTrgNum;} |
82 | /// set the flag telling whether track matches with trigger track or not | |
83 | void SetMatchTrigger(Int_t matchTrigger) {fMatchTrigger = matchTrigger;} | |
84 | /// set the local trigger number corresponding to the trigger track | |
85 | void SetLoTrgNum(Int_t loTrgNum) {floTrgNum = loTrgNum;} | |
86 | /// return the chi2 of trigger/track matching | |
87 | Double_t GetChi2MatchTrigger(void) const {return fChi2MatchTrigger;} | |
88 | /// set the chi2 of trigger/track matching | |
89 | void SetChi2MatchTrigger(Double_t chi2MatchTrigger) {fChi2MatchTrigger = chi2MatchTrigger;} | |
ea94c18b | 90 | |
89c8d66d | 91 | Int_t ClustersInCommon(AliMUONTrack* track) const; |
92 | Int_t ClustersInCommonInSt345(AliMUONTrack* track) const; | |
ea94c18b | 93 | |
5a240757 | 94 | Int_t GetNDF() const; |
96ebe67e | 95 | Double_t GetNormalizedChi2() const; |
ea94c18b | 96 | |
f202486b | 97 | Int_t FindCompatibleClusters(AliMUONTrack &track, Double_t sigma2Cut, Bool_t compatibleCluster[10]) const; |
98 | Bool_t Match(AliMUONTrack &track, Double_t sigma2Cut, Int_t &nMatchClusters) const; | |
b8dc484b | 99 | |
61fed964 | 100 | /// return pointer to track parameters at vertex (can be 0x0) |
40a42243 | 101 | AliMUONTrackParam* GetTrackParamAtVertex() const {return fTrackParamAtVertex;} |
96ebe67e | 102 | void SetTrackParamAtVertex(const AliMUONTrackParam* trackParam); |
103 | ||
104 | /// set word telling which trigger chambers where hit by track | |
105 | UShort_t GetHitsPatternInTrigCh() const {return fHitsPatternInTrigCh;} | |
106 | /// set word telling which trigger chambers where hit by track | |
107 | void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) {fHitsPatternInTrigCh = hitsPatternInTrigCh;} | |
7771752e | 108 | |
423b32ca | 109 | /// set local trigger information for the matched trigger track |
00d46f24 | 110 | void SetLocalTrigger(Int_t loCirc, Int_t loStripX, Int_t loStripY, Int_t loDev, Int_t loLpt, Int_t loHpt, UChar_t respWithoutChamber=0); |
423b32ca | 111 | /// return local trigger information for the matched trigger track |
61fed964 | 112 | Int_t GetLocalTrigger(void) const { return fLocalTrigger; } |
4a335550 | 113 | /// number of triggering circuit |
01413742 | 114 | Int_t LoCircuit(void) const { return fLocalTrigger & 0xFF; } |
4a335550 | 115 | /// x-strip local trigger |
423b32ca | 116 | Int_t LoStripX(void) const { return fLocalTrigger >> 8 & 0x1F; } |
4a335550 | 117 | /// y-strip local trigger |
423b32ca | 118 | Int_t LoStripY(void) const { return fLocalTrigger >> 13 & 0x0F; } |
4a335550 | 119 | /// deviation local trigger |
423b32ca | 120 | Int_t LoDev(void) const { return fLocalTrigger >> 17 & 0x1F; } |
4a335550 | 121 | /// low pt decision local trigger |
423b32ca | 122 | Int_t LoLpt(void) const { return fLocalTrigger >> 22 & 0x03; } |
4a335550 | 123 | /// high pt decision local trigger |
423b32ca | 124 | Int_t LoHpt(void) const { return fLocalTrigger >> 24 & 0x03; } |
00d46f24 | 125 | /// Word stating if trigger would be fired without one chamber |
126 | Int_t GetTriggerWithoutChamber(void) const { return fLocalTrigger >> 26 & 0xF; } | |
127 | /// Check if trigger would be fired without chamber (ich [0,3]) | |
128 | Bool_t TriggerFiredWithoutChamber(Int_t ich) const { return GetTriggerWithoutChamber() >> (3 - ich) & 0x1; } | |
423b32ca | 129 | |
2e2d0c44 | 130 | void FindMCLabel(); |
131 | /// set the corresponding MC track number | |
132 | void SetMCLabel(Int_t label) {fTrackID = label;} | |
133 | /// return the corresponding MC track number | |
134 | Int_t GetMCLabel() const {return fTrackID;} | |
135 | ||
96ebe67e | 136 | void RecursiveDump(void) const; // Recursive dump (with associated clusters) |
6464217e | 137 | |
96ebe67e | 138 | virtual void Print(Option_t* opt="") const; |
a9e2aefa | 139 | |
d2b1e7bb | 140 | virtual void Clear(Option_t* opt=""); |
4ea3f013 | 141 | |
3e1866ad | 142 | /// return the maximum chi2 above which the track can be considered as abnormal (due to extrapolation failure, ...) |
4ea3f013 | 143 | static Double_t MaxChi2() {return fgkMaxChi2;} |
956019b6 | 144 | |
ea94c18b | 145 | |
a9e2aefa | 146 | private: |
4ea3f013 | 147 | |
148 | static const Double_t fgkMaxChi2; ///< maximum chi2 above which the track can be considered as abnormal | |
149 | ||
7332f213 | 150 | mutable TClonesArray* fTrackParamAtCluster; ///< Track parameters at cluster |
de2cd600 | 151 | |
96ebe67e | 152 | Bool_t fFitWithVertex; //!< kTRUE if using the vertex to constrain the fit, kFALSE if not |
153 | Double_t fVertexErrXY2[2]; //!< Vertex resolution square used during the tracking procedure if required | |
208f139e | 154 | |
ea94c18b | 155 | Bool_t fFitWithMCS; //!< kTRUE if accounting for multiple scattering in the fit, kFALSE if not |
156 | ||
96ebe67e | 157 | TMatrixD* fClusterWeightsNonBending; //!< weights matrix, in non bending direction, of clusters attached to the track |
158 | //!< (accounting for multiple scattering and cluster resolution) | |
159 | TMatrixD* fClusterWeightsBending; //!< weights matrix, in bending direction, of clusters attached to the track | |
160 | //!< (accounting for multiple scattering and cluster resolution) | |
ea94c18b | 161 | |
162 | Double_t fGlobalChi2; ///< Global chi2 of the track | |
163 | ||
164 | Bool_t fImproved; //!< kTRUE if the track has been improved | |
165 | ||
423b32ca | 166 | Int_t fMatchTrigger; ///< 0 track does not match trigger |
167 | ///< 1 track match but does not pass pt cut | |
168 | ///< 2 track match Low pt cut | |
169 | ///< 3 track match High pt cut | |
c6ba19f7 | 170 | Int_t floTrgNum; ///< the number of the corresponding loTrg, -1 if no matching |
829425a5 | 171 | Double_t fChi2MatchTrigger; ///< chi2 of trigger/track matching |
de2cd600 | 172 | |
2e2d0c44 | 173 | Int_t fTrackID; ///< Point to the corresponding MC track |
96ebe67e | 174 | |
175 | AliMUONTrackParam* fTrackParamAtVertex; //!< Track parameters at vertex | |
176 | ||
7771752e | 177 | UShort_t fHitsPatternInTrigCh; ///< Word containing info on the hits left in trigger chambers |
423b32ca | 178 | |
179 | Int_t fLocalTrigger; ///< packed local trigger information | |
de2cd600 | 180 | |
ea94c18b | 181 | |
182 | // methods | |
96ebe67e | 183 | Bool_t ComputeClusterWeights(TMatrixD& clusterWeightsNB, TMatrixD& clusterWeightsB, |
184 | TMatrixD* mcsCovariances = 0, AliMUONVCluster* discardedCluster = 0) const; | |
ea94c18b | 185 | void ComputeMCSCovariances(TMatrixD& mcsCovariances) const; |
186 | ||
187 | ||
96ebe67e | 188 | ClassDef(AliMUONTrack, 8) // Reconstructed track in ALICE dimuon spectrometer |
de2cd600 | 189 | }; |
a9e2aefa | 190 | |
191 | #endif |