]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 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 * | |
2c799aa2 | 12 | * about the suitability of this software for any purpeateose. It is * |
a9e2aefa | 13 | * provided "as is" without express or implied warranty. * |
14 | **************************************************************************/ | |
15 | ||
16 | /* | |
17 | $Log$ | |
9e1a0ddb | 18 | Revision 1.27 2001/04/06 11:24:43 morsch |
19 | Dependency on implementations of AliSegmentation and AliMUONResponse moved to AliMUONFactory class. | |
20 | Static method Build() builds the MUON system out of chambers, segmentation and response. | |
21 | ||
be3bb6c1 | 22 | Revision 1.26 2001/03/17 10:07:20 morsch |
23 | Correct inconsistent variable name / method name / comments. | |
24 | ||
2eb55fab | 25 | Revision 1.25 2001/03/16 15:32:06 morsch |
26 | Corrections of overlap with beam shield and dipole (A. de Falco) | |
27 | ||
21a18f36 | 28 | Revision 1.24 2001/03/14 17:22:15 pcrochet |
29 | Geometry of the trigger chambers : a vertical gap of has been introduced around x=0 according fig.3.27 of the TDR (P.Dupieux) | |
30 | ||
236fe2c5 | 31 | Revision 1.23 2001/01/18 15:23:49 egangler |
32 | Bug correction in StepManager : | |
33 | Now the systematic offset with angle is cured | |
34 | ||
e0f71fb7 | 35 | Revision 1.22 2001/01/17 21:01:21 hristov |
36 | Unused variable removed | |
37 | ||
a7e8b51a | 38 | Revision 1.21 2000/12/20 13:00:22 egangler |
39 | ||
40 | Added charge correlation between cathods. | |
41 | In Config_slat.C, use | |
42 | MUON->Chamber(chamber-1).SetChargeCorrel(0.11); to set the RMS of | |
43 | q1/q2 to 11 % (number from Alberto) | |
44 | This is stored in AliMUONChamber fChargeCorrel member. | |
45 | At generation time, when a tracks enters the volume, | |
46 | AliMUONv1::StepManager calls | |
47 | AliMUONChamber::ChargeCorrelationInit() to set the current value of | |
48 | fCurrentCorrel which is then used at Disintegration level to scale | |
49 | appropriately the PadHit charges. | |
50 | ||
681d067b | 51 | Revision 1.20 2000/12/04 17:48:23 gosset |
52 | Modifications for stations 1 et 2 mainly: | |
53 | * station 1 with 4 mm gas gap and smaller cathode segmentation... | |
54 | * stations 1 and 2 with "grey" frame crosses | |
55 | * mean noise at 1.5 ADC channel | |
56 | * Ar-CO2 gas (80%+20%) | |
57 | ||
b64652f5 | 58 | Revision 1.19 2000/12/02 17:15:46 morsch |
59 | Correction of dead zones in inner regions of stations 3-5 | |
60 | Correction of length of slats 3 and 9 of station 4. | |
61 | ||
a083207d | 62 | Revision 1.17 2000/11/24 12:57:10 morsch |
63 | New version of geometry for stations 3-5 "Slats" (A. de Falco) | |
64 | - sensitive region at station 3 inner radius | |
65 | - improved volume tree structure | |
66 | ||
3c084d9f | 67 | Revision 1.16 2000/11/08 13:01:40 morsch |
68 | Chamber half-planes of stations 3-5 at different z-positions. | |
69 | ||
e1ad7d45 | 70 | Revision 1.15 2000/11/06 11:39:02 morsch |
71 | Bug in StepManager() corrected. | |
72 | ||
e3cf5faa | 73 | Revision 1.14 2000/11/06 09:16:50 morsch |
74 | Avoid overlap of slat volumes. | |
75 | ||
2c799aa2 | 76 | Revision 1.13 2000/10/26 07:33:44 morsch |
77 | Correct x-position of slats in station 5. | |
78 | ||
8013c580 | 79 | Revision 1.12 2000/10/25 19:55:35 morsch |
80 | Switches for each station individually for debug and lego. | |
81 | ||
b17c0c87 | 82 | Revision 1.11 2000/10/22 16:44:01 morsch |
83 | Update of slat geometry for stations 3,4,5 (A. deFalco) | |
84 | ||
f9f7c205 | 85 | Revision 1.10 2000/10/12 16:07:04 gosset |
86 | StepManager: | |
87 | * SigGenCond only called for tracking chambers, | |
88 | hence no more division by 0, | |
89 | and may use last ALIROOT/dummies.C with exception handling; | |
90 | * "10" replaced by "AliMUONConstants::NTrackingCh()". | |
91 | ||
a75f073c | 92 | Revision 1.9 2000/10/06 15:37:22 morsch |
93 | Problems with variable redefinition in for-loop solved. | |
94 | Variable names starting with u-case letters changed to l-case. | |
95 | ||
6c5ddcfa | 96 | Revision 1.8 2000/10/06 09:06:31 morsch |
97 | Include Slat chambers (stations 3-5) into geometry (A. de Falco) | |
98 | ||
1e8fff9c | 99 | Revision 1.7 2000/10/02 21:28:09 fca |
100 | Removal of useless dependecies via forward declarations | |
101 | ||
94de3818 | 102 | Revision 1.6 2000/10/02 17:20:45 egangler |
103 | Cleaning of the code (continued ) : | |
104 | -> coding conventions | |
105 | -> void Streamers | |
106 | -> some useless includes removed or replaced by "class" statement | |
107 | ||
8c449e83 | 108 | Revision 1.5 2000/06/28 15:16:35 morsch |
109 | (1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there) | |
110 | to allow development of slat-muon chamber simulation and reconstruction code in the MUON | |
111 | framework. The changes should have no side effects (mostly dummy arguments). | |
112 | (2) Hit disintegration uses 3-dim hit coordinates to allow simulation | |
113 | of chambers with overlapping modules (MakePadHits, Disintegration). | |
114 | ||
802a864d | 115 | Revision 1.4 2000/06/26 14:02:38 morsch |
116 | Add class AliMUONConstants with MUON specific constants using static memeber data and access methods. | |
117 | ||
f665c1ea | 118 | Revision 1.3 2000/06/22 14:10:05 morsch |
119 | HP scope problems corrected (PH) | |
120 | ||
e17592e9 | 121 | Revision 1.2 2000/06/15 07:58:49 morsch |
122 | Code from MUON-dev joined | |
123 | ||
a9e2aefa | 124 | Revision 1.1.2.14 2000/06/14 14:37:25 morsch |
125 | Initialization of TriggerCircuit added (PC) | |
126 | ||
127 | Revision 1.1.2.13 2000/06/09 21:55:47 morsch | |
128 | Most coding rule violations corrected. | |
129 | ||
130 | Revision 1.1.2.12 2000/05/05 11:34:29 morsch | |
131 | Log inside comments. | |
132 | ||
133 | Revision 1.1.2.11 2000/05/05 10:06:48 morsch | |
134 | Coding Rule violations regarding trigger section corrected (CP) | |
135 | Log messages included. | |
136 | */ | |
137 | ||
138 | ///////////////////////////////////////////////////////// | |
139 | // Manager and hits classes for set:MUON version 0 // | |
140 | ///////////////////////////////////////////////////////// | |
141 | ||
142 | #include <TTUBE.h> | |
143 | #include <TNode.h> | |
144 | #include <TRandom.h> | |
145 | #include <TLorentzVector.h> | |
146 | #include <iostream.h> | |
147 | ||
148 | #include "AliMUONv1.h" | |
149 | #include "AliRun.h" | |
150 | #include "AliMC.h" | |
94de3818 | 151 | #include "AliMagF.h" |
a9e2aefa | 152 | #include "AliCallf77.h" |
153 | #include "AliConst.h" | |
154 | #include "AliMUONChamber.h" | |
155 | #include "AliMUONHit.h" | |
156 | #include "AliMUONPadHit.h" | |
f665c1ea | 157 | #include "AliMUONConstants.h" |
8c449e83 | 158 | #include "AliMUONTriggerCircuit.h" |
be3bb6c1 | 159 | #include "AliMUONFactory.h" |
a9e2aefa | 160 | |
161 | ClassImp(AliMUONv1) | |
162 | ||
163 | //___________________________________________ | |
164 | AliMUONv1::AliMUONv1() : AliMUON() | |
165 | { | |
166 | // Constructor | |
167 | fChambers = 0; | |
168 | } | |
169 | ||
170 | //___________________________________________ | |
171 | AliMUONv1::AliMUONv1(const char *name, const char *title) | |
172 | : AliMUON(name,title) | |
173 | { | |
174 | // Constructor | |
be3bb6c1 | 175 | AliMUONFactory::Build(this, title); |
a9e2aefa | 176 | } |
177 | ||
178 | //___________________________________________ | |
179 | void AliMUONv1::CreateGeometry() | |
180 | { | |
181 | // | |
182 | // Note: all chambers have the same structure, which could be | |
183 | // easily parameterised. This was intentionally not done in order | |
184 | // to give a starting point for the implementation of the actual | |
185 | // design of each station. | |
186 | Int_t *idtmed = fIdtmed->GetArray()-1099; | |
187 | ||
188 | // Distance between Stations | |
189 | // | |
190 | Float_t bpar[3]; | |
191 | Float_t tpar[3]; | |
b64652f5 | 192 | // Float_t pgpar[10]; |
a9e2aefa | 193 | Float_t zpos1, zpos2, zfpos; |
b64652f5 | 194 | // Outer excess and inner recess for mother volume radius |
195 | // with respect to ROuter and RInner | |
a9e2aefa | 196 | Float_t dframep=.001; // Value for station 3 should be 6 ... |
b64652f5 | 197 | // Width (RdPhi) of the frame crosses for stations 1 and 2 (cm) |
198 | // Float_t dframep1=.001; | |
199 | Float_t dframep1 = 11.0; | |
200 | // Bool_t frameCrosses=kFALSE; | |
201 | Bool_t frameCrosses=kTRUE; | |
a9e2aefa | 202 | |
b64652f5 | 203 | // Float_t dframez=0.9; |
204 | // Half of the total thickness of frame crosses (including DAlu) | |
205 | // for each chamber in stations 1 and 2: | |
206 | // 3% of X0 of composite material, | |
207 | // but taken as Aluminium here, with same thickness in number of X0 | |
208 | Float_t dframez = 3. * 8.9 / 100; | |
209 | // Float_t dr; | |
a9e2aefa | 210 | Float_t dstation; |
211 | ||
212 | // | |
213 | // Rotation matrices in the x-y plane | |
214 | Int_t idrotm[1199]; | |
215 | // phi= 0 deg | |
216 | AliMatrix(idrotm[1100], 90., 0., 90., 90., 0., 0.); | |
217 | // phi= 90 deg | |
218 | AliMatrix(idrotm[1101], 90., 90., 90., 180., 0., 0.); | |
219 | // phi= 180 deg | |
220 | AliMatrix(idrotm[1102], 90., 180., 90., 270., 0., 0.); | |
221 | // phi= 270 deg | |
222 | AliMatrix(idrotm[1103], 90., 270., 90., 0., 0., 0.); | |
223 | // | |
224 | Float_t phi=2*TMath::Pi()/12/2; | |
225 | ||
226 | // | |
227 | // pointer to the current chamber | |
228 | // pointer to the current chamber | |
b64652f5 | 229 | Int_t idAlu1=idtmed[1103]; // medium 4 |
230 | Int_t idAlu2=idtmed[1104]; // medium 5 | |
a9e2aefa | 231 | // Int_t idAlu1=idtmed[1100]; |
232 | // Int_t idAlu2=idtmed[1100]; | |
b64652f5 | 233 | Int_t idAir=idtmed[1100]; // medium 1 |
234 | // Int_t idGas=idtmed[1105]; // medium 6 = Ar-isoC4H10 gas | |
235 | Int_t idGas=idtmed[1108]; // medium 9 = Ar-CO2 gas (80%+20%) | |
a9e2aefa | 236 | |
237 | ||
238 | AliMUONChamber *iChamber, *iChamber1, *iChamber2; | |
b17c0c87 | 239 | Int_t stations[5] = {1, 1, 1, 1, 1}; |
240 | ||
241 | if (stations[0]) { | |
242 | ||
a9e2aefa | 243 | //******************************************************************** |
244 | // Station 1 ** | |
245 | //******************************************************************** | |
246 | // CONCENTRIC | |
247 | // indices 1 and 2 for first and second chambers in the station | |
248 | // iChamber (first chamber) kept for other quanties than Z, | |
249 | // assumed to be the same in both chambers | |
250 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[0]; | |
251 | iChamber2 =(AliMUONChamber*) (*fChambers)[1]; | |
252 | zpos1=iChamber1->Z(); | |
253 | zpos2=iChamber2->Z(); | |
254 | dstation = zpos2 - zpos1; | |
b64652f5 | 255 | // DGas decreased from standard one (0.5) |
256 | iChamber->SetDGas(0.4); iChamber2->SetDGas(0.4); | |
257 | // DAlu increased from standard one (3% of X0), | |
258 | // because more electronics with smaller pads | |
259 | iChamber->SetDAlu(3.5 * 8.9 / 100.); iChamber2->SetDAlu(3.5 * 8.9 / 100.); | |
a9e2aefa | 260 | zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; |
261 | ||
262 | // | |
263 | // Mother volume | |
b64652f5 | 264 | tpar[0] = iChamber->RInner()-dframep; |
265 | tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); | |
2c799aa2 | 266 | tpar[2] = dstation/5; |
a9e2aefa | 267 | |
268 | gMC->Gsvolu("C01M", "TUBE", idAir, tpar, 3); | |
269 | gMC->Gsvolu("C02M", "TUBE", idAir, tpar, 3); | |
270 | gMC->Gspos("C01M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); | |
1e8fff9c | 271 | gMC->Gspos("C02M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); |
b64652f5 | 272 | // // Aluminium frames |
273 | // // Outer frames | |
274 | // pgpar[0] = 360/12/2; | |
275 | // pgpar[1] = 360.; | |
276 | // pgpar[2] = 12.; | |
277 | // pgpar[3] = 2; | |
278 | // pgpar[4] = -dframez/2; | |
279 | // pgpar[5] = iChamber->ROuter(); | |
280 | // pgpar[6] = pgpar[5]+dframep1; | |
281 | // pgpar[7] = +dframez/2; | |
282 | // pgpar[8] = pgpar[5]; | |
283 | // pgpar[9] = pgpar[6]; | |
284 | // gMC->Gsvolu("C01O", "PGON", idAlu1, pgpar, 10); | |
285 | // gMC->Gsvolu("C02O", "PGON", idAlu1, pgpar, 10); | |
286 | // gMC->Gspos("C01O",1,"C01M", 0.,0.,-zfpos, 0,"ONLY"); | |
287 | // gMC->Gspos("C01O",2,"C01M", 0.,0.,+zfpos, 0,"ONLY"); | |
288 | // gMC->Gspos("C02O",1,"C02M", 0.,0.,-zfpos, 0,"ONLY"); | |
289 | // gMC->Gspos("C02O",2,"C02M", 0.,0.,+zfpos, 0,"ONLY"); | |
290 | // // | |
291 | // // Inner frame | |
292 | // tpar[0]= iChamber->RInner()-dframep1; | |
293 | // tpar[1]= iChamber->RInner(); | |
294 | // tpar[2]= dframez/2; | |
295 | // gMC->Gsvolu("C01I", "TUBE", idAlu1, tpar, 3); | |
296 | // gMC->Gsvolu("C02I", "TUBE", idAlu1, tpar, 3); | |
297 | ||
298 | // gMC->Gspos("C01I",1,"C01M", 0.,0.,-zfpos, 0,"ONLY"); | |
299 | // gMC->Gspos("C01I",2,"C01M", 0.,0.,+zfpos, 0,"ONLY"); | |
300 | // gMC->Gspos("C02I",1,"C02M", 0.,0.,-zfpos, 0,"ONLY"); | |
301 | // gMC->Gspos("C02I",2,"C02M", 0.,0.,+zfpos, 0,"ONLY"); | |
a9e2aefa | 302 | // |
303 | // Frame Crosses | |
b64652f5 | 304 | if (frameCrosses) { |
305 | // outside gas | |
306 | // security for inside mother volume | |
307 | bpar[0] = (iChamber->ROuter() - iChamber->RInner()) | |
308 | * TMath::Cos(TMath::ASin(dframep1 / | |
309 | (iChamber->ROuter() - iChamber->RInner()))) | |
310 | / 2.0; | |
a9e2aefa | 311 | bpar[1] = dframep1/2; |
b64652f5 | 312 | // total thickness will be (4 * bpar[2]) for each chamber, |
313 | // which has to be equal to (2 * dframez) - DAlu | |
314 | bpar[2] = (2.0 * dframez - iChamber->DAlu()) / 4.0; | |
a9e2aefa | 315 | gMC->Gsvolu("C01B", "BOX", idAlu1, bpar, 3); |
316 | gMC->Gsvolu("C02B", "BOX", idAlu1, bpar, 3); | |
317 | ||
318 | gMC->Gspos("C01B",1,"C01M", +iChamber->RInner()+bpar[0] , 0,-zfpos, | |
319 | idrotm[1100],"ONLY"); | |
320 | gMC->Gspos("C01B",2,"C01M", -iChamber->RInner()-bpar[0] , 0,-zfpos, | |
321 | idrotm[1100],"ONLY"); | |
322 | gMC->Gspos("C01B",3,"C01M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, | |
323 | idrotm[1101],"ONLY"); | |
324 | gMC->Gspos("C01B",4,"C01M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, | |
325 | idrotm[1101],"ONLY"); | |
326 | gMC->Gspos("C01B",5,"C01M", +iChamber->RInner()+bpar[0] , 0,+zfpos, | |
327 | idrotm[1100],"ONLY"); | |
328 | gMC->Gspos("C01B",6,"C01M", -iChamber->RInner()-bpar[0] , 0,+zfpos, | |
329 | idrotm[1100],"ONLY"); | |
330 | gMC->Gspos("C01B",7,"C01M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, | |
331 | idrotm[1101],"ONLY"); | |
332 | gMC->Gspos("C01B",8,"C01M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, | |
333 | idrotm[1101],"ONLY"); | |
334 | ||
335 | gMC->Gspos("C02B",1,"C02M", +iChamber->RInner()+bpar[0] , 0,-zfpos, | |
336 | idrotm[1100],"ONLY"); | |
337 | gMC->Gspos("C02B",2,"C02M", -iChamber->RInner()-bpar[0] , 0,-zfpos, | |
338 | idrotm[1100],"ONLY"); | |
339 | gMC->Gspos("C02B",3,"C02M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, | |
340 | idrotm[1101],"ONLY"); | |
341 | gMC->Gspos("C02B",4,"C02M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, | |
342 | idrotm[1101],"ONLY"); | |
343 | gMC->Gspos("C02B",5,"C02M", +iChamber->RInner()+bpar[0] , 0,+zfpos, | |
344 | idrotm[1100],"ONLY"); | |
345 | gMC->Gspos("C02B",6,"C02M", -iChamber->RInner()-bpar[0] , 0,+zfpos, | |
346 | idrotm[1100],"ONLY"); | |
347 | gMC->Gspos("C02B",7,"C02M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, | |
348 | idrotm[1101],"ONLY"); | |
349 | gMC->Gspos("C02B",8,"C02M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, | |
350 | idrotm[1101],"ONLY"); | |
351 | } | |
352 | // | |
353 | // Chamber Material represented by Alu sheet | |
354 | tpar[0]= iChamber->RInner(); | |
355 | tpar[1]= iChamber->ROuter(); | |
356 | tpar[2] = (iChamber->DGas()+iChamber->DAlu())/2; | |
357 | gMC->Gsvolu("C01A", "TUBE", idAlu2, tpar, 3); | |
358 | gMC->Gsvolu("C02A", "TUBE",idAlu2, tpar, 3); | |
359 | gMC->Gspos("C01A", 1, "C01M", 0., 0., 0., 0, "ONLY"); | |
360 | gMC->Gspos("C02A", 1, "C02M", 0., 0., 0., 0, "ONLY"); | |
361 | // | |
362 | // Sensitive volumes | |
363 | // tpar[2] = iChamber->DGas(); | |
364 | tpar[2] = iChamber->DGas()/2; | |
b64652f5 | 365 | gMC->Gsvolu("C01G", "TUBE", idGas, tpar, 3); |
366 | gMC->Gsvolu("C02G", "TUBE", idGas, tpar, 3); | |
a9e2aefa | 367 | gMC->Gspos("C01G", 1, "C01A", 0., 0., 0., 0, "ONLY"); |
368 | gMC->Gspos("C02G", 1, "C02A", 0., 0., 0., 0, "ONLY"); | |
369 | // | |
b64652f5 | 370 | // Frame Crosses to be placed inside gas |
371 | // NONE: chambers are sensitive everywhere | |
372 | // if (frameCrosses) { | |
373 | ||
374 | // dr = (iChamber->ROuter() - iChamber->RInner()); | |
375 | // bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2; | |
376 | // bpar[1] = dframep1/2; | |
377 | // bpar[2] = iChamber->DGas()/2; | |
378 | // gMC->Gsvolu("C01F", "BOX", idAlu1, bpar, 3); | |
379 | // gMC->Gsvolu("C02F", "BOX", idAlu1, bpar, 3); | |
a9e2aefa | 380 | |
b64652f5 | 381 | // gMC->Gspos("C01F",1,"C01G", +iChamber->RInner()+bpar[0] , 0, 0, |
382 | // idrotm[1100],"ONLY"); | |
383 | // gMC->Gspos("C01F",2,"C01G", -iChamber->RInner()-bpar[0] , 0, 0, | |
384 | // idrotm[1100],"ONLY"); | |
385 | // gMC->Gspos("C01F",3,"C01G", 0, +iChamber->RInner()+bpar[0] , 0, | |
386 | // idrotm[1101],"ONLY"); | |
387 | // gMC->Gspos("C01F",4,"C01G", 0, -iChamber->RInner()-bpar[0] , 0, | |
388 | // idrotm[1101],"ONLY"); | |
a9e2aefa | 389 | |
b64652f5 | 390 | // gMC->Gspos("C02F",1,"C02G", +iChamber->RInner()+bpar[0] , 0, 0, |
391 | // idrotm[1100],"ONLY"); | |
392 | // gMC->Gspos("C02F",2,"C02G", -iChamber->RInner()-bpar[0] , 0, 0, | |
393 | // idrotm[1100],"ONLY"); | |
394 | // gMC->Gspos("C02F",3,"C02G", 0, +iChamber->RInner()+bpar[0] , 0, | |
395 | // idrotm[1101],"ONLY"); | |
396 | // gMC->Gspos("C02F",4,"C02G", 0, -iChamber->RInner()-bpar[0] , 0, | |
397 | // idrotm[1101],"ONLY"); | |
398 | // } | |
b17c0c87 | 399 | } |
400 | if (stations[1]) { | |
401 | ||
a9e2aefa | 402 | //******************************************************************** |
403 | // Station 2 ** | |
404 | //******************************************************************** | |
405 | // indices 1 and 2 for first and second chambers in the station | |
406 | // iChamber (first chamber) kept for other quanties than Z, | |
407 | // assumed to be the same in both chambers | |
408 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[2]; | |
409 | iChamber2 =(AliMUONChamber*) (*fChambers)[3]; | |
410 | zpos1=iChamber1->Z(); | |
411 | zpos2=iChamber2->Z(); | |
412 | dstation = zpos2 - zpos1; | |
b64652f5 | 413 | // DGas and DAlu not changed from standard values |
a9e2aefa | 414 | zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; |
415 | ||
416 | // | |
417 | // Mother volume | |
418 | tpar[0] = iChamber->RInner()-dframep; | |
419 | tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); | |
2c799aa2 | 420 | tpar[2] = dstation/5; |
a9e2aefa | 421 | |
422 | gMC->Gsvolu("C03M", "TUBE", idAir, tpar, 3); | |
423 | gMC->Gsvolu("C04M", "TUBE", idAir, tpar, 3); | |
424 | gMC->Gspos("C03M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); | |
425 | gMC->Gspos("C04M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); | |
1e8fff9c | 426 | |
b64652f5 | 427 | // // Aluminium frames |
428 | // // Outer frames | |
429 | // pgpar[0] = 360/12/2; | |
430 | // pgpar[1] = 360.; | |
431 | // pgpar[2] = 12.; | |
432 | // pgpar[3] = 2; | |
433 | // pgpar[4] = -dframez/2; | |
434 | // pgpar[5] = iChamber->ROuter(); | |
435 | // pgpar[6] = pgpar[5]+dframep; | |
436 | // pgpar[7] = +dframez/2; | |
437 | // pgpar[8] = pgpar[5]; | |
438 | // pgpar[9] = pgpar[6]; | |
439 | // gMC->Gsvolu("C03O", "PGON", idAlu1, pgpar, 10); | |
440 | // gMC->Gsvolu("C04O", "PGON", idAlu1, pgpar, 10); | |
441 | // gMC->Gspos("C03O",1,"C03M", 0.,0.,-zfpos, 0,"ONLY"); | |
442 | // gMC->Gspos("C03O",2,"C03M", 0.,0.,+zfpos, 0,"ONLY"); | |
443 | // gMC->Gspos("C04O",1,"C04M", 0.,0.,-zfpos, 0,"ONLY"); | |
444 | // gMC->Gspos("C04O",2,"C04M", 0.,0.,+zfpos, 0,"ONLY"); | |
445 | // // | |
446 | // // Inner frame | |
447 | // tpar[0]= iChamber->RInner()-dframep; | |
448 | // tpar[1]= iChamber->RInner(); | |
449 | // tpar[2]= dframez/2; | |
450 | // gMC->Gsvolu("C03I", "TUBE", idAlu1, tpar, 3); | |
451 | // gMC->Gsvolu("C04I", "TUBE", idAlu1, tpar, 3); | |
452 | ||
453 | // gMC->Gspos("C03I",1,"C03M", 0.,0.,-zfpos, 0,"ONLY"); | |
454 | // gMC->Gspos("C03I",2,"C03M", 0.,0.,+zfpos, 0,"ONLY"); | |
455 | // gMC->Gspos("C04I",1,"C04M", 0.,0.,-zfpos, 0,"ONLY"); | |
456 | // gMC->Gspos("C04I",2,"C04M", 0.,0.,+zfpos, 0,"ONLY"); | |
a9e2aefa | 457 | // |
458 | // Frame Crosses | |
b64652f5 | 459 | if (frameCrosses) { |
460 | // outside gas | |
461 | // security for inside mother volume | |
462 | bpar[0] = (iChamber->ROuter() - iChamber->RInner()) | |
463 | * TMath::Cos(TMath::ASin(dframep1 / | |
464 | (iChamber->ROuter() - iChamber->RInner()))) | |
465 | / 2.0; | |
466 | bpar[1] = dframep1/2; | |
467 | // total thickness will be (4 * bpar[2]) for each chamber, | |
468 | // which has to be equal to (2 * dframez) - DAlu | |
469 | bpar[2] = (2.0 * dframez - iChamber->DAlu()) / 4.0; | |
a9e2aefa | 470 | gMC->Gsvolu("C03B", "BOX", idAlu1, bpar, 3); |
471 | gMC->Gsvolu("C04B", "BOX", idAlu1, bpar, 3); | |
472 | ||
473 | gMC->Gspos("C03B",1,"C03M", +iChamber->RInner()+bpar[0] , 0,-zfpos, | |
474 | idrotm[1100],"ONLY"); | |
475 | gMC->Gspos("C03B",2,"C03M", -iChamber->RInner()-bpar[0] , 0,-zfpos, | |
476 | idrotm[1100],"ONLY"); | |
477 | gMC->Gspos("C03B",3,"C03M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, | |
478 | idrotm[1101],"ONLY"); | |
479 | gMC->Gspos("C03B",4,"C03M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, | |
480 | idrotm[1101],"ONLY"); | |
481 | gMC->Gspos("C03B",5,"C03M", +iChamber->RInner()+bpar[0] , 0,+zfpos, | |
482 | idrotm[1100],"ONLY"); | |
483 | gMC->Gspos("C03B",6,"C03M", -iChamber->RInner()-bpar[0] , 0,+zfpos, | |
484 | idrotm[1100],"ONLY"); | |
485 | gMC->Gspos("C03B",7,"C03M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, | |
486 | idrotm[1101],"ONLY"); | |
487 | gMC->Gspos("C03B",8,"C03M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, | |
488 | idrotm[1101],"ONLY"); | |
489 | ||
490 | gMC->Gspos("C04B",1,"C04M", +iChamber->RInner()+bpar[0] , 0,-zfpos, | |
491 | idrotm[1100],"ONLY"); | |
492 | gMC->Gspos("C04B",2,"C04M", -iChamber->RInner()-bpar[0] , 0,-zfpos, | |
493 | idrotm[1100],"ONLY"); | |
494 | gMC->Gspos("C04B",3,"C04M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, | |
495 | idrotm[1101],"ONLY"); | |
496 | gMC->Gspos("C04B",4,"C04M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, | |
497 | idrotm[1101],"ONLY"); | |
498 | gMC->Gspos("C04B",5,"C04M", +iChamber->RInner()+bpar[0] , 0,+zfpos, | |
499 | idrotm[1100],"ONLY"); | |
500 | gMC->Gspos("C04B",6,"C04M", -iChamber->RInner()-bpar[0] , 0,+zfpos, | |
501 | idrotm[1100],"ONLY"); | |
502 | gMC->Gspos("C04B",7,"C04M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, | |
503 | idrotm[1101],"ONLY"); | |
504 | gMC->Gspos("C04B",8,"C04M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, | |
505 | idrotm[1101],"ONLY"); | |
506 | } | |
507 | // | |
508 | // Chamber Material represented by Alu sheet | |
509 | tpar[0]= iChamber->RInner(); | |
510 | tpar[1]= iChamber->ROuter(); | |
511 | tpar[2] = (iChamber->DGas()+iChamber->DAlu())/2; | |
512 | gMC->Gsvolu("C03A", "TUBE", idAlu2, tpar, 3); | |
513 | gMC->Gsvolu("C04A", "TUBE", idAlu2, tpar, 3); | |
514 | gMC->Gspos("C03A", 1, "C03M", 0., 0., 0., 0, "ONLY"); | |
515 | gMC->Gspos("C04A", 1, "C04M", 0., 0., 0., 0, "ONLY"); | |
516 | // | |
517 | // Sensitive volumes | |
518 | // tpar[2] = iChamber->DGas(); | |
519 | tpar[2] = iChamber->DGas()/2; | |
520 | gMC->Gsvolu("C03G", "TUBE", idGas, tpar, 3); | |
521 | gMC->Gsvolu("C04G", "TUBE", idGas, tpar, 3); | |
522 | gMC->Gspos("C03G", 1, "C03A", 0., 0., 0., 0, "ONLY"); | |
523 | gMC->Gspos("C04G", 1, "C04A", 0., 0., 0., 0, "ONLY"); | |
a9e2aefa | 524 | // |
525 | // Frame Crosses to be placed inside gas | |
b64652f5 | 526 | // NONE: chambers are sensitive everywhere |
527 | // if (frameCrosses) { | |
528 | ||
529 | // dr = (iChamber->ROuter() - iChamber->RInner()); | |
530 | // bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2; | |
531 | // bpar[1] = dframep1/2; | |
532 | // bpar[2] = iChamber->DGas()/2; | |
533 | // gMC->Gsvolu("C03F", "BOX", idAlu1, bpar, 3); | |
534 | // gMC->Gsvolu("C04F", "BOX", idAlu1, bpar, 3); | |
a9e2aefa | 535 | |
b64652f5 | 536 | // gMC->Gspos("C03F",1,"C03G", +iChamber->RInner()+bpar[0] , 0, 0, |
537 | // idrotm[1100],"ONLY"); | |
538 | // gMC->Gspos("C03F",2,"C03G", -iChamber->RInner()-bpar[0] , 0, 0, | |
539 | // idrotm[1100],"ONLY"); | |
540 | // gMC->Gspos("C03F",3,"C03G", 0, +iChamber->RInner()+bpar[0] , 0, | |
541 | // idrotm[1101],"ONLY"); | |
542 | // gMC->Gspos("C03F",4,"C03G", 0, -iChamber->RInner()-bpar[0] , 0, | |
543 | // idrotm[1101],"ONLY"); | |
a9e2aefa | 544 | |
b64652f5 | 545 | // gMC->Gspos("C04F",1,"C04G", +iChamber->RInner()+bpar[0] , 0, 0, |
546 | // idrotm[1100],"ONLY"); | |
547 | // gMC->Gspos("C04F",2,"C04G", -iChamber->RInner()-bpar[0] , 0, 0, | |
548 | // idrotm[1100],"ONLY"); | |
549 | // gMC->Gspos("C04F",3,"C04G", 0, +iChamber->RInner()+bpar[0] , 0, | |
550 | // idrotm[1101],"ONLY"); | |
551 | // gMC->Gspos("C04F",4,"C04G", 0, -iChamber->RInner()-bpar[0] , 0, | |
552 | // idrotm[1101],"ONLY"); | |
553 | // } | |
b17c0c87 | 554 | } |
1e8fff9c | 555 | // define the id of tracking media: |
556 | Int_t idCopper = idtmed[1110]; | |
557 | Int_t idGlass = idtmed[1111]; | |
558 | Int_t idCarbon = idtmed[1112]; | |
559 | Int_t idRoha = idtmed[1113]; | |
560 | ||
1e8fff9c | 561 | // sensitive area: 40*40 cm**2 |
6c5ddcfa | 562 | const Float_t sensLength = 40.; |
563 | const Float_t sensHeight = 40.; | |
564 | const Float_t sensWidth = 0.5; // according to TDR fig 2.120 | |
565 | const Int_t sensMaterial = idGas; | |
1e8fff9c | 566 | const Float_t yOverlap = 1.5; |
567 | ||
568 | // PCB dimensions in cm; width: 30 mum copper | |
6c5ddcfa | 569 | const Float_t pcbLength = sensLength; |
570 | const Float_t pcbHeight = 60.; | |
571 | const Float_t pcbWidth = 0.003; | |
572 | const Int_t pcbMaterial = idCopper; | |
1e8fff9c | 573 | |
574 | // Insulating material: 200 mum glass fiber glued to pcb | |
6c5ddcfa | 575 | const Float_t insuLength = pcbLength; |
576 | const Float_t insuHeight = pcbHeight; | |
577 | const Float_t insuWidth = 0.020; | |
578 | const Int_t insuMaterial = idGlass; | |
1e8fff9c | 579 | |
580 | // Carbon fiber panels: 200mum carbon/epoxy skin | |
6c5ddcfa | 581 | const Float_t panelLength = sensLength; |
582 | const Float_t panelHeight = sensHeight; | |
583 | const Float_t panelWidth = 0.020; | |
584 | const Int_t panelMaterial = idCarbon; | |
1e8fff9c | 585 | |
586 | // rohacell between the two carbon panels | |
6c5ddcfa | 587 | const Float_t rohaLength = sensLength; |
588 | const Float_t rohaHeight = sensHeight; | |
589 | const Float_t rohaWidth = 0.5; | |
590 | const Int_t rohaMaterial = idRoha; | |
1e8fff9c | 591 | |
592 | // Frame around the slat: 2 sticks along length,2 along height | |
593 | // H: the horizontal ones | |
6c5ddcfa | 594 | const Float_t hFrameLength = pcbLength; |
595 | const Float_t hFrameHeight = 1.5; | |
596 | const Float_t hFrameWidth = sensWidth; | |
597 | const Int_t hFrameMaterial = idGlass; | |
1e8fff9c | 598 | |
599 | // V: the vertical ones | |
6c5ddcfa | 600 | const Float_t vFrameLength = 4.0; |
601 | const Float_t vFrameHeight = sensHeight + hFrameHeight; | |
602 | const Float_t vFrameWidth = sensWidth; | |
603 | const Int_t vFrameMaterial = idGlass; | |
1e8fff9c | 604 | |
605 | // B: the horizontal border filled with rohacell | |
6c5ddcfa | 606 | const Float_t bFrameLength = hFrameLength; |
607 | const Float_t bFrameHeight = (pcbHeight - sensHeight)/2. - hFrameHeight; | |
608 | const Float_t bFrameWidth = hFrameWidth; | |
609 | const Int_t bFrameMaterial = idRoha; | |
1e8fff9c | 610 | |
611 | // NULOC: 30 mum copper + 200 mum vetronite (same radiation length as 14mum copper) | |
6c5ddcfa | 612 | const Float_t nulocLength = 2.5; |
613 | const Float_t nulocHeight = 7.5; | |
614 | const Float_t nulocWidth = 0.0030 + 0.0014; // equivalent copper width of vetronite; | |
615 | const Int_t nulocMaterial = idCopper; | |
1e8fff9c | 616 | |
6c5ddcfa | 617 | const Float_t slatHeight = pcbHeight; |
618 | const Float_t slatWidth = sensWidth + 2.*(pcbWidth + insuWidth + | |
619 | 2.* panelWidth + rohaWidth); | |
620 | const Int_t slatMaterial = idAir; | |
621 | const Float_t dSlatLength = vFrameLength; // border on left and right | |
1e8fff9c | 622 | |
1e8fff9c | 623 | Float_t spar[3]; |
b17c0c87 | 624 | Int_t i, j; |
625 | ||
3c084d9f | 626 | // the panel volume contains the rohacell |
627 | ||
628 | Float_t twidth = 2 * panelWidth + rohaWidth; | |
629 | Float_t panelpar[3] = { panelLength/2., panelHeight/2., twidth/2. }; | |
b17c0c87 | 630 | Float_t rohapar[3] = { rohaLength/2., rohaHeight/2., rohaWidth/2. }; |
3c084d9f | 631 | |
632 | // insulating material contains PCB-> gas-> 2 borders filled with rohacell | |
633 | ||
634 | twidth = 2*(insuWidth + pcbWidth) + sensWidth; | |
635 | Float_t insupar[3] = { insuLength/2., insuHeight/2., twidth/2. }; | |
636 | twidth -= 2 * insuWidth; | |
637 | Float_t pcbpar[3] = { pcbLength/2., pcbHeight/2., twidth/2. }; | |
638 | Float_t senspar[3] = { sensLength/2., sensHeight/2., sensWidth/2. }; | |
639 | Float_t theight = 2*hFrameHeight + sensHeight; | |
640 | Float_t hFramepar[3]={hFrameLength/2., theight/2., hFrameWidth/2.}; | |
b17c0c87 | 641 | Float_t bFramepar[3]={bFrameLength/2., bFrameHeight/2., bFrameWidth/2.}; |
3c084d9f | 642 | Float_t vFramepar[3]={vFrameLength/2., vFrameHeight/2., vFrameWidth/2.}; |
b17c0c87 | 643 | Float_t nulocpar[3]={nulocLength/2., nulocHeight/2., nulocWidth/2.}; |
b17c0c87 | 644 | Float_t xx; |
645 | Float_t xxmax = (bFrameLength - nulocLength)/2.; | |
646 | Int_t index=0; | |
647 | ||
648 | if (stations[2]) { | |
649 | ||
650 | //******************************************************************** | |
651 | // Station 3 ** | |
652 | //******************************************************************** | |
653 | // indices 1 and 2 for first and second chambers in the station | |
654 | // iChamber (first chamber) kept for other quanties than Z, | |
655 | // assumed to be the same in both chambers | |
656 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[4]; | |
657 | iChamber2 =(AliMUONChamber*) (*fChambers)[5]; | |
658 | zpos1=iChamber1->Z(); | |
659 | zpos2=iChamber2->Z(); | |
660 | dstation = zpos2 - zpos1; | |
661 | ||
b64652f5 | 662 | // zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; // not used any more |
b17c0c87 | 663 | // |
664 | // Mother volume | |
665 | tpar[0] = iChamber->RInner()-dframep; | |
666 | tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); | |
21a18f36 | 667 | tpar[2] = dstation/5; |
b17c0c87 | 668 | gMC->Gsvolu("C05M", "TUBE", idAir, tpar, 3); |
669 | gMC->Gsvolu("C06M", "TUBE", idAir, tpar, 3); | |
21a18f36 | 670 | gMC->Gspos("C05M", 1, "ALIC", 0., 0., zpos1 , 0, "MANY"); |
671 | gMC->Gspos("C06M", 1, "ALIC", 0., 0., zpos2 , 0, "MANY"); | |
b17c0c87 | 672 | |
673 | // volumes for slat geometry (xx=5,..,10 chamber id): | |
674 | // Sxx0 Sxx1 Sxx2 Sxx3 --> Slat Mother volumes | |
675 | // SxxG --> Sensitive volume (gas) | |
676 | // SxxP --> PCB (copper) | |
677 | // SxxI --> Insulator (vetronite) | |
678 | // SxxC --> Carbon panel | |
679 | // SxxR --> Rohacell | |
680 | // SxxH, SxxV --> Horizontal and Vertical frames (vetronite) | |
21a18f36 | 681 | // SB5x --> Volumes for the 35 cm long PCB |
b17c0c87 | 682 | // slat dimensions: slat is a MOTHER volume!!! made of air |
683 | ||
21a18f36 | 684 | // only for chamber 5: slat 1 has a PCB shorter by 5cm! |
685 | ||
686 | Float_t tlength = 35.; | |
687 | Float_t panelpar2[3] = { tlength/2., panelpar[1], panelpar[2]}; | |
688 | Float_t rohapar2[3] = { tlength/2., rohapar[1], rohapar[2]}; | |
689 | Float_t insupar2[3] = { tlength/2., insupar[1], insupar[2]}; | |
690 | Float_t pcbpar2[3] = { tlength/2., pcbpar[1], pcbpar[2]}; | |
691 | Float_t senspar2[3] = { tlength/2., senspar[1], senspar[2]}; | |
692 | Float_t hFramepar2[3] = { tlength/2., hFramepar[1], hFramepar[2]}; | |
693 | Float_t bFramepar2[3] = { tlength/2., bFramepar[1], bFramepar[2]}; | |
694 | ||
a083207d | 695 | const Int_t nSlats3 = 5; // number of slats per quadrant |
696 | const Int_t nPCB3[nSlats3] = {3,3,4,3,2}; // n PCB per slat | |
21a18f36 | 697 | const Float_t xpos3[nSlats3] = {31., 40., 0., 0., 0.}; |
b17c0c87 | 698 | Float_t slatLength3[nSlats3]; |
699 | ||
700 | // create and position the slat (mother) volumes | |
701 | ||
6c5ddcfa | 702 | char volNam5[5]; |
703 | char volNam6[5]; | |
f9f7c205 | 704 | Float_t xSlat3; |
b17c0c87 | 705 | |
21a18f36 | 706 | Float_t spar2[3]; |
6c5ddcfa | 707 | for (i = 0; i<nSlats3; i++){ |
3c084d9f | 708 | slatLength3[i] = pcbLength * nPCB3[i] + 2. * dSlatLength; |
a083207d | 709 | xSlat3 = slatLength3[i]/2. - vFrameLength/2. + xpos3[i]; |
21a18f36 | 710 | if (i==1 || i==0) slatLength3[i] -= 2. *dSlatLength; // frame out in PCB with circular border |
a083207d | 711 | Float_t ySlat31 = sensHeight * i - yOverlap * i; |
712 | Float_t ySlat32 = -sensHeight * i + yOverlap * i; | |
3c084d9f | 713 | spar[0] = slatLength3[i]/2.; |
714 | spar[1] = slatHeight/2.; | |
715 | spar[2] = slatWidth/2. * 1.01; | |
21a18f36 | 716 | // take away 5 cm from the first slat in chamber 5 |
717 | Float_t xSlat32 = 0; | |
718 | if (i==1 || i==2) { // 1 pcb is shortened by 5cm | |
719 | spar2[0] = spar[0]-5./2.; | |
720 | xSlat32 = xSlat3 - 5/2.; | |
721 | } | |
722 | else { | |
723 | spar2[0] = spar[0]; | |
724 | xSlat32 = xSlat3; | |
725 | } | |
726 | spar2[1] = spar[1]; | |
727 | spar2[2] = spar[2]; | |
3c084d9f | 728 | Float_t dzCh3=spar[2] * 1.01; |
729 | // zSlat to be checked (odd downstream or upstream?) | |
730 | Float_t zSlat = (i%2 ==0)? -spar[2] : spar[2]; | |
731 | sprintf(volNam5,"S05%d",i); | |
21a18f36 | 732 | gMC->Gsvolu(volNam5,"BOX",slatMaterial,spar2,3); |
733 | gMC->Gspos(volNam5, i*4+1,"C05M", xSlat32, ySlat31, zSlat+2.*dzCh3, 0, "ONLY"); | |
734 | gMC->Gspos(volNam5, i*4+2,"C05M",-xSlat32, ySlat31, zSlat-2.*dzCh3, 0, "ONLY"); | |
735 | ||
a083207d | 736 | if (i>0) { |
21a18f36 | 737 | gMC->Gspos(volNam5, i*4+3,"C05M", xSlat32, ySlat32, zSlat+2.*dzCh3, 0, "ONLY"); |
738 | gMC->Gspos(volNam5, i*4+4,"C05M",-xSlat32, ySlat32, zSlat-2.*dzCh3, 0, "ONLY"); | |
a083207d | 739 | } |
3c084d9f | 740 | sprintf(volNam6,"S06%d",i); |
741 | gMC->Gsvolu(volNam6,"BOX",slatMaterial,spar,3); | |
742 | gMC->Gspos(volNam6, i*4+1,"C06M", xSlat3, ySlat31, zSlat+2.*dzCh3, 0, "ONLY"); | |
743 | gMC->Gspos(volNam6, i*4+2,"C06M",-xSlat3, ySlat31, zSlat-2.*dzCh3, 0, "ONLY"); | |
a083207d | 744 | if (i>0) { |
745 | gMC->Gspos(volNam6, i*4+3,"C06M", xSlat3, ySlat32, zSlat+2.*dzCh3, 0, "ONLY"); | |
746 | gMC->Gspos(volNam6, i*4+4,"C06M",-xSlat3, ySlat32, zSlat-2.*dzCh3, 0, "ONLY"); | |
747 | } | |
3c084d9f | 748 | } |
1e8fff9c | 749 | |
750 | // create the panel volume | |
b17c0c87 | 751 | |
6c5ddcfa | 752 | gMC->Gsvolu("S05C","BOX",panelMaterial,panelpar,3); |
21a18f36 | 753 | gMC->Gsvolu("SB5C","BOX",panelMaterial,panelpar2,3); |
6c5ddcfa | 754 | gMC->Gsvolu("S06C","BOX",panelMaterial,panelpar,3); |
1e8fff9c | 755 | |
756 | // create the rohacell volume | |
b17c0c87 | 757 | |
6c5ddcfa | 758 | gMC->Gsvolu("S05R","BOX",rohaMaterial,rohapar,3); |
21a18f36 | 759 | gMC->Gsvolu("SB5R","BOX",rohaMaterial,rohapar2,3); |
6c5ddcfa | 760 | gMC->Gsvolu("S06R","BOX",rohaMaterial,rohapar,3); |
1e8fff9c | 761 | |
3c084d9f | 762 | // create the insulating material volume |
763 | ||
764 | gMC->Gsvolu("S05I","BOX",insuMaterial,insupar,3); | |
21a18f36 | 765 | gMC->Gsvolu("SB5I","BOX",insuMaterial,insupar2,3); |
3c084d9f | 766 | gMC->Gsvolu("S06I","BOX",insuMaterial,insupar,3); |
767 | ||
768 | // create the PCB volume | |
769 | ||
770 | gMC->Gsvolu("S05P","BOX",pcbMaterial,pcbpar,3); | |
21a18f36 | 771 | gMC->Gsvolu("SB5P","BOX",pcbMaterial,pcbpar2,3); |
3c084d9f | 772 | gMC->Gsvolu("S06P","BOX",pcbMaterial,pcbpar,3); |
773 | ||
774 | // create the sensitive volumes, | |
775 | gMC->Gsvolu("S05G","BOX",sensMaterial,0,0); | |
776 | gMC->Gsvolu("S06G","BOX",sensMaterial,0,0); | |
777 | ||
778 | ||
1e8fff9c | 779 | // create the vertical frame volume |
b17c0c87 | 780 | |
6c5ddcfa | 781 | gMC->Gsvolu("S05V","BOX",vFrameMaterial,vFramepar,3); |
782 | gMC->Gsvolu("S06V","BOX",vFrameMaterial,vFramepar,3); | |
1e8fff9c | 783 | |
784 | // create the horizontal frame volume | |
b17c0c87 | 785 | |
6c5ddcfa | 786 | gMC->Gsvolu("S05H","BOX",hFrameMaterial,hFramepar,3); |
21a18f36 | 787 | gMC->Gsvolu("SB5H","BOX",hFrameMaterial,hFramepar2,3); |
6c5ddcfa | 788 | gMC->Gsvolu("S06H","BOX",hFrameMaterial,hFramepar,3); |
1e8fff9c | 789 | |
790 | // create the horizontal border volume | |
b17c0c87 | 791 | |
6c5ddcfa | 792 | gMC->Gsvolu("S05B","BOX",bFrameMaterial,bFramepar,3); |
21a18f36 | 793 | gMC->Gsvolu("SB5B","BOX",bFrameMaterial,bFramepar2,3); |
6c5ddcfa | 794 | gMC->Gsvolu("S06B","BOX",bFrameMaterial,bFramepar,3); |
1e8fff9c | 795 | |
b17c0c87 | 796 | index=0; |
6c5ddcfa | 797 | for (i = 0; i<nSlats3; i++){ |
798 | sprintf(volNam5,"S05%d",i); | |
799 | sprintf(volNam6,"S06%d",i); | |
f9f7c205 | 800 | Float_t xvFrame = (slatLength3[i] - vFrameLength)/2.; |
21a18f36 | 801 | Float_t xvFrame2 = xvFrame; |
802 | if ( i==1 || i ==2 ) xvFrame2 -= 5./2.; | |
3c084d9f | 803 | // position the vertical frames |
21a18f36 | 804 | if (i!=1 && i!=0) { |
805 | gMC->Gspos("S05V",2*i-1,volNam5, xvFrame2, 0., 0. , 0, "ONLY"); | |
806 | gMC->Gspos("S05V",2*i ,volNam5,-xvFrame2, 0., 0. , 0, "ONLY"); | |
3c084d9f | 807 | gMC->Gspos("S06V",2*i-1,volNam6, xvFrame, 0., 0. , 0, "ONLY"); |
808 | gMC->Gspos("S06V",2*i ,volNam6,-xvFrame, 0., 0. , 0, "ONLY"); | |
809 | } | |
810 | // position the panels and the insulating material | |
6c5ddcfa | 811 | for (j=0; j<nPCB3[i]; j++){ |
1e8fff9c | 812 | index++; |
6c5ddcfa | 813 | Float_t xx = sensLength * (-nPCB3[i]/2.+j+.5); |
21a18f36 | 814 | Float_t xx2 = xx + 5/2.; |
3c084d9f | 815 | |
816 | Float_t zPanel = spar[2] - panelpar[2]; | |
21a18f36 | 817 | if ( (i==1 || i==2) && j == nPCB3[i]-1) { // 1 pcb is shortened by 5cm |
818 | gMC->Gspos("SB5C",2*index-1,volNam5, xx, 0., zPanel , 0, "ONLY"); | |
819 | gMC->Gspos("SB5C",2*index ,volNam5, xx, 0.,-zPanel , 0, "ONLY"); | |
820 | gMC->Gspos("SB5I",index ,volNam5, xx, 0., 0 , 0, "ONLY"); | |
821 | } | |
822 | else if ( (i==1 || i==2) && j < nPCB3[i]-1) { | |
823 | gMC->Gspos("S05C",2*index-1,volNam5, xx2, 0., zPanel , 0, "ONLY"); | |
824 | gMC->Gspos("S05C",2*index ,volNam5, xx2, 0.,-zPanel , 0, "ONLY"); | |
825 | gMC->Gspos("S05I",index ,volNam5, xx2, 0., 0 , 0, "ONLY"); | |
826 | } | |
827 | else { | |
828 | gMC->Gspos("S05C",2*index-1,volNam5, xx, 0., zPanel , 0, "ONLY"); | |
829 | gMC->Gspos("S05C",2*index ,volNam5, xx, 0.,-zPanel , 0, "ONLY"); | |
830 | gMC->Gspos("S05I",index ,volNam5, xx, 0., 0 , 0, "ONLY"); | |
831 | } | |
3c084d9f | 832 | gMC->Gspos("S06C",2*index-1,volNam6, xx, 0., zPanel , 0, "ONLY"); |
833 | gMC->Gspos("S06C",2*index ,volNam6, xx, 0.,-zPanel , 0, "ONLY"); | |
3c084d9f | 834 | gMC->Gspos("S06I",index,volNam6, xx, 0., 0 , 0, "ONLY"); |
1e8fff9c | 835 | } |
a9e2aefa | 836 | } |
21a18f36 | 837 | |
3c084d9f | 838 | // position the rohacell volume inside the panel volume |
839 | gMC->Gspos("S05R",1,"S05C",0.,0.,0.,0,"ONLY"); | |
21a18f36 | 840 | gMC->Gspos("SB5R",1,"SB5C",0.,0.,0.,0,"ONLY"); |
3c084d9f | 841 | gMC->Gspos("S06R",1,"S06C",0.,0.,0.,0,"ONLY"); |
842 | ||
843 | // position the PCB volume inside the insulating material volume | |
844 | gMC->Gspos("S05P",1,"S05I",0.,0.,0.,0,"ONLY"); | |
21a18f36 | 845 | gMC->Gspos("SB5P",1,"SB5I",0.,0.,0.,0,"ONLY"); |
3c084d9f | 846 | gMC->Gspos("S06P",1,"S06I",0.,0.,0.,0,"ONLY"); |
847 | // position the horizontal frame volume inside the PCB volume | |
848 | gMC->Gspos("S05H",1,"S05P",0.,0.,0.,0,"ONLY"); | |
21a18f36 | 849 | gMC->Gspos("SB5H",1,"SB5P",0.,0.,0.,0,"ONLY"); |
3c084d9f | 850 | gMC->Gspos("S06H",1,"S06P",0.,0.,0.,0,"ONLY"); |
851 | // position the sensitive volume inside the horizontal frame volume | |
852 | gMC->Gsposp("S05G",1,"S05H",0.,0.,0.,0,"ONLY",senspar,3); | |
21a18f36 | 853 | gMC->Gsposp("S05G",1,"SB5H",0.,0.,0.,0,"ONLY",senspar2,3); |
3c084d9f | 854 | gMC->Gsposp("S06G",1,"S06H",0.,0.,0.,0,"ONLY",senspar,3); |
855 | // position the border volumes inside the PCB volume | |
856 | Float_t yborder = ( pcbHeight - bFrameHeight ) / 2.; | |
857 | gMC->Gspos("S05B",1,"S05P",0., yborder,0.,0,"ONLY"); | |
858 | gMC->Gspos("S05B",2,"S05P",0.,-yborder,0.,0,"ONLY"); | |
21a18f36 | 859 | gMC->Gspos("SB5B",1,"SB5P",0., yborder,0.,0,"ONLY"); |
860 | gMC->Gspos("SB5B",2,"SB5P",0.,-yborder,0.,0,"ONLY"); | |
3c084d9f | 861 | gMC->Gspos("S06B",1,"S06P",0., yborder,0.,0,"ONLY"); |
862 | gMC->Gspos("S06B",2,"S06P",0.,-yborder,0.,0,"ONLY"); | |
863 | ||
1e8fff9c | 864 | // create the NULOC volume and position it in the horizontal frame |
b17c0c87 | 865 | |
6c5ddcfa | 866 | gMC->Gsvolu("S05N","BOX",nulocMaterial,nulocpar,3); |
867 | gMC->Gsvolu("S06N","BOX",nulocMaterial,nulocpar,3); | |
6c5ddcfa | 868 | index = 0; |
21a18f36 | 869 | Float_t xxmax2 = xxmax - 5./2.; |
870 | for (xx = -xxmax; xx<=xxmax; xx+=2*nulocLength) { | |
1e8fff9c | 871 | index++; |
6c5ddcfa | 872 | gMC->Gspos("S05N",2*index-1,"S05B", xx, 0.,-bFrameWidth/4., 0, "ONLY"); |
873 | gMC->Gspos("S05N",2*index ,"S05B", xx, 0., bFrameWidth/4., 0, "ONLY"); | |
21a18f36 | 874 | if (xx > -xxmax2 && xx< xxmax2) { |
875 | gMC->Gspos("S05N",2*index-1,"SB5B", xx, 0.,-bFrameWidth/4., 0, "ONLY"); | |
876 | gMC->Gspos("S05N",2*index ,"SB5B", xx, 0., bFrameWidth/4., 0, "ONLY"); | |
877 | } | |
6c5ddcfa | 878 | gMC->Gspos("S06N",2*index-1,"S06B", xx, 0.,-bFrameWidth/4., 0, "ONLY"); |
879 | gMC->Gspos("S06N",2*index ,"S06B", xx, 0., bFrameWidth/4., 0, "ONLY"); | |
1e8fff9c | 880 | } |
3c084d9f | 881 | |
882 | // position the volumes approximating the circular section of the pipe | |
a083207d | 883 | Float_t yoffs = sensHeight/2. - yOverlap; |
3c084d9f | 884 | Float_t epsilon = 0.001; |
885 | Int_t ndiv=6; | |
886 | Float_t divpar[3]; | |
887 | Double_t dydiv= sensHeight/ndiv; | |
21a18f36 | 888 | Double_t ydiv = yoffs -dydiv; |
3c084d9f | 889 | Int_t imax=0; |
3c084d9f | 890 | imax = 1; |
21a18f36 | 891 | Float_t rmin = 33.; |
a083207d | 892 | Float_t z1 = spar[2], z2=2*spar[2]*1.01; |
3c084d9f | 893 | for (Int_t idiv=0;idiv<ndiv; idiv++){ |
894 | ydiv+= dydiv; | |
425ebd0a | 895 | Float_t xdiv = 0.; |
3c084d9f | 896 | if (ydiv<rmin) xdiv= rmin * TMath::Sin( TMath::ACos(ydiv/rmin) ); |
897 | divpar[0] = (pcbLength-xdiv)/2.; | |
898 | divpar[1] = dydiv/2. - epsilon; | |
899 | divpar[2] = sensWidth/2.; | |
425ebd0a | 900 | Float_t xvol=(pcbLength+xdiv)/2.+1.999; |
a083207d | 901 | Float_t yvol=ydiv + dydiv/2.; |
21a18f36 | 902 | //printf ("y ll = %f y ur = %f \n",yvol - divpar[1], yvol + divpar[1]); |
3c084d9f | 903 | gMC->Gsposp("S05G",imax+4*idiv+1,"C05M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3); |
904 | gMC->Gsposp("S06G",imax+4*idiv+1,"C06M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3); | |
a083207d | 905 | gMC->Gsposp("S05G",imax+4*idiv+2,"C05M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3); |
906 | gMC->Gsposp("S06G",imax+4*idiv+2,"C06M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3); | |
907 | gMC->Gsposp("S05G",imax+4*idiv+3,"C05M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3); | |
908 | gMC->Gsposp("S06G",imax+4*idiv+3,"C06M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3); | |
909 | gMC->Gsposp("S05G",imax+4*idiv+4,"C05M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3); | |
910 | gMC->Gsposp("S06G",imax+4*idiv+4,"C06M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3); | |
3c084d9f | 911 | } |
b17c0c87 | 912 | } |
b17c0c87 | 913 | |
a9e2aefa | 914 | |
3c084d9f | 915 | if (stations[3]) { |
916 | ||
a9e2aefa | 917 | //******************************************************************** |
918 | // Station 4 ** | |
919 | //******************************************************************** | |
920 | // indices 1 and 2 for first and second chambers in the station | |
921 | // iChamber (first chamber) kept for other quanties than Z, | |
922 | // assumed to be the same in both chambers | |
923 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[6]; | |
924 | iChamber2 =(AliMUONChamber*) (*fChambers)[7]; | |
925 | zpos1=iChamber1->Z(); | |
926 | zpos2=iChamber2->Z(); | |
927 | dstation = zpos2 - zpos1; | |
b64652f5 | 928 | // zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; // not used any more |
a9e2aefa | 929 | |
930 | // | |
931 | // Mother volume | |
932 | tpar[0] = iChamber->RInner()-dframep; | |
933 | tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); | |
21a18f36 | 934 | tpar[2] = dstation/5; |
a9e2aefa | 935 | |
936 | gMC->Gsvolu("C07M", "TUBE", idAir, tpar, 3); | |
937 | gMC->Gsvolu("C08M", "TUBE", idAir, tpar, 3); | |
938 | gMC->Gspos("C07M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); | |
939 | gMC->Gspos("C08M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); | |
1e8fff9c | 940 | |
a9e2aefa | 941 | |
f9f7c205 | 942 | const Int_t nSlats4 = 6; // number of slats per quadrant |
425ebd0a | 943 | const Int_t nPCB4[nSlats4] = {4,4,5,5,4,3}; // n PCB per slat |
21a18f36 | 944 | const Float_t xpos4[nSlats4] = {38.5, 40., 0., 0., 0., 0.}; |
6c5ddcfa | 945 | Float_t slatLength4[nSlats4]; |
1e8fff9c | 946 | |
947 | // create and position the slat (mother) volumes | |
948 | ||
6c5ddcfa | 949 | char volNam7[5]; |
950 | char volNam8[5]; | |
1e8fff9c | 951 | Float_t xSlat4; |
f9f7c205 | 952 | Float_t ySlat4; |
1e8fff9c | 953 | |
6c5ddcfa | 954 | for (i = 0; i<nSlats4; i++){ |
a083207d | 955 | slatLength4[i] = pcbLength * nPCB4[i] + 2. * dSlatLength; |
956 | xSlat4 = slatLength4[i]/2. - vFrameLength/2. + xpos4[i]; | |
21a18f36 | 957 | if (i==1 || i==0) slatLength4[i] -= 2. *dSlatLength; // frame out in PCB with circular border |
a083207d | 958 | ySlat4 = sensHeight * i - yOverlap *i; |
959 | ||
960 | spar[0] = slatLength4[i]/2.; | |
961 | spar[1] = slatHeight/2.; | |
962 | spar[2] = slatWidth/2.*1.01; | |
963 | Float_t dzCh4=spar[2]*1.01; | |
964 | // zSlat to be checked (odd downstream or upstream?) | |
965 | Float_t zSlat = (i%2 ==0)? spar[2] : -spar[2]; | |
966 | sprintf(volNam7,"S07%d",i); | |
967 | gMC->Gsvolu(volNam7,"BOX",slatMaterial,spar,3); | |
968 | gMC->Gspos(volNam7, i*4+1,"C07M", xSlat4, ySlat4, zSlat+2.*dzCh4, 0, "ONLY"); | |
969 | gMC->Gspos(volNam7, i*4+2,"C07M",-xSlat4, ySlat4, zSlat-2.*dzCh4, 0, "ONLY"); | |
970 | if (i>0) { | |
971 | gMC->Gspos(volNam7, i*4+3,"C07M", xSlat4,-ySlat4, zSlat+2.*dzCh4, 0, "ONLY"); | |
972 | gMC->Gspos(volNam7, i*4+4,"C07M",-xSlat4,-ySlat4, zSlat-2.*dzCh4, 0, "ONLY"); | |
973 | } | |
974 | sprintf(volNam8,"S08%d",i); | |
975 | gMC->Gsvolu(volNam8,"BOX",slatMaterial,spar,3); | |
976 | gMC->Gspos(volNam8, i*4+1,"C08M", xSlat4, ySlat4, zSlat+2.*dzCh4, 0, "ONLY"); | |
977 | gMC->Gspos(volNam8, i*4+2,"C08M",-xSlat4, ySlat4, zSlat-2.*dzCh4, 0, "ONLY"); | |
978 | if (i>0) { | |
979 | gMC->Gspos(volNam8, i*4+3,"C08M", xSlat4,-ySlat4, zSlat+2.*dzCh4, 0, "ONLY"); | |
980 | gMC->Gspos(volNam8, i*4+4,"C08M",-xSlat4,-ySlat4, zSlat-2.*dzCh4, 0, "ONLY"); | |
981 | } | |
a9e2aefa | 982 | } |
a083207d | 983 | |
3c084d9f | 984 | |
985 | // create the panel volume | |
1e8fff9c | 986 | |
3c084d9f | 987 | gMC->Gsvolu("S07C","BOX",panelMaterial,panelpar,3); |
988 | gMC->Gsvolu("S08C","BOX",panelMaterial,panelpar,3); | |
a9e2aefa | 989 | |
3c084d9f | 990 | // create the rohacell volume |
991 | ||
992 | gMC->Gsvolu("S07R","BOX",rohaMaterial,rohapar,3); | |
993 | gMC->Gsvolu("S08R","BOX",rohaMaterial,rohapar,3); | |
1e8fff9c | 994 | |
1e8fff9c | 995 | // create the insulating material volume |
996 | ||
6c5ddcfa | 997 | gMC->Gsvolu("S07I","BOX",insuMaterial,insupar,3); |
998 | gMC->Gsvolu("S08I","BOX",insuMaterial,insupar,3); | |
1e8fff9c | 999 | |
3c084d9f | 1000 | // create the PCB volume |
1e8fff9c | 1001 | |
3c084d9f | 1002 | gMC->Gsvolu("S07P","BOX",pcbMaterial,pcbpar,3); |
1003 | gMC->Gsvolu("S08P","BOX",pcbMaterial,pcbpar,3); | |
1e8fff9c | 1004 | |
3c084d9f | 1005 | // create the sensitive volumes, |
1006 | ||
1007 | gMC->Gsvolu("S07G","BOX",sensMaterial,0,0); | |
1008 | gMC->Gsvolu("S08G","BOX",sensMaterial,0,0); | |
1e8fff9c | 1009 | |
1010 | // create the vertical frame volume | |
1011 | ||
6c5ddcfa | 1012 | gMC->Gsvolu("S07V","BOX",vFrameMaterial,vFramepar,3); |
1013 | gMC->Gsvolu("S08V","BOX",vFrameMaterial,vFramepar,3); | |
1e8fff9c | 1014 | |
1015 | // create the horizontal frame volume | |
1016 | ||
6c5ddcfa | 1017 | gMC->Gsvolu("S07H","BOX",hFrameMaterial,hFramepar,3); |
1018 | gMC->Gsvolu("S08H","BOX",hFrameMaterial,hFramepar,3); | |
1e8fff9c | 1019 | |
1020 | // create the horizontal border volume | |
1021 | ||
6c5ddcfa | 1022 | gMC->Gsvolu("S07B","BOX",bFrameMaterial,bFramepar,3); |
1023 | gMC->Gsvolu("S08B","BOX",bFrameMaterial,bFramepar,3); | |
3c084d9f | 1024 | |
1025 | index=0; | |
6c5ddcfa | 1026 | for (i = 0; i<nSlats4; i++){ |
1027 | sprintf(volNam7,"S07%d",i); | |
1028 | sprintf(volNam8,"S08%d",i); | |
1029 | Float_t xvFrame = (slatLength4[i] - vFrameLength)/2.; | |
3c084d9f | 1030 | // position the vertical frames |
21a18f36 | 1031 | if (i!=1 && i!=0) { |
a083207d | 1032 | gMC->Gspos("S07V",2*i-1,volNam7, xvFrame, 0., 0. , 0, "ONLY"); |
1033 | gMC->Gspos("S07V",2*i ,volNam7,-xvFrame, 0., 0. , 0, "ONLY"); | |
1034 | gMC->Gspos("S08V",2*i-1,volNam8, xvFrame, 0., 0. , 0, "ONLY"); | |
1035 | gMC->Gspos("S08V",2*i ,volNam8,-xvFrame, 0., 0. , 0, "ONLY"); | |
1036 | } | |
3c084d9f | 1037 | // position the panels and the insulating material |
6c5ddcfa | 1038 | for (j=0; j<nPCB4[i]; j++){ |
1e8fff9c | 1039 | index++; |
6c5ddcfa | 1040 | Float_t xx = sensLength * (-nPCB4[i]/2.+j+.5); |
3c084d9f | 1041 | |
1042 | Float_t zPanel = spar[2] - panelpar[2]; | |
1043 | gMC->Gspos("S07C",2*index-1,volNam7, xx, 0., zPanel , 0, "ONLY"); | |
1044 | gMC->Gspos("S07C",2*index ,volNam7, xx, 0.,-zPanel , 0, "ONLY"); | |
1045 | gMC->Gspos("S08C",2*index-1,volNam8, xx, 0., zPanel , 0, "ONLY"); | |
1046 | gMC->Gspos("S08C",2*index ,volNam8, xx, 0.,-zPanel , 0, "ONLY"); | |
1047 | ||
1048 | gMC->Gspos("S07I",index,volNam7, xx, 0., 0 , 0, "ONLY"); | |
1049 | gMC->Gspos("S08I",index,volNam8, xx, 0., 0 , 0, "ONLY"); | |
1e8fff9c | 1050 | } |
a9e2aefa | 1051 | } |
1e8fff9c | 1052 | |
3c084d9f | 1053 | // position the rohacell volume inside the panel volume |
1054 | gMC->Gspos("S07R",1,"S07C",0.,0.,0.,0,"ONLY"); | |
1055 | gMC->Gspos("S08R",1,"S08C",0.,0.,0.,0,"ONLY"); | |
1056 | ||
1057 | // position the PCB volume inside the insulating material volume | |
1058 | gMC->Gspos("S07P",1,"S07I",0.,0.,0.,0,"ONLY"); | |
1059 | gMC->Gspos("S08P",1,"S08I",0.,0.,0.,0,"ONLY"); | |
1060 | // position the horizontal frame volume inside the PCB volume | |
1061 | gMC->Gspos("S07H",1,"S07P",0.,0.,0.,0,"ONLY"); | |
1062 | gMC->Gspos("S08H",1,"S08P",0.,0.,0.,0,"ONLY"); | |
1063 | // position the sensitive volume inside the horizontal frame volume | |
1064 | gMC->Gsposp("S07G",1,"S07H",0.,0.,0.,0,"ONLY",senspar,3); | |
1065 | gMC->Gsposp("S08G",1,"S08H",0.,0.,0.,0,"ONLY",senspar,3); | |
3c084d9f | 1066 | // position the border volumes inside the PCB volume |
1067 | Float_t yborder = ( pcbHeight - bFrameHeight ) / 2.; | |
1068 | gMC->Gspos("S07B",1,"S07P",0., yborder,0.,0,"ONLY"); | |
1069 | gMC->Gspos("S07B",2,"S07P",0.,-yborder,0.,0,"ONLY"); | |
1070 | gMC->Gspos("S08B",1,"S08P",0., yborder,0.,0,"ONLY"); | |
1071 | gMC->Gspos("S08B",2,"S08P",0.,-yborder,0.,0,"ONLY"); | |
1072 | ||
1e8fff9c | 1073 | // create the NULOC volume and position it in the horizontal frame |
3c084d9f | 1074 | |
6c5ddcfa | 1075 | gMC->Gsvolu("S07N","BOX",nulocMaterial,nulocpar,3); |
1076 | gMC->Gsvolu("S08N","BOX",nulocMaterial,nulocpar,3); | |
3c084d9f | 1077 | index = 0; |
21a18f36 | 1078 | for (xx = -xxmax; xx<=xxmax; xx+=2*nulocLength) { |
1e8fff9c | 1079 | index++; |
6c5ddcfa | 1080 | gMC->Gspos("S07N",2*index-1,"S07B", xx, 0.,-bFrameWidth/4., 0, "ONLY"); |
1081 | gMC->Gspos("S07N",2*index ,"S07B", xx, 0., bFrameWidth/4., 0, "ONLY"); | |
1082 | gMC->Gspos("S08N",2*index-1,"S08B", xx, 0.,-bFrameWidth/4., 0, "ONLY"); | |
1083 | gMC->Gspos("S08N",2*index ,"S08B", xx, 0., bFrameWidth/4., 0, "ONLY"); | |
1e8fff9c | 1084 | } |
a083207d | 1085 | |
1086 | // position the volumes approximating the circular section of the pipe | |
21a18f36 | 1087 | Float_t yoffs = sensHeight/2. - yOverlap; |
a083207d | 1088 | Float_t epsilon = 0.001; |
1089 | Int_t ndiv=6; | |
1090 | Float_t divpar[3]; | |
1091 | Double_t dydiv= sensHeight/ndiv; | |
21a18f36 | 1092 | Double_t ydiv = yoffs -dydiv; |
a083207d | 1093 | Int_t imax=0; |
a083207d | 1094 | imax = 1; |
1095 | Float_t rmin = 40.; | |
1096 | Float_t z1 = -spar[2], z2=2*spar[2]*1.01; | |
1097 | for (Int_t idiv=0;idiv<ndiv; idiv++){ | |
1098 | ydiv+= dydiv; | |
425ebd0a | 1099 | Float_t xdiv = 0.; |
a083207d | 1100 | if (ydiv<rmin) xdiv= rmin * TMath::Sin( TMath::ACos(ydiv/rmin) ); |
1101 | divpar[0] = (pcbLength-xdiv)/2.; | |
1102 | divpar[1] = dydiv/2. - epsilon; | |
1103 | divpar[2] = sensWidth/2.; | |
425ebd0a | 1104 | Float_t xvol=(pcbLength+xdiv)/2.+1.999; |
a083207d | 1105 | Float_t yvol=ydiv + dydiv/2.; |
1106 | gMC->Gsposp("S07G",imax+4*idiv+1,"C07M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3); | |
1107 | gMC->Gsposp("S08G",imax+4*idiv+1,"C08M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3); | |
1108 | gMC->Gsposp("S07G",imax+4*idiv+2,"C07M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3); | |
1109 | gMC->Gsposp("S08G",imax+4*idiv+2,"C08M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3); | |
1110 | gMC->Gsposp("S07G",imax+4*idiv+3,"C07M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3); | |
1111 | gMC->Gsposp("S08G",imax+4*idiv+3,"C08M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3); | |
1112 | gMC->Gsposp("S07G",imax+4*idiv+4,"C07M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3); | |
1113 | gMC->Gsposp("S08G",imax+4*idiv+4,"C08M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3); | |
1114 | } | |
1115 | ||
1116 | ||
1117 | ||
1118 | ||
1119 | ||
b17c0c87 | 1120 | } |
3c084d9f | 1121 | |
b17c0c87 | 1122 | if (stations[4]) { |
1123 | ||
1e8fff9c | 1124 | |
a9e2aefa | 1125 | //******************************************************************** |
1126 | // Station 5 ** | |
1127 | //******************************************************************** | |
1128 | // indices 1 and 2 for first and second chambers in the station | |
1129 | // iChamber (first chamber) kept for other quanties than Z, | |
1130 | // assumed to be the same in both chambers | |
1131 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[8]; | |
1132 | iChamber2 =(AliMUONChamber*) (*fChambers)[9]; | |
1133 | zpos1=iChamber1->Z(); | |
1134 | zpos2=iChamber2->Z(); | |
1135 | dstation = zpos2 - zpos1; | |
b64652f5 | 1136 | // zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; // not used any more |
3c084d9f | 1137 | |
a9e2aefa | 1138 | // |
1139 | // Mother volume | |
1140 | tpar[0] = iChamber->RInner()-dframep; | |
1141 | tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); | |
3c084d9f | 1142 | tpar[2] = dstation/5.; |
a9e2aefa | 1143 | |
1144 | gMC->Gsvolu("C09M", "TUBE", idAir, tpar, 3); | |
1145 | gMC->Gsvolu("C10M", "TUBE", idAir, tpar, 3); | |
1146 | gMC->Gspos("C09M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); | |
1147 | gMC->Gspos("C10M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); | |
a9e2aefa | 1148 | |
a9e2aefa | 1149 | |
1e8fff9c | 1150 | const Int_t nSlats5 = 7; // number of slats per quadrant |
a083207d | 1151 | const Int_t nPCB5[nSlats5] = {5,5,6,6,5,4,3}; // n PCB per slat |
21a18f36 | 1152 | const Float_t xpos5[nSlats5] = {38.5, 40., 0., 0., 0., 0., 0.}; |
6c5ddcfa | 1153 | Float_t slatLength5[nSlats5]; |
6c5ddcfa | 1154 | char volNam9[5]; |
1155 | char volNam10[5]; | |
f9f7c205 | 1156 | Float_t xSlat5; |
1157 | Float_t ySlat5; | |
1e8fff9c | 1158 | |
6c5ddcfa | 1159 | for (i = 0; i<nSlats5; i++){ |
1160 | slatLength5[i] = pcbLength * nPCB5[i] + 2. * dSlatLength; | |
a083207d | 1161 | xSlat5 = slatLength5[i]/2. - vFrameLength/2. +xpos5[i]; |
21a18f36 | 1162 | if (i==1 || i==0) slatLength5[i] -= 2. *dSlatLength; // frame out in PCB with circular border |
f9f7c205 | 1163 | ySlat5 = sensHeight * i - yOverlap * i; |
6c5ddcfa | 1164 | spar[0] = slatLength5[i]/2.; |
1165 | spar[1] = slatHeight/2.; | |
3c084d9f | 1166 | spar[2] = slatWidth/2. * 1.01; |
1167 | Float_t dzCh5=spar[2]*1.01; | |
1e8fff9c | 1168 | // zSlat to be checked (odd downstream or upstream?) |
3c084d9f | 1169 | Float_t zSlat = (i%2 ==0)? -spar[2] : spar[2]; |
6c5ddcfa | 1170 | sprintf(volNam9,"S09%d",i); |
1171 | gMC->Gsvolu(volNam9,"BOX",slatMaterial,spar,3); | |
e1ad7d45 | 1172 | gMC->Gspos(volNam9, i*4+1,"C09M", xSlat5, ySlat5, zSlat+2.*dzCh5, 0, "ONLY"); |
1173 | gMC->Gspos(volNam9, i*4+2,"C09M",-xSlat5, ySlat5, zSlat-2.*dzCh5, 0, "ONLY"); | |
f9f7c205 | 1174 | if (i>0) { |
3c084d9f | 1175 | gMC->Gspos(volNam9, i*4+3,"C09M", xSlat5,-ySlat5, zSlat+2.*dzCh5, 0, "ONLY"); |
1176 | gMC->Gspos(volNam9, i*4+4,"C09M",-xSlat5,-ySlat5, zSlat-2.*dzCh5, 0, "ONLY"); | |
f9f7c205 | 1177 | } |
6c5ddcfa | 1178 | sprintf(volNam10,"S10%d",i); |
1179 | gMC->Gsvolu(volNam10,"BOX",slatMaterial,spar,3); | |
e1ad7d45 | 1180 | gMC->Gspos(volNam10, i*4+1,"C10M", xSlat5, ySlat5, zSlat+2.*dzCh5, 0, "ONLY"); |
1181 | gMC->Gspos(volNam10, i*4+2,"C10M",-xSlat5, ySlat5, zSlat-2.*dzCh5, 0, "ONLY"); | |
f9f7c205 | 1182 | if (i>0) { |
3c084d9f | 1183 | gMC->Gspos(volNam10, i*4+3,"C10M", xSlat5,-ySlat5, zSlat+2.*dzCh5, 0, "ONLY"); |
1184 | gMC->Gspos(volNam10, i*4+4,"C10M",-xSlat5,-ySlat5, zSlat-2.*dzCh5, 0, "ONLY"); | |
f9f7c205 | 1185 | } |
a9e2aefa | 1186 | } |
1187 | ||
1e8fff9c | 1188 | // create the panel volume |
3c084d9f | 1189 | |
6c5ddcfa | 1190 | gMC->Gsvolu("S09C","BOX",panelMaterial,panelpar,3); |
1191 | gMC->Gsvolu("S10C","BOX",panelMaterial,panelpar,3); | |
3c084d9f | 1192 | |
1e8fff9c | 1193 | // create the rohacell volume |
3c084d9f | 1194 | |
6c5ddcfa | 1195 | gMC->Gsvolu("S09R","BOX",rohaMaterial,rohapar,3); |
1196 | gMC->Gsvolu("S10R","BOX",rohaMaterial,rohapar,3); | |
3c084d9f | 1197 | |
1198 | // create the insulating material volume | |
1199 | ||
1200 | gMC->Gsvolu("S09I","BOX",insuMaterial,insupar,3); | |
1201 | gMC->Gsvolu("S10I","BOX",insuMaterial,insupar,3); | |
1202 | ||
1203 | // create the PCB volume | |
1204 | ||
1205 | gMC->Gsvolu("S09P","BOX",pcbMaterial,pcbpar,3); | |
1206 | gMC->Gsvolu("S10P","BOX",pcbMaterial,pcbpar,3); | |
1207 | ||
1208 | // create the sensitive volumes, | |
1209 | ||
1210 | gMC->Gsvolu("S09G","BOX",sensMaterial,0,0); | |
1211 | gMC->Gsvolu("S10G","BOX",sensMaterial,0,0); | |
3c084d9f | 1212 | |
1e8fff9c | 1213 | // create the vertical frame volume |
3c084d9f | 1214 | |
6c5ddcfa | 1215 | gMC->Gsvolu("S09V","BOX",vFrameMaterial,vFramepar,3); |
1216 | gMC->Gsvolu("S10V","BOX",vFrameMaterial,vFramepar,3); | |
1e8fff9c | 1217 | |
1218 | // create the horizontal frame volume | |
3c084d9f | 1219 | |
6c5ddcfa | 1220 | gMC->Gsvolu("S09H","BOX",hFrameMaterial,hFramepar,3); |
1221 | gMC->Gsvolu("S10H","BOX",hFrameMaterial,hFramepar,3); | |
1e8fff9c | 1222 | |
1223 | // create the horizontal border volume | |
1224 | ||
6c5ddcfa | 1225 | gMC->Gsvolu("S09B","BOX",bFrameMaterial,bFramepar,3); |
1226 | gMC->Gsvolu("S10B","BOX",bFrameMaterial,bFramepar,3); | |
1e8fff9c | 1227 | |
3c084d9f | 1228 | index=0; |
6c5ddcfa | 1229 | for (i = 0; i<nSlats5; i++){ |
1230 | sprintf(volNam9,"S09%d",i); | |
1231 | sprintf(volNam10,"S10%d",i); | |
1232 | Float_t xvFrame = (slatLength5[i] - vFrameLength)/2.; | |
3c084d9f | 1233 | // position the vertical frames |
21a18f36 | 1234 | if (i!=1 && i!=0) { |
a083207d | 1235 | gMC->Gspos("S09V",2*i-1,volNam9, xvFrame, 0., 0. , 0, "ONLY"); |
1236 | gMC->Gspos("S09V",2*i ,volNam9,-xvFrame, 0., 0. , 0, "ONLY"); | |
1237 | gMC->Gspos("S10V",2*i-1,volNam10, xvFrame, 0., 0. , 0, "ONLY"); | |
1238 | gMC->Gspos("S10V",2*i ,volNam10,-xvFrame, 0., 0. , 0, "ONLY"); | |
1239 | } | |
3c084d9f | 1240 | |
1241 | // position the panels and the insulating material | |
6c5ddcfa | 1242 | for (j=0; j<nPCB5[i]; j++){ |
1e8fff9c | 1243 | index++; |
3c084d9f | 1244 | Float_t xx = sensLength * (-nPCB5[i]/2.+j+.5); |
1245 | ||
1246 | Float_t zPanel = spar[2] - panelpar[2]; | |
1247 | gMC->Gspos("S09C",2*index-1,volNam9, xx, 0., zPanel , 0, "ONLY"); | |
1248 | gMC->Gspos("S09C",2*index ,volNam9, xx, 0.,-zPanel , 0, "ONLY"); | |
1249 | gMC->Gspos("S10C",2*index-1,volNam10, xx, 0., zPanel , 0, "ONLY"); | |
1250 | gMC->Gspos("S10C",2*index ,volNam10, xx, 0.,-zPanel , 0, "ONLY"); | |
1251 | ||
1252 | gMC->Gspos("S09I",index,volNam9, xx, 0., 0 , 0, "ONLY"); | |
1253 | gMC->Gspos("S10I",index,volNam10, xx, 0., 0 , 0, "ONLY"); | |
1e8fff9c | 1254 | } |
1255 | } | |
1256 | ||
3c084d9f | 1257 | // position the rohacell volume inside the panel volume |
1258 | gMC->Gspos("S09R",1,"S09C",0.,0.,0.,0,"ONLY"); | |
1259 | gMC->Gspos("S10R",1,"S10C",0.,0.,0.,0,"ONLY"); | |
1260 | ||
1261 | // position the PCB volume inside the insulating material volume | |
1262 | gMC->Gspos("S09P",1,"S09I",0.,0.,0.,0,"ONLY"); | |
1263 | gMC->Gspos("S10P",1,"S10I",0.,0.,0.,0,"ONLY"); | |
1264 | // position the horizontal frame volume inside the PCB volume | |
1265 | gMC->Gspos("S09H",1,"S09P",0.,0.,0.,0,"ONLY"); | |
1266 | gMC->Gspos("S10H",1,"S10P",0.,0.,0.,0,"ONLY"); | |
1267 | // position the sensitive volume inside the horizontal frame volume | |
1268 | gMC->Gsposp("S09G",1,"S09H",0.,0.,0.,0,"ONLY",senspar,3); | |
1269 | gMC->Gsposp("S10G",1,"S10H",0.,0.,0.,0,"ONLY",senspar,3); | |
3c084d9f | 1270 | // position the border volumes inside the PCB volume |
1271 | Float_t yborder = ( pcbHeight - bFrameHeight ) / 2.; | |
1272 | gMC->Gspos("S09B",1,"S09P",0., yborder,0.,0,"ONLY"); | |
1273 | gMC->Gspos("S09B",2,"S09P",0.,-yborder,0.,0,"ONLY"); | |
1274 | gMC->Gspos("S10B",1,"S10P",0., yborder,0.,0,"ONLY"); | |
1275 | gMC->Gspos("S10B",2,"S10P",0.,-yborder,0.,0,"ONLY"); | |
1276 | ||
1e8fff9c | 1277 | // create the NULOC volume and position it in the horizontal frame |
3c084d9f | 1278 | |
6c5ddcfa | 1279 | gMC->Gsvolu("S09N","BOX",nulocMaterial,nulocpar,3); |
1280 | gMC->Gsvolu("S10N","BOX",nulocMaterial,nulocpar,3); | |
3c084d9f | 1281 | index = 0; |
21a18f36 | 1282 | for (xx = -xxmax; xx<=xxmax; xx+=2*nulocLength) { |
1e8fff9c | 1283 | index++; |
6c5ddcfa | 1284 | gMC->Gspos("S09N",2*index-1,"S09B", xx, 0.,-bFrameWidth/4., 0, "ONLY"); |
1285 | gMC->Gspos("S09N",2*index ,"S09B", xx, 0., bFrameWidth/4., 0, "ONLY"); | |
1286 | gMC->Gspos("S10N",2*index-1,"S10B", xx, 0.,-bFrameWidth/4., 0, "ONLY"); | |
1287 | gMC->Gspos("S10N",2*index ,"S10B", xx, 0., bFrameWidth/4., 0, "ONLY"); | |
a9e2aefa | 1288 | } |
a083207d | 1289 | // position the volumes approximating the circular section of the pipe |
21a18f36 | 1290 | Float_t yoffs = sensHeight/2. - yOverlap; |
a083207d | 1291 | Float_t epsilon = 0.001; |
1292 | Int_t ndiv=6; | |
1293 | Float_t divpar[3]; | |
1294 | Double_t dydiv= sensHeight/ndiv; | |
21a18f36 | 1295 | Double_t ydiv = yoffs -dydiv; |
a083207d | 1296 | Int_t imax=0; |
1297 | // for (Int_t islat=0; islat<nSlats3; islat++) imax += nPCB3[islat]; | |
1298 | imax = 1; | |
1299 | Float_t rmin = 40.; | |
1300 | Float_t z1 = spar[2], z2=2*spar[2]*1.01; | |
1301 | for (Int_t idiv=0;idiv<ndiv; idiv++){ | |
1302 | ydiv+= dydiv; | |
425ebd0a | 1303 | Float_t xdiv = 0.; |
a083207d | 1304 | if (ydiv<rmin) xdiv= rmin * TMath::Sin( TMath::ACos(ydiv/rmin) ); |
1305 | divpar[0] = (pcbLength-xdiv)/2.; | |
1306 | divpar[1] = dydiv/2. - epsilon; | |
1307 | divpar[2] = sensWidth/2.; | |
425ebd0a | 1308 | Float_t xvol=(pcbLength+xdiv)/2. + 1.999; |
a083207d | 1309 | Float_t yvol=ydiv + dydiv/2.; |
1310 | gMC->Gsposp("S09G",imax+4*idiv+1,"C09M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3); | |
1311 | gMC->Gsposp("S10G",imax+4*idiv+1,"C10M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3); | |
1312 | gMC->Gsposp("S09G",imax+4*idiv+2,"C09M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3); | |
1313 | gMC->Gsposp("S10G",imax+4*idiv+2,"C10M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3); | |
1314 | gMC->Gsposp("S09G",imax+4*idiv+3,"C09M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3); | |
1315 | gMC->Gsposp("S10G",imax+4*idiv+3,"C10M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3); | |
1316 | gMC->Gsposp("S09G",imax+4*idiv+4,"C09M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3); | |
1317 | gMC->Gsposp("S10G",imax+4*idiv+4,"C10M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3); | |
1318 | } | |
1319 | ||
b17c0c87 | 1320 | } |
1321 | ||
1e8fff9c | 1322 | |
a9e2aefa | 1323 | /////////////////////////////////////// |
1324 | // GEOMETRY FOR THE TRIGGER CHAMBERS // | |
1325 | /////////////////////////////////////// | |
1326 | ||
1327 | // 03/00 P. Dupieux : introduce a slighly more realistic | |
1328 | // geom. of the trigger readout planes with | |
1329 | // 2 Zpos per trigger plane (alternate | |
1330 | // between left and right of the trigger) | |
1331 | ||
1332 | // Parameters of the Trigger Chambers | |
1333 | ||
236fe2c5 | 1334 | // DP03-01 introduce dead zone of +/- 2 cm arround x=0 (as in TDR, fig3.27) |
1335 | const Float_t kDXZERO=2.; | |
a9e2aefa | 1336 | const Float_t kXMC1MIN=34.; |
1337 | const Float_t kXMC1MED=51.; | |
1338 | const Float_t kXMC1MAX=272.; | |
1339 | const Float_t kYMC1MIN=34.; | |
1340 | const Float_t kYMC1MAX=51.; | |
1341 | const Float_t kRMIN1=50.; | |
236fe2c5 | 1342 | // DP03-01 const Float_t kRMAX1=62.; |
1343 | const Float_t kRMAX1=64.; | |
a9e2aefa | 1344 | const Float_t kRMIN2=50.; |
236fe2c5 | 1345 | // DP03-01 const Float_t kRMAX2=66.; |
1346 | const Float_t kRMAX2=68.; | |
a9e2aefa | 1347 | |
1348 | // zposition of the middle of the gas gap in mother vol | |
1349 | const Float_t kZMCm=-3.6; | |
1350 | const Float_t kZMCp=+3.6; | |
1351 | ||
1352 | ||
1353 | // TRIGGER STATION 1 - TRIGGER STATION 1 - TRIGGER STATION 1 | |
1354 | ||
1355 | // iChamber 1 and 2 for first and second chambers in the station | |
1356 | // iChamber (first chamber) kept for other quanties than Z, | |
1357 | // assumed to be the same in both chambers | |
1358 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[10]; | |
1359 | iChamber2 =(AliMUONChamber*) (*fChambers)[11]; | |
1360 | ||
1361 | // 03/00 | |
1362 | // zpos1 and zpos2 are now the middle of the first and second | |
1363 | // plane of station 1 : | |
1364 | // zpos1=(16075+15995)/2=16035 mm, thick/2=40 mm | |
1365 | // zpos2=(16225+16145)/2=16185 mm, thick/2=40 mm | |
1366 | // | |
1367 | // zpos1m=15999 mm , zpos1p=16071 mm (middles of gas gaps) | |
1368 | // zpos2m=16149 mm , zpos2p=16221 mm (middles of gas gaps) | |
1369 | // rem : the total thickness accounts for 1 mm of al on both | |
1370 | // side of the RPCs (see zpos1 and zpos2), as previously | |
1371 | ||
1372 | zpos1=iChamber1->Z(); | |
1373 | zpos2=iChamber2->Z(); | |
1374 | ||
1375 | ||
1376 | // Mother volume definition | |
1377 | tpar[0] = iChamber->RInner(); | |
1378 | tpar[1] = iChamber->ROuter(); | |
1379 | tpar[2] = 4.0; | |
1380 | gMC->Gsvolu("CM11", "TUBE", idAir, tpar, 3); | |
1381 | gMC->Gsvolu("CM12", "TUBE", idAir, tpar, 3); | |
1382 | ||
1383 | // Definition of the flange between the beam shielding and the RPC | |
1384 | tpar[0]= kRMIN1; | |
1385 | tpar[1]= kRMAX1; | |
1386 | tpar[2]= 4.0; | |
1387 | ||
1388 | gMC->Gsvolu("CF1A", "TUBE", idAlu1, tpar, 3); //Al | |
1389 | gMC->Gspos("CF1A", 1, "CM11", 0., 0., 0., 0, "MANY"); | |
1390 | gMC->Gspos("CF1A", 2, "CM12", 0., 0., 0., 0, "MANY"); | |
1391 | ||
1392 | ||
1393 | // FIRST PLANE OF STATION 1 | |
1394 | ||
1395 | // ratios of zpos1m/zpos1p and inverse for first plane | |
1396 | Float_t zmp=(zpos1-3.6)/(zpos1+3.6); | |
1397 | Float_t zpm=1./zmp; | |
1398 | ||
1399 | ||
1400 | // Definition of prototype for chambers in the first plane | |
1401 | ||
1402 | tpar[0]= 0.; | |
1403 | tpar[1]= 0.; | |
1404 | tpar[2]= 0.; | |
1405 | ||
1406 | gMC->Gsvolu("CC1A", "BOX ", idAlu1, tpar, 0); //Al | |
1407 | gMC->Gsvolu("CB1A", "BOX ", idtmed[1107], tpar, 0); //Bakelite | |
1408 | gMC->Gsvolu("CG1A", "BOX ", idtmed[1106], tpar, 0); //Gas streamer | |
1409 | ||
1410 | // chamber type A | |
1411 | tpar[0] = -1.; | |
1412 | tpar[1] = -1.; | |
1413 | ||
236fe2c5 | 1414 | // DP03-01 const Float_t kXMC1A=kXMC1MED+(kXMC1MAX-kXMC1MED)/2.; |
1415 | const Float_t kXMC1A=kDXZERO+kXMC1MED+(kXMC1MAX-kXMC1MED)/2.; | |
a9e2aefa | 1416 | const Float_t kYMC1Am=0.; |
1417 | const Float_t kYMC1Ap=0.; | |
1418 | ||
1419 | tpar[2] = 0.1; | |
1420 | gMC->Gsposp("CG1A", 1, "CB1A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1421 | tpar[2] = 0.3; | |
1422 | gMC->Gsposp("CB1A", 1, "CC1A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1423 | ||
1424 | tpar[2] = 0.4; | |
1425 | tpar[0] = (kXMC1MAX-kXMC1MED)/2.; | |
1426 | tpar[1] = kYMC1MIN; | |
1427 | ||
1428 | gMC->Gsposp("CC1A", 1, "CM11",kXMC1A,kYMC1Am,kZMCm, 0, "ONLY", tpar, 3); | |
1429 | gMC->Gsposp("CC1A", 2, "CM11",-kXMC1A,kYMC1Ap,kZMCp, 0, "ONLY", tpar, 3); | |
1430 | ||
1431 | // chamber type B | |
1432 | Float_t tpar1save=tpar[1]; | |
1433 | Float_t y1msave=kYMC1Am; | |
1434 | Float_t y1psave=kYMC1Ap; | |
1435 | ||
1436 | tpar[0] = (kXMC1MAX-kXMC1MIN)/2.; | |
1437 | tpar[1] = (kYMC1MAX-kYMC1MIN)/2.; | |
1438 | ||
236fe2c5 | 1439 | // DP03-01 const Float_t kXMC1B=kXMC1MIN+tpar[0]; |
1440 | const Float_t kXMC1B=kDXZERO+kXMC1MIN+tpar[0]; | |
a9e2aefa | 1441 | const Float_t kYMC1Bp=(y1msave+tpar1save)*zpm+tpar[1]; |
1442 | const Float_t kYMC1Bm=(y1psave+tpar1save)*zmp+tpar[1]; | |
1443 | ||
1444 | gMC->Gsposp("CC1A", 3, "CM11",kXMC1B,kYMC1Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1445 | gMC->Gsposp("CC1A", 4, "CM11",-kXMC1B,kYMC1Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1446 | gMC->Gsposp("CC1A", 5, "CM11",kXMC1B,-kYMC1Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1447 | gMC->Gsposp("CC1A", 6, "CM11",-kXMC1B,-kYMC1Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1448 | ||
1449 | // chamber type C (end of type B !!) | |
1450 | tpar1save=tpar[1]; | |
1451 | y1msave=kYMC1Bm; | |
1452 | y1psave=kYMC1Bp; | |
1453 | ||
1454 | tpar[0] = kXMC1MAX/2; | |
1455 | tpar[1] = kYMC1MAX/2; | |
1456 | ||
236fe2c5 | 1457 | |
1458 | // DP03-01 const Float_t kXMC1C=tpar[0]; | |
1459 | const Float_t kXMC1C=kDXZERO+tpar[0]; | |
a9e2aefa | 1460 | // warning : same Z than type B |
1461 | const Float_t kYMC1Cp=(y1psave+tpar1save)*1.+tpar[1]; | |
1462 | const Float_t kYMC1Cm=(y1msave+tpar1save)*1.+tpar[1]; | |
1463 | ||
1464 | gMC->Gsposp("CC1A", 7, "CM11",kXMC1C,kYMC1Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1465 | gMC->Gsposp("CC1A", 8, "CM11",-kXMC1C,kYMC1Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1466 | gMC->Gsposp("CC1A", 9, "CM11",kXMC1C,-kYMC1Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1467 | gMC->Gsposp("CC1A", 10, "CM11",-kXMC1C,-kYMC1Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1468 | ||
1469 | // chamber type D, E and F (same size) | |
1470 | tpar1save=tpar[1]; | |
1471 | y1msave=kYMC1Cm; | |
1472 | y1psave=kYMC1Cp; | |
1473 | ||
1474 | tpar[0] = kXMC1MAX/2.; | |
1475 | tpar[1] = kYMC1MIN; | |
1476 | ||
236fe2c5 | 1477 | // DP03-01 const Float_t kXMC1D=tpar[0]; |
1478 | const Float_t kXMC1D=kDXZERO+tpar[0]; | |
a9e2aefa | 1479 | const Float_t kYMC1Dp=(y1msave+tpar1save)*zpm+tpar[1]; |
1480 | const Float_t kYMC1Dm=(y1psave+tpar1save)*zmp+tpar[1]; | |
1481 | ||
1482 | gMC->Gsposp("CC1A", 11, "CM11",kXMC1D,kYMC1Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1483 | gMC->Gsposp("CC1A", 12, "CM11",-kXMC1D,kYMC1Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1484 | gMC->Gsposp("CC1A", 13, "CM11",kXMC1D,-kYMC1Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1485 | gMC->Gsposp("CC1A", 14, "CM11",-kXMC1D,-kYMC1Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1486 | ||
1487 | ||
1488 | tpar1save=tpar[1]; | |
1489 | y1msave=kYMC1Dm; | |
1490 | y1psave=kYMC1Dp; | |
1491 | const Float_t kYMC1Ep=(y1msave+tpar1save)*zpm+tpar[1]; | |
1492 | const Float_t kYMC1Em=(y1psave+tpar1save)*zmp+tpar[1]; | |
1493 | ||
1494 | gMC->Gsposp("CC1A", 15, "CM11",kXMC1D,kYMC1Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1495 | gMC->Gsposp("CC1A", 16, "CM11",-kXMC1D,kYMC1Em,kZMCm, 0, "ONLY", tpar, 3); | |
1496 | gMC->Gsposp("CC1A", 17, "CM11",kXMC1D,-kYMC1Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1497 | gMC->Gsposp("CC1A", 18, "CM11",-kXMC1D,-kYMC1Em,kZMCm, 0, "ONLY", tpar, 3); | |
1498 | ||
1499 | tpar1save=tpar[1]; | |
1500 | y1msave=kYMC1Em; | |
1501 | y1psave=kYMC1Ep; | |
1502 | const Float_t kYMC1Fp=(y1msave+tpar1save)*zpm+tpar[1]; | |
1503 | const Float_t kYMC1Fm=(y1psave+tpar1save)*zmp+tpar[1]; | |
1504 | ||
1505 | gMC->Gsposp("CC1A", 19, "CM11",kXMC1D,kYMC1Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1506 | gMC->Gsposp("CC1A", 20, "CM11",-kXMC1D,kYMC1Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1507 | gMC->Gsposp("CC1A", 21, "CM11",kXMC1D,-kYMC1Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1508 | gMC->Gsposp("CC1A", 22, "CM11",-kXMC1D,-kYMC1Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1509 | ||
1510 | // Positioning first plane in ALICE | |
1511 | gMC->Gspos("CM11", 1, "ALIC", 0., 0., zpos1, 0, "ONLY"); | |
1512 | ||
1513 | // End of geometry definition for the first plane of station 1 | |
1514 | ||
1515 | ||
1516 | ||
1517 | // SECOND PLANE OF STATION 1 : proj ratio = zpos2/zpos1 | |
1518 | ||
1519 | const Float_t kZ12=zpos2/zpos1; | |
1520 | ||
1521 | // Definition of prototype for chambers in the second plane of station 1 | |
1522 | ||
1523 | tpar[0]= 0.; | |
1524 | tpar[1]= 0.; | |
1525 | tpar[2]= 0.; | |
1526 | ||
1527 | gMC->Gsvolu("CC2A", "BOX ", idAlu1, tpar, 0); //Al | |
1528 | gMC->Gsvolu("CB2A", "BOX ", idtmed[1107], tpar, 0); //Bakelite | |
1529 | gMC->Gsvolu("CG2A", "BOX ", idtmed[1106], tpar, 0); //Gas streamer | |
1530 | ||
1531 | // chamber type A | |
1532 | tpar[0] = -1.; | |
1533 | tpar[1] = -1.; | |
1534 | ||
1535 | const Float_t kXMC2A=kXMC1A*kZ12; | |
1536 | const Float_t kYMC2Am=0.; | |
1537 | const Float_t kYMC2Ap=0.; | |
1538 | ||
1539 | tpar[2] = 0.1; | |
1540 | gMC->Gsposp("CG2A", 1, "CB2A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1541 | tpar[2] = 0.3; | |
1542 | gMC->Gsposp("CB2A", 1, "CC2A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1543 | ||
1544 | tpar[2] = 0.4; | |
1545 | tpar[0] = ((kXMC1MAX-kXMC1MED)/2.)*kZ12; | |
1546 | tpar[1] = kYMC1MIN*kZ12; | |
1547 | ||
1548 | gMC->Gsposp("CC2A", 1, "CM12",kXMC2A,kYMC2Am,kZMCm, 0, "ONLY", tpar, 3); | |
1549 | gMC->Gsposp("CC2A", 2, "CM12",-kXMC2A,kYMC2Ap,kZMCp, 0, "ONLY", tpar, 3); | |
1550 | ||
1551 | ||
1552 | // chamber type B | |
1553 | ||
1554 | tpar[0] = ((kXMC1MAX-kXMC1MIN)/2.)*kZ12; | |
1555 | tpar[1] = ((kYMC1MAX-kYMC1MIN)/2.)*kZ12; | |
1556 | ||
1557 | const Float_t kXMC2B=kXMC1B*kZ12; | |
1558 | const Float_t kYMC2Bp=kYMC1Bp*kZ12; | |
1559 | const Float_t kYMC2Bm=kYMC1Bm*kZ12; | |
1560 | gMC->Gsposp("CC2A", 3, "CM12",kXMC2B,kYMC2Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1561 | gMC->Gsposp("CC2A", 4, "CM12",-kXMC2B,kYMC2Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1562 | gMC->Gsposp("CC2A", 5, "CM12",kXMC2B,-kYMC2Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1563 | gMC->Gsposp("CC2A", 6, "CM12",-kXMC2B,-kYMC2Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1564 | ||
1565 | ||
1566 | // chamber type C (end of type B !!) | |
1567 | ||
1568 | tpar[0] = (kXMC1MAX/2)*kZ12; | |
1569 | tpar[1] = (kYMC1MAX/2)*kZ12; | |
1570 | ||
1571 | const Float_t kXMC2C=kXMC1C*kZ12; | |
1572 | const Float_t kYMC2Cp=kYMC1Cp*kZ12; | |
1573 | const Float_t kYMC2Cm=kYMC1Cm*kZ12; | |
1574 | gMC->Gsposp("CC2A", 7, "CM12",kXMC2C,kYMC2Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1575 | gMC->Gsposp("CC2A", 8, "CM12",-kXMC2C,kYMC2Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1576 | gMC->Gsposp("CC2A", 9, "CM12",kXMC2C,-kYMC2Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1577 | gMC->Gsposp("CC2A", 10, "CM12",-kXMC2C,-kYMC2Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1578 | ||
1579 | // chamber type D, E and F (same size) | |
1580 | ||
1581 | tpar[0] = (kXMC1MAX/2.)*kZ12; | |
1582 | tpar[1] = kYMC1MIN*kZ12; | |
1583 | ||
1584 | const Float_t kXMC2D=kXMC1D*kZ12; | |
1585 | const Float_t kYMC2Dp=kYMC1Dp*kZ12; | |
1586 | const Float_t kYMC2Dm=kYMC1Dm*kZ12; | |
1587 | gMC->Gsposp("CC2A", 11, "CM12",kXMC2D,kYMC2Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1588 | gMC->Gsposp("CC2A", 12, "CM12",-kXMC2D,kYMC2Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1589 | gMC->Gsposp("CC2A", 13, "CM12",kXMC2D,-kYMC2Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1590 | gMC->Gsposp("CC2A", 14, "CM12",-kXMC2D,-kYMC2Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1591 | ||
1592 | const Float_t kYMC2Ep=kYMC1Ep*kZ12; | |
1593 | const Float_t kYMC2Em=kYMC1Em*kZ12; | |
1594 | gMC->Gsposp("CC2A", 15, "CM12",kXMC2D,kYMC2Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1595 | gMC->Gsposp("CC2A", 16, "CM12",-kXMC2D,kYMC2Em,kZMCm, 0, "ONLY", tpar, 3); | |
1596 | gMC->Gsposp("CC2A", 17, "CM12",kXMC2D,-kYMC2Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1597 | gMC->Gsposp("CC2A", 18, "CM12",-kXMC2D,-kYMC2Em,kZMCm, 0, "ONLY", tpar, 3); | |
1598 | ||
1599 | ||
1600 | const Float_t kYMC2Fp=kYMC1Fp*kZ12; | |
1601 | const Float_t kYMC2Fm=kYMC1Fm*kZ12; | |
1602 | gMC->Gsposp("CC2A", 19, "CM12",kXMC2D,kYMC2Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1603 | gMC->Gsposp("CC2A", 20, "CM12",-kXMC2D,kYMC2Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1604 | gMC->Gsposp("CC2A", 21, "CM12",kXMC2D,-kYMC2Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1605 | gMC->Gsposp("CC2A", 22, "CM12",-kXMC2D,-kYMC2Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1606 | ||
1607 | // Positioning second plane of station 1 in ALICE | |
1608 | ||
1609 | gMC->Gspos("CM12", 1, "ALIC", 0., 0., zpos2, 0, "ONLY"); | |
1610 | ||
1611 | // End of geometry definition for the second plane of station 1 | |
1612 | ||
1613 | ||
1614 | ||
1615 | // TRIGGER STATION 2 - TRIGGER STATION 2 - TRIGGER STATION 2 | |
1616 | ||
1617 | // 03/00 | |
1618 | // zpos3 and zpos4 are now the middle of the first and second | |
1619 | // plane of station 2 : | |
1620 | // zpos3=(17075+16995)/2=17035 mm, thick/2=40 mm | |
1621 | // zpos4=(17225+17145)/2=17185 mm, thick/2=40 mm | |
1622 | // | |
1623 | // zpos3m=16999 mm , zpos3p=17071 mm (middles of gas gaps) | |
1624 | // zpos4m=17149 mm , zpos4p=17221 mm (middles of gas gaps) | |
1625 | // rem : the total thickness accounts for 1 mm of al on both | |
1626 | // side of the RPCs (see zpos3 and zpos4), as previously | |
1627 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[12]; | |
1628 | iChamber2 =(AliMUONChamber*) (*fChambers)[13]; | |
1629 | Float_t zpos3=iChamber1->Z(); | |
1630 | Float_t zpos4=iChamber2->Z(); | |
1631 | ||
1632 | ||
1633 | // Mother volume definition | |
1634 | tpar[0] = iChamber->RInner(); | |
1635 | tpar[1] = iChamber->ROuter(); | |
1636 | tpar[2] = 4.0; | |
1637 | ||
1638 | gMC->Gsvolu("CM21", "TUBE", idAir, tpar, 3); | |
1639 | gMC->Gsvolu("CM22", "TUBE", idAir, tpar, 3); | |
1640 | ||
1641 | // Definition of the flange between the beam shielding and the RPC | |
1642 | // ???? interface shielding | |
1643 | ||
1644 | tpar[0]= kRMIN2; | |
1645 | tpar[1]= kRMAX2; | |
1646 | tpar[2]= 4.0; | |
1647 | ||
1648 | gMC->Gsvolu("CF2A", "TUBE", idAlu1, tpar, 3); //Al | |
1649 | gMC->Gspos("CF2A", 1, "CM21", 0., 0., 0., 0, "MANY"); | |
1650 | gMC->Gspos("CF2A", 2, "CM22", 0., 0., 0., 0, "MANY"); | |
1651 | ||
1652 | ||
1653 | ||
1654 | // FIRST PLANE OF STATION 2 : proj ratio = zpos3/zpos1 | |
1655 | ||
1656 | const Float_t kZ13=zpos3/zpos1; | |
1657 | ||
1658 | // Definition of prototype for chambers in the first plane of station 2 | |
1659 | tpar[0]= 0.; | |
1660 | tpar[1]= 0.; | |
1661 | tpar[2]= 0.; | |
1662 | ||
1663 | gMC->Gsvolu("CC3A", "BOX ", idAlu1, tpar, 0); //Al | |
1664 | gMC->Gsvolu("CB3A", "BOX ", idtmed[1107], tpar, 0); //Bakelite | |
1665 | gMC->Gsvolu("CG3A", "BOX ", idtmed[1106], tpar, 0); //Gas streamer | |
1666 | ||
1667 | ||
1668 | // chamber type A | |
1669 | tpar[0] = -1.; | |
1670 | tpar[1] = -1.; | |
1671 | ||
1672 | const Float_t kXMC3A=kXMC1A*kZ13; | |
1673 | const Float_t kYMC3Am=0.; | |
1674 | const Float_t kYMC3Ap=0.; | |
1675 | ||
1676 | tpar[2] = 0.1; | |
1677 | gMC->Gsposp("CG3A", 1, "CB3A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1678 | tpar[2] = 0.3; | |
1679 | gMC->Gsposp("CB3A", 1, "CC3A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1680 | ||
1681 | tpar[2] = 0.4; | |
1682 | tpar[0] = ((kXMC1MAX-kXMC1MED)/2.)*kZ13; | |
1683 | tpar[1] = kYMC1MIN*kZ13; | |
1684 | gMC->Gsposp("CC3A", 1, "CM21",kXMC3A,kYMC3Am,kZMCm, 0, "ONLY", tpar, 3); | |
1685 | gMC->Gsposp("CC3A", 2, "CM21",-kXMC3A,kYMC3Ap,kZMCp, 0, "ONLY", tpar, 3); | |
1686 | ||
1687 | ||
1688 | // chamber type B | |
1689 | tpar[0] = ((kXMC1MAX-kXMC1MIN)/2.)*kZ13; | |
1690 | tpar[1] = ((kYMC1MAX-kYMC1MIN)/2.)*kZ13; | |
1691 | ||
1692 | const Float_t kXMC3B=kXMC1B*kZ13; | |
1693 | const Float_t kYMC3Bp=kYMC1Bp*kZ13; | |
1694 | const Float_t kYMC3Bm=kYMC1Bm*kZ13; | |
1695 | gMC->Gsposp("CC3A", 3, "CM21",kXMC3B,kYMC3Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1696 | gMC->Gsposp("CC3A", 4, "CM21",-kXMC3B,kYMC3Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1697 | gMC->Gsposp("CC3A", 5, "CM21",kXMC3B,-kYMC3Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1698 | gMC->Gsposp("CC3A", 6, "CM21",-kXMC3B,-kYMC3Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1699 | ||
1700 | ||
1701 | // chamber type C (end of type B !!) | |
1702 | tpar[0] = (kXMC1MAX/2)*kZ13; | |
1703 | tpar[1] = (kYMC1MAX/2)*kZ13; | |
1704 | ||
1705 | const Float_t kXMC3C=kXMC1C*kZ13; | |
1706 | const Float_t kYMC3Cp=kYMC1Cp*kZ13; | |
1707 | const Float_t kYMC3Cm=kYMC1Cm*kZ13; | |
1708 | gMC->Gsposp("CC3A", 7, "CM21",kXMC3C,kYMC3Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1709 | gMC->Gsposp("CC3A", 8, "CM21",-kXMC3C,kYMC3Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1710 | gMC->Gsposp("CC3A", 9, "CM21",kXMC3C,-kYMC3Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1711 | gMC->Gsposp("CC3A", 10, "CM21",-kXMC3C,-kYMC3Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1712 | ||
1713 | ||
1714 | // chamber type D, E and F (same size) | |
1715 | ||
1716 | tpar[0] = (kXMC1MAX/2.)*kZ13; | |
1717 | tpar[1] = kYMC1MIN*kZ13; | |
1718 | ||
1719 | const Float_t kXMC3D=kXMC1D*kZ13; | |
1720 | const Float_t kYMC3Dp=kYMC1Dp*kZ13; | |
1721 | const Float_t kYMC3Dm=kYMC1Dm*kZ13; | |
1722 | gMC->Gsposp("CC3A", 11, "CM21",kXMC3D,kYMC3Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1723 | gMC->Gsposp("CC3A", 12, "CM21",-kXMC3D,kYMC3Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1724 | gMC->Gsposp("CC3A", 13, "CM21",kXMC3D,-kYMC3Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1725 | gMC->Gsposp("CC3A", 14, "CM21",-kXMC3D,-kYMC3Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1726 | ||
1727 | const Float_t kYMC3Ep=kYMC1Ep*kZ13; | |
1728 | const Float_t kYMC3Em=kYMC1Em*kZ13; | |
1729 | gMC->Gsposp("CC3A", 15, "CM21",kXMC3D,kYMC3Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1730 | gMC->Gsposp("CC3A", 16, "CM21",-kXMC3D,kYMC3Em,kZMCm, 0, "ONLY", tpar, 3); | |
1731 | gMC->Gsposp("CC3A", 17, "CM21",kXMC3D,-kYMC3Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1732 | gMC->Gsposp("CC3A", 18, "CM21",-kXMC3D,-kYMC3Em,kZMCm, 0, "ONLY", tpar, 3); | |
1733 | ||
1734 | const Float_t kYMC3Fp=kYMC1Fp*kZ13; | |
1735 | const Float_t kYMC3Fm=kYMC1Fm*kZ13; | |
1736 | gMC->Gsposp("CC3A", 19, "CM21",kXMC3D,kYMC3Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1737 | gMC->Gsposp("CC3A", 20, "CM21",-kXMC3D,kYMC3Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1738 | gMC->Gsposp("CC3A", 21, "CM21",kXMC3D,-kYMC3Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1739 | gMC->Gsposp("CC3A", 22, "CM21",-kXMC3D,-kYMC3Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1740 | ||
1741 | ||
1742 | // Positioning first plane of station 2 in ALICE | |
1743 | ||
1744 | gMC->Gspos("CM21", 1, "ALIC", 0., 0., zpos3, 0, "ONLY"); | |
1745 | ||
1746 | // End of geometry definition for the first plane of station 2 | |
1747 | ||
1748 | ||
1749 | ||
1750 | ||
1751 | // SECOND PLANE OF STATION 2 : proj ratio = zpos4/zpos1 | |
1752 | ||
1753 | const Float_t kZ14=zpos4/zpos1; | |
1754 | ||
1755 | // Definition of prototype for chambers in the second plane of station 2 | |
1756 | ||
1757 | tpar[0]= 0.; | |
1758 | tpar[1]= 0.; | |
1759 | tpar[2]= 0.; | |
1760 | ||
1761 | gMC->Gsvolu("CC4A", "BOX ", idAlu1, tpar, 0); //Al | |
1762 | gMC->Gsvolu("CB4A", "BOX ", idtmed[1107], tpar, 0); //Bakelite | |
1763 | gMC->Gsvolu("CG4A", "BOX ", idtmed[1106], tpar, 0); //Gas streamer | |
1764 | ||
1765 | // chamber type A | |
1766 | tpar[0] = -1.; | |
1767 | tpar[1] = -1.; | |
1768 | ||
1769 | const Float_t kXMC4A=kXMC1A*kZ14; | |
1770 | const Float_t kYMC4Am=0.; | |
1771 | const Float_t kYMC4Ap=0.; | |
1772 | ||
1773 | tpar[2] = 0.1; | |
1774 | gMC->Gsposp("CG4A", 1, "CB4A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1775 | tpar[2] = 0.3; | |
1776 | gMC->Gsposp("CB4A", 1, "CC4A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1777 | ||
1778 | tpar[2] = 0.4; | |
1779 | tpar[0] = ((kXMC1MAX-kXMC1MED)/2.)*kZ14; | |
1780 | tpar[1] = kYMC1MIN*kZ14; | |
1781 | gMC->Gsposp("CC4A", 1, "CM22",kXMC4A,kYMC4Am,kZMCm, 0, "ONLY", tpar, 3); | |
1782 | gMC->Gsposp("CC4A", 2, "CM22",-kXMC4A,kYMC4Ap,kZMCp, 0, "ONLY", tpar, 3); | |
1783 | ||
1784 | ||
1785 | // chamber type B | |
1786 | tpar[0] = ((kXMC1MAX-kXMC1MIN)/2.)*kZ14; | |
1787 | tpar[1] = ((kYMC1MAX-kYMC1MIN)/2.)*kZ14; | |
1788 | ||
1789 | const Float_t kXMC4B=kXMC1B*kZ14; | |
1790 | const Float_t kYMC4Bp=kYMC1Bp*kZ14; | |
1791 | const Float_t kYMC4Bm=kYMC1Bm*kZ14; | |
1792 | gMC->Gsposp("CC4A", 3, "CM22",kXMC4B,kYMC4Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1793 | gMC->Gsposp("CC4A", 4, "CM22",-kXMC4B,kYMC4Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1794 | gMC->Gsposp("CC4A", 5, "CM22",kXMC4B,-kYMC4Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1795 | gMC->Gsposp("CC4A", 6, "CM22",-kXMC4B,-kYMC4Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1796 | ||
1797 | ||
1798 | // chamber type C (end of type B !!) | |
1799 | tpar[0] =(kXMC1MAX/2)*kZ14; | |
1800 | tpar[1] = (kYMC1MAX/2)*kZ14; | |
1801 | ||
1802 | const Float_t kXMC4C=kXMC1C*kZ14; | |
1803 | const Float_t kYMC4Cp=kYMC1Cp*kZ14; | |
1804 | const Float_t kYMC4Cm=kYMC1Cm*kZ14; | |
1805 | gMC->Gsposp("CC4A", 7, "CM22",kXMC4C,kYMC4Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1806 | gMC->Gsposp("CC4A", 8, "CM22",-kXMC4C,kYMC4Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1807 | gMC->Gsposp("CC4A", 9, "CM22",kXMC4C,-kYMC4Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1808 | gMC->Gsposp("CC4A", 10, "CM22",-kXMC4C,-kYMC4Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1809 | ||
1810 | ||
1811 | // chamber type D, E and F (same size) | |
1812 | tpar[0] = (kXMC1MAX/2.)*kZ14; | |
1813 | tpar[1] = kYMC1MIN*kZ14; | |
1814 | ||
1815 | const Float_t kXMC4D=kXMC1D*kZ14; | |
1816 | const Float_t kYMC4Dp=kYMC1Dp*kZ14; | |
1817 | const Float_t kYMC4Dm=kYMC1Dm*kZ14; | |
1818 | gMC->Gsposp("CC4A", 11, "CM22",kXMC4D,kYMC4Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1819 | gMC->Gsposp("CC4A", 12, "CM22",-kXMC4D,kYMC4Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1820 | gMC->Gsposp("CC4A", 13, "CM22",kXMC4D,-kYMC4Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1821 | gMC->Gsposp("CC4A", 14, "CM22",-kXMC4D,-kYMC4Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1822 | ||
1823 | const Float_t kYMC4Ep=kYMC1Ep*kZ14; | |
1824 | const Float_t kYMC4Em=kYMC1Em*kZ14; | |
1825 | gMC->Gsposp("CC4A", 15, "CM22",kXMC4D,kYMC4Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1826 | gMC->Gsposp("CC4A", 16, "CM22",-kXMC4D,kYMC4Em,kZMCm, 0, "ONLY", tpar, 3); | |
1827 | gMC->Gsposp("CC4A", 17, "CM22",kXMC4D,-kYMC4Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1828 | gMC->Gsposp("CC4A", 18, "CM22",-kXMC4D,-kYMC4Em,kZMCm, 0, "ONLY", tpar, 3); | |
1829 | ||
1830 | const Float_t kYMC4Fp=kYMC1Fp*kZ14; | |
1831 | const Float_t kYMC4Fm=kYMC1Fm*kZ14; | |
1832 | gMC->Gsposp("CC4A", 19, "CM22",kXMC4D,kYMC4Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1833 | gMC->Gsposp("CC4A", 20, "CM22",-kXMC4D,kYMC4Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1834 | gMC->Gsposp("CC4A", 21, "CM22",kXMC4D,-kYMC4Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1835 | gMC->Gsposp("CC4A", 22, "CM22",-kXMC4D,-kYMC4Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1836 | ||
1837 | ||
1838 | // Positioning second plane of station 2 in ALICE | |
1839 | ||
1840 | gMC->Gspos("CM22", 1, "ALIC", 0., 0., zpos4, 0, "ONLY"); | |
1841 | ||
1842 | // End of geometry definition for the second plane of station 2 | |
1843 | ||
1844 | // End of trigger geometry definition | |
1845 | ||
1846 | } | |
1847 | ||
1848 | ||
1849 | ||
1850 | //___________________________________________ | |
1851 | void AliMUONv1::CreateMaterials() | |
1852 | { | |
1853 | // *** DEFINITION OF AVAILABLE MUON MATERIALS *** | |
1854 | // | |
b64652f5 | 1855 | // Ar-CO2 gas (80%+20%) |
a9e2aefa | 1856 | Float_t ag1[3] = { 39.95,12.01,16. }; |
1857 | Float_t zg1[3] = { 18.,6.,8. }; | |
1858 | Float_t wg1[3] = { .8,.0667,.13333 }; | |
1859 | Float_t dg1 = .001821; | |
1860 | // | |
1861 | // Ar-buthane-freon gas -- trigger chambers | |
1862 | Float_t atr1[4] = { 39.95,12.01,1.01,19. }; | |
1863 | Float_t ztr1[4] = { 18.,6.,1.,9. }; | |
1864 | Float_t wtr1[4] = { .56,.1262857,.2857143,.028 }; | |
1865 | Float_t dtr1 = .002599; | |
1866 | // | |
1867 | // Ar-CO2 gas | |
1868 | Float_t agas[3] = { 39.95,12.01,16. }; | |
1869 | Float_t zgas[3] = { 18.,6.,8. }; | |
1870 | Float_t wgas[3] = { .74,.086684,.173316 }; | |
1871 | Float_t dgas = .0018327; | |
1872 | // | |
1873 | // Ar-Isobutane gas (80%+20%) -- tracking | |
1874 | Float_t ag[3] = { 39.95,12.01,1.01 }; | |
1875 | Float_t zg[3] = { 18.,6.,1. }; | |
1876 | Float_t wg[3] = { .8,.057,.143 }; | |
1877 | Float_t dg = .0019596; | |
1878 | // | |
1879 | // Ar-Isobutane-Forane-SF6 gas (49%+7%+40%+4%) -- trigger | |
1880 | Float_t atrig[5] = { 39.95,12.01,1.01,19.,32.066 }; | |
1881 | Float_t ztrig[5] = { 18.,6.,1.,9.,16. }; | |
1882 | Float_t wtrig[5] = { .49,1.08,1.5,1.84,0.04 }; | |
1883 | Float_t dtrig = .0031463; | |
1884 | // | |
1885 | // bakelite | |
1886 | ||
1887 | Float_t abak[3] = {12.01 , 1.01 , 16.}; | |
1888 | Float_t zbak[3] = {6. , 1. , 8.}; | |
1889 | Float_t wbak[3] = {6. , 6. , 1.}; | |
1890 | Float_t dbak = 1.4; | |
1891 | ||
1892 | Float_t epsil, stmin, deemax, tmaxfd, stemax; | |
1893 | ||
1894 | Int_t iSXFLD = gAlice->Field()->Integ(); | |
1895 | Float_t sXMGMX = gAlice->Field()->Max(); | |
1896 | // | |
1897 | // --- Define the various materials for GEANT --- | |
1898 | AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); | |
1899 | AliMaterial(10, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); | |
1900 | AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500); | |
1901 | AliMixture(19, "Bakelite$", abak, zbak, dbak, -3, wbak); | |
1902 | AliMixture(20, "ArC4H10 GAS$", ag, zg, dg, 3, wg); | |
1903 | AliMixture(21, "TRIG GAS$", atrig, ztrig, dtrig, -5, wtrig); | |
1904 | AliMixture(22, "ArCO2 80%$", ag1, zg1, dg1, 3, wg1); | |
1905 | AliMixture(23, "Ar-freon $", atr1, ztr1, dtr1, 4, wtr1); | |
1906 | AliMixture(24, "ArCO2 GAS$", agas, zgas, dgas, 3, wgas); | |
1e8fff9c | 1907 | // materials for slat: |
1908 | // Sensitive area: gas (already defined) | |
1909 | // PCB: copper | |
1910 | // insulating material and frame: vetronite | |
1911 | // walls: carbon, rohacell, carbon | |
1912 | Float_t aglass[5]={12.01, 28.09, 16., 10.8, 23.}; | |
1913 | Float_t zglass[5]={ 6., 14., 8., 5., 11.}; | |
1914 | Float_t wglass[5]={ 0.5, 0.105, 0.355, 0.03, 0.01}; | |
1915 | Float_t dglass=1.74; | |
1916 | ||
1917 | // rohacell: C9 H13 N1 O2 | |
1918 | Float_t arohac[4] = {12.01, 1.01, 14.010, 16.}; | |
1919 | Float_t zrohac[4] = { 6., 1., 7., 8.}; | |
1920 | Float_t wrohac[4] = { 9., 13., 1., 2.}; | |
1921 | Float_t drohac = 0.03; | |
1922 | ||
1923 | AliMaterial(31, "COPPER$", 63.54, 29., 8.96, 1.4, 0.); | |
1924 | AliMixture(32, "Vetronite$",aglass, zglass, dglass, 5, wglass); | |
1925 | AliMaterial(33, "Carbon$", 12.01, 6., 2.265, 18.8, 49.9); | |
1926 | AliMixture(34, "Rohacell$", arohac, zrohac, drohac, -4, wrohac); | |
1927 | ||
a9e2aefa | 1928 | |
1929 | epsil = .001; // Tracking precision, | |
1930 | stemax = -1.; // Maximum displacement for multiple scat | |
1931 | tmaxfd = -20.; // Maximum angle due to field deflection | |
1932 | deemax = -.3; // Maximum fractional energy loss, DLS | |
1933 | stmin = -.8; | |
1934 | // | |
1935 | // Air | |
1936 | AliMedium(1, "AIR_CH_US ", 15, 1, iSXFLD, sXMGMX, tmaxfd, stemax, deemax, epsil, stmin); | |
1937 | // | |
1938 | // Aluminum | |
1939 | ||
1940 | AliMedium(4, "ALU_CH_US ", 9, 0, iSXFLD, sXMGMX, tmaxfd, fMaxStepAlu, | |
1941 | fMaxDestepAlu, epsil, stmin); | |
1942 | AliMedium(5, "ALU_CH_US ", 10, 0, iSXFLD, sXMGMX, tmaxfd, fMaxStepAlu, | |
1943 | fMaxDestepAlu, epsil, stmin); | |
1944 | // | |
1945 | // Ar-isoC4H10 gas | |
1946 | ||
1947 | AliMedium(6, "AR_CH_US ", 20, 1, iSXFLD, sXMGMX, tmaxfd, fMaxStepGas, | |
1948 | fMaxDestepGas, epsil, stmin); | |
1949 | // | |
1950 | // Ar-Isobuthane-Forane-SF6 gas | |
1951 | ||
1952 | AliMedium(7, "GAS_CH_TRIGGER ", 21, 1, iSXFLD, sXMGMX, tmaxfd, stemax, deemax, epsil, stmin); | |
1953 | ||
1954 | AliMedium(8, "BAKE_CH_TRIGGER ", 19, 0, iSXFLD, sXMGMX, tmaxfd, fMaxStepAlu, | |
1955 | fMaxDestepAlu, epsil, stmin); | |
1956 | ||
1957 | AliMedium(9, "ARG_CO2 ", 22, 1, iSXFLD, sXMGMX, tmaxfd, fMaxStepGas, | |
1958 | fMaxDestepAlu, epsil, stmin); | |
1e8fff9c | 1959 | // tracking media for slats: check the parameters!! |
1960 | AliMedium(11, "PCB_COPPER ", 31, 0, iSXFLD, sXMGMX, tmaxfd, | |
1961 | fMaxStepAlu, fMaxDestepAlu, epsil, stmin); | |
1962 | AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, sXMGMX, tmaxfd, | |
1963 | fMaxStepAlu, fMaxDestepAlu, epsil, stmin); | |
1964 | AliMedium(13, "CARBON ", 33, 0, iSXFLD, sXMGMX, tmaxfd, | |
1965 | fMaxStepAlu, fMaxDestepAlu, epsil, stmin); | |
1966 | AliMedium(14, "Rohacell ", 34, 0, iSXFLD, sXMGMX, tmaxfd, | |
1967 | fMaxStepAlu, fMaxDestepAlu, epsil, stmin); | |
a9e2aefa | 1968 | } |
1969 | ||
1970 | //___________________________________________ | |
1971 | ||
1972 | void AliMUONv1::Init() | |
1973 | { | |
1974 | // | |
1975 | // Initialize Tracking Chambers | |
1976 | // | |
1977 | ||
9e1a0ddb | 1978 | if(fDebug) printf("\n%s: Start Init for version 1 - CPC chamber type\n\n",ClassName()); |
e17592e9 | 1979 | Int_t i; |
f665c1ea | 1980 | for (i=0; i<AliMUONConstants::NCh(); i++) { |
a9e2aefa | 1981 | ( (AliMUONChamber*) (*fChambers)[i])->Init(); |
1982 | } | |
1983 | ||
1984 | // | |
1985 | // Set the chamber (sensitive region) GEANT identifier | |
1986 | AliMC* gMC = AliMC::GetMC(); | |
1987 | ((AliMUONChamber*)(*fChambers)[0])->SetGid(gMC->VolId("C01G")); | |
1988 | ((AliMUONChamber*)(*fChambers)[1])->SetGid(gMC->VolId("C02G")); | |
b17c0c87 | 1989 | |
a9e2aefa | 1990 | ((AliMUONChamber*)(*fChambers)[2])->SetGid(gMC->VolId("C03G")); |
1991 | ((AliMUONChamber*)(*fChambers)[3])->SetGid(gMC->VolId("C04G")); | |
b17c0c87 | 1992 | |
1e8fff9c | 1993 | ((AliMUONChamber*)(*fChambers)[4])->SetGid(gMC->VolId("S05G")); |
1994 | ((AliMUONChamber*)(*fChambers)[5])->SetGid(gMC->VolId("S06G")); | |
b17c0c87 | 1995 | |
1e8fff9c | 1996 | ((AliMUONChamber*)(*fChambers)[6])->SetGid(gMC->VolId("S07G")); |
1997 | ((AliMUONChamber*)(*fChambers)[7])->SetGid(gMC->VolId("S08G")); | |
b17c0c87 | 1998 | |
1e8fff9c | 1999 | ((AliMUONChamber*)(*fChambers)[8])->SetGid(gMC->VolId("S09G")); |
2000 | ((AliMUONChamber*)(*fChambers)[9])->SetGid(gMC->VolId("S10G")); | |
b17c0c87 | 2001 | |
a9e2aefa | 2002 | ((AliMUONChamber*)(*fChambers)[10])->SetGid(gMC->VolId("CG1A")); |
2003 | ((AliMUONChamber*)(*fChambers)[11])->SetGid(gMC->VolId("CG2A")); | |
2004 | ((AliMUONChamber*)(*fChambers)[12])->SetGid(gMC->VolId("CG3A")); | |
2005 | ((AliMUONChamber*)(*fChambers)[13])->SetGid(gMC->VolId("CG4A")); | |
2006 | ||
9e1a0ddb | 2007 | if(fDebug) printf("\n%s: Finished Init for version 1 - CPC chamber type\n",ClassName()); |
a9e2aefa | 2008 | |
2009 | //cp | |
9e1a0ddb | 2010 | if(fDebug) printf("\n%s: Start Init for Trigger Circuits\n",ClassName()); |
f665c1ea | 2011 | for (i=0; i<AliMUONConstants::NTriggerCircuit(); i++) { |
a9e2aefa | 2012 | ( (AliMUONTriggerCircuit*) (*fTriggerCircuits)[i])->Init(i); |
2013 | } | |
9e1a0ddb | 2014 | if(fDebug) printf("%s: Finished Init for Trigger Circuits\n",ClassName()); |
a9e2aefa | 2015 | //cp |
2016 | ||
2017 | } | |
2018 | ||
2019 | //___________________________________________ | |
2020 | void AliMUONv1::StepManager() | |
2021 | { | |
2022 | Int_t copy, id; | |
2023 | static Int_t idvol; | |
2024 | static Int_t vol[2]; | |
2025 | Int_t ipart; | |
2026 | TLorentzVector pos; | |
2027 | TLorentzVector mom; | |
2028 | Float_t theta,phi; | |
2029 | Float_t destep, step; | |
681d067b | 2030 | |
1e8fff9c | 2031 | static Float_t eloss, eloss2, xhit, yhit, zhit, tof, tlength; |
2eb55fab | 2032 | const Float_t kBig = 1.e10; |
a9e2aefa | 2033 | static Float_t hits[15]; |
2034 | ||
2035 | TClonesArray &lhits = *fHits; | |
2036 | ||
2037 | // | |
a9e2aefa | 2038 | // |
2039 | // Only charged tracks | |
2040 | if( !(gMC->TrackCharge()) ) return; | |
2041 | // | |
2042 | // Only gas gap inside chamber | |
2043 | // Tag chambers and record hits when track enters | |
2044 | idvol=-1; | |
2045 | id=gMC->CurrentVolID(copy); | |
2046 | ||
2eb55fab | 2047 | for (Int_t i = 1; i <= AliMUONConstants::NCh(); i++) { |
a9e2aefa | 2048 | if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){ |
2eb55fab | 2049 | vol[0] = i; |
2050 | idvol = i-1; | |
a9e2aefa | 2051 | } |
2052 | } | |
2053 | if (idvol == -1) return; | |
2054 | // | |
2055 | // Get current particle id (ipart), track position (pos) and momentum (mom) | |
2056 | gMC->TrackPosition(pos); | |
2057 | gMC->TrackMomentum(mom); | |
2058 | ||
2059 | ipart = gMC->TrackPid(); | |
a9e2aefa | 2060 | |
2061 | // | |
2062 | // momentum loss and steplength in last step | |
2063 | destep = gMC->Edep(); | |
2064 | step = gMC->TrackStep(); | |
2065 | ||
2066 | // | |
2067 | // record hits when track enters ... | |
2068 | if( gMC->IsTrackEntering()) { | |
2069 | gMC->SetMaxStep(fMaxStepGas); | |
2070 | Double_t tc = mom[0]*mom[0]+mom[1]*mom[1]; | |
2071 | Double_t rt = TMath::Sqrt(tc); | |
2072 | Double_t pmom = TMath::Sqrt(tc+mom[2]*mom[2]); | |
2eb55fab | 2073 | Double_t tx = mom[0]/pmom; |
2074 | Double_t ty = mom[1]/pmom; | |
2075 | Double_t tz = mom[2]/pmom; | |
2076 | Double_t s = ((AliMUONChamber*)(*fChambers)[idvol]) | |
a9e2aefa | 2077 | ->ResponseModel() |
2078 | ->Pitch()/tz; | |
2079 | theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg; | |
2080 | phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg; | |
2081 | hits[0] = Float_t(ipart); // Geant3 particle type | |
2eb55fab | 2082 | hits[1] = pos[0]+s*tx; // X-position for hit |
2083 | hits[2] = pos[1]+s*ty; // Y-position for hit | |
2084 | hits[3] = pos[2]+s*tz; // Z-position for hit | |
a9e2aefa | 2085 | hits[4] = theta; // theta angle of incidence |
2086 | hits[5] = phi; // phi angle of incidence | |
2eb55fab | 2087 | hits[8] = (Float_t) fNPadHits; // first padhit |
a9e2aefa | 2088 | hits[9] = -1; // last pad hit |
2eb55fab | 2089 | hits[10] = mom[3]; // hit momentum P |
2090 | hits[11] = mom[0]; // Px | |
2091 | hits[12] = mom[1]; // Py | |
2092 | hits[13] = mom[2]; // Pz | |
a9e2aefa | 2093 | tof=gMC->TrackTime(); |
2eb55fab | 2094 | hits[14] = tof; // Time of flight |
2095 | tlength = 0; | |
2096 | eloss = 0; | |
2097 | eloss2 = 0; | |
2098 | xhit = pos[0]; | |
2099 | yhit = pos[1]; | |
2100 | zhit = pos[2]; | |
681d067b | 2101 | Chamber(idvol).ChargeCorrelationInit(); |
a9e2aefa | 2102 | // Only if not trigger chamber |
1e8fff9c | 2103 | |
2104 | ||
2105 | ||
2106 | ||
2eb55fab | 2107 | if(idvol < AliMUONConstants::NTrackingCh()) { |
a9e2aefa | 2108 | // |
2109 | // Initialize hit position (cursor) in the segmentation model | |
2110 | ((AliMUONChamber*) (*fChambers)[idvol]) | |
2111 | ->SigGenInit(pos[0], pos[1], pos[2]); | |
2112 | } else { | |
2113 | //geant3->Gpcxyz(); | |
2114 | //printf("In the Trigger Chamber #%d\n",idvol-9); | |
2115 | } | |
2116 | } | |
2117 | eloss2+=destep; | |
2118 | ||
2119 | // | |
2120 | // Calculate the charge induced on a pad (disintegration) in case | |
2121 | // | |
2122 | // Mip left chamber ... | |
2123 | if( gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared()){ | |
2124 | gMC->SetMaxStep(kBig); | |
2125 | eloss += destep; | |
2126 | tlength += step; | |
2127 | ||
802a864d | 2128 | Float_t x0,y0,z0; |
2129 | Float_t localPos[3]; | |
2130 | Float_t globalPos[3] = {pos[0], pos[1], pos[2]}; | |
802a864d | 2131 | gMC->Gmtod(globalPos,localPos,1); |
2132 | ||
2eb55fab | 2133 | if(idvol < AliMUONConstants::NTrackingCh()) { |
a9e2aefa | 2134 | // tracking chambers |
2135 | x0 = 0.5*(xhit+pos[0]); | |
2136 | y0 = 0.5*(yhit+pos[1]); | |
1e8fff9c | 2137 | z0 = 0.5*(zhit+pos[2]); |
a9e2aefa | 2138 | } else { |
2139 | // trigger chambers | |
2eb55fab | 2140 | x0 = xhit; |
2141 | y0 = yhit; | |
2142 | z0 = 0.; | |
a9e2aefa | 2143 | } |
2144 | ||
1e8fff9c | 2145 | |
802a864d | 2146 | if (eloss >0) MakePadHits(x0,y0,z0,eloss,tof,idvol); |
a9e2aefa | 2147 | |
2148 | ||
2eb55fab | 2149 | hits[6] = tlength; // track length |
2150 | hits[7] = eloss2; // de/dx energy loss | |
2151 | ||
a9e2aefa | 2152 | if (fNPadHits > (Int_t)hits[8]) { |
2eb55fab | 2153 | hits[8] = hits[8]+1; |
2154 | hits[9] = (Float_t) fNPadHits; | |
a9e2aefa | 2155 | } |
2eb55fab | 2156 | // |
2157 | // new hit | |
2158 | ||
a9e2aefa | 2159 | new(lhits[fNhits++]) |
2eb55fab | 2160 | AliMUONHit(fIshunt, gAlice->CurrentTrack(), vol,hits); |
a9e2aefa | 2161 | eloss = 0; |
2162 | // | |
2163 | // Check additional signal generation conditions | |
2164 | // defined by the segmentation | |
a75f073c | 2165 | // model (boundary crossing conditions) |
2166 | // only for tracking chambers | |
a9e2aefa | 2167 | } else if |
a75f073c | 2168 | ((idvol < AliMUONConstants::NTrackingCh()) && |
2169 | ((AliMUONChamber*) (*fChambers)[idvol])->SigGenCond(pos[0], pos[1], pos[2])) | |
a9e2aefa | 2170 | { |
2171 | ((AliMUONChamber*) (*fChambers)[idvol]) | |
2172 | ->SigGenInit(pos[0], pos[1], pos[2]); | |
802a864d | 2173 | |
2174 | Float_t localPos[3]; | |
2175 | Float_t globalPos[3] = {pos[0], pos[1], pos[2]}; | |
2176 | gMC->Gmtod(globalPos,localPos,1); | |
2177 | ||
e0f71fb7 | 2178 | eloss += destep; |
802a864d | 2179 | |
a75f073c | 2180 | if (eloss > 0 && idvol < AliMUONConstants::NTrackingCh()) |
1e8fff9c | 2181 | MakePadHits(0.5*(xhit+pos[0]),0.5*(yhit+pos[1]),pos[2],eloss,tof,idvol); |
a9e2aefa | 2182 | xhit = pos[0]; |
2183 | yhit = pos[1]; | |
e0f71fb7 | 2184 | zhit = pos[2]; |
2185 | eloss = 0; | |
a9e2aefa | 2186 | tlength += step ; |
2187 | // | |
2188 | // nothing special happened, add up energy loss | |
2189 | } else { | |
2190 | eloss += destep; | |
2191 | tlength += step ; | |
2192 | } | |
2193 | } | |
2194 | ||
2195 |