]>
Commit | Line | Data |
---|---|---|
c28632f0 | 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$ | |
4c475d27 | 18 | Revision 1.18 2002/10/22 16:28:21 alibrary |
19 | Introducing Riostream.h | |
20 | ||
7118aef0 | 21 | Revision 1.17 2002/10/14 14:57:32 hristov |
22 | Merging the VirtualMC branch to the main development branch (HEAD) | |
23 | ||
b9d0a01d | 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 | ||
03f3e21a | 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 | ||
2682e810 | 36 | Revision 1.14 2001/05/16 14:57:20 alibrary |
37 | New files for folders and Stack | |
38 | ||
9e1a0ddb | 39 | Revision 1.13 2001/05/10 12:28:04 jbarbosa |
40 | Repositioned the RICH modules. | |
41 | ||
449e6743 | 42 | Revision 1.12 2001/02/23 17:26:12 jbarbosa |
43 | Setters for wire sag effect and voltage values. | |
44 | ||
c4384528 | 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 | ||
2fc6393f | 48 | Revision 1.10 2000/12/20 14:08:02 jbarbosa |
49 | Removed dependencies on TGeant3 (thanks to F. Carminati and I. Hrivnacova) | |
50 | ||
5cfcdf54 | 51 | Revision 1.9 2000/12/18 17:44:40 jbarbosa |
52 | Took two lines out of output. | |
53 | ||
f2de8657 | 54 | Revision 1.8 2000/11/01 15:39:00 jbarbosa |
55 | Updated default geometry. | |
56 | ||
2463d46d | 57 | Revision 1.7 2000/10/03 21:44:09 morsch |
58 | Use AliSegmentation and AliHit abstract base classes. | |
59 | ||
a2f7eaf6 | 60 | Revision 1.6 2000/07/10 15:28:39 fca |
61 | Correction of the inheritance scheme | |
62 | ||
452a64c6 | 63 | Revision 1.5 2000/06/30 16:38:51 dibari |
64 | Removed setters. | |
65 | ||
64e9b5aa | 66 | Revision 1.4 2000/06/13 13:13:40 jbarbosa |
67 | Correcting previous correction... | |
68 | ||
bef02574 | 69 | Revision 1.3 2000/06/13 13:06:38 jbarbosa |
70 | Fixed compiling error for HP (multiple declaration) | |
71 | ||
7f36f6bc | 72 | Revision 1.2 2000/06/12 15:36:16 jbarbosa |
73 | Cleaned up version. | |
74 | ||
237c933d | 75 | Revision 1.1 2000/06/09 15:00:31 jbarbosa |
76 | New full version. All parameters configurable. | |
77 | ||
c28632f0 | 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> | |
237c933d | 108 | #include <TParticle.h> |
c28632f0 | 109 | |
110 | #include "AliRICHv1.h" | |
237c933d | 111 | #include "AliRICHHit.h" |
a2f7eaf6 | 112 | #include "AliSegmentation.h" |
64e9b5aa | 113 | #include "AliRICHResponse.h" |
03f3e21a | 114 | #include "AliRICHSegmentationV1.h" |
64e9b5aa | 115 | #include "AliRICHResponseV0.h" |
116 | #include "AliRICHGeometry.h" | |
c28632f0 | 117 | #include "AliRun.h" |
7118aef0 | 118 | #include "Riostream.h" |
c28632f0 | 119 | #include "AliConst.h" |
120 | #include "AliPDG.h" | |
c28632f0 | 121 | |
122 | ClassImp(AliRICHv1) | |
123 | ||
124 | //___________________________________________ | |
452a64c6 | 125 | AliRICHv1::AliRICHv1() |
c28632f0 | 126 | { |
237c933d | 127 | |
128 | // Default constructor fo AliRICHvv1 (full version) | |
129 | ||
c28632f0 | 130 | //fChambers = 0; |
131 | } | |
132 | ||
133 | //___________________________________________ | |
134 | AliRICHv1::AliRICHv1(const char *name, const char *title) | |
452a64c6 | 135 | : AliRICH(name,title) |
c28632f0 | 136 | { |
c28632f0 | 137 | |
237c933d | 138 | // Full version of RICH with hits and diagnostics |
139 | ||
64e9b5aa | 140 | // Version 0 |
141 | // Default Segmentation, no hits | |
03f3e21a | 142 | AliRICHSegmentationV1* segmentation = new AliRICHSegmentationV1; |
64e9b5aa | 143 | // |
144 | // Segmentation parameters | |
c4384528 | 145 | segmentation->SetPadSize(0.84,0.80); |
146 | segmentation->SetDAnod(0.84/2); | |
64e9b5aa | 147 | // |
148 | // Geometry parameters | |
149 | AliRICHGeometry* geometry = new AliRICHGeometry; | |
150 | geometry->SetGapThickness(8); | |
151 | geometry->SetProximityGapThickness(.4); | |
2463d46d | 152 | geometry->SetQuartzLength(133); |
153 | geometry->SetQuartzWidth(127.9); | |
64e9b5aa | 154 | geometry->SetQuartzThickness(.5); |
2463d46d | 155 | geometry->SetOuterFreonLength(133); |
156 | geometry->SetOuterFreonWidth(41.3); | |
157 | geometry->SetInnerFreonLength(133); | |
158 | geometry->SetInnerFreonWidth(41.3); | |
159 | geometry->SetFreonThickness(1.5); | |
64e9b5aa | 160 | // |
161 | // Response parameters | |
c4384528 | 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); | |
03f3e21a | 176 | response->SetWireSag(1); // 1->On, 0->Off |
c4384528 | 177 | response->SetVoltage(2150); // Should only be 2000, 2050, 2100 or 2150 |
178 | ||
64e9b5aa | 179 | // |
180 | // AliRICH *RICH = (AliRICH *) gAlice->GetDetector("RICH"); | |
181 | ||
237c933d | 182 | fCkovNumber=0; |
183 | fFreonProd=0; | |
64e9b5aa | 184 | Int_t i=0; |
c28632f0 | 185 | |
64e9b5aa | 186 | fChambers = new TObjArray(kNCH); |
187 | for (i=0; i<kNCH; i++) { | |
188 | ||
2682e810 | 189 | //PH (*fChambers)[i] = new AliRICHChamber(); |
190 | fChambers->AddAt(new AliRICHChamber(), i); | |
64e9b5aa | 191 | |
c28632f0 | 192 | } |
64e9b5aa | 193 | |
194 | for (i=0; i<kNCH; i++) { | |
195 | SetGeometryModel(i,geometry); | |
c4384528 | 196 | SetSegmentationModel(i, segmentation); |
197 | SetResponseModel(i, response); | |
64e9b5aa | 198 | SetDebugLevel(0); |
199 | } | |
200 | ||
201 | ||
c28632f0 | 202 | } |
203 | ||
237c933d | 204 | void AliRICHv1::Init() |
205 | { | |
206 | ||
9e1a0ddb | 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 | } | |
237c933d | 213 | |
214 | ||
a2f7eaf6 | 215 | AliSegmentation* segmentation; |
237c933d | 216 | AliRICHGeometry* geometry; |
217 | AliRICHResponse* response; | |
218 | ||
219 | ||
220 | // | |
221 | // Initialize Tracking Chambers | |
222 | // | |
2fc6393f | 223 | for (Int_t i=0; i<kNCH; i++) { |
237c933d | 224 | //printf ("i:%d",i); |
2682e810 | 225 | //PH ( (AliRICHChamber*) (*fChambers)[i])->Init(i); |
226 | ( (AliRICHChamber*)fChambers->At(i))->Init(i); | |
237c933d | 227 | } |
228 | ||
229 | // | |
230 | // Set the chamber (sensitive region) GEANT identifier | |
231 | ||
2682e810 | 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 | ||
237c933d | 248 | |
237c933d | 249 | segmentation=Chamber(0).GetSegmentationModel(0); |
250 | geometry=Chamber(0).GetGeometryModel(); | |
251 | response=Chamber(0).GetResponseModel(); | |
252 | ||
449e6743 | 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)); | |
237c933d | 276 | |
9e1a0ddb | 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 | } | |
237c933d | 301 | } |
c28632f0 | 302 | |
2463d46d | 303 | |
304 | ||
305 | ||
306 | ||
307 | ||
308 | ||
309 |