]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTrack.h
Pre-allocate right amount of memory when used for de,manu storage (Laurent)
[u/mrichter/AliRoot.git] / MUON / AliMUONTrack.h
CommitLineData
a9e2aefa 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$*/
30178c30 7// Revision of includes 07/05/2004
8
692de412 9/// \ingroup rec
10/// \class AliMUONTrack
11/// \brief Reconstructed track in ALICE dimuon spectrometer
12///
13////////////////////////////////////////////////////
14/// Reconstructed track in ALICE dimuon spectrometer
15////////////////////////////////////////////////////
3831f268 16
30178c30 17#include <TClonesArray.h>
18
c1a185bf 19#include "AliMUONTrackParam.h" // object belongs to the class
b8dc484b 20#include "AliMUONHitForRec.h" // object belongs to the class
a9e2aefa 21
343146bf 22//const Int_t kMaxTrackingChamber=10;
23 // not used
d837040f 24
c1a185bf 25class TObjArray;
956019b6 26class TVirtualFitter;
29f1b13a 27class AliMUONTrackReconstructor;
a9e2aefa 28class AliMUONHitForRec;
29class AliMUONSegment;
30
30178c30 31class AliMUONTrack : public TObject
32{
a9e2aefa 33 public:
d837040f 34 AliMUONTrack(); // Default constructor
8429a5e4 35 virtual ~AliMUONTrack(); // Destructor
a9e2aefa 36 AliMUONTrack (const AliMUONTrack& AliMUONTrack); // copy constructor
37 AliMUONTrack& operator=(const AliMUONTrack& AliMUONTrack); // assignment operator
38
29f1b13a 39 AliMUONTrack(AliMUONSegment* BegSegment, AliMUONSegment* EndSegment, AliMUONTrackReconstructor* TrackReconstructor); // Constructor from two Segment's
40 AliMUONTrack(AliMUONSegment* Segment, AliMUONHitForRec* HitForRec, AliMUONTrackReconstructor* TrackReconstructor); // Constructor from one Segment and one HitForRec
8429a5e4 41 void Remove(void);
a9e2aefa 42
29f1b13a 43 AliMUONTrackReconstructor* GetTrackReconstructor(void) const {return fTrackReconstructor;}
6464217e 44 AliMUONTrackParam* GetTrackParamAtVertex(void) {return &fTrackParamAtVertex;}
45 void SetTrackParamAtVertex(void); // Set track parameters at vertex from last stations 4 & 5
46 void SetTrackParamAtVertex(AliMUONTrackParam* TrackParam) {fTrackParamAtVertex = *TrackParam;}
47 TClonesArray* GetTrackParamAtHit(void) const {return fTrackParamAtHit;}
48 TClonesArray* GetHitForRecAtHit(void) const {return fHitForRecAtHit;}
49 void ResetTrackParamAtHit(void) { fTrackParamAtHit->Delete(); }
50 void ResetHitForRecAtHit(void) { fHitForRecAtHit->Delete(); }
51 void AddTrackParamAtHit(const AliMUONTrackParam *trackParam);
52 void AddHitForRecAtHit(const AliMUONHitForRec *hitForRec);
53
54 TObjArray* GetTrackHitsPtr(void) const {return fTrackHitsPtr;}
55 Int_t GetNTrackHits(void) const {return fNTrackHits;}
56 void SetNTrackHits(Int_t nTrackHits) {fNTrackHits = nTrackHits;}
57 Int_t GetFitMCS(void) const {return fFitMCS;}
58 Int_t GetFitNParam(void) const {return fFitNParam;}
59 Int_t GetFitStart(void) const {return fFitStart;}
60 Double_t GetFitFMin(void) const {return fFitFMin;}
61 Bool_t GetMatchTrigger(void) const {return fMatchTrigger;}
62 Double_t GetChi2MatchTrigger(void) const {return fChi2MatchTrigger;}
63 void SetFitMCS(Int_t FitMCS);
64 void SetFitNParam(Int_t FitNParam);
65 void SetFitStart(Int_t FitStart);
66 void SetFitFMin(Double_t chi2) { fFitFMin = chi2; } // set Chi2
67
68 AliMUONTrackParam* GetTrackParamAtFirstHit(void) const;
69
70 void RecursiveDump(void) const; // Recursive dump (with track hits)
71 void Fit(); // Fit
72 void AddSegment(AliMUONSegment* Segment); // Add Segment
73 void AddHitForRec(AliMUONHitForRec* HitForRec); // Add HitForRec
74 void SetTrackParamAtHit(Int_t indexHit, AliMUONTrackParam *TrackParam) const;
75 Int_t HitsInCommon(AliMUONTrack* Track) const;
76 void MatchTriggerTrack(TClonesArray* TriggerTrackArray);
77 Bool_t* CompatibleTrack(AliMUONTrack* Track, Double_t Sigma2Cut) const; // return array of compatible chamber
b8dc484b 78
6464217e 79 Int_t GetTrackID() const {return fTrackID;}
80 void SetTrackID(Int_t trackID) {fTrackID = trackID;}
81
82 virtual void Print(Option_t* opt="") const;
83
84 static TVirtualFitter* Fitter(void) {return fgFitter;}
85
a9e2aefa 86
956019b6 87
a9e2aefa 88 protected:
89 private:
829425a5 90 static TVirtualFitter* fgFitter; //!< Pointer to track fitter
91 AliMUONTrackReconstructor* fTrackReconstructor; //!< Pointer to TrackReconstructor
92 AliMUONTrackParam fTrackParamAtVertex; ///< Track parameters at vertex
93 TClonesArray *fTrackParamAtHit; ///< Track parameters at hit
94 TClonesArray *fHitForRecAtHit; ///< Cluster parameters at hit
95 TObjArray *fTrackHitsPtr; //!< Pointer to array of pointers to TrackHit's
96 Int_t fNTrackHits; ///< Number of TrackHit's
97 Int_t fFitMCS; ///< 0(1) for fit without(with) multiple Coulomb scattering
98 Int_t fFitNParam; ///< 3(5) for fit with 3(5) parameters
99 Int_t fFitStart; ///< 0 or 1 for fit starting from parameters at vertex (0) or at first TrackHit(1)
100 Double_t fFitFMin; ///< minimum value of the function minimized by the fit
101 Bool_t fMatchTrigger; ///< 1 if track matches with trigger track, 0 if not
102 Double_t fChi2MatchTrigger; ///< chi2 of trigger/track matching
d837040f 103
829425a5 104 Int_t fTrackID; ///< track ID = track number in TrackRefs
b8dc484b 105
8547965d 106 ClassDef(AliMUONTrack, 2) // Reconstructed track in ALICE dimuon spectrometer
a9e2aefa 107 };
108
109#endif