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 // getter&setter for the chamber position and attitude
63 void SetChamberTransform(Float_t x,Float_t y,Float_t z,TRotMatrix *pRotMatrix) {fX=x; fY=y; fZ=z; fpRotMatrix=pRotMatrix;}
64 TRotMatrix * GetRotMatrix() const {return fpRotMatrix;}
65 Float_t GetX() const {return fX;}
66 Float_t GetY() const {return fY;}
67 Float_t GetZ() const {return fZ;}
69 //Configure geometry model
70 void GeometryModel(AliRICHGeometry* thisGeometry){
71 fGeometry=thisGeometry;
75 // Configure response model
76 void ResponseModel(AliRICHResponse* thisResponse);
79 // Configure segmentation model
80 void SetSegmentationModel(AliSegmentation* thisSegmentation) {
81 fSegmentation = thisSegmentation;
83 void SetReconstructionModel(AliRICHClusterFinder *thisReconstruction) {
84 fReconstruction = thisReconstruction;
88 // Get reference to response model
89 AliRICHResponse* GetResponseModel();
91 // Get reference to segmentation model
92 AliSegmentation* GetSegmentationModel() {
96 // Get reference to geometry model
97 AliRICHGeometry* GetGeometryModel() {
102 AliSegmentation* GetSegmentationModel(Int_t i) {
103 return fSegmentation;
107 AliRICHClusterFinder* &GetReconstructionModel() {return fReconstruction;}
109 // Member function forwarding to the segmentation and response models
111 // Calculate pulse height from energy loss
112 Float_t IntPH(Float_t eloss, Float_t yhit) {return fResponse->IntPH(eloss,yhit);}
113 Float_t IntPH(Float_t yhit) {return fResponse->IntPH(yhit);}
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 SetWireSag(Int_t p)
183 fResponse->SetWireSag(p);
186 void SetVoltage(Int_t p)
188 fResponse->SetVoltage(p);
191 void SetPadSize(Float_t p1, Float_t p2)
193 fSegmentation->SetPadSize(p1,p2);
195 void SetGapThickness(Float_t thickness)
197 fGeometry->SetGapThickness(thickness);
199 void SetProximityGapThickness(Float_t thickness)
201 fGeometry->SetProximityGapThickness(thickness);
203 void SetQuartzLength(Float_t length)
205 fGeometry->SetQuartzLength(length);
207 void SetQuartzWidth(Float_t width)
209 fGeometry->SetQuartzWidth(width);
211 void SetQuartzThickness(Float_t thickness)
213 fGeometry->SetQuartzThickness(thickness);
215 void SetOuterFreonLength(Float_t length)
217 fGeometry->SetOuterFreonLength(length);
219 void SetOuterFreonWidth(Float_t width)
221 fGeometry->SetOuterFreonWidth(width);
223 void SetInnerFreonLength(Float_t length)
225 fGeometry->SetInnerFreonLength(length);
227 void SetInnerFreonWidth(Float_t width)
229 fGeometry->SetInnerFreonWidth(width);
231 void SetFreonThickness(Float_t thickness)
233 fGeometry->SetFreonThickness(thickness);
236 AliRICHChamber& operator=(const AliRICHChamber& rhs);
239 // Cluster formation method
240 void DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit, Int_t&x, Float_t newclust[6][500], ResponseType res);
242 // GEANT volume if for sensitive volume of this
243 Float_t frMin; // Minimum Chamber size
244 Float_t frMax; // Maximum Chamber size
245 Int_t fGid; // Id tag
246 Float_t fzPos; // z-position of this chamber
248 TRotMatrix *fpRotMatrix; // Rotation matrix of the chamber with respect to MRS
249 Float_t fX,fY,fZ; // Position of the center of the chamber in MRS (cm)
251 AliSegmentation *fSegmentation; //Segmentation model for each chamber
252 AliRICHResponse *fResponse; //Response model for each chamber
253 AliRICHGeometry *fGeometry; //Geometry model for each chamber
254 AliRICHClusterFinder *fReconstruction; //Reconstruction model for each chamber
255 ClassDef(AliRICHChamber,1)