Redesigning Original tracking classes (Philippe Pillot)
[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 class AliMUONSegment;
23
24 class AliMUONTrack : public TObject 
25 {
26  public:
27   AliMUONTrack(); // Default constructor
28   virtual ~AliMUONTrack(); // Destructor
29   AliMUONTrack (const AliMUONTrack& AliMUONTrack); // copy constructor
30   AliMUONTrack& operator=(const AliMUONTrack& AliMUONTrack); // assignment operator
31
32   AliMUONTrack(AliMUONSegment* BegSegment, AliMUONSegment* EndSegment); // Constructor from two Segment's
33   AliMUONTrack(AliMUONSegment* Segment, AliMUONHitForRec* HitForRec); // Constructor from one Segment and one HitForRec
34
35   AliMUONTrackParam*         GetTrackParamAtVertex(void) {return &fTrackParamAtVertex;}
36   void                       SetTrackParamAtVertex(AliMUONTrackParam* TrackParam) {fTrackParamAtVertex = *TrackParam;}
37
38   TClonesArray*              GetTrackParamAtHit(void) const {return fTrackParamAtHit;}
39   void                       ResetTrackParamAtHit(void) { fTrackParamAtHit->Delete(); }
40   void                       AddTrackParamAtHit(AliMUONTrackParam *trackParam, AliMUONHitForRec *hitForRec); 
41   
42   TClonesArray*              GetHitForRecAtHit(void) const {return fHitForRecAtHit;}
43   void                       ResetHitForRecAtHit(void) { fHitForRecAtHit->Delete(); }
44   void                       AddHitForRecAtHit(const AliMUONHitForRec *hitForRec); 
45
46   Int_t                      GetNTrackHits(void) const {return fNTrackHits;}
47   void                       SetNTrackHits(Int_t nTrackHits) {fNTrackHits = nTrackHits;}
48
49   Double_t                   GetFitFMin(void) const {return fFitFMin;}
50   void                       SetFitFMin(Double_t chi2) { fFitFMin = chi2; } // set Chi2
51   Bool_t                     GetMatchTrigger(void) const {return fMatchTrigger;}
52   void                       SetMatchTrigger(Bool_t MatchTrigger) {fMatchTrigger = MatchTrigger;}
53   Double_t                   GetChi2MatchTrigger(void) const {return fChi2MatchTrigger;}
54   void                       SetChi2MatchTrigger(Double_t Chi2MatchTrigger) {fChi2MatchTrigger = Chi2MatchTrigger;}
55   
56   Int_t                      HitsInCommon(AliMUONTrack* Track) const;
57   Bool_t*                    CompatibleTrack(AliMUONTrack* Track, Double_t Sigma2Cut) const; // return array of compatible chamber
58   
59   Int_t                      GetTrackID() const {return fTrackID;}
60   void                       SetTrackID(Int_t trackID) {fTrackID = trackID;}
61
62   void                       RecursiveDump(void) const; // Recursive dump (with track hits)
63
64   virtual void               Print(Option_t* opt="") const;
65
66
67  private:
68   AliMUONTrackParam fTrackParamAtVertex; ///< Track parameters at vertex
69   TClonesArray *fTrackParamAtHit; ///< Track parameters at hit
70   TClonesArray *fHitForRecAtHit; ///< Cluster parameters at hit
71   Int_t fNTrackHits; ///< Number of TrackHit's
72   
73   Double_t fFitFMin; ///< minimum value of the function minimized by the fit
74   Bool_t fMatchTrigger; ///< 1 if track matches with trigger track, 0 if not
75   Double_t fChi2MatchTrigger; ///< chi2 of trigger/track matching 
76   
77   Int_t fTrackID; ///< track ID = track number in TrackRefs
78   
79   
80   ClassDef(AliMUONTrack, 3) // Reconstructed track in ALICE dimuon spectrometer
81 };
82         
83 #endif