]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* | |
17 | $Log$ | |
18 | Revision 1.18 2002/10/22 16:28:21 alibrary | |
19 | Introducing Riostream.h | |
20 | ||
21 | Revision 1.17 2002/10/14 14:57:32 hristov | |
22 | Merging the VirtualMC branch to the main development branch (HEAD) | |
23 | ||
24 | Revision 1.16.6.2 2002/07/24 10:07:52 alibrary | |
25 | Updating VirtualMC | |
26 | ||
27 | Revision 1.16.6.1 2002/06/10 15:12:46 hristov | |
28 | Merged with v3-08-02 | |
29 | ||
30 | Revision 1.16 2001/10/10 11:29:17 morsch | |
31 | Use segmentation v1 and wire sag as default. It does not work otherwise. Why ? | |
32 | ||
33 | Revision 1.15 2001/08/30 09:51:23 hristov | |
34 | The operator[] is replaced by At() or AddAt() in case of TObjArray. | |
35 | ||
36 | Revision 1.14 2001/05/16 14:57:20 alibrary | |
37 | New files for folders and Stack | |
38 | ||
39 | Revision 1.13 2001/05/10 12:28:04 jbarbosa | |
40 | Repositioned the RICH modules. | |
41 | ||
42 | Revision 1.12 2001/02/23 17:26:12 jbarbosa | |
43 | Setters for wire sag effect and voltage values. | |
44 | ||
45 | Revision 1.11 2001/02/13 20:10:33 jbarbosa | |
46 | Removed call to SetNSec() (obsolete). Fixed bug in chamber initialisation (not all chambers were initialised). | |
47 | ||
48 | Revision 1.10 2000/12/20 14:08:02 jbarbosa | |
49 | Removed dependencies on TGeant3 (thanks to F. Carminati and I. Hrivnacova) | |
50 | ||
51 | Revision 1.9 2000/12/18 17:44:40 jbarbosa | |
52 | Took two lines out of output. | |
53 | ||
54 | Revision 1.8 2000/11/01 15:39:00 jbarbosa | |
55 | Updated default geometry. | |
56 | ||
57 | Revision 1.7 2000/10/03 21:44:09 morsch | |
58 | Use AliSegmentation and AliHit abstract base classes. | |
59 | ||
60 | Revision 1.6 2000/07/10 15:28:39 fca | |
61 | Correction of the inheritance scheme | |
62 | ||
63 | Revision 1.5 2000/06/30 16:38:51 dibari | |
64 | Removed setters. | |
65 | ||
66 | Revision 1.4 2000/06/13 13:13:40 jbarbosa | |
67 | Correcting previous correction... | |
68 | ||
69 | Revision 1.3 2000/06/13 13:06:38 jbarbosa | |
70 | Fixed compiling error for HP (multiple declaration) | |
71 | ||
72 | Revision 1.2 2000/06/12 15:36:16 jbarbosa | |
73 | Cleaned up version. | |
74 | ||
75 | Revision 1.1 2000/06/09 15:00:31 jbarbosa | |
76 | New full version. All parameters configurable. | |
77 | ||
78 | Revision 1.9 2000/05/31 08:19:38 jbarbosa | |
79 | Fixed bug in StepManager | |
80 | ||
81 | Revision 1.8 2000/05/26 17:30:08 jbarbosa | |
82 | Cerenkov angle now stored within cerenkov data structure. | |
83 | ||
84 | Revision 1.7 2000/05/18 10:31:36 jbarbosa | |
85 | Fixed positioning of spacers inside freon. | |
86 | Fixed positioning of proximity gap | |
87 | inside methane. | |
88 | Fixed cut on neutral particles in the StepManager. | |
89 | ||
90 | Revision 1.6 2000/04/28 11:51:58 morsch | |
91 | Dimensions of arrays hits and Ckov_data corrected. | |
92 | ||
93 | Revision 1.5 2000/04/19 13:28:46 morsch | |
94 | Major changes in geometry (parametrised), materials (updated) and | |
95 | step manager (diagnostics) (JB, AM) | |
96 | ||
97 | */ | |
98 | ||
99 | ||
100 | ||
101 | ////////////////////////////////////////////////////////// | |
102 | // Manager and hits classes for set: RICH full version // | |
103 | ////////////////////////////////////////////////////////// | |
104 | ||
105 | #include <TTUBE.h> | |
106 | #include <TNode.h> | |
107 | #include <TRandom.h> | |
108 | #include <TParticle.h> | |
109 | ||
110 | #include "AliRICHv1.h" | |
111 | #include "AliRICHHit.h" | |
112 | #include "AliSegmentation.h" | |
113 | #include "AliRICHResponse.h" | |
114 | #include "AliRICHSegmentationV1.h" | |
115 | #include "AliRICHResponseV0.h" | |
116 | #include "AliRICHGeometry.h" | |
117 | #include "AliRun.h" | |
118 | #include "Riostream.h" | |
119 | #include "AliConst.h" | |
120 | #include "AliPDG.h" | |
121 | ||
122 | ClassImp(AliRICHv1) | |
123 | ||
124 | //___________________________________________ | |
125 | AliRICHv1::AliRICHv1() | |
126 | { | |
127 | ||
128 | // Default constructor fo AliRICHvv1 (full version) | |
129 | ||
130 | //fChambers = 0; | |
131 | } | |
132 | ||
133 | //___________________________________________ | |
134 | AliRICHv1::AliRICHv1(const char *name, const char *title) | |
135 | : AliRICH(name,title) | |
136 | { | |
137 | ||
138 | // Full version of RICH with hits and diagnostics | |
139 | ||
140 | // Version 0 | |
141 | // Default Segmentation, no hits | |
142 | AliRICHSegmentationV1* segmentation = new AliRICHSegmentationV1; | |
143 | // | |
144 | // Segmentation parameters | |
145 | segmentation->SetPadSize(0.84,0.80); | |
146 | segmentation->SetDAnod(0.84/2); | |
147 | // | |
148 | // Geometry parameters | |
149 | AliRICHGeometry* geometry = new AliRICHGeometry; | |
150 | geometry->SetGapThickness(8); | |
151 | geometry->SetProximityGapThickness(.4); | |
152 | geometry->SetQuartzLength(133); | |
153 | geometry->SetQuartzWidth(127.9); | |
154 | geometry->SetQuartzThickness(.5); | |
155 | geometry->SetOuterFreonLength(133); | |
156 | geometry->SetOuterFreonWidth(41.3); | |
157 | geometry->SetInnerFreonLength(133); | |
158 | geometry->SetInnerFreonWidth(41.3); | |
159 | geometry->SetFreonThickness(1.5); | |
160 | // | |
161 | // Response parameters | |
162 | AliRICHResponseV0* response = new AliRICHResponseV0; | |
163 | response->SetSigmaIntegration(5.); | |
164 | response->SetChargeSlope(27.); | |
165 | response->SetChargeSpread(0.18, 0.18); | |
166 | response->SetMaxAdc(4096); | |
167 | response->SetAlphaFeedback(0.036); | |
168 | response->SetEIonisation(26.e-9); | |
169 | response->SetSqrtKx3(0.77459667); | |
170 | response->SetKx2(0.962); | |
171 | response->SetKx4(0.379); | |
172 | response->SetSqrtKy3(0.77459667); | |
173 | response->SetKy2(0.962); | |
174 | response->SetKy4(0.379); | |
175 | response->SetPitch(0.25); | |
176 | response->SetWireSag(1); // 1->On, 0->Off | |
177 | response->SetVoltage(2150); // Should only be 2000, 2050, 2100 or 2150 | |
178 | ||
179 | // | |
180 | // AliRICH *RICH = (AliRICH *) gAlice->GetDetector("RICH"); | |
181 | ||
182 | fCkovNumber=0; | |
183 | fFreonProd=0; | |
184 | Int_t i=0; | |
185 | ||
186 | fChambers = new TObjArray(kNCH); | |
187 | for (i=0; i<kNCH; i++) { | |
188 | ||
189 | //PH (*fChambers)[i] = new AliRICHChamber(); | |
190 | fChambers->AddAt(new AliRICHChamber(), i); | |
191 | ||
192 | } | |
193 | ||
194 | for (i=0; i<kNCH; i++) { | |
195 | SetGeometryModel(i,geometry); | |
196 | SetSegmentationModel(i, segmentation); | |
197 | SetResponseModel(i, response); | |
198 | SetDebugLevel(0); | |
199 | } | |
200 | ||
201 | ||
202 | } | |
203 | ||
204 | void AliRICHv1::Init() | |
205 | { | |
206 | ||
207 | if(fDebug) { | |
208 | printf("%s: *********************************** RICH_INIT ***********************************\n",ClassName()); | |
209 | printf("%s: * *\n",ClassName()); | |
210 | printf("%s: * AliRICHv1 Full version started *\n",ClassName()); | |
211 | printf("%s: * *\n",ClassName()); | |
212 | } | |
213 | ||
214 | ||
215 | AliSegmentation* segmentation; | |
216 | AliRICHGeometry* geometry; | |
217 | AliRICHResponse* response; | |
218 | ||
219 | ||
220 | // | |
221 | // Initialize Tracking Chambers | |
222 | // | |
223 | for (Int_t i=0; i<kNCH; i++) { | |
224 | //printf ("i:%d",i); | |
225 | //PH ( (AliRICHChamber*) (*fChambers)[i])->Init(i); | |
226 | ( (AliRICHChamber*)fChambers->At(i))->Init(i); | |
227 | } | |
228 | ||
229 | // | |
230 | // Set the chamber (sensitive region) GEANT identifier | |
231 | ||
232 | //PH ((AliRICHChamber*)(*fChambers)[0])->SetGid(1); | |
233 | //PH ((AliRICHChamber*)(*fChambers)[1])->SetGid(2); | |
234 | //PH ((AliRICHChamber*)(*fChambers)[2])->SetGid(3); | |
235 | //PH ((AliRICHChamber*)(*fChambers)[3])->SetGid(4); | |
236 | //PH ((AliRICHChamber*)(*fChambers)[4])->SetGid(5); | |
237 | //PH ((AliRICHChamber*)(*fChambers)[5])->SetGid(6); | |
238 | //PH ((AliRICHChamber*)(*fChambers)[6])->SetGid(7); | |
239 | ||
240 | ((AliRICHChamber*)fChambers->At(0))->SetGid(1); | |
241 | ((AliRICHChamber*)fChambers->At(1))->SetGid(2); | |
242 | ((AliRICHChamber*)fChambers->At(2))->SetGid(3); | |
243 | ((AliRICHChamber*)fChambers->At(3))->SetGid(4); | |
244 | ((AliRICHChamber*)fChambers->At(4))->SetGid(5); | |
245 | ((AliRICHChamber*)fChambers->At(5))->SetGid(6); | |
246 | ((AliRICHChamber*)fChambers->At(6))->SetGid(7); | |
247 | ||
248 | ||
249 | segmentation=Chamber(0).GetSegmentationModel(0); | |
250 | geometry=Chamber(0).GetGeometryModel(); | |
251 | response=Chamber(0).GetResponseModel(); | |
252 | ||
253 | Float_t offset = 490 + 1.276 - geometry->GetGapThickness()/2; //distance from center of mother volume to methane | |
254 | Float_t deltaphi = 19.5; //phi angle between center of chambers - z direction | |
255 | Float_t deltatheta = 20; //theta angle between center of chambers - x direction | |
256 | Float_t cosphi = TMath::Cos(deltaphi*TMath::Pi()/180); | |
257 | Float_t sinphi = TMath::Sin(deltaphi*TMath::Pi()/180); | |
258 | Float_t costheta = TMath::Cos(deltatheta*TMath::Pi()/180); | |
259 | Float_t sintheta = TMath::Sin(deltatheta*TMath::Pi()/180); | |
260 | ||
261 | Float_t pos1[3]={0. , offset*cosphi , offset*sinphi}; | |
262 | Float_t pos2[3]={offset*sintheta , offset*costheta , 0. }; | |
263 | Float_t pos3[3]={0. , offset , 0.}; | |
264 | Float_t pos4[3]={-offset*sintheta , offset*costheta , 0.}; | |
265 | Float_t pos5[3]={offset*sinphi , offset*costheta*cosphi, -offset*sinphi}; | |
266 | Float_t pos6[3]={0. , offset*cosphi , -offset*sinphi}; | |
267 | Float_t pos7[3]={ -offset*sinphi , offset*costheta*cosphi, -offset*sinphi}; | |
268 | ||
269 | Chamber(0).SetChamberTransform(pos1[0],pos1[1],pos1[2],new TRotMatrix("rot993","rot993",90., 0. , 90. - deltaphi, 90. , deltaphi, -90. )); | |
270 | Chamber(1).SetChamberTransform(pos2[0],pos2[1],pos2[2],new TRotMatrix("rot994","rot994",90., -deltatheta , 90. , 90.- deltatheta , 0. , 0. )); | |
271 | Chamber(2).SetChamberTransform(pos3[0],pos3[1],pos3[2],new TRotMatrix("rot995","rot995",90., 0. , 90. , 90. , 0. , 0. )); | |
272 | Chamber(3).SetChamberTransform(pos4[0],pos4[1],pos4[2],new TRotMatrix("rot996","rot996",90., deltatheta , 90. , 90 + deltatheta , 0. , 0. )); | |
273 | Chamber(4).SetChamberTransform(pos5[0],pos5[1],pos5[2],new TRotMatrix("rot997","rot997",90., 360. - deltatheta, 108.2 , 90.- deltatheta ,18.2 , 90 - deltatheta)); | |
274 | Chamber(5).SetChamberTransform(pos6[0],pos6[1],pos6[2],new TRotMatrix("rot998","rot998",90., 0. , 90 + deltaphi , 90. , deltaphi, 90. )); | |
275 | Chamber(6).SetChamberTransform(pos7[0],pos7[1],pos7[2],new TRotMatrix("rot999","rot999",90., deltatheta , 108.2 , 90.+ deltatheta ,18.2 , 90 + deltatheta)); | |
276 | ||
277 | if(fDebug) { | |
278 | printf("%s: * Pads : %3dx%3d *\n", | |
279 | ClassName(),segmentation->Npx(),segmentation->Npy()); | |
280 | printf("%s: * Pad size : %5.2f x%5.2f mm2 *\n", | |
281 | ClassName(),segmentation->Dpx(),segmentation->Dpy()); | |
282 | printf("%s: * Gap Thickness : %5.1f cm *\n", | |
283 | ClassName(),geometry->GetGapThickness()); | |
284 | printf("%s: * Radiator Width : %5.1f cm *\n", | |
285 | ClassName(),geometry->GetQuartzWidth()); | |
286 | printf("%s: * Radiator Length : %5.1f cm *\n", | |
287 | ClassName(),geometry->GetQuartzLength()); | |
288 | printf("%s: * Freon Thickness : %5.1f cm *\n", | |
289 | ClassName(),geometry->GetFreonThickness()); | |
290 | printf("%s: * Charge Slope : %5.1f ADC *\n", | |
291 | ClassName(),response->ChargeSlope()); | |
292 | printf("%s: * Feedback Prob. : %5.2f %% *\n", | |
293 | ClassName(),response->AlphaFeedback()*100); | |
294 | printf("%s: * Debug Level : %3d *\n", | |
295 | ClassName(),GetDebugLevel()); | |
296 | printf("%s: * *\n", | |
297 | ClassName()); | |
298 | printf("%s: *********************************************************************************\n", | |
299 | ClassName()); | |
300 | } | |
301 | } | |
302 | ||
303 | ||
304 | ||
305 | ||
306 | ||
307 | ||
308 | ||
309 |