1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.6 2002/10/14 14:57:43 hristov
19 Merging the VirtualMC branch to the main development branch (HEAD)
21 Revision 1.3.6.2 2002/07/24 10:09:30 alibrary
24 Revision 1.5 2002/06/12 09:54:35 cblume
25 Update of tracking code provided by Sergei
27 Revision 1.4 2002/03/28 14:59:07 cblume
30 Revision 1.3 2002/02/11 14:21:16 cblume
31 Update of the geometry. Get rid of MANY
33 Revision 1.2 2001/11/08 13:13:08 cblume
34 Change to MANY for UCFI/M/O and UAFI/M/O
36 Revision 1.1 2001/11/06 17:19:41 cblume
37 Add detailed geometry and simple simulator
41 ///////////////////////////////////////////////////////////////////////////////
43 // Detailed TRD geometry for the spaceframe without holes //
45 ///////////////////////////////////////////////////////////////////////////////
47 #include "TVirtualMC.h"
49 #include "AliTRDgeometryDetail.h"
50 #include "AliTRDparameter.h"
52 ClassImp(AliTRDgeometryDetail)
54 //_____________________________________________________________________________
55 AliTRDgeometryDetail::AliTRDgeometryDetail():AliTRDgeometryFull()
58 // AliTRDgeometryDetail default constructor
65 //_____________________________________________________________________________
66 AliTRDgeometryDetail::~AliTRDgeometryDetail()
69 // AliTRDgeometryDetail destructor
74 //_____________________________________________________________________________
75 void AliTRDgeometryDetail::Init()
78 // Initializes the geometry parameter
81 AliTRDgeometryFull::Init();
85 //_____________________________________________________________________________
86 void AliTRDgeometryDetail::CreateGeometry(Int_t *idtmed)
89 // Create the detailed TRD geometry without hole
90 // including the MCMs and the cooling pipes
93 // Names of the TRD volumina (xx = detector number):
95 // Lower part of the readout chambers (gas volume + radiator)
97 // UAxx Aluminum frames (Al)
98 // UBxx G10 frames (C)
99 // UCxx Inner volumes (Air)
101 // Upper part of the readout chambers (readout plane + fee)
103 // UDxx G10 frames (C)
104 // UExx Inner volumes of the G10 (Air)
105 // UFxx Aluminum frames (Al)
106 // UGxx Inner volumes of the Al (Air)
108 // Inner material layers
110 // UHxx Radiator (Rohacell)
111 // UIxx Entrance window (Mylar)
112 // UJxx Drift volume (Xe/CO2)
113 // UKxx Amplification volume (Xe/CO2)
114 // ULxx Pad plane (Cu)
115 // UMxx Support structure (Rohacell)
116 // UNxx FEE + signal lines (Cu)
119 const Int_t kNparTrd = 4;
120 const Int_t kNparCha = 3;
122 Float_t xpos, ypos, zpos;
124 Float_t parTrd[kNparTrd];
125 Float_t parCha[kNparCha];
133 gMC->Matrix(idrotm, 0.0, 0.0, 90.0, 90.0, 90.0, 0.0);
135 // The TRD mother volume for one sector (Air), full length in z-direction
136 parTrd[0] = fgkSwidth1/2.;
137 parTrd[1] = fgkSwidth2/2.;
138 parTrd[2] = fgkSlenTR1/2.;
139 parTrd[3] = fgkSheight/2.;
140 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
142 // Create the readout volumina
143 CreateReadout(idtmed);
145 // Create the volumina for the cooling
146 CreateCooling(idtmed);
148 for (Int_t icham = 0; icham < kNcham; icham++) {
149 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
151 Int_t iDet = GetDetectorSec(iplan,icham);
153 // The lower part of the readout chambers (gas volume + radiator)
154 // The aluminum frames
155 sprintf(cTagV,"UA%02d",iDet);
156 parCha[0] = fCwidth[iplan]/2.;
157 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
158 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
159 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
161 sprintf(cTagV,"UB%02d",iDet);
162 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
165 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
166 // The inner part (air)
167 sprintf(cTagV,"UC%02d",iDet);
168 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
169 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
171 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
173 // The upper part of the readout chambers (readout plane + fee)
175 sprintf(cTagV,"UD%02d",iDet);
176 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
177 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
178 parCha[2] = fgkCamH/2.;
179 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
180 // The inner part of the G10 frame (air)
181 sprintf(cTagV,"UE%02d",iDet);
182 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
183 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
185 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
186 // The aluminum frames
187 sprintf(cTagV,"UF%02d",iDet);
188 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
189 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
190 parCha[2] = fgkCroH/2.;
191 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
192 // The inner part of the aluminum frames
193 sprintf(cTagV,"UG%02d",iDet);
194 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
195 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
197 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
199 // The material layers inside the chambers
202 // Rohacell layer (radiator)
203 parCha[2] = fgkRaThick/2;
204 sprintf(cTagV,"UH%02d",iDet);
205 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
206 // Mylar layer (entrance window + HV cathode)
207 parCha[2] = fgkMyThick/2;
208 sprintf(cTagV,"UI%02d",iDet);
209 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
210 // Xe/Isobutane layer (drift volume)
211 parCha[2] = fgkDrThick/2.;
212 sprintf(cTagV,"UJ%02d",iDet);
213 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
214 // Xe/Isobutane layer (amplification volume)
215 parCha[2] = fgkAmThick/2.;
216 sprintf(cTagV,"UK%02d",iDet);
217 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
218 // Cu layer (pad plane)
219 parCha[2] = fgkCuThick/2;
220 sprintf(cTagV,"UL%02d",iDet);
221 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
222 // G10 layer (support structure / honeycomb)
223 parCha[2] = fgkSuThick/2;
224 sprintf(cTagV,"UM%02d",iDet);
225 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
226 // Cu layer (FEE + signal lines)
227 parCha[2] = fgkFeThick/2;
228 sprintf(cTagV,"UN%02d",iDet);
229 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
231 // Position the layers in the chambers
235 // Rohacell layer (radiator)
237 sprintf(cTagV,"UH%02d",iDet);
238 sprintf(cTagM,"UC%02d",iDet);
239 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
240 // Mylar layer (entrance window + HV cathode)
242 sprintf(cTagV,"UI%02d",iDet);
243 sprintf(cTagM,"UC%02d",iDet);
244 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
245 // Xe/Isobutane layer (drift volume)
247 sprintf(cTagV,"UJ%02d",iDet);
248 sprintf(cTagM,"UC%02d",iDet);
249 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
251 // Xe/Isobutane layer (amplification volume)
253 sprintf(cTagV,"UK%02d",iDet);
254 sprintf(cTagM,"UE%02d",iDet);
255 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
257 // Cu layer (pad plane)
259 sprintf(cTagV,"UL%02d",iDet);
260 sprintf(cTagM,"UG%02d",iDet);
261 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
262 // G10 layer (support structure)
264 sprintf(cTagV,"UM%02d",iDet);
265 sprintf(cTagM,"UG%02d",iDet);
266 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
267 // Cu layer (FEE + signal lines)
269 sprintf(cTagV,"UN%02d",iDet);
270 sprintf(cTagM,"UG%02d",iDet);
271 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
273 // Position the inner volumes of the chambers in the frames
277 // The inside of the lower G10 frame
278 sprintf(cTagV,"UC%02d",iDet);
279 sprintf(cTagM,"UB%02d",iDet);
280 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
281 // The lower G10 frame inside the aluminum frame
282 sprintf(cTagV,"UB%02d",iDet);
283 sprintf(cTagM,"UA%02d",iDet);
284 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
285 // The inside of the upper G10 frame
286 sprintf(cTagV,"UE%02d",iDet);
287 sprintf(cTagM,"UD%02d",iDet);
288 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
289 // The inside of the upper aluminum frame
290 sprintf(cTagV,"UG%02d",iDet);
291 sprintf(cTagM,"UF%02d",iDet);
292 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
294 // Position the frames of the chambers in the TRD mother volume
296 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
297 for (Int_t ic = 0; ic < icham; ic++) {
298 ypos += fClength[iplan][ic];
300 ypos += fClength[iplan][icham]/2.;
301 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
302 // The lower aluminum frame, radiator + drift region
303 sprintf(cTagV,"UA%02d",iDet);
304 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
305 // The upper G10 frame, amplification region
306 sprintf(cTagV,"UD%02d",iDet);
307 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
308 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
309 // The upper aluminum frame
310 sprintf(cTagV,"UF%02d",iDet);
311 zpos += fgkCroH/2. + fgkCamH/2.;
312 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
314 // Position the MCM volumina
315 PositionReadout(iplan,icham);
317 // Position the volumina for the cooling
318 PositionCooling(iplan,icham,idrotm);
326 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
327 gMC->Gspos("UTR1",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
328 gMC->Gspos("UTR1",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
332 //_____________________________________________________________________________
333 void AliTRDgeometryDetail::CreateReadout(Int_t *idtmed) const
336 // Create the volumina of the readout electronics
339 const Int_t kNparBox = 3;
341 Float_t parBox[kNparBox];
346 // The mother volume for the MCMs + connectors (air)
350 gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parBox,kNparBox);
352 // The MCM carrier G10 layer
356 gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parBox,kNparBox);
357 // The MCM carrier Cu layer
360 parBox[2] = 0.0034/2.;
361 gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parBox,kNparBox);
362 // The MCM carrier Sn layer
365 parBox[2] = 0.004/2.;
366 gMC->Gsvolu("UMC3","BOX",idtmed[1317-1],parBox,kNparBox);
367 // The MCM carrier Al layer
371 gMC->Gsvolu("UMC4","BOX",idtmed[1316-1],parBox,kNparBox);
373 // The epoxy of chip no.1
374 parBox[0] = 0.548/2.;
375 parBox[1] = 0.548/2.;
377 gMC->Gsvolu("UCE1","BOX",idtmed[1321-1],parBox,kNparBox);
378 // The silicon of chip no.1
379 parBox[0] = 0.316/2.;
380 parBox[1] = 0.316/2.;
382 gMC->Gsvolu("UCS1","BOX",idtmed[1320-1],parBox,kNparBox);
384 // The epoxy of chip no.2
385 parBox[0] = 1.549/2.;
386 parBox[1] = 1.549/2.;
388 gMC->Gsvolu("UCE2","BOX",idtmed[1321-1],parBox,kNparBox);
389 // The silicon of chip no.2
390 parBox[0] = 0.894/2.;
391 parBox[1] = 0.894/2.;
393 gMC->Gsvolu("UCS2","BOX",idtmed[1320-1],parBox,kNparBox);
395 // The PE of the connector
399 gMC->Gsvolu("UCN1","BOX",idtmed[1322-1],parBox,kNparBox);
400 // The Cu of the connector
403 parBox[2] = 0.005/2.;
404 gMC->Gsvolu("UCN2","BOX",idtmed[1323-1],parBox,kNparBox);
408 zpos = -0.25 + 0.1/2.;
409 gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
410 zpos += 0.1/2. + 0.0034/2.;
411 gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
412 zpos += 0.0034/2 + 0.004/2.;
413 gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
414 zpos += 0.004/2 + 0.05/2.;
415 gMC->Gspos("UMC4",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
416 zpos += 0.05/2. + 0.1/2.;
418 gMC->Gspos("UCE1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
420 gMC->Gspos("UCE2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
421 zpos += 0.1/2. + 0.03/2.;
423 gMC->Gspos("UCS1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
425 gMC->Gspos("UCS2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
427 ypos = 3.4/2. - 0.4/2.;
428 zpos = -0.25 + 0.3/2.;
429 gMC->Gspos("UCN1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
430 zpos += 0.3/2. + 0.005/2.;
431 gMC->Gspos("UCN2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
435 //_____________________________________________________________________________
436 void AliTRDgeometryDetail::PositionReadout(Int_t ipla, Int_t icha)
439 // Position the volumina inside the readout mother volume
442 const Int_t kNmcmChannel = 18;
444 AliTRDparameter *parameter = new AliTRDparameter();
446 Int_t nMCMrow = parameter->GetRowMax(ipla,icha,0);
447 Int_t nMCMcol = parameter->GetColMax(ipla) / kNmcmChannel;
449 Float_t xSize = (GetChamberWidth(ipla) - 2.*fgkCpadW)
450 / ((Float_t) nMCMcol);
451 Float_t ySize = (GetChamberLength(ipla,icha) - 2.*fgkRpadW)
452 / ((Float_t) nMCMrow);
453 Float_t x0 = parameter->GetCol0(ipla);
454 Float_t y0 = parameter->GetRow0(ipla,icha,0);
456 Int_t iCopy = GetDetector(ipla,icha,0) * 1000;
457 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
458 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
460 Float_t xpos = (0.5 + iMCMcol) * xSize + x0;
461 Float_t ypos = (0.5 + iMCMrow) * ySize + y0;
462 Float_t zpos = fgkCH - fgkSheight/2. + 0.5/2.
463 + ipla * (fgkCH + fgkVspace);
464 gMC->Gspos("UMCM",iCopy,"UTR1",xpos,ypos,zpos,0,"ONLY");
472 //_____________________________________________________________________________
473 void AliTRDgeometryDetail::CreateCooling(Int_t *idtmed) const
476 // Create the volumina of the cooling
479 const Int_t kNparTube = 3;
481 Float_t parTube[kNparTube];
486 // The aluminum pipe for the cooling
490 gMC->Gsvolu("UCOA","TUBE",idtmed[1324-1],parTube,0);
496 gMC->Gsvolu("UCOW","TUBE",idtmed[1314-1],parTube,kNparTube);
498 // Water inside the cooling pipe
502 gMC->Gspos("UCOW",1,"UCOA",xpos,ypos,zpos,0,"ONLY");
506 //_____________________________________________________________________________
507 void AliTRDgeometryDetail::PositionCooling(Int_t ipla, Int_t icha, Int_t idrotm)
510 // Position the volumina of the cooling
513 const Int_t kNpar = 3;
520 AliTRDparameter *parameter = new AliTRDparameter();
522 Int_t iCopy = GetDetector(ipla,icha,0) * 100;
523 Int_t nMCMrow = parameter->GetRowMax(ipla,icha,0);
525 Float_t ySize = (GetChamberLength(ipla,icha) - 2.*fgkRpadW)
526 / ((Float_t) nMCMrow);
527 Float_t y0 = parameter->GetRow0(ipla,icha,0);
529 // Position the cooling pipes
530 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
533 ypos = (0.5 + iMCMrow) * ySize + y0 - 1.9;
534 zpos = fgkCH - fgkSheight/2. + 0.5/2.
535 + ipla * (fgkCH + fgkVspace);
538 par[2] = GetChamberWidth(ipla)/2.+ fgkCroW;
539 gMC->Gsposp("UCOA",iCopy+iMCMrow,"UTR1",xpos,ypos,zpos
540 ,idrotm,"ONLY",par,kNpar);