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