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.3.6.2 2002/07/24 10:09:30 alibrary
21 Revision 1.5 2002/06/12 09:54:35 cblume
22 Update of tracking code provided by Sergei
24 Revision 1.4 2002/03/28 14:59:07 cblume
27 Revision 1.3 2002/02/11 14:21:16 cblume
28 Update of the geometry. Get rid of MANY
30 Revision 1.2 2001/11/08 13:13:08 cblume
31 Change to MANY for UCFI/M/O and UAFI/M/O
33 Revision 1.1 2001/11/06 17:19:41 cblume
34 Add detailed geometry and simple simulator
38 ///////////////////////////////////////////////////////////////////////////////
40 // Detailed TRD geometry for the spaceframe without holes //
42 ///////////////////////////////////////////////////////////////////////////////
46 #include "AliTRDgeometryDetail.h"
47 #include "AliTRDparameter.h"
49 ClassImp(AliTRDgeometryDetail)
51 //_____________________________________________________________________________
52 AliTRDgeometryDetail::AliTRDgeometryDetail():AliTRDgeometryFull()
55 // AliTRDgeometryDetail default constructor
62 //_____________________________________________________________________________
63 AliTRDgeometryDetail::~AliTRDgeometryDetail()
66 // AliTRDgeometryDetail destructor
71 //_____________________________________________________________________________
72 void AliTRDgeometryDetail::Init()
75 // Initializes the geometry parameter
78 AliTRDgeometryFull::Init();
82 //_____________________________________________________________________________
83 void AliTRDgeometryDetail::CreateGeometry(Int_t *idtmed)
86 // Create the detailed TRD geometry without hole
87 // including the MCMs and the cooling pipes
90 // Names of the TRD volumina (xx = detector number):
92 // Lower part of the readout chambers (gas volume + radiator)
94 // UAxx Aluminum frames (Al)
95 // UBxx G10 frames (C)
96 // UCxx Inner volumes (Air)
98 // Upper part of the readout chambers (readout plane + fee)
100 // UDxx G10 frames (C)
101 // UExx Inner volumes of the G10 (Air)
102 // UFxx Aluminum frames (Al)
103 // UGxx Inner volumes of the Al (Air)
105 // Inner material layers
107 // UHxx Radiator (Rohacell)
108 // UIxx Entrance window (Mylar)
109 // UJxx Drift volume (Xe/CO2)
110 // UKxx Amplification volume (Xe/CO2)
111 // ULxx Pad plane (Cu)
112 // UMxx Support structure (Rohacell)
113 // UNxx FEE + signal lines (Cu)
116 const Int_t kNparTrd = 4;
117 const Int_t kNparCha = 3;
119 Float_t xpos, ypos, zpos;
121 Float_t parTrd[kNparTrd];
122 Float_t parCha[kNparCha];
130 gMC->Matrix(idrotm, 0.0, 0.0, 90.0, 90.0, 90.0, 0.0);
132 // The TRD mother volume for one sector (Air), full length in z-direction
133 parTrd[0] = fgkSwidth1/2.;
134 parTrd[1] = fgkSwidth2/2.;
135 parTrd[2] = fgkSlenTR1/2.;
136 parTrd[3] = fgkSheight/2.;
137 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
139 // Create the readout volumina
140 CreateReadout(idtmed);
142 // Create the volumina for the cooling
143 CreateCooling(idtmed);
145 for (Int_t icham = 0; icham < kNcham; icham++) {
146 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
148 Int_t iDet = GetDetectorSec(iplan,icham);
150 // The lower part of the readout chambers (gas volume + radiator)
151 // The aluminum frames
152 sprintf(cTagV,"UA%02d",iDet);
153 parCha[0] = fCwidth[iplan]/2.;
154 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
155 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
156 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
158 sprintf(cTagV,"UB%02d",iDet);
159 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
162 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
163 // The inner part (air)
164 sprintf(cTagV,"UC%02d",iDet);
165 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
166 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
168 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
170 // The upper part of the readout chambers (readout plane + fee)
172 sprintf(cTagV,"UD%02d",iDet);
173 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
174 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
175 parCha[2] = fgkCamH/2.;
176 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
177 // The inner part of the G10 frame (air)
178 sprintf(cTagV,"UE%02d",iDet);
179 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
180 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
182 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
183 // The aluminum frames
184 sprintf(cTagV,"UF%02d",iDet);
185 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
186 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
187 parCha[2] = fgkCroH/2.;
188 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
189 // The inner part of the aluminum frames
190 sprintf(cTagV,"UG%02d",iDet);
191 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
192 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
194 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
196 // The material layers inside the chambers
199 // Rohacell layer (radiator)
200 parCha[2] = fgkRaThick/2;
201 sprintf(cTagV,"UH%02d",iDet);
202 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
203 // Mylar layer (entrance window + HV cathode)
204 parCha[2] = fgkMyThick/2;
205 sprintf(cTagV,"UI%02d",iDet);
206 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
207 // Xe/Isobutane layer (drift volume)
208 parCha[2] = fgkDrThick/2.;
209 sprintf(cTagV,"UJ%02d",iDet);
210 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
211 // Xe/Isobutane layer (amplification volume)
212 parCha[2] = fgkAmThick/2.;
213 sprintf(cTagV,"UK%02d",iDet);
214 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
215 // Cu layer (pad plane)
216 parCha[2] = fgkCuThick/2;
217 sprintf(cTagV,"UL%02d",iDet);
218 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
219 // G10 layer (support structure / honeycomb)
220 parCha[2] = fgkSuThick/2;
221 sprintf(cTagV,"UM%02d",iDet);
222 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
223 // Cu layer (FEE + signal lines)
224 parCha[2] = fgkFeThick/2;
225 sprintf(cTagV,"UN%02d",iDet);
226 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
228 // Position the layers in the chambers
232 // Rohacell layer (radiator)
234 sprintf(cTagV,"UH%02d",iDet);
235 sprintf(cTagM,"UC%02d",iDet);
236 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
237 // Mylar layer (entrance window + HV cathode)
239 sprintf(cTagV,"UI%02d",iDet);
240 sprintf(cTagM,"UC%02d",iDet);
241 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
242 // Xe/Isobutane layer (drift volume)
244 sprintf(cTagV,"UJ%02d",iDet);
245 sprintf(cTagM,"UC%02d",iDet);
246 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
248 // Xe/Isobutane layer (amplification volume)
250 sprintf(cTagV,"UK%02d",iDet);
251 sprintf(cTagM,"UE%02d",iDet);
252 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
254 // Cu layer (pad plane)
256 sprintf(cTagV,"UL%02d",iDet);
257 sprintf(cTagM,"UG%02d",iDet);
258 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
259 // G10 layer (support structure)
261 sprintf(cTagV,"UM%02d",iDet);
262 sprintf(cTagM,"UG%02d",iDet);
263 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
264 // Cu layer (FEE + signal lines)
266 sprintf(cTagV,"UN%02d",iDet);
267 sprintf(cTagM,"UG%02d",iDet);
268 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
270 // Position the inner volumes of the chambers in the frames
274 // The inside of the lower G10 frame
275 sprintf(cTagV,"UC%02d",iDet);
276 sprintf(cTagM,"UB%02d",iDet);
277 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
278 // The lower G10 frame inside the aluminum frame
279 sprintf(cTagV,"UB%02d",iDet);
280 sprintf(cTagM,"UA%02d",iDet);
281 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
282 // The inside of the upper G10 frame
283 sprintf(cTagV,"UE%02d",iDet);
284 sprintf(cTagM,"UD%02d",iDet);
285 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
286 // The inside of the upper aluminum frame
287 sprintf(cTagV,"UG%02d",iDet);
288 sprintf(cTagM,"UF%02d",iDet);
289 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
291 // Position the frames of the chambers in the TRD mother volume
293 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
294 for (Int_t ic = 0; ic < icham; ic++) {
295 ypos += fClength[iplan][ic];
297 ypos += fClength[iplan][icham]/2.;
298 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
299 // The lower aluminum frame, radiator + drift region
300 sprintf(cTagV,"UA%02d",iDet);
301 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
302 // The upper G10 frame, amplification region
303 sprintf(cTagV,"UD%02d",iDet);
304 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
305 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
306 // The upper aluminum frame
307 sprintf(cTagV,"UF%02d",iDet);
308 zpos += fgkCroH/2. + fgkCamH/2.;
309 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
311 // Position the MCM volumina
312 PositionReadout(iplan,icham);
314 // Position the volumina for the cooling
315 PositionCooling(iplan,icham,idrotm);
323 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
324 gMC->Gspos("UTR1",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
325 gMC->Gspos("UTR1",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
329 //_____________________________________________________________________________
330 void AliTRDgeometryDetail::CreateReadout(Int_t *idtmed) const
333 // Create the volumina of the readout electronics
336 const Int_t kNparBox = 3;
338 Float_t parBox[kNparBox];
343 // The mother volume for the MCMs + connectors (air)
347 gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parBox,kNparBox);
349 // The MCM carrier G10 layer
353 gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parBox,kNparBox);
354 // The MCM carrier Cu layer
357 parBox[2] = 0.0034/2.;
358 gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parBox,kNparBox);
359 // The MCM carrier Sn layer
362 parBox[2] = 0.004/2.;
363 gMC->Gsvolu("UMC3","BOX",idtmed[1317-1],parBox,kNparBox);
364 // The MCM carrier Al layer
368 gMC->Gsvolu("UMC4","BOX",idtmed[1316-1],parBox,kNparBox);
370 // The epoxy of chip no.1
371 parBox[0] = 0.548/2.;
372 parBox[1] = 0.548/2.;
374 gMC->Gsvolu("UCE1","BOX",idtmed[1321-1],parBox,kNparBox);
375 // The silicon of chip no.1
376 parBox[0] = 0.316/2.;
377 parBox[1] = 0.316/2.;
379 gMC->Gsvolu("UCS1","BOX",idtmed[1320-1],parBox,kNparBox);
381 // The epoxy of chip no.2
382 parBox[0] = 1.549/2.;
383 parBox[1] = 1.549/2.;
385 gMC->Gsvolu("UCE2","BOX",idtmed[1321-1],parBox,kNparBox);
386 // The silicon of chip no.2
387 parBox[0] = 0.894/2.;
388 parBox[1] = 0.894/2.;
390 gMC->Gsvolu("UCS2","BOX",idtmed[1320-1],parBox,kNparBox);
392 // The PE of the connector
396 gMC->Gsvolu("UCN1","BOX",idtmed[1322-1],parBox,kNparBox);
397 // The Cu of the connector
400 parBox[2] = 0.005/2.;
401 gMC->Gsvolu("UCN2","BOX",idtmed[1323-1],parBox,kNparBox);
405 zpos = -0.25 + 0.1/2.;
406 gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
407 zpos += 0.1/2. + 0.0034/2.;
408 gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
409 zpos += 0.0034/2 + 0.004/2.;
410 gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
411 zpos += 0.004/2 + 0.05/2.;
412 gMC->Gspos("UMC4",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
413 zpos += 0.05/2. + 0.1/2.;
415 gMC->Gspos("UCE1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
417 gMC->Gspos("UCE2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
418 zpos += 0.1/2. + 0.03/2.;
420 gMC->Gspos("UCS1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
422 gMC->Gspos("UCS2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
424 ypos = 3.4/2. - 0.4/2.;
425 zpos = -0.25 + 0.3/2.;
426 gMC->Gspos("UCN1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
427 zpos += 0.3/2. + 0.005/2.;
428 gMC->Gspos("UCN2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
432 //_____________________________________________________________________________
433 void AliTRDgeometryDetail::PositionReadout(Int_t ipla, Int_t icha)
436 // Position the volumina inside the readout mother volume
439 const Int_t kNmcmChannel = 18;
441 AliTRDparameter *parameter = new AliTRDparameter();
443 Int_t nMCMrow = parameter->GetRowMax(ipla,icha,0);
444 Int_t nMCMcol = parameter->GetColMax(ipla) / kNmcmChannel;
446 Float_t xSize = (GetChamberWidth(ipla) - 2.*fgkCpadW)
447 / ((Float_t) nMCMcol);
448 Float_t ySize = (GetChamberLength(ipla,icha) - 2.*fgkRpadW)
449 / ((Float_t) nMCMrow);
450 Float_t x0 = parameter->GetCol0(ipla);
451 Float_t y0 = parameter->GetRow0(ipla,icha,0);
453 Int_t iCopy = GetDetector(ipla,icha,0) * 1000;
454 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
455 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
457 Float_t xpos = (0.5 + iMCMcol) * xSize + x0;
458 Float_t ypos = (0.5 + iMCMrow) * ySize + y0;
459 Float_t zpos = fgkCH - fgkSheight/2. + 0.5/2.
460 + ipla * (fgkCH + fgkVspace);
461 gMC->Gspos("UMCM",iCopy,"UTR1",xpos,ypos,zpos,0,"ONLY");
469 //_____________________________________________________________________________
470 void AliTRDgeometryDetail::CreateCooling(Int_t *idtmed) const
473 // Create the volumina of the cooling
476 const Int_t kNparTube = 3;
478 Float_t parTube[kNparTube];
483 // The aluminum pipe for the cooling
487 gMC->Gsvolu("UCOA","TUBE",idtmed[1324-1],parTube,0);
493 gMC->Gsvolu("UCOW","TUBE",idtmed[1314-1],parTube,kNparTube);
495 // Water inside the cooling pipe
499 gMC->Gspos("UCOW",1,"UCOA",xpos,ypos,zpos,0,"ONLY");
503 //_____________________________________________________________________________
504 void AliTRDgeometryDetail::PositionCooling(Int_t ipla, Int_t icha, Int_t idrotm)
507 // Position the volumina of the cooling
510 const Int_t kNpar = 3;
517 AliTRDparameter *parameter = new AliTRDparameter();
519 Int_t iCopy = GetDetector(ipla,icha,0) * 100;
520 Int_t nMCMrow = parameter->GetRowMax(ipla,icha,0);
522 Float_t ySize = (GetChamberLength(ipla,icha) - 2.*fgkRpadW)
523 / ((Float_t) nMCMrow);
524 Float_t y0 = parameter->GetRow0(ipla,icha,0);
526 // Position the cooling pipes
527 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
530 ypos = (0.5 + iMCMrow) * ySize + y0 - 1.9;
531 zpos = fgkCH - fgkSheight/2. + 0.5/2.
532 + ipla * (fgkCH + fgkVspace);
535 par[2] = GetChamberWidth(ipla)/2.+ fgkCroW;
536 gMC->Gsposp("UCOA",iCopy+iMCMrow,"UTR1",xpos,ypos,zpos
537 ,idrotm,"ONLY",par,kNpar);