]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTrack.h
Optional geometry without CPV
[u/mrichter/AliRoot.git] / MUON / AliMUONTrack.h
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 <TClonesArray.h>
18
19 #include "AliMUONTrackParam.h" // object belongs to the class
20
21 class AliMUONHitForRec;
22
23 class AliMUONTrack : public TObject 
24 {
25  public:
26   AliMUONTrack(); // Default constructor
27   virtual ~AliMUONTrack(); // Destructor
28   AliMUONTrack (const AliMUONTrack& AliMUONTrack); // copy constructor
29   AliMUONTrack& operator=(const AliMUONTrack& AliMUONTrack); // assignment operator
30
31   AliMUONTrack(AliMUONHitForRec* hitForRec1, AliMUONHitForRec* hitForRec2); // Constructor from a segment
32
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;}
37
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         /// add track parameters to the array of track parameters at hit
43   void                       AddTrackParamAtHit(AliMUONTrackParam *trackParam, AliMUONHitForRec *hitForRec); 
44   
45         /// return array of hitForRec at hit
46   TClonesArray*              GetHitForRecAtHit(void) const {return fHitForRecAtHit;}
47         /// reset array of hitForRec at hit
48   void                       ResetHitForRecAtHit(void) { fHitForRecAtHit->Delete(); }
49   void                       AddHitForRecAtHit(const AliMUONHitForRec *hitForRec); 
50
51         /// return the number of hits attached to the track
52   Int_t                      GetNTrackHits(void) const {return fNTrackHits;}
53         /// set the number of hits attached to the track
54   void                       SetNTrackHits(Int_t nTrackHits) {fNTrackHits = nTrackHits;}
55
56         /// return pointeur to track parameters extrapolated to the next station
57   AliMUONTrackParam*         GetExtrapTrackParam(void) {return &fExtrapTrackParam;}
58         /// set track parameters extrapolated to next station
59   void                       SetExtrapTrackParam(AliMUONTrackParam* trackParam) {fExtrapTrackParam = *trackParam;}
60
61         /// return kTrue if the vertex must be used to constrain the fit, kFalse if not
62   Bool_t                     GetFitWithVertex(void) const {return fFitWithVertex;}
63         /// set the flag telling whether the vertex must be used to constrain the fit or not
64   void                       SetFitWithVertex(Bool_t fitWithVertex) { fFitWithVertex = fitWithVertex; }
65         /// return the vertex used during the tracking procedure
66   AliMUONHitForRec*          GetVertex(void) const {return fVertex;}
67   void                       SetVertex(AliMUONHitForRec* vertex);
68
69         /// return the minimum value of the function minimized by the fit
70   Double_t                   GetFitFMin(void) const {return fFitFMin;}
71         /// set the minimum value of the function minimized by the fit
72   void                       SetFitFMin(Double_t chi2) { fFitFMin = chi2; }
73         /// return kTrue if track matches with trigger track, kFalse if not
74   Bool_t                     GetMatchTrigger(void) const {return fMatchTrigger;}
75         /// set the flag telling whether track matches with trigger track or not
76   void                       SetMatchTrigger(Bool_t matchTrigger) {fMatchTrigger = matchTrigger;}
77         /// return the chi2 of trigger/track matching 
78   Double_t                   GetChi2MatchTrigger(void) const {return fChi2MatchTrigger;}
79         /// set the chi2 of trigger/track matching 
80   void                       SetChi2MatchTrigger(Double_t chi2MatchTrigger) {fChi2MatchTrigger = chi2MatchTrigger;}
81   
82   Int_t                      HitsInCommon(AliMUONTrack* track) const;
83   Bool_t*                    CompatibleTrack(AliMUONTrack* track, Double_t sigma2Cut) const; // return array of compatible chamber
84   
85         /// return track number in TrackRefs
86   Int_t                      GetTrackID() const {return fTrackID;}
87         /// set track number in TrackRefs
88   void                       SetTrackID(Int_t trackID) {fTrackID = trackID;}
89
90   Double_t                   TryOneHitForRec(AliMUONHitForRec* hitForRec);
91   Double_t                   TryTwoHitForRec(AliMUONHitForRec* hitForRec1, AliMUONHitForRec* hitForRec2); 
92   
93   void                       RecursiveDump(void) const; // Recursive dump (with track hits)
94
95   virtual void               Print(Option_t* opt="") const;
96
97
98  private:
99   static const Double_t fgkMaxTrackingDistanceBending;    ///< Maximum distance to the track to search for compatible hitForRec(s) in bending direction
100   static const Double_t fgkMaxTrackingDistanceNonBending; ///< Maximum distance to the track to search for compatible hitForRec(s) in non bending direction
101   
102   AliMUONTrackParam fTrackParamAtVertex; ///< Track parameters at vertex
103   TClonesArray *fTrackParamAtHit; ///< Track parameters at hit
104   TClonesArray *fHitForRecAtHit; ///< Cluster parameters at hit
105   Int_t fNTrackHits; ///< Number of hits attached to the track
106   
107   AliMUONTrackParam fExtrapTrackParam; //!< Track parameters extrapolated to a given z position
108   
109   Bool_t fFitWithVertex; //!< 1 if using the vertex to constrain the fit, 0 if not
110   AliMUONHitForRec *fVertex; //!< Vertex used during the tracking procedure if required
111   
112   Double_t fFitFMin; ///< minimum value of the function minimized by the fit
113   Bool_t fMatchTrigger; ///< 1 if track matches with trigger track, 0 if not
114   Double_t fChi2MatchTrigger; ///< chi2 of trigger/track matching 
115   
116   Int_t fTrackID; ///< track ID = track number in TrackRefs
117   
118   
119   ClassDef(AliMUONTrack, 3) // Reconstructed track in ALICE dimuon spectrometer
120 };
121         
122 #endif