Code from MUON-dev joined
[u/mrichter/AliRoot.git] / MUON / AliMUONEventReconstructor.h
CommitLineData
a9e2aefa 1#ifndef ALIMUONEVENTRECONSTRUCTOR_H
2#define ALIMUONEVENTRECONSTRUCTOR_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#include <TROOT.h>
9
10class AliMUONHit;
11class AliMUONHitForRec;
12class AliMUONSegment;
13class TClonesArray;
14class TFile;
15class TTree;
16
17// Constants which should be elsewhere ????
18const Int_t MAX_MUON_TRACKING_CHAMBERS = 10;
19const Int_t MAX_MUON_TRACKING_STATIONS = MAX_MUON_TRACKING_CHAMBERS / 2;
20
21class AliMUONEventReconstructor : public TObject {
22
23 public:
24 AliMUONEventReconstructor(void); // Constructor
25 virtual ~AliMUONEventReconstructor(void); // Destructor
26
27 // Parameters for event reconstruction: public methods
28 // Get and Set, Set to defaults
29 Double_t GetMinBendingMomentum(void) {return fMinBendingMomentum;}
30 void SetMinBendingMomentum(Double_t MinBendingMomentum) {fMinBendingMomentum = MinBendingMomentum;}
31 Double_t GetMaxSigma2Distance(void) {return fMaxSigma2Distance;}
32 void SetMaxSigma2Distance(Double_t MaxSigma2Distance) {fMaxSigma2Distance = MaxSigma2Distance;}
33 Double_t GetBendingResolution(void) {return fBendingResolution;}
34 void SetBendingResolution(Double_t BendingResolution) {fBendingResolution = BendingResolution;}
35 Double_t GetNonBendingResolution(void) {return fNonBendingResolution;}
36 void SetNonBendingResolution(Double_t NonBendingResolution) {fNonBendingResolution = NonBendingResolution;}
37 Double_t GetChamberThicknessInX0(void) {return fChamberThicknessInX0;}
38 void SetChamberThicknessInX0(Double_t ChamberThicknessInX0) {fChamberThicknessInX0 = ChamberThicknessInX0;}
39 Double_t GetSimpleBValue(void) {return fSimpleBValue;}
40 void SetSimpleBValue(Double_t SimpleBValue) {fSimpleBValue = SimpleBValue;}
41 Double_t GetSimpleBLength(void) {return fSimpleBLength;}
42 void SetSimpleBLength(Double_t SimpleBLength) {fSimpleBLength = SimpleBLength;}
43 Double_t GetSimpleBPosition(void) {return fSimpleBPosition;}
44 void SetSimpleBPosition(Double_t SimpleBPosition) {fSimpleBPosition = SimpleBPosition;}
45 Int_t GetRecGeantHits(void) {return fRecGeantHits;}
46 void SetRecGeantHits(Int_t RecGeantHits) {fRecGeantHits = RecGeantHits;}
47 Double_t GetEfficiency(void) {return fEfficiency;}
48 void SetEfficiency(Double_t Efficiency) {fEfficiency = Efficiency;}
49 Int_t GetPrintLevel(void) {return fPrintLevel;}
50 void SetPrintLevel(Int_t PrintLevel) {fPrintLevel = PrintLevel;}
51 void SetReconstructionParametersToDefaults(void);
52
53 // Parameters for GEANT background events
54 TFile* GetBkgGeantFile(void) {return fBkgGeantFile;}
55 void SetBkgGeantFile(Text_t *BkgGeantFileName); // set background file for GEANT hits
56 void NextBkgGeantEvent(void); // next event in background file for GEANT hits
57
58 // Hits for reconstruction
59 Int_t GetNHitsForRec() {return fNHitsForRec;} // Number
60
61 // Functions
62 Double_t GetImpactParamFromBendingMomentum(Double_t BendingMomentum);
63 Double_t GetBendingMomentumFromImpactParam(Double_t ImpactParam);
64 void EventReconstruct(void);
65
66 private:
67
68 // Parameters for event reconstruction
69 Double_t fMinBendingMomentum; // minimum value (GeV/c) of momentum in bending plane
70 Double_t fMaxSigma2Distance; // maximum square distance in units of the variance (maximum chi2)
71 Double_t fRMin[MAX_MUON_TRACKING_CHAMBERS]; // minimum radius (cm)
72 Double_t fRMax[MAX_MUON_TRACKING_CHAMBERS]; // maximum radius (cm)
73 Double_t fSegmentMaxDistBending[MAX_MUON_TRACKING_STATIONS]; // maximum distance (cm) for segments in bending plane
74 Double_t fSegmentMaxDistNonBending[MAX_MUON_TRACKING_STATIONS]; // maximum distance (cm) for segments in bending plane
75 Double_t fBendingResolution; // chamber resolution (cm) in bending plane
76 Double_t fNonBendingResolution; // chamber resolution (cm) in non bending plane
77 Double_t fChamberThicknessInX0; // chamber thickness in number of radiation lengths
78 // how to take it from simulation ????
79 Double_t fSimpleBValue; // simple magnetic field: value (kG)
80 Double_t fSimpleBLength; // simple magnetic field: length (cm)
81 Double_t fSimpleBPosition; // simple magnetic field: Z central position (cm)
82 Int_t fRecGeantHits; // reconstruction from raw clusters (0) or from GEANT hits (1)
83 Double_t fEfficiency; // chamber efficiency (used for GEANT hits only)
84 Int_t fPrintLevel; // print level
85
86 // Parameters for GEANT background events
87 // should be in AliMUON class ????
88 TFile *fBkgGeantFile; // pointer to file
89 TTree *fBkgGeantTK; // pointer to tree TK
90 TClonesArray *fBkgGeantParticles; // pointer to list of particles in tree TK
91 TTree *fBkgGeantTH; // pointer to tree TH
92 TClonesArray *fBkgGeantHits; // pointer to list of hits in tree TH
93 Int_t fBkgGeantEventNumber; // event number
94
95 // Hits for reconstruction (should be in AliMUON ????)
96 TClonesArray *fHitsForRecPtr; // pointer to the array of hits for reconstruction
97 Int_t fNHitsForRec; // number of hits for reconstruction
98 // Information per chamber (should be in AliMUONChamber ????)
99 Int_t fNHitsForRecPerChamber[MAX_MUON_TRACKING_CHAMBERS]; // number of HitsForRec
100 Int_t fIndexOfFirstHitForRecPerChamber[MAX_MUON_TRACKING_CHAMBERS]; // index (0...) of first HitForRec
101
102 // Segments inside a station
103 TClonesArray *fSegmentsPtr[MAX_MUON_TRACKING_STATIONS]; // array of pointers to the segments for each station
104 Int_t fNSegments[MAX_MUON_TRACKING_STATIONS]; // number of segments for each station
105
106 // Tracks
107 TClonesArray *fRecTracksPtr; // pointer to array of reconstructed tracks
108 Int_t fNRecTracks; // number of reconstructed tracks
109
110 // Functions
111 void ResetHitsForRec(void);
112 void MakeEventToBeReconstructed(void);
113 void AddHitsForRecFromGEANT(TTree *TH);
114 void AddHitsForRecFromBkgGEANT(TTree *TH, TClonesArray *Hits);
115 AliMUONHitForRec* NewHitForRecFromGEANT(AliMUONHit* Hit, Int_t TrackNumber, Int_t HitNumber, Int_t Signal);
116/* void AddHitsForRecFromCathodeCorrelations(TTree* TC); */
117 void AddHitsForRecFromRawClusters(TTree* TR);
118 void SortHitsForRecWithIncreasingChamber();
119 void MakeSegments(void);
120 void ResetSegments(void);
121 void MakeSegmentsPerStation(Int_t Station);
122 void MakeTracks(void);
123 void ResetTracks(void);
124 Int_t MakeTrackCandidatesWithTwoSegments(AliMUONSegment *BegSegment);
125 Int_t MakeTrackCandidatesWithOneSegmentAndOnePoint(AliMUONSegment *BegSegment);
126 void MakeTrackCandidates(void);
127 void FollowTracks(void);
128
129 protected:
130
131 ClassDef(AliMUONEventReconstructor, 1) // Class definition in ROOT context
132 };
133
134#endif