]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICHChamber.h
Redefinition of sectors and pad coordinates/real coordinates transformations.
[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
115 Int_t Nsec() {return fnsec;}
116 void SetNsec(Int_t nsec) {fnsec=nsec;}
117//
118// Member function forwarding to the segmentation and response models
119//
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();}
123//
124// Ask segmentation if signal should be generated
125 Int_t SigGenCond(Float_t x, Float_t y, Float_t z)
126 {
127 return fSegmentation->SigGenCond(x, y, z);
128 }
129
130// Ask segmentation sector
131 Int_t Sector(Float_t x, Float_t y)
132 {
133 return fSegmentation->Sector(x, y);
134 }
135
136//
137// Initialisation of segmentation for hit
138 void SigGenInit(Float_t x, Float_t y, Float_t z)
139 {
140 fSegmentation->SigGenInit(x, y, z) ;
141 }
142// Configuration forwarding
143//
144 void SetSigmaIntegration(Float_t p)
145 {
146 fResponse->SetSigmaIntegration(p);
147 }
148 void SetChargeSlope(Float_t p)
149 {
150 fResponse->SetChargeSlope(p);
151 }
152 void SetChargeSpread(Float_t p1, Float_t p2)
153 {
154 fResponse->SetChargeSpread(p1,p2);
155 }
156 void SetMaxAdc(Float_t p)
157 {
158 fResponse->SetMaxAdc(p);
159 }
160 void SetSqrtKx3(Float_t p)
161 {
162 fResponse->SetSqrtKx3(p);
163 }
164 void SetKx2(Float_t p)
165 {
166 fResponse->SetKx2(p);
167 }
168 void SetKx4(Float_t p)
169 {
170 fResponse->SetKx4(p);
171 }
172 void SetSqrtKy3(Float_t p)
173 {
174 fResponse->SetSqrtKy3(p);
175 }
176 void SetKy2(Float_t p)
177 {
178 fResponse->SetKy2(p);
179 }
180 void SetKy4(Float_t p)
181 {
182 fResponse->SetKy4(p);
183 }
184
185 void SetPitch(Float_t p)
186 {
187 fResponse->SetPitch(p);
188 }
189
190 void SetPadSize(Float_t p1, Float_t p2)
191 {
192 fSegmentation->SetPadSize(p1,p2);
193 }
194 void SetGapThickness(Float_t thickness)
195 {
196 fGeometry->SetGapThickness(thickness);
197 }
198 void SetProximityGapThickness(Float_t thickness)
199 {
200 fGeometry->SetProximityGapThickness(thickness);
201 }
202 void SetQuartzLength(Float_t length)
203 {
204 fGeometry->SetQuartzLength(length);
205 }
206 void SetQuartzWidth(Float_t width)
207 {
208 fGeometry->SetQuartzWidth(width);
209 }
210 void SetQuartzThickness(Float_t thickness)
211 {
212 fGeometry->SetQuartzThickness(thickness);
213 }
214 void SetOuterFreonLength(Float_t length)
215 {
216 fGeometry->SetOuterFreonLength(length);
217 }
218 void SetOuterFreonWidth(Float_t width)
219 {
220 fGeometry->SetOuterFreonWidth(width);
221 }
222 void SetInnerFreonLength(Float_t length)
223 {
224 fGeometry->SetInnerFreonLength(length);
225 }
226 void SetInnerFreonWidth(Float_t width)
227 {
228 fGeometry->SetInnerFreonWidth(width);
229 }
230 void SetFreonThickness(Float_t thickness)
231 {
232 fGeometry->SetFreonThickness(thickness);
233 }
234
237c933d 235 AliRICHChamber& operator=(const AliRICHChamber& rhs);
236
2e5f0f7b 237//
238// Cluster formation method
237c933d 239 void DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit, Int_t&x, Float_t newclust[6][500], ResponseType res);
2e5f0f7b 240 private:
241// GEANT volume if for sensitive volume of this
237c933d 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
2e5f0f7b 246// The segmentation models for the cathode planes
237c933d 247 Int_t fnsec; // fnsec=1: one plane segmented, fnsec=2: both planes are segmented.
2e5f0f7b 248
237c933d 249 TRotMatrix *fChamberMatrix; //Rotation matrices for each chamber
250 Float_t fChamberTrans[3]; //Translaction vectors for each chamber
251
a2f7eaf6 252 AliSegmentation *fSegmentation; //Segmentation model for each chamber
237c933d 253 AliRICHResponse *fResponse; //Response model for each chamber
254 AliRICHGeometry *fGeometry; //Geometry model for each chamber
255 AliRICHClusterFinder *fReconstruction; //Reconstruction model for each chamber
2e5f0f7b 256 ClassDef(AliRICHChamber,1)
257};
258#endif
237c933d 259
260
261
262