]>
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 | |
96ebe67e | 20 | class AliMUONVCluster; |
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 | |
b1fea02e | 32 | void Reset(); |
33 | ||
7332f213 | 34 | TClonesArray* GetTrackParamAtCluster() const; |
96ebe67e | 35 | void AddTrackParamAtCluster(const AliMUONTrackParam &trackParam, AliMUONVCluster &cluster, Bool_t copy = kFALSE); |
36 | void RemoveTrackParamAtCluster(AliMUONTrackParam *trackParam); | |
37 | void UpdateTrackParamAtCluster(); | |
38 | void UpdateCovTrackParamAtCluster(); | |
39 | ||
7332f213 | 40 | Bool_t IsValid(); |
41 | ||
42 | void TagRemovableClusters(); | |
43 | ||
96ebe67e | 44 | /// return the number of clusters attached to the track |
7332f213 | 45 | Int_t GetNClusters() const {return fTrackParamAtCluster ? fTrackParamAtCluster->GetEntriesFast() : 0;} |
96ebe67e | 46 | |
47 | /// return kTrue if the vertex must be used to constrain the fit, kFalse if not | |
48 | Bool_t FitWithVertex() const {return fFitWithVertex;} | |
49 | /// set the flag telling whether the vertex must be used to constrain the fit or not | |
50 | void FitWithVertex(Bool_t fitWithVertex) { fFitWithVertex = fitWithVertex; } | |
51 | /// return the vertex resolution square used during the tracking procedure | |
52 | void GetVertexErrXY2(Double_t &nonBendingErr2, Double_t &bendingErr2) const | |
53 | { nonBendingErr2 = fVertexErrXY2[0]; bendingErr2 = fVertexErrXY2[1]; } | |
54 | /// set the vertex resolution square used during the tracking procedure | |
55 | void SetVertexErrXY2(Double_t nonBendingErr2, Double_t bendingErr2) | |
56 | { fVertexErrXY2[0] = nonBendingErr2; fVertexErrXY2[1] = bendingErr2; } | |
57 | ||
58 | /// return kTrue if the multiple scattering must be accounted for in the fit, kFalse if not | |
59 | Bool_t FitWithMCS() const {return fFitWithMCS;} | |
60 | /// set the flag telling whether the multiple scattering must be accounted for in the fit or not | |
61 | void FitWithMCS(Bool_t fitWithMCS) {fFitWithMCS = fitWithMCS;} | |
62 | ||
63 | Bool_t ComputeClusterWeights(TMatrixD* mcsCovariances = 0); | |
64 | Bool_t ComputeLocalChi2(Bool_t accountForMCS); | |
65 | Double_t ComputeGlobalChi2(Bool_t accountForMCS); | |
66 | ||
67 | /// return the minimum value of the function minimized by the fit | |
68 | Double_t GetGlobalChi2() const {return fGlobalChi2;} | |
69 | /// set the minimum value of the function minimized by the fit | |
70 | void SetGlobalChi2(Double_t chi2) { fGlobalChi2 = chi2;} | |
71 | ||
72 | /// return kTRUE if the track has been improved | |
73 | Bool_t IsImproved() const {return fImproved;} | |
74 | /// set the flag telling whether the track has been improved or not | |
75 | void SetImproved(Bool_t improved) { fImproved = improved;} | |
76 | ||
77 | /// return 1,2,3 if track matches with trigger track, 0 if not | |
78 | Int_t GetMatchTrigger(void) const {return fMatchTrigger;} | |
c6ba19f7 | 79 | /// returns the local trigger number corresponding to the trigger track |
96ebe67e | 80 | Int_t GetLoTrgNum(void) const {return floTrgNum;} |
81 | /// set the flag telling whether track matches with trigger track or not | |
82 | void SetMatchTrigger(Int_t matchTrigger) {fMatchTrigger = matchTrigger;} | |
83 | /// set the local trigger number corresponding to the trigger track | |
84 | void SetLoTrgNum(Int_t loTrgNum) {floTrgNum = loTrgNum;} | |
85 | /// return the chi2 of trigger/track matching | |
86 | Double_t GetChi2MatchTrigger(void) const {return fChi2MatchTrigger;} | |
87 | /// set the chi2 of trigger/track matching | |
88 | void SetChi2MatchTrigger(Double_t chi2MatchTrigger) {fChi2MatchTrigger = chi2MatchTrigger;} | |
ea94c18b | 89 | |
96ebe67e | 90 | Int_t ClustersInCommon(AliMUONTrack* track) const; |
ea94c18b | 91 | |
96ebe67e | 92 | Double_t GetNormalizedChi2() const; |
ea94c18b | 93 | |
96ebe67e | 94 | Bool_t* CompatibleTrack(AliMUONTrack* track, Double_t sigma2Cut) const; // return array of compatible chamber |
b8dc484b | 95 | |
96ebe67e | 96 | /// return track number in TrackRefs |
97 | Int_t GetTrackID() const {return fTrackID;} | |
98 | /// set track number in TrackRefs | |
99 | void SetTrackID(Int_t trackID) {fTrackID = trackID;} | |
6464217e | 100 | |
61fed964 | 101 | /// return pointer to track parameters at vertex (can be 0x0) |
102 | AliMUONTrackParam* GetTrackParamAtVertex() {return fTrackParamAtVertex;} | |
96ebe67e | 103 | void SetTrackParamAtVertex(const AliMUONTrackParam* trackParam); |
104 | ||
105 | /// set word telling which trigger chambers where hit by track | |
106 | UShort_t GetHitsPatternInTrigCh() const {return fHitsPatternInTrigCh;} | |
107 | /// set word telling which trigger chambers where hit by track | |
108 | void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) {fHitsPatternInTrigCh = hitsPatternInTrigCh;} | |
7771752e | 109 | |
423b32ca | 110 | /// set local trigger information for the matched trigger track |
96ebe67e | 111 | void SetLocalTrigger(Int_t loCirc, Int_t loStripX, Int_t loStripY, Int_t loDev, Int_t loLpt, Int_t loHpt); |
423b32ca | 112 | /// return local trigger information for the matched trigger track |
61fed964 | 113 | Int_t GetLocalTrigger(void) const { return fLocalTrigger; } |
4a335550 | 114 | /// number of triggering circuit |
01413742 | 115 | Int_t LoCircuit(void) const { return fLocalTrigger & 0xFF; } |
4a335550 | 116 | /// x-strip local trigger |
423b32ca | 117 | Int_t LoStripX(void) const { return fLocalTrigger >> 8 & 0x1F; } |
4a335550 | 118 | /// y-strip local trigger |
423b32ca | 119 | Int_t LoStripY(void) const { return fLocalTrigger >> 13 & 0x0F; } |
4a335550 | 120 | /// deviation local trigger |
423b32ca | 121 | Int_t LoDev(void) const { return fLocalTrigger >> 17 & 0x1F; } |
4a335550 | 122 | /// low pt decision local trigger |
423b32ca | 123 | Int_t LoLpt(void) const { return fLocalTrigger >> 22 & 0x03; } |
4a335550 | 124 | /// high pt decision local trigger |
423b32ca | 125 | Int_t LoHpt(void) const { return fLocalTrigger >> 24 & 0x03; } |
126 | ||
96ebe67e | 127 | void RecursiveDump(void) const; // Recursive dump (with associated clusters) |
6464217e | 128 | |
96ebe67e | 129 | virtual void Print(Option_t* opt="") const; |
a9e2aefa | 130 | |
d2b1e7bb | 131 | virtual void Clear(Option_t* opt=""); |
956019b6 | 132 | |
ea94c18b | 133 | |
a9e2aefa | 134 | private: |
ea94c18b | 135 | |
7332f213 | 136 | mutable TClonesArray* fTrackParamAtCluster; ///< Track parameters at cluster |
de2cd600 | 137 | |
96ebe67e | 138 | Bool_t fFitWithVertex; //!< kTRUE if using the vertex to constrain the fit, kFALSE if not |
139 | Double_t fVertexErrXY2[2]; //!< Vertex resolution square used during the tracking procedure if required | |
208f139e | 140 | |
ea94c18b | 141 | Bool_t fFitWithMCS; //!< kTRUE if accounting for multiple scattering in the fit, kFALSE if not |
142 | ||
96ebe67e | 143 | TMatrixD* fClusterWeightsNonBending; //!< weights matrix, in non bending direction, of clusters attached to the track |
144 | //!< (accounting for multiple scattering and cluster resolution) | |
145 | TMatrixD* fClusterWeightsBending; //!< weights matrix, in bending direction, of clusters attached to the track | |
146 | //!< (accounting for multiple scattering and cluster resolution) | |
ea94c18b | 147 | |
148 | Double_t fGlobalChi2; ///< Global chi2 of the track | |
149 | ||
150 | Bool_t fImproved; //!< kTRUE if the track has been improved | |
151 | ||
423b32ca | 152 | Int_t fMatchTrigger; ///< 0 track does not match trigger |
153 | ///< 1 track match but does not pass pt cut | |
154 | ///< 2 track match Low pt cut | |
155 | ///< 3 track match High pt cut | |
c6ba19f7 | 156 | Int_t floTrgNum; ///< the number of the corresponding loTrg, -1 if no matching |
829425a5 | 157 | Double_t fChi2MatchTrigger; ///< chi2 of trigger/track matching |
de2cd600 | 158 | |
829425a5 | 159 | Int_t fTrackID; ///< track ID = track number in TrackRefs |
96ebe67e | 160 | |
161 | AliMUONTrackParam* fTrackParamAtVertex; //!< Track parameters at vertex | |
162 | ||
7771752e | 163 | UShort_t fHitsPatternInTrigCh; ///< Word containing info on the hits left in trigger chambers |
423b32ca | 164 | |
165 | Int_t fLocalTrigger; ///< packed local trigger information | |
de2cd600 | 166 | |
ea94c18b | 167 | |
168 | // methods | |
96ebe67e | 169 | Bool_t ComputeClusterWeights(TMatrixD& clusterWeightsNB, TMatrixD& clusterWeightsB, |
170 | TMatrixD* mcsCovariances = 0, AliMUONVCluster* discardedCluster = 0) const; | |
ea94c18b | 171 | void ComputeMCSCovariances(TMatrixD& mcsCovariances) const; |
172 | ||
173 | ||
96ebe67e | 174 | ClassDef(AliMUONTrack, 8) // Reconstructed track in ALICE dimuon spectrometer |
de2cd600 | 175 | }; |
a9e2aefa | 176 | |
177 | #endif |