]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MUON/AliMUONTrack.h
The changes to perform the trigger chamber efficiency determination from ESD
[u/mrichter/AliRoot.git] / MUON / AliMUONTrack.h
... / ...
CommitLineData
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$*/
7// Revision of includes 07/05/2004
8
9/// \ingroup rec
10/// \class AliMUONTrack
11/// \brief Reconstructed track in ALICE dimuon spectrometer
12///
13////////////////////////////////////////////////////
14/// Reconstructed track in ALICE dimuon spectrometer
15////////////////////////////////////////////////////
16
17#include "AliMUONTrackParam.h" // object belongs to the class
18#include <TClonesArray.h>
19
20class AliMUONVCluster;
21class AliMUONObjectPair;
22class AliESDMuonTrack;
23
24class AliMUONTrack : public TObject
25{
26 public:
27 AliMUONTrack(); // Default constructor
28 AliMUONTrack(AliMUONObjectPair *segment); // Constructor from a segment
29 AliMUONTrack(AliESDMuonTrack& esdTrack); // Constructor from an ESD muon track
30 virtual ~AliMUONTrack(); // Destructor
31 AliMUONTrack (const AliMUONTrack& track); // copy constructor
32 AliMUONTrack& operator=(const AliMUONTrack& track); // assignment operator
33
34
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;}
77 /// returns the local trigger number corresponding to the trigger track
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;}
87
88 Int_t ClustersInCommon(AliMUONTrack* track) const;
89
90 Double_t GetNormalizedChi2() const;
91
92 Bool_t* CompatibleTrack(AliMUONTrack* track, Double_t sigma2Cut) const; // return array of compatible chamber
93
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;}
98
99 /// return pointer to track parameters at vertex (can be 0x0)
100 AliMUONTrackParam* GetTrackParamAtVertex() {return fTrackParamAtVertex;}
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;}
107
108 /// set local trigger information for the matched trigger track
109 void SetLocalTrigger(Int_t loCirc, Int_t loStripX, Int_t loStripY, Int_t loDev, Int_t loLpt, Int_t loHpt);
110 /// return local trigger information for the matched trigger track
111 Int_t GetLocalTrigger(void) const { return fLocalTrigger; }
112 /// number of triggering circuit
113 Int_t LoCircuit(void) const { return fLocalTrigger & 0xFF; }
114 /// x-strip local trigger
115 Int_t LoStripX(void) const { return fLocalTrigger >> 8 & 0x1F; }
116 /// y-strip local trigger
117 Int_t LoStripY(void) const { return fLocalTrigger >> 13 & 0x0F; }
118 /// deviation local trigger
119 Int_t LoDev(void) const { return fLocalTrigger >> 17 & 0x1F; }
120 /// low pt decision local trigger
121 Int_t LoLpt(void) const { return fLocalTrigger >> 22 & 0x03; }
122 /// high pt decision local trigger
123 Int_t LoHpt(void) const { return fLocalTrigger >> 24 & 0x03; }
124
125 void RecursiveDump(void) const; // Recursive dump (with associated clusters)
126
127 virtual void Print(Option_t* opt="") const;
128
129 virtual void Clear(Option_t* opt="");
130
131
132 private:
133
134 TClonesArray* fTrackParamAtCluster; ///< Track parameters at cluster
135
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
138
139 Bool_t fFitWithMCS; //!< kTRUE if accounting for multiple scattering in the fit, kFALSE if not
140
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)
145
146 Double_t fGlobalChi2; ///< Global chi2 of the track
147
148 Bool_t fImproved; //!< kTRUE if the track has been improved
149
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
154 Int_t floTrgNum; ///< the number of the corresponding loTrg, -1 if no matching
155 Double_t fChi2MatchTrigger; ///< chi2 of trigger/track matching
156
157 Int_t fTrackID; ///< track ID = track number in TrackRefs
158
159 AliMUONTrackParam* fTrackParamAtVertex; //!< Track parameters at vertex
160
161 UShort_t fHitsPatternInTrigCh; ///< Word containing info on the hits left in trigger chambers
162
163 Int_t fLocalTrigger; ///< packed local trigger information
164
165
166 // methods
167 Bool_t ComputeClusterWeights(TMatrixD& clusterWeightsNB, TMatrixD& clusterWeightsB,
168 TMatrixD* mcsCovariances = 0, AliMUONVCluster* discardedCluster = 0) const;
169 void ComputeMCSCovariances(TMatrixD& mcsCovariances) const;
170
171
172 ClassDef(AliMUONTrack, 8) // Reconstructed track in ALICE dimuon spectrometer
173};
174
175#endif