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