237c933d |
1 | #ifndef ALIRICH_H |
2 | #define ALIRICH_H |
2e5f0f7b |
3 | |
3da30618 |
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ |
6 | |
7 | /* $Id$ */ |
8 | |
2e5f0f7b |
9 | |
fe4da5cc |
10 | //////////////////////////////////////////////// |
11 | // Manager and hits classes for set:RICH // |
12 | //////////////////////////////////////////////// |
fe4da5cc |
13 | #include "AliDetector.h" |
ddae0931 |
14 | #include "AliRICHConst.h" |
2e5f0f7b |
15 | #include "AliRICHChamber.h" |
237c933d |
16 | static const int kNCH=7; |
fe4da5cc |
17 | |
2ab0c725 |
18 | class TFile; |
fe4da5cc |
19 | |
237c933d |
20 | class AliRICHHit; |
b251a2b5 |
21 | class AliRICHSDigit; |
2e5f0f7b |
22 | class AliRICHRawCluster; |
a4622d0f |
23 | class AliRICHRecHit1D; |
24 | class AliRICHRecHit3D; |
2e5f0f7b |
25 | class AliRICHClusterFinder; |
26 | class AliRICHDetect; |
27 | class AliRICHChamber; |
28 | class AliRICHCerenkov; |
a2f7eaf6 |
29 | class AliSegmentation; |
2e5f0f7b |
30 | class AliRICHResponse; |
31 | class AliRICHEllipse; |
237c933d |
32 | class AliRICHGeometry; |
d8a72780 |
33 | class AliRICHMerger; |
ddae0931 |
34 | |
35 | class AliRICH : public AliDetector { |
36 | public: |
37 | AliRICH(); |
38 | AliRICH(const char *name, const char *title); |
237c933d |
39 | AliRICH(const AliRICH& RICH); |
ddae0931 |
40 | virtual ~AliRICH(); |
237c933d |
41 | virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits); |
42 | virtual void AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs); |
b251a2b5 |
43 | virtual void AddSDigit(Int_t *clhits); |
237c933d |
44 | virtual void AddDigits(Int_t id, Int_t *tracks, Int_t *charges, Int_t *digits); |
45 | virtual void AddRawCluster(Int_t id, const AliRICHRawCluster& cluster); |
a4622d0f |
46 | virtual void AddRecHit1D(Int_t id, Float_t* rechit, Float_t* photons, Int_t* padsx, Int_t* padsy); |
47 | virtual void AddRecHit3D(Int_t id, Float_t* rechit); |
2e5f0f7b |
48 | |
49 | |
ddae0931 |
50 | virtual void BuildGeometry(); |
452a64c6 |
51 | virtual void CreateGeometry(); |
52 | virtual void CreateMaterials(); |
53 | virtual Float_t AbsoCH4(Float_t x); |
54 | virtual Float_t Fresnel(Float_t ene,Float_t pdoti, Bool_t pola); |
ddae0931 |
55 | virtual void StepManager(); |
56 | Int_t DistancetoPrimitive(Int_t px, Int_t py); |
57 | virtual Int_t IsVersion() const =0; |
58 | // |
b251a2b5 |
59 | TClonesArray *SDigits() {return fSDigits;} |
2e5f0f7b |
60 | TClonesArray *Cerenkovs() {return fCerenkovs;} |
9e1a0ddb |
61 | virtual void MakeBranch(Option_t *opt=" ", const char *file=0); |
b762c2f6 |
62 | virtual void MakeBranchInTreeD(TTree *treeD, const char *file=0); |
ddae0931 |
63 | void SetTreeAddress(); |
64 | virtual void ResetHits(); |
65 | virtual void ResetDigits(); |
2e5f0f7b |
66 | virtual void ResetRawClusters(); |
a4622d0f |
67 | virtual void ResetRecHits1D(); |
68 | virtual void ResetRecHits3D(); |
237c933d |
69 | virtual void FindClusters(Int_t nev,Int_t lastEntry); |
34ead2dd |
70 | virtual void Hits2SDigits(); |
2ab0c725 |
71 | virtual void SDigits2Digits(); |
34ead2dd |
72 | virtual void SDigits2Digits(Int_t nev, Int_t flag); |
73 | virtual void Digits2Reco(); |
ddae0931 |
74 | // |
75 | // Configuration Methods (per station id) |
76 | // |
77 | // Set Chamber Segmentation Parameters |
78 | // id refers to the station and isec to the cathode plane |
ddae0931 |
79 | // Set Segmentation and Response Model |
2e5f0f7b |
80 | virtual void SetGeometryModel(Int_t id, AliRICHGeometry *geometry); |
a2f7eaf6 |
81 | virtual void SetSegmentationModel(Int_t id, AliSegmentation *segmentation); |
2e5f0f7b |
82 | virtual void SetResponseModel(Int_t id, AliRICHResponse *response); |
2e5f0f7b |
83 | // Set Reconstruction Model |
84 | virtual void SetReconstructionModel(Int_t id, AliRICHClusterFinder *reconstruction); |
6fb24c3c |
85 | // Set source debugging level |
34ead2dd |
86 | void SetDebugLevel(Int_t level) {fDebugLevel=level;} |
d8a72780 |
87 | // Set Merger |
88 | virtual void SetMerger(AliRICHMerger* thisMerger) {fMerger=thisMerger;} |
6fb24c3c |
89 | // Get source debugging level |
34ead2dd |
90 | Int_t GetDebugLevel() {return fDebugLevel;} |
ddae0931 |
91 | // Response Simulation |
34ead2dd |
92 | virtual Int_t Hits2SDigits(Float_t xhit,Float_t yhit,Float_t eloss,Int_t id, ResponseType res); |
ddae0931 |
93 | // Return reference to Chamber #id |
34ead2dd |
94 | virtual AliRICHChamber& Chamber(Int_t id) {return *((AliRICHChamber *) (*fChambers)[id]);} |
ddae0931 |
95 | // Retrieve pad hits for a given Hit |
34ead2dd |
96 | virtual AliRICHSDigit* FirstPad(AliRICHHit *hit, TClonesArray *clusters); |
97 | virtual AliRICHSDigit* NextPad(TClonesArray *clusters); |
ddae0931 |
98 | // Return pointers to digits |
34ead2dd |
99 | TObjArray *Dchambers() {return fDchambers;} |
100 | Int_t *Ndch() {return fNdch;} |
ddae0931 |
101 | virtual TClonesArray *DigitsAddress(Int_t id) {return ((TClonesArray *) (*fDchambers)[id]);} |
2e5f0f7b |
102 | // Return pointers to rec. hits |
34ead2dd |
103 | TObjArray *RecHits1D() {return fRecHits1D;} |
104 | Int_t *Nrechits1D() {return fNrechits1D;} |
a4622d0f |
105 | virtual TClonesArray *RecHitsAddress1D(Int_t id) {return ((TClonesArray *) (*fRecHits1D)[id]);} |
34ead2dd |
106 | TObjArray *RecHits3D() {return fRecHits3D;} |
107 | Int_t *Nrechits3D() {return fNrechits3D;} |
a4622d0f |
108 | virtual TClonesArray *RecHitsAddress3D(Int_t id) {return ((TClonesArray *) (*fRecHits3D)[id]);} |
109 | |
ddae0931 |
110 | // Return pointers to reconstructed clusters |
2e5f0f7b |
111 | virtual TClonesArray *RawClustAddress(Int_t id) {return ((TClonesArray *) (*fRawClusters)[id]);} |
237c933d |
112 | // Assignment operator |
113 | AliRICH& operator=(const AliRICH& rhs); |
52042918 |
114 | |
115 | // Analysis routines |
116 | // Full events |
117 | virtual void DiagnosticsFE(Int_t evNumber1=0,Int_t evNumber2=0); |
118 | // Single events |
119 | virtual void DiagnosticsSE(Int_t diaglevel,Int_t evNumber1=0,Int_t evNumber2=0); |
ddae0931 |
120 | |
121 | protected: |
122 | TObjArray *fChambers; // List of Tracking Chambers |
b251a2b5 |
123 | Int_t fNSDigits; // Number of clusters |
2e5f0f7b |
124 | Int_t fNcerenkovs; // Number of cerenkovs |
b251a2b5 |
125 | TClonesArray *fSDigits; // List of clusters |
ddae0931 |
126 | TObjArray *fDchambers; // List of digits |
ddae0931 |
127 | TClonesArray *fCerenkovs; // List of cerenkovs |
a4622d0f |
128 | Int_t fNdch[kNCH]; // Number of digits |
2e5f0f7b |
129 | TObjArray *fRawClusters; // List of raw clusters |
a4622d0f |
130 | TObjArray *fRecHits1D; // List of rec. hits |
131 | TObjArray *fRecHits3D; // List of rec. hits |
132 | Int_t fNrawch[kNCH]; // Number of raw clusters |
133 | Int_t fNrechits1D[kNCH]; // Number of rec hits |
134 | Int_t fNrechits3D[kNCH]; // Number of rec hits |
135 | Int_t fDebugLevel; // Source debugging level |
378f6387 |
136 | |
34ead2dd |
137 | Int_t fCkovNumber; // Number of Cerenkov photons |
138 | Int_t fCkovQuarz; // Cerenkovs crossing quartz |
139 | Int_t fCkovGap; // Cerenkovs crossing gap |
140 | Int_t fCkovCsi; // Cerenkovs crossing csi |
141 | Int_t fLostRfreo; // Cerenkovs reflected in freon |
142 | Int_t fLostRquar; // Cerenkovs reflected in quartz |
143 | Int_t fLostAfreo; // Cerenkovs absorbed in freon |
144 | Int_t fLostAquarz; // Cerenkovs absorbed in quartz |
145 | Int_t fLostAmeta; // Cerenkovs absorbed in methane |
146 | Int_t fLostCsi; // Cerenkovs below csi quantum efficiency |
147 | Int_t fLostWires; // Cerenkovs lost in wires |
148 | Int_t fFreonProd; // Cerenkovs produced in freon |
149 | Float_t fMipx; // x coord. of MIP |
150 | Float_t fMipy; // y coord. of MIP |
151 | Int_t fFeedbacks; // Number of feedback photons |
152 | Int_t fLostFresnel; // Cerenkovs lost by Fresnel reflection |
d8a72780 |
153 | |
154 | |
155 | // Background eent for event mixing |
34ead2dd |
156 | Text_t *fFileName; // ! File with background hits |
157 | AliRICHMerger *fMerger; // ! pointer to merger |
ddae0931 |
158 | |
34ead2dd |
159 | ClassDef(AliRICH,1) //Hits manager for set:RICH |
2e5f0f7b |
160 | }; |
fe4da5cc |
161 | #endif |
162 | |