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