]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHChamber.h
Fixed compiling error for HP (multiple declaration)
[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 "AliRICHSegmentation.h"
13 #include "AliRICHGeometry.h"
14 #include "AliRICHResponse.h"
15
16 class AliRICHClusterFinder;
17
18 typedef enum {kMip, kCerenkov} ResponseType;
19
20 class AliRICHChamber : public TObject
21 {
22  public:
23     
24  public:
25     AliRICHChamber();
26     AliRICHChamber(const AliRICHChamber & Chamber);
27     ~AliRICHChamber(){}
28 //
29 // Set and get GEANT id  
30     Int_t   GetGid()         {return fGid;}
31     void    SetGid(Int_t id) {fGid=id;}
32 //  
33 // Initialisation and z-Position
34     void    Init();
35     // Set inner radius of sensitive volume 
36     void SetRInner(Float_t rmin) {frMin=rmin;}
37 // Set outer radius of sensitive volum  
38     void SetROuter(Float_t rmax) {frMax=rmax;}  
39     
40 // Return inner radius of sensitive volume 
41     Float_t RInner()            {return frMin;}
42 // Return outer radius of sensitive volum  
43     Float_t ROuter()            {return frMax;}
44
45     void    SetZPOS(Float_t p1) {fzPos=p1;}
46     Float_t ZPosition()         {return fzPos;}
47
48 //
49 //Transformation from Global to local coordinates, chamber-dependant
50     void LocaltoGlobal(Float_t pos[3],Float_t Localpos[3]);
51     void GlobaltoLocal(Float_t pos[3],Float_t localpos[3]); 
52     
53 //Setting chamber specific rotation matrices
54     
55     void SetChamberTransform(Float_t Trans1,Float_t Trans2,Float_t Trans3,TRotMatrix *Matrix)
56         
57         {
58             fChamberMatrix=Matrix;
59             fChamberTrans[0]=Trans1;
60             fChamberTrans[1]=Trans2;
61             fChamberTrans[2]=Trans3;
62         }
63     
64     TRotMatrix * GetRotMatrix() {return fChamberMatrix;}
65     
66 //Configure geometry model
67     void    GeometryModel(AliRICHGeometry* thisGeometry){
68       fGeometry=thisGeometry;
69     }
70     
71     
72 // Configure response model
73     void    ResponseModel(AliRICHResponse* thisResponse);
74     
75     //  
76 // Configure segmentation model
77     void    SegmentationModel(AliRICHSegmentation* thisSegmentation) {
78         fSegmentation = thisSegmentation;
79     }
80     void    ReconstructionModel(AliRICHClusterFinder *thisReconstruction) {
81         fReconstruction = thisReconstruction;
82     }
83
84 //  
85 //  Get reference to response model
86     AliRICHResponse* GetResponseModel();
87 //  
88 //  Get reference to segmentation model
89     AliRICHSegmentation*  GetSegmentationModel() {
90         return fSegmentation;
91     }
92
93 //  Get reference to geometry model
94     AliRICHGeometry*  GetGeometryModel() {
95         return fGeometry;
96     }
97     
98
99     AliRICHSegmentation*  GetSegmentationModel(Int_t i) {
100         return fSegmentation;
101     }
102     
103     //
104     AliRICHClusterFinder* &GetReconstructionModel() {return fReconstruction;}
105
106     Int_t Nsec()              {return fnsec;}
107     void  SetNsec(Int_t nsec) {fnsec=nsec;}
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) {return fResponse->IntPH(eloss);}
113     Float_t IntPH()              {return fResponse->IntPH();}
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   SetPadSize(Float_t p1, Float_t p2)
182         {
183             fSegmentation->SetPadSize(p1,p2);
184         }
185     void   SetGapThickness(Float_t thickness)
186       {
187         fGeometry->SetGapThickness(thickness);
188       } 
189     void   SetProximityGapThickness(Float_t thickness)
190       {
191         fGeometry->SetProximityGapThickness(thickness);
192       }
193     void   SetQuartzLength(Float_t length)
194       {
195         fGeometry->SetQuartzLength(length);
196       }
197     void   SetQuartzWidth(Float_t width)
198       {
199         fGeometry->SetQuartzWidth(width);
200       }
201     void   SetQuartzThickness(Float_t thickness) 
202       {
203         fGeometry->SetQuartzThickness(thickness);
204       }
205     void   SetOuterFreonLength(Float_t length)
206       {
207         fGeometry->SetOuterFreonLength(length);
208       }
209     void   SetOuterFreonWidth(Float_t width)
210       {
211         fGeometry->SetOuterFreonWidth(width);
212       }
213     void   SetInnerFreonLength(Float_t length)
214       {
215         fGeometry->SetInnerFreonLength(length);
216       }
217     void   SetInnerFreonWidth(Float_t width) 
218       {
219         fGeometry->SetInnerFreonWidth(width);
220       }
221     void   SetFreonThickness(Float_t thickness)
222       {
223         fGeometry->SetFreonThickness(thickness);
224       }
225
226     AliRICHChamber& operator=(const AliRICHChamber& rhs);
227     
228 //  
229 // Cluster formation method
230     void   DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit, Int_t&x, Float_t newclust[6][500], ResponseType res);
231  private:
232 // GEANT volume if for sensitive volume of this
233     Float_t frMin;                 // Minimum Chamber size
234     Float_t frMax;                 // Maximum Chamber size 
235     Int_t   fGid;                  // Id tag 
236     Float_t fzPos;                 // z-position of this chamber
237 // The segmentation models for the cathode planes
238     Int_t   fnsec;                 // fnsec=1: one plane segmented, fnsec=2: both planes are segmented.
239     
240     TRotMatrix *fChamberMatrix;          //Rotation matrices for each chamber
241     Float_t fChamberTrans[3];            //Translaction vectors for each chamber
242
243     AliRICHSegmentation           *fSegmentation;          //Segmentation model for each chamber
244     AliRICHResponse               *fResponse;              //Response model for each chamber
245     AliRICHGeometry               *fGeometry;              //Geometry model for each chamber
246     AliRICHClusterFinder          *fReconstruction;        //Reconstruction model for each chamber
247     ClassDef(AliRICHChamber,1)
248 };
249 #endif
250
251
252
253