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 "AliRICHSegmentation.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 SegmentationModel(AliRICHSegmentation* thisSegmentation) {
87 fSegmentation = thisSegmentation;
89 void ReconstructionModel(AliRICHClusterFinder *thisReconstruction) {
90 fReconstruction = thisReconstruction;
94 // Get reference to response model
95 AliRICHResponse* GetResponseModel();
97 // Get reference to segmentation model
98 AliRICHSegmentation* GetSegmentationModel() {
102 // Get reference to geometry model
103 AliRICHGeometry* GetGeometryModel() {
108 AliRICHSegmentation* GetSegmentationModel(Int_t i) {
109 return fSegmentation;
113 AliRICHClusterFinder* &GetReconstructionModel() {return fReconstruction;}
115 Int_t Nsec() {return fnsec;}
116 void SetNsec(Int_t nsec) {fnsec=nsec;}
118 // Member function forwarding to the segmentation and response models
120 // Calculate pulse height from energy loss
121 Float_t IntPH(Float_t eloss) {return fResponse->IntPH(eloss);}
122 Float_t IntPH() {return fResponse->IntPH();}
124 // Ask segmentation if signal should be generated
125 Int_t SigGenCond(Float_t x, Float_t y, Float_t z)
127 return fSegmentation->SigGenCond(x, y, z);
130 // Ask segmentation sector
131 Int_t Sector(Float_t x, Float_t y)
133 return fSegmentation->Sector(x, y);
137 // Initialisation of segmentation for hit
138 void SigGenInit(Float_t x, Float_t y, Float_t z)
140 fSegmentation->SigGenInit(x, y, z) ;
142 // Configuration forwarding
144 void SetSigmaIntegration(Float_t p)
146 fResponse->SetSigmaIntegration(p);
148 void SetChargeSlope(Float_t p)
150 fResponse->SetChargeSlope(p);
152 void SetChargeSpread(Float_t p1, Float_t p2)
154 fResponse->SetChargeSpread(p1,p2);
156 void SetMaxAdc(Float_t p)
158 fResponse->SetMaxAdc(p);
160 void SetSqrtKx3(Float_t p)
162 fResponse->SetSqrtKx3(p);
164 void SetKx2(Float_t p)
166 fResponse->SetKx2(p);
168 void SetKx4(Float_t p)
170 fResponse->SetKx4(p);
172 void SetSqrtKy3(Float_t p)
174 fResponse->SetSqrtKy3(p);
176 void SetKy2(Float_t p)
178 fResponse->SetKy2(p);
180 void SetKy4(Float_t p)
182 fResponse->SetKy4(p);
185 void SetPitch(Float_t p)
187 fResponse->SetPitch(p);
190 void SetPadSize(Float_t p1, Float_t p2)
192 fSegmentation->SetPadSize(p1,p2);
194 void SetGapThickness(Float_t thickness)
196 fGeometry->SetGapThickness(thickness);
198 void SetProximityGapThickness(Float_t thickness)
200 fGeometry->SetProximityGapThickness(thickness);
202 void SetQuartzLength(Float_t length)
204 fGeometry->SetQuartzLength(length);
206 void SetQuartzWidth(Float_t width)
208 fGeometry->SetQuartzWidth(width);
210 void SetQuartzThickness(Float_t thickness)
212 fGeometry->SetQuartzThickness(thickness);
214 void SetOuterFreonLength(Float_t length)
216 fGeometry->SetOuterFreonLength(length);
218 void SetOuterFreonWidth(Float_t width)
220 fGeometry->SetOuterFreonWidth(width);
222 void SetInnerFreonLength(Float_t length)
224 fGeometry->SetInnerFreonLength(length);
226 void SetInnerFreonWidth(Float_t width)
228 fGeometry->SetInnerFreonWidth(width);
230 void SetFreonThickness(Float_t thickness)
232 fGeometry->SetFreonThickness(thickness);
235 AliRICHChamber& operator=(const AliRICHChamber& rhs);
238 // Cluster formation method
239 void DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit, Int_t&x, Float_t newclust[6][500], ResponseType res);
241 // GEANT volume if for sensitive volume of this
242 Float_t frMin; // Minimum Chamber size
243 Float_t frMax; // Maximum Chamber size
244 Int_t fGid; // Id tag
245 Float_t fzPos; // z-position of this chamber
246 // The segmentation models for the cathode planes
247 Int_t fnsec; // fnsec=1: one plane segmented, fnsec=2: both planes are segmented.
249 TRotMatrix *fChamberMatrix; //Rotation matrices for each chamber
250 Float_t fChamberTrans[3]; //Translaction vectors for each chamber
252 AliRICHSegmentation *fSegmentation; //Segmentation model for each chamber
253 AliRICHResponse *fResponse; //Response model for each chamber
254 AliRICHGeometry *fGeometry; //Geometry model for each chamber
255 AliRICHClusterFinder *fReconstruction; //Reconstruction model for each chamber
256 ClassDef(AliRICHChamber,1)