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 "AliRICHTresholdMap.h"
13 #include "AliSegmentation.h"
14 #include "AliRICHGeometry.h"
15 #include "AliRICHResponse.h"
17 class AliRICHClusterFinder;
19 typedef enum {kMip, kCerenkov} ResponseType;
21 class AliRICHChamber : public TObject
25 Int_t fIndexMap[50]; //indeces of tresholds
26 AliRICHTresholdMap* fTresh; //map of tresholds
30 AliRICHChamber(const AliRICHChamber & Chamber);
33 // Set and get GEANT id
34 Int_t GetGid() {return fGid;}
35 void SetGid(Int_t id) {fGid=id;}
37 // Initialisation and z-Position
39 // Set inner radius of sensitive volume
40 void SetRInner(Float_t rmin) {frMin=rmin;}
41 // Set outer radius of sensitive volum
42 void SetROuter(Float_t rmax) {frMax=rmax;}
44 // Return inner radius of sensitive volume
45 Float_t RInner() {return frMin;}
46 // Return outer radius of sensitive volum
47 Float_t ROuter() {return frMax;}
49 void SetZPOS(Float_t p1) {fzPos=p1;}
50 Float_t ZPosition() {return fzPos;}
53 //Transformation from Global to local coordinates, chamber-dependant
54 void LocaltoGlobal(Float_t pos[3],Float_t Localpos[3]);
55 void GlobaltoLocal(Float_t pos[3],Float_t localpos[3]);
57 //Generate pad dependent tresholds
59 void GenerateTresholds();
62 //Setting chamber specific rotation matrices
64 void SetChamberTransform(Float_t Trans1,Float_t Trans2,Float_t Trans3,TRotMatrix *Matrix)
67 fChamberMatrix=Matrix;
68 fChamberTrans[0]=Trans1;
69 fChamberTrans[1]=Trans2;
70 fChamberTrans[2]=Trans3;
73 TRotMatrix * GetRotMatrix() {return fChamberMatrix;}
75 //Configure geometry model
76 void GeometryModel(AliRICHGeometry* thisGeometry){
77 fGeometry=thisGeometry;
81 // Configure response model
82 void ResponseModel(AliRICHResponse* thisResponse);
85 // Configure segmentation model
86 void SetSegmentationModel(AliSegmentation* thisSegmentation) {
87 fSegmentation = thisSegmentation;
89 void SetReconstructionModel(AliRICHClusterFinder *thisReconstruction) {
90 fReconstruction = thisReconstruction;
94 // Get reference to response model
95 AliRICHResponse* GetResponseModel();
97 // Get reference to segmentation model
98 AliSegmentation* GetSegmentationModel() {
102 // Get reference to geometry model
103 AliRICHGeometry* GetGeometryModel() {
108 AliSegmentation* GetSegmentationModel(Int_t i) {
109 return fSegmentation;
113 AliRICHClusterFinder* &GetReconstructionModel() {return fReconstruction;}
115 // Member function forwarding to the segmentation and response models
117 // Calculate pulse height from energy loss
118 Float_t IntPH(Float_t eloss, Float_t yhit) {return fResponse->IntPH(eloss,yhit);}
119 Float_t IntPH(Float_t yhit) {return fResponse->IntPH(yhit);}
121 // Ask segmentation if signal should be generated
122 Int_t SigGenCond(Float_t x, Float_t y, Float_t z)
124 return fSegmentation->SigGenCond(x, y, z);
127 // Ask segmentation sector
128 Int_t Sector(Float_t x, Float_t y)
130 return fSegmentation->Sector(x, y);
134 // Initialisation of segmentation for hit
135 void SigGenInit(Float_t x, Float_t y, Float_t z)
137 fSegmentation->SigGenInit(x, y, z) ;
139 // Configuration forwarding
141 void SetSigmaIntegration(Float_t p)
143 fResponse->SetSigmaIntegration(p);
145 void SetChargeSlope(Float_t p)
147 fResponse->SetChargeSlope(p);
149 void SetChargeSpread(Float_t p1, Float_t p2)
151 fResponse->SetChargeSpread(p1,p2);
153 void SetMaxAdc(Float_t p)
155 fResponse->SetMaxAdc(p);
157 void SetSqrtKx3(Float_t p)
159 fResponse->SetSqrtKx3(p);
161 void SetKx2(Float_t p)
163 fResponse->SetKx2(p);
165 void SetKx4(Float_t p)
167 fResponse->SetKx4(p);
169 void SetSqrtKy3(Float_t p)
171 fResponse->SetSqrtKy3(p);
173 void SetKy2(Float_t p)
175 fResponse->SetKy2(p);
177 void SetKy4(Float_t p)
179 fResponse->SetKy4(p);
182 void SetPitch(Float_t p)
184 fResponse->SetPitch(p);
187 void SetWireSag(Int_t p)
189 fResponse->SetWireSag(p);
192 void SetVoltage(Int_t p)
194 fResponse->SetVoltage(p);
197 void SetPadSize(Float_t p1, Float_t p2)
199 fSegmentation->SetPadSize(p1,p2);
201 void SetGapThickness(Float_t thickness)
203 fGeometry->SetGapThickness(thickness);
205 void SetProximityGapThickness(Float_t thickness)
207 fGeometry->SetProximityGapThickness(thickness);
209 void SetQuartzLength(Float_t length)
211 fGeometry->SetQuartzLength(length);
213 void SetQuartzWidth(Float_t width)
215 fGeometry->SetQuartzWidth(width);
217 void SetQuartzThickness(Float_t thickness)
219 fGeometry->SetQuartzThickness(thickness);
221 void SetOuterFreonLength(Float_t length)
223 fGeometry->SetOuterFreonLength(length);
225 void SetOuterFreonWidth(Float_t width)
227 fGeometry->SetOuterFreonWidth(width);
229 void SetInnerFreonLength(Float_t length)
231 fGeometry->SetInnerFreonLength(length);
233 void SetInnerFreonWidth(Float_t width)
235 fGeometry->SetInnerFreonWidth(width);
237 void SetFreonThickness(Float_t thickness)
239 fGeometry->SetFreonThickness(thickness);
242 AliRICHChamber& operator=(const AliRICHChamber& rhs);
245 // Cluster formation method
246 void DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit, Int_t&x, Float_t newclust[6][500], ResponseType res);
248 // GEANT volume if for sensitive volume of this
249 Float_t frMin; // Minimum Chamber size
250 Float_t frMax; // Maximum Chamber size
251 Int_t fGid; // Id tag
252 Float_t fzPos; // z-position of this chamber
254 TRotMatrix *fChamberMatrix; //Rotation matrices for each chamber
255 Float_t fChamberTrans[3]; //Translaction vectors for each chamber
257 AliSegmentation *fSegmentation; //Segmentation model for each chamber
258 AliRICHResponse *fResponse; //Response model for each chamber
259 AliRICHGeometry *fGeometry; //Geometry model for each chamber
260 AliRICHClusterFinder *fReconstruction; //Reconstruction model for each chamber
261 ClassDef(AliRICHChamber,1)