Doxygen configuration files (Initial version)
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackReconstructor.h
CommitLineData
29f1b13a 1#ifndef ALIMUONTRACKTRECONSTRUCTOR_H
2#define ALIMUONTRACKRECONSTRUCTOR_H
a9e2aefa 3
3831f268 4////////////////////////////////////
29f1b13a 5// MUON track reconstructor in ALICE
3831f268 6////////////////////////////////////
7
8#include <TObject.h>
190f97ea 9#include "AliMUONConstants.h"
a9e2aefa 10
a9e2aefa 11class AliMUONHitForRec;
12class AliMUONSegment;
13class TClonesArray;
14class TFile;
15class TTree;
52c9bc11 16class AliMUONData;
17class AliRunLoader;
18class AliLoader;
29fc2c86 19class AliTrackReference;
a9e2aefa 20
29f1b13a 21class AliMUONTrackReconstructor : public TObject {
a9e2aefa 22
23 public:
29f1b13a 24 AliMUONTrackReconstructor(AliLoader* loader); // default Constructor
25 virtual ~AliMUONTrackReconstructor(void); // Destructor
a9e2aefa 26
29f1b13a 27 // Parameters for track reconstruction: public methods
a9e2aefa 28 // Get and Set, Set to defaults
3831f268 29 Double_t GetMinBendingMomentum(void) const {return fMinBendingMomentum;}
a9e2aefa 30 void SetMinBendingMomentum(Double_t MinBendingMomentum) {fMinBendingMomentum = MinBendingMomentum;}
3831f268 31 Double_t GetMaxBendingMomentum(void) const {return fMaxBendingMomentum;}
d0bfce8d 32 void SetMaxBendingMomentum(Double_t MaxBendingMomentum) {fMaxBendingMomentum = MaxBendingMomentum;}
3831f268 33 Double_t GetMaxChi2(void) const {return fMaxChi2;}
d0bfce8d 34 void SetMaxChi2(Double_t MaxChi2) {fMaxChi2 = MaxChi2;}
3831f268 35 Double_t GetMaxSigma2Distance(void) const {return fMaxSigma2Distance;}
a9e2aefa 36 void SetMaxSigma2Distance(Double_t MaxSigma2Distance) {fMaxSigma2Distance = MaxSigma2Distance;}
3831f268 37 Double_t GetBendingResolution(void) const {return fBendingResolution;}
a9e2aefa 38 void SetBendingResolution(Double_t BendingResolution) {fBendingResolution = BendingResolution;}
3831f268 39 Double_t GetNonBendingResolution(void) const {return fNonBendingResolution;}
a9e2aefa 40 void SetNonBendingResolution(Double_t NonBendingResolution) {fNonBendingResolution = NonBendingResolution;}
3831f268 41 Double_t GetChamberThicknessInX0(void) const {return fChamberThicknessInX0;}
a9e2aefa 42 void SetChamberThicknessInX0(Double_t ChamberThicknessInX0) {fChamberThicknessInX0 = ChamberThicknessInX0;}
3831f268 43 Double_t GetSimpleBValue(void) const {return fSimpleBValue;}
a9e2aefa 44 void SetSimpleBValue(Double_t SimpleBValue) {fSimpleBValue = SimpleBValue;}
3831f268 45 Double_t GetSimpleBLength(void) const {return fSimpleBLength;}
a9e2aefa 46 void SetSimpleBLength(Double_t SimpleBLength) {fSimpleBLength = SimpleBLength;}
3831f268 47 Double_t GetSimpleBPosition(void) const {return fSimpleBPosition;}
a9e2aefa 48 void SetSimpleBPosition(Double_t SimpleBPosition) {fSimpleBPosition = SimpleBPosition;}
29fc2c86 49 Int_t GetRecTrackRefHits(void) const {return fRecTrackRefHits;}
50 void SetRecTrackRefHits(Int_t RecTrackRefHits) {fRecTrackRefHits = RecTrackRefHits;}
3831f268 51 Double_t GetEfficiency(void) const {return fEfficiency;}
a9e2aefa 52 void SetEfficiency(Double_t Efficiency) {fEfficiency = Efficiency;}
a9e2aefa 53 void SetReconstructionParametersToDefaults(void);
54
29fc2c86 55 // Parameters for Track Ref. background events
56 TFile* GetBkgTrackRefFile(void) const {return fBkgTrackRefFile;}
57 void SetBkgTrackRefFile(Text_t *BkgTrackRefFileName); // set background file for track ref. hits
58 void NextBkgTrackRefEvent(void); // next event in background file for track ref. hits
a9e2aefa 59
60 // Hits for reconstruction
3831f268 61 Int_t GetNHitsForRec(void) const {return fNHitsForRec;} // Number
8429a5e4 62
63 // Reconstructed tracks
3831f268 64 Int_t GetNRecTracks() const {return fNRecTracks;} // Number
8429a5e4 65 void SetNRecTracks(Int_t NRecTracks) {fNRecTracks = NRecTracks;}
3831f268 66 TClonesArray* GetRecTracksPtr(void) const {return fRecTracksPtr;} // Array
52c9bc11 67
8429a5e4 68 // Hits on reconstructed tracks
3831f268 69 Int_t GetNRecTrackHits() const {return fNRecTrackHits;} // Number
8429a5e4 70 void SetNRecTrackHits(Int_t NRecTrackHits) {fNRecTrackHits = NRecTrackHits;}
3831f268 71 TClonesArray* GetRecTrackHitsPtr(void) const {return fRecTrackHitsPtr;} // Array
a9e2aefa 72
73 // Functions
3831f268 74 Double_t GetImpactParamFromBendingMomentum(Double_t BendingMomentum) const;
75 Double_t GetBendingMomentumFromImpactParam(Double_t ImpactParam) const;
a9e2aefa 76 void EventReconstruct(void);
276c44b7 77 void EventReconstructTrigger(void);
04b5ea16 78 void EventDump(void); // dump reconstructed event
276c44b7 79 void EventDumpTrigger(void); // dump reconstructed trigger event
3f9fc997 80 //PH void FillEvent(); // fill and write tree of reconstructed events
b035a148 81 void SetTrackMethod(Int_t iTrackMethod); //AZ
82 Int_t GetTrackMethod(void) const {return fTrackMethod;}
83 void FillMUONTrack(void); // set track parameters at hits for Kalman track
8574c72f 84 //Int_t fMuons; // AZ - number of muons within acceptance - just for tests
52c9bc11 85
86 AliMUONData* GetMUONData() {return fMUONData;}
87
9cbdf048 88 protected:
29f1b13a 89 AliMUONTrackReconstructor (const AliMUONTrackReconstructor& rhs); // copy constructor
90 AliMUONTrackReconstructor& operator=(const AliMUONTrackReconstructor& rhs); // assignment operator
9cbdf048 91
a9e2aefa 92 private:
93
343146bf 94 // Constants which should be elsewhere ????
95 static const Int_t fgkMaxMuonTrackingChambers = 10; // Max number of Muon tracking chambers
30178c30 96 static const Int_t fgkMaxMuonTrackingStations = 5; // Max number of Muon tracking stations
343146bf 97
98 // Defaults parameters for reconstruction
7e6d7e07 99 static const Double_t fgkDefaultMinBendingMomentum; // default min. bending momentum for reconstruction
100 static const Double_t fgkDefaultMaxBendingMomentum; // default max. bending momentum for reconstruction
101 static const Double_t fgkDefaultMaxChi2; // default max. track chi2 for reconstruction
102 static const Double_t fgkDefaultMaxSigma2Distance; // default square of max. distance for window size
103 static const Double_t fgkDefaultBendingResolution; // default bending coordinate resolution for reconstruction
104 static const Double_t fgkDefaultNonBendingResolution; // default non bending coordinate resolution for reconstruction
105 static const Double_t fgkDefaultChamberThicknessInX0; // default chamber thickness in X0 for reconstruction
343146bf 106 // Simple magnetic field:
107 // Value taken from macro MUONtracking.C: 0.7 T, hence 7 kG
108 // Length and Position from reco_muon.F, with opposite sign:
109 // Length = ZMAGEND-ZCOIL
110 // Position = (ZMAGEND+ZCOIL)/2
111 // to be ajusted differently from real magnetic field ????
7e6d7e07 112 static const Double_t fgkDefaultSimpleBValue; // default value of magnetic field (dipole)
113 static const Double_t fgkDefaultSimpleBLength; // default length of magnetic field (dipole)
114 static const Double_t fgkDefaultSimpleBPosition; // default position of magnetic field (dipole)
29fc2c86 115 static const Int_t fgkDefaultRecTrackRefHits; // default flag for reconstrution track ref. hits or Clusters
116 static const Double_t fgkDefaultEfficiency; // default chamber efficiency for track ref. hits recontruction
343146bf 117
343146bf 118
83dbc640 119 Int_t fTrackMethod; // AZ - tracking method
120
29f1b13a 121 // Parameters for track reconstruction
a9e2aefa 122 Double_t fMinBendingMomentum; // minimum value (GeV/c) of momentum in bending plane
29f1b13a 123 // Parameters for track reconstruction
d0bfce8d 124 Double_t fMaxBendingMomentum; // maximum value (GeV/c) of momentum in bending plane
125 Double_t fMaxChi2; // maximum Chi2 per degree of Freedom
a9e2aefa 126 Double_t fMaxSigma2Distance; // maximum square distance in units of the variance (maximum chi2)
343146bf 127 Double_t fRMin[fgkMaxMuonTrackingChambers]; // minimum radius (cm)
128 Double_t fRMax[fgkMaxMuonTrackingChambers]; // maximum radius (cm)
30178c30 129 Double_t fSegmentMaxDistBending[fgkMaxMuonTrackingStations]; // maximum distance (cm) for segments in bending plane
130 Double_t fSegmentMaxDistNonBending[fgkMaxMuonTrackingStations]; // maximum distance (cm) for segments in non bending plane
a9e2aefa 131 Double_t fBendingResolution; // chamber resolution (cm) in bending plane
132 Double_t fNonBendingResolution; // chamber resolution (cm) in non bending plane
133 Double_t fChamberThicknessInX0; // chamber thickness in number of radiation lengths
134 // how to take it from simulation ????
135 Double_t fSimpleBValue; // simple magnetic field: value (kG)
136 Double_t fSimpleBLength; // simple magnetic field: length (cm)
137 Double_t fSimpleBPosition; // simple magnetic field: Z central position (cm)
29fc2c86 138 Int_t fRecTrackRefHits; // reconstruction from raw clusters (0) or from track ref. hits (1)
139 Double_t fEfficiency; // chamber efficiency (used for track ref. hits only)
a9e2aefa 140
29fc2c86 141 // Parameters for track ref. background events
a9e2aefa 142 // should be in AliMUON class ????
29fc2c86 143 TFile *fBkgTrackRefFile; // pointer to file
144 TTree *fBkgTrackRefTK; // pointer to tree TK
145 TClonesArray *fBkgTrackRefParticles; // pointer to list of particles in tree TK
146 TTree *fBkgTrackRefTTR; // pointer to tree TTR
147 Int_t fBkgTrackRefEventNumber; // event number
a9e2aefa 148
149 // Hits for reconstruction (should be in AliMUON ????)
150 TClonesArray *fHitsForRecPtr; // pointer to the array of hits for reconstruction
151 Int_t fNHitsForRec; // number of hits for reconstruction
152 // Information per chamber (should be in AliMUONChamber ????)
343146bf 153 Int_t fNHitsForRecPerChamber[fgkMaxMuonTrackingChambers]; // number of HitsForRec
154 Int_t fIndexOfFirstHitForRecPerChamber[fgkMaxMuonTrackingChambers]; // index (0...) of first HitForRec
a9e2aefa 155
156 // Segments inside a station
30178c30 157 TClonesArray *fSegmentsPtr[fgkMaxMuonTrackingStations]; // array of pointers to the segments for each station
158 Int_t fNSegments[fgkMaxMuonTrackingStations]; // number of segments for each station
a9e2aefa 159
8429a5e4 160 // Reconstructed tracks
a9e2aefa 161 TClonesArray *fRecTracksPtr; // pointer to array of reconstructed tracks
162 Int_t fNRecTracks; // number of reconstructed tracks
163
8429a5e4 164 // Track hits on reconstructed tracks
165 TClonesArray *fRecTrackHitsPtr; // pointer to array of hits on reconstructed tracks
166 Int_t fNRecTrackHits; // number of hits on reconstructed tracks
167
52c9bc11 168 // data container
7e6d7e07 169 AliMUONData* fMUONData; // Data container for MUON subsystem
52c9bc11 170
171 // alice loader
7e6d7e07 172 AliLoader* fLoader; // MUON loader to get data
52c9bc11 173
8574c72f 174 Int_t fMuons; // AZ - number of muons within acceptance - just for tests
175
a9e2aefa 176 // Functions
177 void ResetHitsForRec(void);
178 void MakeEventToBeReconstructed(void);
29fc2c86 179 void AddHitsForRecFromTrackRef(TTree *TTR, Int_t Signal);
180 AliMUONHitForRec* NewHitForRecFromTrackRef(AliTrackReference* Hit, Int_t TrackNumber, Int_t Signal);
181 TClonesArray *CleanTrackRefs(TTree *treeTR);
a9e2aefa 182/* void AddHitsForRecFromCathodeCorrelations(TTree* TC); */
183 void AddHitsForRecFromRawClusters(TTree* TR);
184 void SortHitsForRecWithIncreasingChamber();
185 void MakeSegments(void);
186 void ResetSegments(void);
187 void MakeSegmentsPerStation(Int_t Station);
188 void MakeTracks(void);
d837040f 189 Bool_t MakeTriggerTracks(void);
8429a5e4 190 void ResetTrackHits(void);
a9e2aefa 191 void ResetTracks(void);
192 Int_t MakeTrackCandidatesWithTwoSegments(AliMUONSegment *BegSegment);
193 Int_t MakeTrackCandidatesWithOneSegmentAndOnePoint(AliMUONSegment *BegSegment);
194 void MakeTrackCandidates(void);
195 void FollowTracks(void);
8429a5e4 196 void RemoveDoubleTracks(void);
d837040f 197 void UpdateTrackParamAtHit(void);
b8dc484b 198 void UpdateHitForRecAtHit(void);
d837040f 199 void ValidateTracksWithTrigger(void);
83dbc640 200
201
202 //AZ - for Kalman Filter
203 void MakeTrackCandidatesK(void);
204 void FollowTracksK(void);
205 void RemoveDoubleTracksK(void);
206 void GoToVertex(void);
30178c30 207 Bool_t CheckCandidateK(Int_t icand, Int_t nSeeds) const;
83dbc640 208
29fc2c86 209
29f1b13a 210 ClassDef(AliMUONTrackReconstructor, 0) // MUON track reconstructor in ALICE
a9e2aefa 211 };
212
213#endif