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 <TClonesArray.h>
19 #include "AliMUONTrackParam.h" // object belongs to the class
21 class AliMUONHitForRec;
23 class AliMUONTrack : public TObject
26 AliMUONTrack(); // Default constructor
27 virtual ~AliMUONTrack(); // Destructor
28 AliMUONTrack (const AliMUONTrack& AliMUONTrack); // copy constructor
29 AliMUONTrack& operator=(const AliMUONTrack& AliMUONTrack); // assignment operator
31 AliMUONTrack(AliMUONHitForRec* hitForRec1, AliMUONHitForRec* hitForRec2); // Constructor from a segment
33 /// return pointeur to track parameters at vertex
34 AliMUONTrackParam* GetTrackParamAtVertex(void) {return &fTrackParamAtVertex;}
35 /// set track parameters at vertex
36 void SetTrackParamAtVertex(AliMUONTrackParam* trackParam) {fTrackParamAtVertex = *trackParam;}
38 /// return array of track parameters at hit
39 TClonesArray* GetTrackParamAtHit(void) const {return fTrackParamAtHit;}
40 /// reset array of track parameters at hit
41 void ResetTrackParamAtHit(void) { fTrackParamAtHit->Delete(); }
42 void AddTrackParamAtHit(AliMUONTrackParam *trackParam, AliMUONHitForRec *hitForRec);
44 /// return array of hitForRec at hit
45 TClonesArray* GetHitForRecAtHit(void) const {return fHitForRecAtHit;}
46 /// reset array of hitForRec at hit
47 void ResetHitForRecAtHit(void) { fHitForRecAtHit->Delete(); }
48 void AddHitForRecAtHit(const AliMUONHitForRec *hitForRec);
50 /// return the number of hits attached to the track
51 Int_t GetNTrackHits(void) const {return fNTrackHits;}
52 /// set the number of hits attached to the track
53 void SetNTrackHits(Int_t nTrackHits) {fNTrackHits = nTrackHits;}
55 /// return pointeur to track parameters extrapolated to the next station
56 AliMUONTrackParam* GetExtrapTrackParam(void) {return &fExtrapTrackParam;}
57 /// set track parameters extrapolated to next station
58 void SetExtrapTrackParam(AliMUONTrackParam* trackParam) {fExtrapTrackParam = *trackParam;}
60 /// return kTrue if the vertex must be used to constrain the fit, kFalse if not
61 Bool_t GetFitWithVertex(void) const {return fFitWithVertex;}
62 /// set the flag telling whether the vertex must be used to constrain the fit or not
63 void SetFitWithVertex(Bool_t fitWithVertex) { fFitWithVertex = fitWithVertex; }
64 /// return the vertex used during the tracking procedure
65 AliMUONHitForRec* GetVertex(void) const {return fVertex;}
66 void SetVertex(AliMUONHitForRec* vertex);
68 /// return the minimum value of the function minimized by the fit
69 Double_t GetFitFMin(void) const {return fFitFMin;}
70 /// set the minimum value of the function minimized by the fit
71 void SetFitFMin(Double_t chi2) { fFitFMin = chi2; }
72 /// return 0,1,2 if track matches with trigger track, -1 if not
73 Int_t GetMatchTrigger(void) const {return fMatchTrigger;}
74 /// returns the local trigger number corresponding to the trigger track
75 Int_t GetLoTrgNum(void) const {return floTrgNum;}
76 /// set the flag telling whether track matches with trigger track or not
77 void SetMatchTrigger(Int_t matchTrigger) {fMatchTrigger = matchTrigger;}
78 /// set the local trigger number corresponding to the trigger track
79 void SetLoTrgNum(Int_t loTrgNum) {floTrgNum = loTrgNum;}
80 /// return the chi2 of trigger/track matching
81 Double_t GetChi2MatchTrigger(void) const {return fChi2MatchTrigger;}
82 /// set the chi2 of trigger/track matching
83 void SetChi2MatchTrigger(Double_t chi2MatchTrigger) {fChi2MatchTrigger = chi2MatchTrigger;}
85 Int_t HitsInCommon(AliMUONTrack* track) const;
86 Bool_t* CompatibleTrack(AliMUONTrack* track, Double_t sigma2Cut) const; // return array of compatible chamber
88 /// return track number in TrackRefs
89 Int_t GetTrackID() const {return fTrackID;}
90 /// set track number in TrackRefs
91 void SetTrackID(Int_t trackID) {fTrackID = trackID;}
93 /// set word telling which trigger chambers where hit by track
94 UShort_t GetHitsPatternInTrigCh() const {return fHitsPatternInTrigCh;}
95 /// set word telling which trigger chambers where hit by track
96 void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) {fHitsPatternInTrigCh = hitsPatternInTrigCh;}
98 Double_t TryOneHitForRec(AliMUONHitForRec* hitForRec);
99 Double_t TryTwoHitForRec(AliMUONHitForRec* hitForRec1, AliMUONHitForRec* hitForRec2);
101 void RecursiveDump(void) const; // Recursive dump (with track hits)
103 virtual void Print(Option_t* opt="") const;
107 static const Double_t fgkMaxTrackingDistanceBending; ///< Maximum distance to the track to search for compatible hitForRec(s) in bending direction
108 static const Double_t fgkMaxTrackingDistanceNonBending; ///< Maximum distance to the track to search for compatible hitForRec(s) in non bending direction
110 AliMUONTrackParam fTrackParamAtVertex; //!< Track parameters at vertex
111 TClonesArray *fTrackParamAtHit; ///< Track parameters at hit
112 TClonesArray *fHitForRecAtHit; ///< Cluster parameters at hit
113 Int_t fNTrackHits; ///< Number of hits attached to the track
115 AliMUONTrackParam fExtrapTrackParam; //!< Track parameters extrapolated to a given z position
117 Bool_t fFitWithVertex; //!< 1 if using the vertex to constrain the fit, 0 if not
118 AliMUONHitForRec *fVertex; //!< Vertex used during the tracking procedure if required
120 Double_t fFitFMin; ///< minimum value of the function minimized by the fit
121 Int_t fMatchTrigger; ///< -1 track does not match trigger
122 ///< 0 track match but does not pass pt cut
123 ///< 1 track match Low pt cut
124 ///< 2 track match High pt cut
125 Int_t floTrgNum; ///< the number of the corresponding loTrg, -1 if no matching
126 Double_t fChi2MatchTrigger; ///< chi2 of trigger/track matching
128 Int_t fTrackID; ///< track ID = track number in TrackRefs
129 UShort_t fHitsPatternInTrigCh; ///< Word containing info on the hits left in trigger chambers
132 ClassDef(AliMUONTrack, 5) // Reconstructed track in ALICE dimuon spectrometer