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 ///////////////////////////////////////////////////////////////////////////////
20 // Detailed TRD geometry for the spaceframe without holes //
22 ///////////////////////////////////////////////////////////////////////////////
24 #include <TVirtualMC.h>
26 #include "AliTRDgeometryDetail.h"
27 #include "AliTRDparameter.h"
29 ClassImp(AliTRDgeometryDetail)
31 //_____________________________________________________________________________
32 AliTRDgeometryDetail::AliTRDgeometryDetail():AliTRDgeometryFull()
35 // AliTRDgeometryDetail default constructor
42 //_____________________________________________________________________________
43 AliTRDgeometryDetail::~AliTRDgeometryDetail()
46 // AliTRDgeometryDetail destructor
51 //_____________________________________________________________________________
52 void AliTRDgeometryDetail::Init()
55 // Initializes the geometry parameter
58 AliTRDgeometryFull::Init();
62 //_____________________________________________________________________________
63 void AliTRDgeometryDetail::CreateGeometry(Int_t *idtmed)
66 // Create the detailed TRD geometry without hole
67 // including the MCMs and the cooling pipes
70 // Names of the TRD volumina (xx = detector number):
72 // Lower part of the readout chambers (gas volume + radiator)
74 // UAxx Aluminum frames (Al)
75 // UBxx G10 frames (C)
76 // UCxx Inner volumes (Air)
78 // Upper part of the readout chambers (readout plane + fee)
80 // UDxx G10 frames (C)
81 // UExx Inner volumes of the G10 (Air)
82 // UFxx Aluminum frames (Al)
83 // UGxx Inner volumes of the Al (Air)
85 // Inner material layers
87 // UHxx Radiator (Rohacell)
88 // UIxx Entrance window (Mylar)
89 // UJxx Drift volume (Xe/CO2)
90 // UKxx Amplification volume (Xe/CO2)
91 // ULxx Pad plane (Cu)
92 // UMxx Support structure (Rohacell)
93 // UNxx FEE + signal lines (Cu)
96 const Int_t kNparTrd = 4;
97 const Int_t kNparCha = 3;
99 Float_t xpos, ypos, zpos;
101 Float_t parTrd[kNparTrd];
102 Float_t parCha[kNparCha];
110 gMC->Matrix(idrotm, 0.0, 0.0, 90.0, 90.0, 90.0, 0.0);
112 // The TRD mother volume for one sector (Air), full length in z-direction
113 parTrd[0] = fgkSwidth1/2.;
114 parTrd[1] = fgkSwidth2/2.;
115 parTrd[2] = fgkSlenTR1/2.;
116 parTrd[3] = fgkSheight/2.;
117 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
119 // Create the readout volumina
120 CreateReadout(idtmed);
122 // Create the volumina for the cooling
123 CreateCooling(idtmed);
125 for (Int_t icham = 0; icham < kNcham; icham++) {
126 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
128 Int_t iDet = GetDetectorSec(iplan,icham);
130 // The lower part of the readout chambers (gas volume + radiator)
131 // The aluminum frames
132 sprintf(cTagV,"UA%02d",iDet);
133 parCha[0] = fCwidth[iplan]/2.;
134 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
135 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
136 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
138 sprintf(cTagV,"UB%02d",iDet);
139 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
142 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
143 // The inner part (air)
144 sprintf(cTagV,"UC%02d",iDet);
145 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
146 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
148 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
150 // The upper part of the readout chambers (readout plane + fee)
152 sprintf(cTagV,"UD%02d",iDet);
153 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
154 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
155 parCha[2] = fgkCamH/2.;
156 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
157 // The inner part of the G10 frame (air)
158 sprintf(cTagV,"UE%02d",iDet);
159 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
160 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
162 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
163 // The aluminum frames
164 sprintf(cTagV,"UF%02d",iDet);
165 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
166 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
167 parCha[2] = fgkCroH/2.;
168 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
169 // The inner part of the aluminum frames
170 sprintf(cTagV,"UG%02d",iDet);
171 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
172 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
174 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
176 // The material layers inside the chambers
179 // Rohacell layer (radiator)
180 parCha[2] = fgkRaThick/2;
181 sprintf(cTagV,"UH%02d",iDet);
182 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
183 // Mylar layer (entrance window + HV cathode)
184 parCha[2] = fgkMyThick/2;
185 sprintf(cTagV,"UI%02d",iDet);
186 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
187 // Xe/Isobutane layer (drift volume)
188 parCha[2] = fgkDrThick/2.;
189 sprintf(cTagV,"UJ%02d",iDet);
190 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
191 // Xe/Isobutane layer (amplification volume)
192 parCha[2] = fgkAmThick/2.;
193 sprintf(cTagV,"UK%02d",iDet);
194 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
195 // Cu layer (pad plane)
196 parCha[2] = fgkCuThick/2;
197 sprintf(cTagV,"UL%02d",iDet);
198 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
199 // G10 layer (support structure / honeycomb)
200 parCha[2] = fgkSuThick/2;
201 sprintf(cTagV,"UM%02d",iDet);
202 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
203 // Cu layer (FEE + signal lines)
204 parCha[2] = fgkFeThick/2;
205 sprintf(cTagV,"UN%02d",iDet);
206 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
208 // Position the layers in the chambers
212 // Rohacell layer (radiator)
214 sprintf(cTagV,"UH%02d",iDet);
215 sprintf(cTagM,"UC%02d",iDet);
216 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
217 // Mylar layer (entrance window + HV cathode)
219 sprintf(cTagV,"UI%02d",iDet);
220 sprintf(cTagM,"UC%02d",iDet);
221 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
222 // Xe/Isobutane layer (drift volume)
224 sprintf(cTagV,"UJ%02d",iDet);
225 sprintf(cTagM,"UC%02d",iDet);
226 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
228 // Xe/Isobutane layer (amplification volume)
230 sprintf(cTagV,"UK%02d",iDet);
231 sprintf(cTagM,"UE%02d",iDet);
232 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
234 // Cu layer (pad plane)
236 sprintf(cTagV,"UL%02d",iDet);
237 sprintf(cTagM,"UG%02d",iDet);
238 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
239 // G10 layer (support structure)
241 sprintf(cTagV,"UM%02d",iDet);
242 sprintf(cTagM,"UG%02d",iDet);
243 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
244 // Cu layer (FEE + signal lines)
246 sprintf(cTagV,"UN%02d",iDet);
247 sprintf(cTagM,"UG%02d",iDet);
248 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
250 // Position the inner volumes of the chambers in the frames
254 // The inside of the lower G10 frame
255 sprintf(cTagV,"UC%02d",iDet);
256 sprintf(cTagM,"UB%02d",iDet);
257 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
258 // The lower G10 frame inside the aluminum frame
259 sprintf(cTagV,"UB%02d",iDet);
260 sprintf(cTagM,"UA%02d",iDet);
261 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
262 // The inside of the upper G10 frame
263 sprintf(cTagV,"UE%02d",iDet);
264 sprintf(cTagM,"UD%02d",iDet);
265 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
266 // The inside of the upper aluminum frame
267 sprintf(cTagV,"UG%02d",iDet);
268 sprintf(cTagM,"UF%02d",iDet);
269 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
271 // Position the frames of the chambers in the TRD mother volume
273 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
274 for (Int_t ic = 0; ic < icham; ic++) {
275 ypos += fClength[iplan][ic];
277 ypos += fClength[iplan][icham]/2.;
278 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
279 // The lower aluminum frame, radiator + drift region
280 sprintf(cTagV,"UA%02d",iDet);
281 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
282 // The upper G10 frame, amplification region
283 sprintf(cTagV,"UD%02d",iDet);
284 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
285 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
286 // The upper aluminum frame
287 sprintf(cTagV,"UF%02d",iDet);
288 zpos += fgkCroH/2. + fgkCamH/2.;
289 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
291 // Position the MCM volumina
292 PositionReadout(iplan,icham);
294 // Position the volumina for the cooling
295 PositionCooling(iplan,icham,idrotm);
303 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
304 gMC->Gspos("UTR1",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
305 gMC->Gspos("UTR1",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
309 //_____________________________________________________________________________
310 void AliTRDgeometryDetail::CreateReadout(Int_t *idtmed) const
313 // Create the volumina of the readout electronics
316 const Int_t kNparBox = 3;
318 Float_t parBox[kNparBox];
323 // The mother volume for the MCMs + connectors (air)
327 gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parBox,kNparBox);
329 // The MCM carrier G10 layer
333 gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parBox,kNparBox);
334 // The MCM carrier Cu layer
337 parBox[2] = 0.0034/2.;
338 gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parBox,kNparBox);
339 // The MCM carrier Sn layer
342 parBox[2] = 0.004/2.;
343 gMC->Gsvolu("UMC3","BOX",idtmed[1317-1],parBox,kNparBox);
344 // The MCM carrier Al layer
348 gMC->Gsvolu("UMC4","BOX",idtmed[1316-1],parBox,kNparBox);
350 // The epoxy of chip no.1
351 parBox[0] = 0.548/2.;
352 parBox[1] = 0.548/2.;
354 gMC->Gsvolu("UCE1","BOX",idtmed[1321-1],parBox,kNparBox);
355 // The silicon of chip no.1
356 parBox[0] = 0.316/2.;
357 parBox[1] = 0.316/2.;
359 gMC->Gsvolu("UCS1","BOX",idtmed[1320-1],parBox,kNparBox);
361 // The epoxy of chip no.2
362 parBox[0] = 1.549/2.;
363 parBox[1] = 1.549/2.;
365 gMC->Gsvolu("UCE2","BOX",idtmed[1321-1],parBox,kNparBox);
366 // The silicon of chip no.2
367 parBox[0] = 0.894/2.;
368 parBox[1] = 0.894/2.;
370 gMC->Gsvolu("UCS2","BOX",idtmed[1320-1],parBox,kNparBox);
372 // The PE of the connector
376 gMC->Gsvolu("UCN1","BOX",idtmed[1322-1],parBox,kNparBox);
377 // The Cu of the connector
380 parBox[2] = 0.005/2.;
381 gMC->Gsvolu("UCN2","BOX",idtmed[1323-1],parBox,kNparBox);
385 zpos = -0.25 + 0.1/2.;
386 gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
387 zpos += 0.1/2. + 0.0034/2.;
388 gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
389 zpos += 0.0034/2 + 0.004/2.;
390 gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
391 zpos += 0.004/2 + 0.05/2.;
392 gMC->Gspos("UMC4",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
393 zpos += 0.05/2. + 0.1/2.;
395 gMC->Gspos("UCE1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
397 gMC->Gspos("UCE2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
398 zpos += 0.1/2. + 0.03/2.;
400 gMC->Gspos("UCS1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
402 gMC->Gspos("UCS2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
404 ypos = 3.4/2. - 0.4/2.;
405 zpos = -0.25 + 0.3/2.;
406 gMC->Gspos("UCN1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
407 zpos += 0.3/2. + 0.005/2.;
408 gMC->Gspos("UCN2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
412 //_____________________________________________________________________________
413 void AliTRDgeometryDetail::PositionReadout(Int_t ipla, Int_t icha)
416 // Position the volumina inside the readout mother volume
419 const Int_t kNmcmChannel = 18;
421 AliTRDparameter *parameter = new AliTRDparameter();
423 Int_t nMCMrow = parameter->GetRowMax(ipla,icha,0);
424 Int_t nMCMcol = parameter->GetColMax(ipla) / kNmcmChannel;
426 Float_t xSize = (GetChamberWidth(ipla) - 2.*fgkCpadW)
427 / ((Float_t) nMCMcol);
428 Float_t ySize = (GetChamberLength(ipla,icha) - 2.*fgkRpadW)
429 / ((Float_t) nMCMrow);
430 Float_t x0 = parameter->GetCol0(ipla);
431 Float_t y0 = parameter->GetRow0(ipla,icha,0);
433 Int_t iCopy = GetDetector(ipla,icha,0) * 1000;
434 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
435 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
437 Float_t xpos = (0.5 + iMCMcol) * xSize + x0;
438 Float_t ypos = (0.5 + iMCMrow) * ySize + y0;
439 Float_t zpos = fgkCH - fgkSheight/2. + 0.5/2.
440 + ipla * (fgkCH + fgkVspace);
441 gMC->Gspos("UMCM",iCopy,"UTR1",xpos,ypos,zpos,0,"ONLY");
449 //_____________________________________________________________________________
450 void AliTRDgeometryDetail::CreateCooling(Int_t *idtmed) const
453 // Create the volumina of the cooling
456 const Int_t kNparTube = 3;
458 Float_t parTube[kNparTube];
463 // The aluminum pipe for the cooling
467 gMC->Gsvolu("UCOA","TUBE",idtmed[1324-1],parTube,0);
473 gMC->Gsvolu("UCOW","TUBE",idtmed[1314-1],parTube,kNparTube);
475 // Water inside the cooling pipe
479 gMC->Gspos("UCOW",1,"UCOA",xpos,ypos,zpos,0,"ONLY");
483 //_____________________________________________________________________________
484 void AliTRDgeometryDetail::PositionCooling(Int_t ipla, Int_t icha, Int_t idrotm)
487 // Position the volumina of the cooling
490 const Int_t kNpar = 3;
497 AliTRDparameter *parameter = new AliTRDparameter();
499 Int_t iCopy = GetDetector(ipla,icha,0) * 100;
500 Int_t nMCMrow = parameter->GetRowMax(ipla,icha,0);
502 Float_t ySize = (GetChamberLength(ipla,icha) - 2.*fgkRpadW)
503 / ((Float_t) nMCMrow);
504 Float_t y0 = parameter->GetRow0(ipla,icha,0);
506 // Position the cooling pipes
507 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
510 ypos = (0.5 + iMCMrow) * ySize + y0 - 1.9;
511 zpos = fgkCH - fgkSheight/2. + 0.5/2.
512 + ipla * (fgkCH + fgkVspace);
515 par[2] = GetChamberWidth(ipla)/2.+ fgkCroW;
516 gMC->Gsposp("UCOA",iCopy+iMCMrow,"UTR1",xpos,ypos,zpos
517 ,idrotm,"ONLY",par,kNpar);