]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHChamber.h
GetX() GetY() GetZ() added
[u/mrichter/AliRoot.git] / RICH / AliRICHChamber.h
1 #ifndef ALIRICHCHAMBER_H
2 #define ALIRICHCHAMBER_H
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>
11
12 #include "AliRICHTresholdMap.h"
13 #include "AliSegmentation.h"
14 #include "AliRICHGeometry.h"
15 #include "AliRICHResponse.h"
16
17 class AliRICHClusterFinder;
18
19 typedef enum {kMip, kCerenkov} ResponseType;
20
21 class AliRICHChamber : public TObject
22 {
23  public:
24     
25   Int_t                fIndexMap[50];   //indeces of tresholds
26   AliRICHTresholdMap*  fTresh;          //map of tresholds
27
28  public:
29     AliRICHChamber();
30     AliRICHChamber(const AliRICHChamber & Chamber);
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
38     void    Init(Int_t id);
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]); 
56
57 //Generate pad dependent tresholds
58
59     void GenerateTresholds();
60
61     
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;}    
68     
69 //Configure geometry model
70     void    GeometryModel(AliRICHGeometry* thisGeometry){
71       fGeometry=thisGeometry;
72     }
73     
74     
75 // Configure response model
76     void    ResponseModel(AliRICHResponse* thisResponse);
77     
78     //  
79 // Configure segmentation model
80     void    SetSegmentationModel(AliSegmentation* thisSegmentation) {
81         fSegmentation = thisSegmentation;
82     }
83     void    SetReconstructionModel(AliRICHClusterFinder *thisReconstruction) {
84         fReconstruction = thisReconstruction;
85     }
86
87 //  
88 //  Get reference to response model
89     AliRICHResponse* GetResponseModel();
90 //  
91 //  Get reference to segmentation model
92     AliSegmentation*  GetSegmentationModel() {
93         return fSegmentation;
94     }
95
96 //  Get reference to geometry model
97     AliRICHGeometry*  GetGeometryModel() {
98         return fGeometry;
99     }
100     
101
102     AliSegmentation*  GetSegmentationModel(Int_t i) {
103         return fSegmentation;
104     }
105     
106     //
107     AliRICHClusterFinder* &GetReconstructionModel() {return fReconstruction;}
108
109 // Member function forwarding to the segmentation and response models
110 //
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);}
114 //  
115 // Ask segmentation if signal should be generated  
116     Int_t   SigGenCond(Float_t x, Float_t y, Float_t z)
117         {
118             return fSegmentation->SigGenCond(x, y, z);
119         }
120
121 // Ask segmentation sector 
122     Int_t   Sector(Float_t x, Float_t y)
123         {
124             return fSegmentation->Sector(x, y);
125         }   
126     
127 //
128 // Initialisation of segmentation for hit  
129     void   SigGenInit(Float_t x, Float_t y, Float_t z)
130         {
131             fSegmentation->SigGenInit(x, y, z) ;
132         }
133 // Configuration forwarding
134 //
135     void   SetSigmaIntegration(Float_t p)
136         {
137             fResponse->SetSigmaIntegration(p);
138         }
139     void   SetChargeSlope(Float_t p)
140         {
141             fResponse->SetChargeSlope(p);
142         }
143     void   SetChargeSpread(Float_t p1, Float_t p2)
144         {
145             fResponse->SetChargeSpread(p1,p2);
146         }
147     void   SetMaxAdc(Float_t p)
148         {
149             fResponse->SetMaxAdc(p);
150         }
151     void   SetSqrtKx3(Float_t p)
152         {
153             fResponse->SetSqrtKx3(p);
154         }
155     void   SetKx2(Float_t p)
156         {
157             fResponse->SetKx2(p);
158         }
159     void   SetKx4(Float_t p)
160         {
161             fResponse->SetKx4(p);
162         }
163     void   SetSqrtKy3(Float_t p)
164         {
165             fResponse->SetSqrtKy3(p);
166         }
167     void   SetKy2(Float_t p)
168         {
169             fResponse->SetKy2(p);
170         }
171     void   SetKy4(Float_t p)
172         {
173             fResponse->SetKy4(p);
174         }
175     
176     void   SetPitch(Float_t p)
177         {
178             fResponse->SetPitch(p);
179         }
180
181     void   SetWireSag(Int_t p)
182         {
183             fResponse->SetWireSag(p);
184         }
185
186     void   SetVoltage(Int_t p)
187         {
188             fResponse->SetVoltage(p);
189         }
190     
191     void   SetPadSize(Float_t p1, Float_t p2)
192         {
193             fSegmentation->SetPadSize(p1,p2);
194         }
195     void   SetGapThickness(Float_t thickness)
196       {
197         fGeometry->SetGapThickness(thickness);
198       } 
199     void   SetProximityGapThickness(Float_t thickness)
200       {
201         fGeometry->SetProximityGapThickness(thickness);
202       }
203     void   SetQuartzLength(Float_t length)
204       {
205         fGeometry->SetQuartzLength(length);
206       }
207     void   SetQuartzWidth(Float_t width)
208       {
209         fGeometry->SetQuartzWidth(width);
210       }
211     void   SetQuartzThickness(Float_t thickness) 
212       {
213         fGeometry->SetQuartzThickness(thickness);
214       }
215     void   SetOuterFreonLength(Float_t length)
216       {
217         fGeometry->SetOuterFreonLength(length);
218       }
219     void   SetOuterFreonWidth(Float_t width)
220       {
221         fGeometry->SetOuterFreonWidth(width);
222       }
223     void   SetInnerFreonLength(Float_t length)
224       {
225         fGeometry->SetInnerFreonLength(length);
226       }
227     void   SetInnerFreonWidth(Float_t width) 
228       {
229         fGeometry->SetInnerFreonWidth(width);
230       }
231     void   SetFreonThickness(Float_t thickness)
232       {
233         fGeometry->SetFreonThickness(thickness);
234       }
235
236    AliRICHChamber& operator=(const AliRICHChamber& rhs);
237    
238 //  
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);
241  private:
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
247
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)
250
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)
256 };
257 #endif