]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICHChamber.h
Update of SSD simulation and reconstruction code by Boris and Enrico.
[u/mrichter/AliRoot.git] / RICH / AliRICHChamber.h
CommitLineData
237c933d 1#ifndef ALIRICHCHAMBER_H
2#define ALIRICHCHAMBER_H
2e5f0f7b 3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9#include <TObjArray.h>
10#include <TRotMatrix.h>
2e5f0f7b 11
4faf338d 12#include "AliRICHTresholdMap.h"
a2f7eaf6 13#include "AliSegmentation.h"
237c933d 14#include "AliRICHGeometry.h"
15#include "AliRICHResponse.h"
2e5f0f7b 16
17class AliRICHClusterFinder;
237c933d 18
19typedef enum {kMip, kCerenkov} ResponseType;
2e5f0f7b 20
21class AliRICHChamber : public TObject
22{
23 public:
24
4faf338d 25 Int_t fIndexMap[50]; //indeces of tresholds
26 AliRICHTresholdMap* fTresh; //map of tresholds
27
2e5f0f7b 28 public:
29 AliRICHChamber();
237c933d 30 AliRICHChamber(const AliRICHChamber & Chamber);
2e5f0f7b 31 ~AliRICHChamber(){}
32//
33// Set and get GEANT id
34 Int_t GetGid() {return fGid;}
35 void SetGid(Int_t id) {fGid=id;}
36//
37// Initialisation and z-Position
a2f7eaf6 38 void Init(Int_t id);
2e5f0f7b 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;}
43
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;}
48
49 void SetZPOS(Float_t p1) {fzPos=p1;}
50 Float_t ZPosition() {return fzPos;}
51
52//
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]);
4faf338d 56
57//Generate pad dependent tresholds
58
59 void GenerateTresholds();
60
2e5f0f7b 61
62//Setting chamber specific rotation matrices
63
64 void SetChamberTransform(Float_t Trans1,Float_t Trans2,Float_t Trans3,TRotMatrix *Matrix)
65
66 {
67 fChamberMatrix=Matrix;
68 fChamberTrans[0]=Trans1;
69 fChamberTrans[1]=Trans2;
70 fChamberTrans[2]=Trans3;
71 }
72
73 TRotMatrix * GetRotMatrix() {return fChamberMatrix;}
74
75//Configure geometry model
76 void GeometryModel(AliRICHGeometry* thisGeometry){
77 fGeometry=thisGeometry;
78 }
79
80
81// Configure response model
82 void ResponseModel(AliRICHResponse* thisResponse);
83
84 //
85// Configure segmentation model
a2f7eaf6 86 void SetSegmentationModel(AliSegmentation* thisSegmentation) {
2e5f0f7b 87 fSegmentation = thisSegmentation;
88 }
a2f7eaf6 89 void SetReconstructionModel(AliRICHClusterFinder *thisReconstruction) {
2e5f0f7b 90 fReconstruction = thisReconstruction;
91 }
92
93//
94// Get reference to response model
95 AliRICHResponse* GetResponseModel();
96//
97// Get reference to segmentation model
a2f7eaf6 98 AliSegmentation* GetSegmentationModel() {
2e5f0f7b 99 return fSegmentation;
100 }
101
102// Get reference to geometry model
103 AliRICHGeometry* GetGeometryModel() {
104 return fGeometry;
105 }
106
107
a2f7eaf6 108 AliSegmentation* GetSegmentationModel(Int_t i) {
2e5f0f7b 109 return fSegmentation;
110 }
111
112 //
113 AliRICHClusterFinder* &GetReconstructionModel() {return fReconstruction;}
114
2e5f0f7b 115// Member function forwarding to the segmentation and response models
116//
117// Calculate pulse height from energy loss
a9b7cb8e 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);}
2e5f0f7b 120//
121// Ask segmentation if signal should be generated
122 Int_t SigGenCond(Float_t x, Float_t y, Float_t z)
123 {
124 return fSegmentation->SigGenCond(x, y, z);
125 }
126
127// Ask segmentation sector
128 Int_t Sector(Float_t x, Float_t y)
129 {
130 return fSegmentation->Sector(x, y);
131 }
132
133//
134// Initialisation of segmentation for hit
135 void SigGenInit(Float_t x, Float_t y, Float_t z)
136 {
137 fSegmentation->SigGenInit(x, y, z) ;
138 }
139// Configuration forwarding
140//
141 void SetSigmaIntegration(Float_t p)
142 {
143 fResponse->SetSigmaIntegration(p);
144 }
145 void SetChargeSlope(Float_t p)
146 {
147 fResponse->SetChargeSlope(p);
148 }
149 void SetChargeSpread(Float_t p1, Float_t p2)
150 {
151 fResponse->SetChargeSpread(p1,p2);
152 }
153 void SetMaxAdc(Float_t p)
154 {
155 fResponse->SetMaxAdc(p);
156 }
157 void SetSqrtKx3(Float_t p)
158 {
159 fResponse->SetSqrtKx3(p);
160 }
161 void SetKx2(Float_t p)
162 {
163 fResponse->SetKx2(p);
164 }
165 void SetKx4(Float_t p)
166 {
167 fResponse->SetKx4(p);
168 }
169 void SetSqrtKy3(Float_t p)
170 {
171 fResponse->SetSqrtKy3(p);
172 }
173 void SetKy2(Float_t p)
174 {
175 fResponse->SetKy2(p);
176 }
177 void SetKy4(Float_t p)
178 {
179 fResponse->SetKy4(p);
180 }
181
182 void SetPitch(Float_t p)
183 {
184 fResponse->SetPitch(p);
185 }
a9b7cb8e 186
187 void SetWireSag(Int_t p)
188 {
189 fResponse->SetWireSag(p);
190 }
191
192 void SetVoltage(Int_t p)
193 {
194 fResponse->SetVoltage(p);
195 }
2e5f0f7b 196
197 void SetPadSize(Float_t p1, Float_t p2)
198 {
199 fSegmentation->SetPadSize(p1,p2);
200 }
201 void SetGapThickness(Float_t thickness)
202 {
203 fGeometry->SetGapThickness(thickness);
204 }
205 void SetProximityGapThickness(Float_t thickness)
206 {
207 fGeometry->SetProximityGapThickness(thickness);
208 }
209 void SetQuartzLength(Float_t length)
210 {
211 fGeometry->SetQuartzLength(length);
212 }
213 void SetQuartzWidth(Float_t width)
214 {
215 fGeometry->SetQuartzWidth(width);
216 }
217 void SetQuartzThickness(Float_t thickness)
218 {
219 fGeometry->SetQuartzThickness(thickness);
220 }
221 void SetOuterFreonLength(Float_t length)
222 {
223 fGeometry->SetOuterFreonLength(length);
224 }
225 void SetOuterFreonWidth(Float_t width)
226 {
227 fGeometry->SetOuterFreonWidth(width);
228 }
229 void SetInnerFreonLength(Float_t length)
230 {
231 fGeometry->SetInnerFreonLength(length);
232 }
233 void SetInnerFreonWidth(Float_t width)
234 {
235 fGeometry->SetInnerFreonWidth(width);
236 }
237 void SetFreonThickness(Float_t thickness)
238 {
239 fGeometry->SetFreonThickness(thickness);
240 }
241
237c933d 242 AliRICHChamber& operator=(const AliRICHChamber& rhs);
243
2e5f0f7b 244//
245// Cluster formation method
237c933d 246 void DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit, Int_t&x, Float_t newclust[6][500], ResponseType res);
2e5f0f7b 247 private:
248// GEANT volume if for sensitive volume of this
237c933d 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
b82b47f9 253
237c933d 254 TRotMatrix *fChamberMatrix; //Rotation matrices for each chamber
255 Float_t fChamberTrans[3]; //Translaction vectors for each chamber
256
a2f7eaf6 257 AliSegmentation *fSegmentation; //Segmentation model for each chamber
237c933d 258 AliRICHResponse *fResponse; //Response model for each chamber
259 AliRICHGeometry *fGeometry; //Geometry model for each chamber
260 AliRICHClusterFinder *fReconstruction; //Reconstruction model for each chamber
2e5f0f7b 261 ClassDef(AliRICHChamber,1)
262};
263#endif
237c933d 264
265
266
267