Change const char * by TString, change AliInfos per AliPreprocessor::Log or AliDebug
[u/mrichter/AliRoot.git] / MUON / AliMUONVTrackReconstructor.h
CommitLineData
8d0843c6 1#ifndef ALIMUONVTRACKRECONSTRUCTOR_H
2#define ALIMUONVTRACKRECONSTRUCTOR_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
8/// \ingroup rec
9/// \class AliMUONVTrackReconstructor
10/// \brief Virtual class for the MUON track reconstruction
11///
12/////////////////////////////////////////////
13/// Virtual MUON track reconstructor in ALICE
14/////////////////////////////////////////////
15
16#include <TObject.h>
17
18class TClonesArray;
19class AliMUONData;
20class AliMUONTriggerTrack;
21
22class AliMUONVTrackReconstructor : public TObject {
23
24 public:
25 AliMUONVTrackReconstructor(AliMUONData* data); // default Constructor
26 virtual ~AliMUONVTrackReconstructor(); // Destructor
27
28 // Parameters for track reconstruction: public methods
29 // Get and Set, Set to defaults
30 /// Return minimum value (GeV/c) of momentum in bending plane
31 Double_t GetMinBendingMomentum(void) const {return fMinBendingMomentum;}
32 /// Return chamber resolution (cm) in bending plane
33 Double_t GetBendingResolution(void) const {return fBendingResolution;}
34 /// Return chamber resolution (cm) in non-bending plane
35 Double_t GetNonBendingResolution(void) const {return fNonBendingResolution;}
36 /// Return chamber thickness in number of radiation lengths
37 Double_t GetChamberThicknessInX0(void) const {return fChamberThicknessInX0;}
38
39 // Reconstructed tracks
40 /// Return number of reconstructed tracks
41 Int_t GetNRecTracks() const {return fNRecTracks;} // Number
42 /// Set number of reconstructed tracks
43 void SetNRecTracks(Int_t NRecTracks) {fNRecTracks = NRecTracks;}
44 /// Return array of reconstructed tracks
45 TClonesArray* GetRecTracksPtr(void) const {return fRecTracksPtr;} // Array
46
47 // Functions
48 void EventReconstruct(void);
49 void EventReconstructTrigger(void);
50 virtual void EventDump(void) = 0; // dump reconstructed event
51 void EventDumpTrigger(void); // dump reconstructed trigger event
52
53 // needed in MakeSegmentsPerStation !!!
54 Double_t GetImpactParamFromBendingMomentum(Double_t BendingMomentum) const;
55 Double_t GetBendingMomentumFromImpactParam(Double_t ImpactParam) const;
56
57 /// Return MUON data
58 AliMUONData* GetMUONData() {return fMUONData;}
59
60 /// Set trigger circuit
61 void SetTriggerCircuit(TClonesArray* circuit) {fTriggerCircuit = circuit;}
62
63
64 protected:
65
66 // Defaults parameters for reconstruction
67 static const Double_t fgkDefaultMinBendingMomentum; ///< default min. bending momentum for reconstruction
68 static const Double_t fgkDefaultMaxBendingMomentum; ///< default max. bending momentum for reconstruction
69 static const Double_t fgkDefaultBendingResolution; ///< default bending coordinate resolution for reconstruction
70 static const Double_t fgkDefaultNonBendingResolution; ///< default non bending coordinate resolution for reconstruction
71 static const Double_t fgkDefaultMaxSigma2Distance; ///< default square of max. distance for window size
72 // Simple magnetic field:
73 // Value taken from macro MUONtracking.C: 0.7 T, hence 7 kG
74 // Length and Position from reco_muon.F, with opposite sign:
75 // Length = ZMAGEND-ZCOIL
76 // Position = (ZMAGEND+ZCOIL)/2
77 // to be ajusted differently from real magnetic field ????
78 static const Double_t fgkDefaultSimpleBValue; ///< default value of magnetic field (dipole)
79 static const Double_t fgkDefaultSimpleBLength; ///< default length of magnetic field (dipole)
80 static const Double_t fgkDefaultSimpleBPosition; ///< default position of magnetic field (dipole)
81
82 // Parameters for track reconstruction
83 Double_t fMinBendingMomentum; ///< minimum value (GeV/c) of momentum in bending plane
84 Double_t fMaxBendingMomentum; ///< maximum value (GeV/c) of momentum in bending plane
85 Double_t fBendingResolution; ///< chamber resolution (cm) in bending plane
86 Double_t fNonBendingResolution; ///< chamber resolution (cm) in non bending plane
87 Double_t fMaxSigma2Distance; ///< maximum square distance in units of the variance (maximum chi2)
88 Double_t fChamberThicknessInX0; ///< chamber thickness in number of radiation lengths
89 Double_t fSimpleBValue; ///< simple magnetic field: value (kG)
90 Double_t fSimpleBLength; ///< simple magnetic field: length (cm)
91 Double_t fSimpleBPosition; ///< simple magnetic field: Z central position (cm)
92
93 Double_t* fSegmentMaxDistBending; ///< maximum distance (cm) for segments in bending plane
94 Double_t* fSegmentMaxDistNonBending; ///< maximum distance (cm) for segments in non bending plane
95
96 // Hits for reconstruction (should be in AliMUON ????)
97 TClonesArray* fHitsForRecPtr; ///< pointer to the array of hits for reconstruction
98 Int_t fNHitsForRec; ///< number of hits for reconstruction
99 // Information per chamber (should be in AliMUONChamber ????)
100 Int_t* fNHitsForRecPerChamber; ///< number of HitsForRec
101 Int_t* fIndexOfFirstHitForRecPerChamber; ///< index (0...) of first HitForRec
102
103 // Segments inside a station
104 TClonesArray** fSegmentsPtr; ///< array of pointers to the segments for each station
105 Int_t* fNSegments; ///< number of segments for each station
106
107 // Reconstructed tracks
108 TClonesArray *fRecTracksPtr; ///< pointer to array of reconstructed tracks
109 Int_t fNRecTracks; ///< number of reconstructed tracks
110
111 // data container
112 AliMUONData* fMUONData; ///< Data container for MUON subsystem
113
114 // Functions
115 AliMUONVTrackReconstructor (const AliMUONVTrackReconstructor& rhs); ///< copy constructor
116 AliMUONVTrackReconstructor& operator=(const AliMUONVTrackReconstructor& rhs); ///< assignment operator
117
118 void SortHitsForRecWithIncreasingChamber();
119 void MakeSegmentsPerStation(Int_t Station);
120
121 virtual void AddHitsForRecFromRawClusters() = 0;
122 virtual void MakeSegments(void) = 0;
123 virtual void MakeTracks(void) = 0;
124 virtual void MakeTrackCandidates(void) = 0;
125 virtual void FollowTracks(void) = 0;
126 virtual void RemoveDoubleTracks(void) = 0;
127
128 private:
129
130 AliMUONTriggerTrack* fTriggerTrack; ///< Trigger track structure
131
132 TClonesArray* fTriggerCircuit; //!< trigger circuit array
133
134 // Functions
135 void SetReconstructionParametersToDefaults(void);
136
137 void ResetTracks(void);
138 void ResetSegments(void);
139 void ResetHitsForRec(void);
140
141 void ValidateTracksWithTrigger(void);
142
143 Bool_t MakeTriggerTracks(void);
144
145
146 ClassDef(AliMUONVTrackReconstructor, 0) // MUON track reconstructor in ALICE
147 };
148
149#endif