3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 // Revision of includes 07/05/2004
10 /// \class AliMUONTrack
11 /// \brief Reconstructed track in ALICE dimuon spectrometer
13 ////////////////////////////////////////////////////
14 /// Reconstructed track in ALICE dimuon spectrometer
15 ////////////////////////////////////////////////////
17 #include "AliMUONTrackParam.h" // object belongs to the class
18 #include <TClonesArray.h>
20 class AliMUONVCluster;
21 class AliMUONObjectPair;
23 class AliMUONTrack : public TObject
26 AliMUONTrack(); // Default constructor
27 AliMUONTrack(AliMUONObjectPair *segment); // Constructor from a segment
28 virtual ~AliMUONTrack(); // Destructor
29 AliMUONTrack (const AliMUONTrack& track); // copy constructor
30 AliMUONTrack& operator=(const AliMUONTrack& track); // assignment operator
33 /// return array of track parameters at cluster
34 TClonesArray* GetTrackParamAtCluster() const {return fTrackParamAtCluster;}
35 void AddTrackParamAtCluster(const AliMUONTrackParam &trackParam, AliMUONVCluster &cluster, Bool_t copy = kFALSE);
36 void RemoveTrackParamAtCluster(AliMUONTrackParam *trackParam);
37 void UpdateTrackParamAtCluster();
38 void UpdateCovTrackParamAtCluster();
40 /// return the number of clusters attached to the track
41 Int_t GetNClusters() const {return fTrackParamAtCluster->GetEntriesFast();}
43 /// return kTrue if the vertex must be used to constrain the fit, kFalse if not
44 Bool_t FitWithVertex() const {return fFitWithVertex;}
45 /// set the flag telling whether the vertex must be used to constrain the fit or not
46 void FitWithVertex(Bool_t fitWithVertex) { fFitWithVertex = fitWithVertex; }
47 /// return the vertex resolution square used during the tracking procedure
48 void GetVertexErrXY2(Double_t &nonBendingErr2, Double_t &bendingErr2) const
49 { nonBendingErr2 = fVertexErrXY2[0]; bendingErr2 = fVertexErrXY2[1]; }
50 /// set the vertex resolution square used during the tracking procedure
51 void SetVertexErrXY2(Double_t nonBendingErr2, Double_t bendingErr2)
52 { fVertexErrXY2[0] = nonBendingErr2; fVertexErrXY2[1] = bendingErr2; }
54 /// return kTrue if the multiple scattering must be accounted for in the fit, kFalse if not
55 Bool_t FitWithMCS() const {return fFitWithMCS;}
56 /// set the flag telling whether the multiple scattering must be accounted for in the fit or not
57 void FitWithMCS(Bool_t fitWithMCS) {fFitWithMCS = fitWithMCS;}
59 Bool_t ComputeClusterWeights(TMatrixD* mcsCovariances = 0);
60 Bool_t ComputeLocalChi2(Bool_t accountForMCS);
61 Double_t ComputeGlobalChi2(Bool_t accountForMCS);
63 /// return the minimum value of the function minimized by the fit
64 Double_t GetGlobalChi2() const {return fGlobalChi2;}
65 /// set the minimum value of the function minimized by the fit
66 void SetGlobalChi2(Double_t chi2) { fGlobalChi2 = chi2;}
68 /// return kTRUE if the track has been improved
69 Bool_t IsImproved() const {return fImproved;}
70 /// set the flag telling whether the track has been improved or not
71 void SetImproved(Bool_t improved) { fImproved = improved;}
73 /// return 1,2,3 if track matches with trigger track, 0 if not
74 Int_t GetMatchTrigger(void) const {return fMatchTrigger;}
75 /// returns the local trigger number corresponding to the trigger track
76 Int_t GetLoTrgNum(void) const {return floTrgNum;}
77 /// set the flag telling whether track matches with trigger track or not
78 void SetMatchTrigger(Int_t matchTrigger) {fMatchTrigger = matchTrigger;}
79 /// set the local trigger number corresponding to the trigger track
80 void SetLoTrgNum(Int_t loTrgNum) {floTrgNum = loTrgNum;}
81 /// return the chi2 of trigger/track matching
82 Double_t GetChi2MatchTrigger(void) const {return fChi2MatchTrigger;}
83 /// set the chi2 of trigger/track matching
84 void SetChi2MatchTrigger(Double_t chi2MatchTrigger) {fChi2MatchTrigger = chi2MatchTrigger;}
86 Int_t ClustersInCommon(AliMUONTrack* track) const;
88 Double_t GetNormalizedChi2() const;
90 Bool_t* CompatibleTrack(AliMUONTrack* track, Double_t sigma2Cut) const; // return array of compatible chamber
92 /// return track number in TrackRefs
93 Int_t GetTrackID() const {return fTrackID;}
94 /// set track number in TrackRefs
95 void SetTrackID(Int_t trackID) {fTrackID = trackID;}
97 AliMUONTrackParam* GetTrackParamAtVertex();
98 void SetTrackParamAtVertex(const AliMUONTrackParam* trackParam);
100 /// set word telling which trigger chambers where hit by track
101 UShort_t GetHitsPatternInTrigCh() const {return fHitsPatternInTrigCh;}
102 /// set word telling which trigger chambers where hit by track
103 void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) {fHitsPatternInTrigCh = hitsPatternInTrigCh;}
105 /// set local trigger information for the matched trigger track
106 void SetLocalTrigger(Int_t loCirc, Int_t loStripX, Int_t loStripY, Int_t loDev, Int_t loLpt, Int_t loHpt);
107 /// return local trigger information for the matched trigger track
108 Int_t GetLocalTrigger(void) const { return fLocalTrigger; }
109 /// number of triggering circuit
110 Int_t LoCircuit(void) const { return fLocalTrigger & 0xFF; }
111 /// x-strip local trigger
112 Int_t LoStripX(void) const { return fLocalTrigger >> 8 & 0x1F; }
113 /// y-strip local trigger
114 Int_t LoStripY(void) const { return fLocalTrigger >> 13 & 0x0F; }
115 /// deviation local trigger
116 Int_t LoDev(void) const { return fLocalTrigger >> 17 & 0x1F; }
117 /// low pt decision local trigger
118 Int_t LoLpt(void) const { return fLocalTrigger >> 22 & 0x03; }
119 /// high pt decision local trigger
120 Int_t LoHpt(void) const { return fLocalTrigger >> 24 & 0x03; }
122 void RecursiveDump(void) const; // Recursive dump (with associated clusters)
124 virtual void Print(Option_t* opt="") const;
126 virtual void Clear(Option_t* opt="");
131 TClonesArray* fTrackParamAtCluster; ///< Track parameters at cluster
133 Bool_t fFitWithVertex; //!< kTRUE if using the vertex to constrain the fit, kFALSE if not
134 Double_t fVertexErrXY2[2]; //!< Vertex resolution square used during the tracking procedure if required
136 Bool_t fFitWithMCS; //!< kTRUE if accounting for multiple scattering in the fit, kFALSE if not
138 TMatrixD* fClusterWeightsNonBending; //!< weights matrix, in non bending direction, of clusters attached to the track
139 //!< (accounting for multiple scattering and cluster resolution)
140 TMatrixD* fClusterWeightsBending; //!< weights matrix, in bending direction, of clusters attached to the track
141 //!< (accounting for multiple scattering and cluster resolution)
143 Double_t fGlobalChi2; ///< Global chi2 of the track
145 Bool_t fImproved; //!< kTRUE if the track has been improved
147 Int_t fMatchTrigger; ///< 0 track does not match trigger
148 ///< 1 track match but does not pass pt cut
149 ///< 2 track match Low pt cut
150 ///< 3 track match High pt cut
151 Int_t floTrgNum; ///< the number of the corresponding loTrg, -1 if no matching
152 Double_t fChi2MatchTrigger; ///< chi2 of trigger/track matching
154 Int_t fTrackID; ///< track ID = track number in TrackRefs
156 AliMUONTrackParam* fTrackParamAtVertex; //!< Track parameters at vertex
158 UShort_t fHitsPatternInTrigCh; ///< Word containing info on the hits left in trigger chambers
160 Int_t fLocalTrigger; ///< packed local trigger information
164 Bool_t ComputeClusterWeights(TMatrixD& clusterWeightsNB, TMatrixD& clusterWeightsB,
165 TMatrixD* mcsCovariances = 0, AliMUONVCluster* discardedCluster = 0) const;
166 void ComputeMCSCovariances(TMatrixD& mcsCovariances) const;
169 ClassDef(AliMUONTrack, 8) // Reconstructed track in ALICE dimuon spectrometer