1 #ifndef ALIRICHCHAMBER_H
2 #define ALIRICHCHAMBER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 #include <TRotMatrix.h>
12 #include "AliRICHSegmentation.h"
13 #include "AliRICHGeometry.h"
14 #include "AliRICHResponse.h"
16 class AliRICHClusterFinder;
18 typedef enum {kMip, kCerenkov} ResponseType;
20 class AliRICHChamber : public TObject
26 AliRICHChamber(const AliRICHChamber & Chamber);
29 // Set and get GEANT id
30 Int_t GetGid() {return fGid;}
31 void SetGid(Int_t id) {fGid=id;}
33 // Initialisation and z-Position
35 // Set inner radius of sensitive volume
36 void SetRInner(Float_t rmin) {frMin=rmin;}
37 // Set outer radius of sensitive volum
38 void SetROuter(Float_t rmax) {frMax=rmax;}
40 // Return inner radius of sensitive volume
41 Float_t RInner() {return frMin;}
42 // Return outer radius of sensitive volum
43 Float_t ROuter() {return frMax;}
45 void SetZPOS(Float_t p1) {fzPos=p1;}
46 Float_t ZPosition() {return fzPos;}
49 //Transformation from Global to local coordinates, chamber-dependant
50 void LocaltoGlobal(Float_t pos[3],Float_t Localpos[3]);
51 void GlobaltoLocal(Float_t pos[3],Float_t localpos[3]);
53 //Setting chamber specific rotation matrices
55 void SetChamberTransform(Float_t Trans1,Float_t Trans2,Float_t Trans3,TRotMatrix *Matrix)
58 fChamberMatrix=Matrix;
59 fChamberTrans[0]=Trans1;
60 fChamberTrans[1]=Trans2;
61 fChamberTrans[2]=Trans3;
64 TRotMatrix * GetRotMatrix() {return fChamberMatrix;}
66 //Configure geometry model
67 void GeometryModel(AliRICHGeometry* thisGeometry){
68 fGeometry=thisGeometry;
72 // Configure response model
73 void ResponseModel(AliRICHResponse* thisResponse);
76 // Configure segmentation model
77 void SegmentationModel(AliRICHSegmentation* thisSegmentation) {
78 fSegmentation = thisSegmentation;
80 void ReconstructionModel(AliRICHClusterFinder *thisReconstruction) {
81 fReconstruction = thisReconstruction;
85 // Get reference to response model
86 AliRICHResponse* GetResponseModel();
88 // Get reference to segmentation model
89 AliRICHSegmentation* GetSegmentationModel() {
93 // Get reference to geometry model
94 AliRICHGeometry* GetGeometryModel() {
99 AliRICHSegmentation* GetSegmentationModel(Int_t i) {
100 return fSegmentation;
104 AliRICHClusterFinder* &GetReconstructionModel() {return fReconstruction;}
106 Int_t Nsec() {return fnsec;}
107 void SetNsec(Int_t nsec) {fnsec=nsec;}
109 // Member function forwarding to the segmentation and response models
111 // Calculate pulse height from energy loss
112 Float_t IntPH(Float_t eloss) {return fResponse->IntPH(eloss);}
113 Float_t IntPH() {return fResponse->IntPH();}
115 // Ask segmentation if signal should be generated
116 Int_t SigGenCond(Float_t x, Float_t y, Float_t z)
118 return fSegmentation->SigGenCond(x, y, z);
121 // Ask segmentation sector
122 Int_t Sector(Float_t x, Float_t y)
124 return fSegmentation->Sector(x, y);
128 // Initialisation of segmentation for hit
129 void SigGenInit(Float_t x, Float_t y, Float_t z)
131 fSegmentation->SigGenInit(x, y, z) ;
133 // Configuration forwarding
135 void SetSigmaIntegration(Float_t p)
137 fResponse->SetSigmaIntegration(p);
139 void SetChargeSlope(Float_t p)
141 fResponse->SetChargeSlope(p);
143 void SetChargeSpread(Float_t p1, Float_t p2)
145 fResponse->SetChargeSpread(p1,p2);
147 void SetMaxAdc(Float_t p)
149 fResponse->SetMaxAdc(p);
151 void SetSqrtKx3(Float_t p)
153 fResponse->SetSqrtKx3(p);
155 void SetKx2(Float_t p)
157 fResponse->SetKx2(p);
159 void SetKx4(Float_t p)
161 fResponse->SetKx4(p);
163 void SetSqrtKy3(Float_t p)
165 fResponse->SetSqrtKy3(p);
167 void SetKy2(Float_t p)
169 fResponse->SetKy2(p);
171 void SetKy4(Float_t p)
173 fResponse->SetKy4(p);
176 void SetPitch(Float_t p)
178 fResponse->SetPitch(p);
181 void SetPadSize(Float_t p1, Float_t p2)
183 fSegmentation->SetPadSize(p1,p2);
185 void SetGapThickness(Float_t thickness)
187 fGeometry->SetGapThickness(thickness);
189 void SetProximityGapThickness(Float_t thickness)
191 fGeometry->SetProximityGapThickness(thickness);
193 void SetQuartzLength(Float_t length)
195 fGeometry->SetQuartzLength(length);
197 void SetQuartzWidth(Float_t width)
199 fGeometry->SetQuartzWidth(width);
201 void SetQuartzThickness(Float_t thickness)
203 fGeometry->SetQuartzThickness(thickness);
205 void SetOuterFreonLength(Float_t length)
207 fGeometry->SetOuterFreonLength(length);
209 void SetOuterFreonWidth(Float_t width)
211 fGeometry->SetOuterFreonWidth(width);
213 void SetInnerFreonLength(Float_t length)
215 fGeometry->SetInnerFreonLength(length);
217 void SetInnerFreonWidth(Float_t width)
219 fGeometry->SetInnerFreonWidth(width);
221 void SetFreonThickness(Float_t thickness)
223 fGeometry->SetFreonThickness(thickness);
226 AliRICHChamber& operator=(const AliRICHChamber& rhs);
229 // Cluster formation method
230 void DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit, Int_t&x, Float_t newclust[6][500], ResponseType res);
232 // GEANT volume if for sensitive volume of this
233 Float_t frMin; // Minimum Chamber size
234 Float_t frMax; // Maximum Chamber size
235 Int_t fGid; // Id tag
236 Float_t fzPos; // z-position of this chamber
237 // The segmentation models for the cathode planes
238 Int_t fnsec; // fnsec=1: one plane segmented, fnsec=2: both planes are segmented.
240 TRotMatrix *fChamberMatrix; //Rotation matrices for each chamber
241 Float_t fChamberTrans[3]; //Translaction vectors for each chamber
243 AliRICHSegmentation *fSegmentation; //Segmentation model for each chamber
244 AliRICHResponse *fResponse; //Response model for each chamber
245 AliRICHGeometry *fGeometry; //Geometry model for each chamber
246 AliRICHClusterFinder *fReconstruction; //Reconstruction model for each chamber
247 ClassDef(AliRICHChamber,1)