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 **************************************************************************/
20 ///////////////////////////////////////////////////////////////////////////////
22 // Transition Radiation Detector //
23 // This class contains the basic functions for the Transition Radiation //
24 // detector. Functions specific to one particular geometry are //
25 // contained in the derived classes //
29 <img src="picts/AliTRDClass.gif">
34 ///////////////////////////////////////////////////////////////////////////////
49 //_____________________________________________________________________________
53 // Default constructor
61 // The chamber dimensions
62 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
63 fClengthI[iplan] = 0.;
64 fClengthM[iplan] = 0.;
65 fClengthO[iplan] = 0.;
70 //_____________________________________________________________________________
71 AliTRD::AliTRD(const char *name, const char *title)
72 : AliDetector(name,title)
75 // Standard constructor for the TRD
79 // Check that FRAME is there otherwise we have no place where to put the TRD
80 AliModule* FRAME = gAlice->GetModule("FRAME");
82 Error("AliTRD","TRD needs FRAME to be present\n");
86 // Allocate the hit array
87 fHits = new TClonesArray("AliTRDhit", 405);
89 // Allocate the digits array
90 fDigits = new TClonesArray("AliTRDdigit",10000);
95 // The chamber dimensions
96 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
97 fClengthI[iplan] = 0.;
98 fClengthM[iplan] = 0.;
99 fClengthO[iplan] = 0.;
103 SetMarkerColor(kWhite);
107 //_____________________________________________________________________________
121 //_____________________________________________________________________________
122 void AliTRD::AddDigit(Int_t *tracks, Int_t *digits)
125 // Add a digit for the TRD
128 TClonesArray &ldigits = *fDigits;
129 new(ldigits[fNdigits++]) AliTRDdigit(tracks,digits);
133 //_____________________________________________________________________________
134 void AliTRD::AddHit(Int_t track, Int_t *vol, Float_t *hits)
137 // Add a hit for the TRD
140 TClonesArray &lhits = *fHits;
141 new(lhits[fNhits++]) AliTRDhit(fIshunt,track,vol,hits);
145 //_____________________________________________________________________________
146 void AliTRD::BuildGeometry()
149 // Create the ROOT TNode geometry for the TRD
154 const Int_t kColorTRD = 46;
156 // Find the top node alice
157 Top = gAlice->GetGeometry()->GetNode("alice");
159 pgon = new TPGON("S_TRD","TRD","void",0,360,kNsect,4);
160 Float_t ff = TMath::Cos(kDegrad * 180 / kNsect);
161 Float_t rrmin = kRmin / ff;
162 Float_t rrmax = kRmax / ff;
163 pgon->DefineSection(0,-kZmax1,rrmax,rrmax);
164 pgon->DefineSection(1,-kZmax2,rrmin,rrmax);
165 pgon->DefineSection(2, kZmax2,rrmin,rrmax);
166 pgon->DefineSection(3, kZmax1,rrmax,rrmax);
168 Node = new TNode("TRD","TRD","S_TRD",0,0,0,"");
169 Node->SetLineColor(kColorTRD);
174 //_____________________________________________________________________________
175 void AliTRD::CreateGeometry()
178 // Creates the volumes for the TRD chambers
180 // Author: Christoph Blume (C.Blume@gsi.de) 20/07/99
183 // TRD (Air) --- The TRD mother volume for one sector.
184 // To be placed into the spaceframe.
186 // UAFI(/M/O) (Al) --- The aluminum frame of the inner(/middle/outer) chambers (readout)
187 // UCFI(/M/O) (C) --- The carbon frame of the inner(/middle/outer) chambers
188 // (driftchamber + radiator)
189 // UAII(/M/O) (Air) --- The inner part of the readout of the inner(/middle/outer) chambers
190 // UFII(/M/O) (Air) --- The inner part of the chamner and radiator of the
191 // inner(/middle/outer) chambers
193 // The material layers in one chamber:
194 // UL01 (G10) --- The gas seal of the radiator
195 // UL02 (CO2) --- The gas in the radiator
196 // UL03 (PE) --- The foil stack
197 // UL04 (Mylar) --- Entrance window to the driftvolume and HV-cathode
198 // UL05 (Xe) --- The driftvolume
199 // UL06 (Xe) --- The amplification region
201 // UL07 (Cu) --- The pad plane
202 // UL08 (G10) --- The Nomex honeycomb support structure
203 // UL09 (Cu) --- FEE and signal lines
204 // UL10 (PE) --- The cooling devices
205 // UL11 (Water) --- The cooling water
207 // Check that FRAME is there otherwise we have no place where to put the TRD
208 AliModule* FRAME = gAlice->GetModule("FRAME");
211 const Int_t npar_trd = 4;
212 const Int_t npar_cha = 3;
215 Float_t par_trd[npar_trd];
216 Float_t par_cha[npar_cha];
219 Float_t xpos, ypos, zpos;
221 Int_t *idtmed = fIdtmed->GetArray()-1299;
223 // The length of the inner chambers
224 for (iplan = 0; iplan < kNplan; iplan++) fClengthI[iplan] = 110.0;
225 // The length of the middle chambers
226 fClengthM[0] = 123.5;
227 fClengthM[1] = 131.0;
228 fClengthM[2] = 138.5;
229 fClengthM[3] = 146.0;
230 fClengthM[4] = 153.0;
231 fClengthM[5] = 160.5;
232 // The length of the outer chambers
233 fClengthO[0] = 123.5;
234 fClengthO[1] = 131.0;
235 fClengthO[2] = 134.5;
236 fClengthO[3] = 142.0;
237 fClengthO[4] = 142.0;
238 fClengthO[5] = 134.5;
240 // The width of the chambers
248 // The TRD mother volume for one sector (Air) (dimensions identical to BTR1-3)
249 par_trd[0] = kSwidth1/2.;
250 par_trd[1] = kSwidth2/2.;
251 par_trd[2] = kSlength/2.;
252 par_trd[3] = kSheight/2.;
253 gMC->Gsvolu("TRD ","TRD1",idtmed[1302-1],par_trd,npar_trd);
255 // The aluminum frames - readout + electronics (Al)
256 // The inner chambers
257 gMC->Gsvolu("UAFI","BOX ",idtmed[1301-1],par_dum,0);
258 // The middle chambers
259 gMC->Gsvolu("UAFM","BOX ",idtmed[1301-1],par_dum,0);
260 // The outer chambers
261 gMC->Gsvolu("UAFO","BOX ",idtmed[1301-1],par_dum,0);
263 // The inner part of the aluminum frames (Air)
264 // The inner chambers
265 gMC->Gsvolu("UAII","BOX ",idtmed[1302-1],par_dum,0);
266 // The middle chambers
267 gMC->Gsvolu("UAIM","BOX ",idtmed[1302-1],par_dum,0);
268 // The outer chambers
269 gMC->Gsvolu("UAIO","BOX ",idtmed[1302-1],par_dum,0);
271 // The carbon frames - radiator + driftchamber (C)
272 // The inner chambers
273 gMC->Gsvolu("UCFI","BOX ",idtmed[1307-1],par_dum,0);
274 // The middle chambers
275 gMC->Gsvolu("UCFM","BOX ",idtmed[1307-1],par_dum,0);
276 // The outer chambers
277 gMC->Gsvolu("UCFO","BOX ",idtmed[1307-1],par_dum,0);
279 // The inner part of the carbon frames (Air)
280 // The inner chambers
281 gMC->Gsvolu("UCII","BOX ",idtmed[1302-1],par_dum,0);
282 // The middle chambers
283 gMC->Gsvolu("UCIM","BOX ",idtmed[1302-1],par_dum,0);
284 // The outer chambers
285 gMC->Gsvolu("UCIO","BOX ",idtmed[1302-1],par_dum,0);
287 // The material layers inside the chambers
290 // G10 layer (radiator seal)
291 par_cha[2] = kSeThick/2;
292 gMC->Gsvolu("UL01","BOX ",idtmed[1313-1],par_cha,npar_cha);
293 // CO2 layer (radiator)
294 par_cha[2] = kRaThick/2;
295 gMC->Gsvolu("UL02","BOX ",idtmed[1312-1],par_cha,npar_cha);
296 // PE layer (radiator)
297 par_cha[2] = kPeThick/2;
298 gMC->Gsvolu("UL03","BOX ",idtmed[1303-1],par_cha,npar_cha);
299 // Mylar layer (entrance window + HV cathode)
300 par_cha[2] = kMyThick/2;
301 gMC->Gsvolu("UL04","BOX ",idtmed[1308-1],par_cha,npar_cha);
302 // Xe/Isobutane layer (drift volume, sensitive)
303 par_cha[2] = kDrThick/2.;
304 gMC->Gsvolu("UL05","BOX ",idtmed[1309-1],par_cha,npar_cha);
305 // Xe/Isobutane layer (amplification volume, not sensitive)
306 par_cha[2] = kAmThick/2.;
307 gMC->Gsvolu("UL06","BOX ",idtmed[1309-1],par_cha,npar_cha);
309 // Cu layer (pad plane)
310 par_cha[2] = kCuThick/2;
311 gMC->Gsvolu("UL07","BOX ",idtmed[1305-1],par_cha,npar_cha);
312 // G10 layer (support structure)
313 par_cha[2] = kSuThick/2;
314 gMC->Gsvolu("UL08","BOX ",idtmed[1313-1],par_cha,npar_cha);
315 // Cu layer (FEE + signal lines)
316 par_cha[2] = kFeThick/2;
317 gMC->Gsvolu("UL09","BOX ",idtmed[1305-1],par_cha,npar_cha);
318 // PE layer (cooling devices)
319 par_cha[2] = kCoThick/2;
320 gMC->Gsvolu("UL10","BOX ",idtmed[1303-1],par_cha,npar_cha);
321 // Water layer (cooling)
322 par_cha[2] = kWaThick/2;
323 gMC->Gsvolu("UL11","BOX ",idtmed[1314-1],par_cha,npar_cha);
325 // Position the layers in the chambers
329 // G10 layer (radiator seal)
331 gMC->Gspos("UL01",1,"UCII",xpos,ypos,zpos,0,"ONLY");
332 gMC->Gspos("UL01",2,"UCIM",xpos,ypos,zpos,0,"ONLY");
333 gMC->Gspos("UL01",3,"UCIO",xpos,ypos,zpos,0,"ONLY");
334 // CO2 layer (radiator)
336 gMC->Gspos("UL02",1,"UCII",xpos,ypos,zpos,0,"ONLY");
337 gMC->Gspos("UL02",2,"UCIM",xpos,ypos,zpos,0,"ONLY");
338 gMC->Gspos("UL02",3,"UCIO",xpos,ypos,zpos,0,"ONLY");
339 // PE layer (radiator)
341 gMC->Gspos("UL03",1,"UL02",xpos,ypos,zpos,0,"ONLY");
342 // Mylar layer (entrance window + HV cathode)
344 gMC->Gspos("UL04",1,"UCII",xpos,ypos,zpos,0,"ONLY");
345 gMC->Gspos("UL04",2,"UCIM",xpos,ypos,zpos,0,"ONLY");
346 gMC->Gspos("UL04",3,"UCIO",xpos,ypos,zpos,0,"ONLY");
347 // Xe/Isobutane layer (drift volume)
349 gMC->Gspos("UL05",1,"UCII",xpos,ypos,zpos,0,"ONLY");
350 gMC->Gspos("UL05",2,"UCIM",xpos,ypos,zpos,0,"ONLY");
351 gMC->Gspos("UL05",3,"UCIO",xpos,ypos,zpos,0,"ONLY");
352 // Xe/Isobutane layer (amplification volume)
354 gMC->Gspos("UL06",1,"UCII",xpos,ypos,zpos,0,"ONLY");
355 gMC->Gspos("UL06",2,"UCIM",xpos,ypos,zpos,0,"ONLY");
356 gMC->Gspos("UL06",3,"UCIO",xpos,ypos,zpos,0,"ONLY");
358 // Cu layer (pad plane)
360 gMC->Gspos("UL07",1,"UAII",xpos,ypos,zpos,0,"ONLY");
361 gMC->Gspos("UL07",2,"UAIM",xpos,ypos,zpos,0,"ONLY");
362 gMC->Gspos("UL07",3,"UAIO",xpos,ypos,zpos,0,"ONLY");
363 // G10 layer (support structure)
365 gMC->Gspos("UL08",1,"UAII",xpos,ypos,zpos,0,"ONLY");
366 gMC->Gspos("UL08",2,"UAIM",xpos,ypos,zpos,0,"ONLY");
367 gMC->Gspos("UL08",3,"UAIO",xpos,ypos,zpos,0,"ONLY");
368 // Cu layer (FEE + signal lines)
370 gMC->Gspos("UL09",1,"UAII",xpos,ypos,zpos,0,"ONLY");
371 gMC->Gspos("UL09",2,"UAIM",xpos,ypos,zpos,0,"ONLY");
372 gMC->Gspos("UL09",3,"UAIO",xpos,ypos,zpos,0,"ONLY");
373 // PE layer (cooling devices)
375 gMC->Gspos("UL10",1,"UAII",xpos,ypos,zpos,0,"ONLY");
376 gMC->Gspos("UL10",2,"UAIM",xpos,ypos,zpos,0,"ONLY");
377 gMC->Gspos("UL10",3,"UAIO",xpos,ypos,zpos,0,"ONLY");
378 // Water layer (cooling)
380 gMC->Gspos("UL11",1,"UAII",xpos,ypos,zpos,0,"ONLY");
381 gMC->Gspos("UL11",1,"UAIM",xpos,ypos,zpos,0,"ONLY");
382 gMC->Gspos("UL11",1,"UAIO",xpos,ypos,zpos,0,"ONLY");
384 // Position the chambers in the TRD mother volume
385 for (iplan = 1; iplan <= kNplan; iplan++) {
387 // The inner chambers ---------------------------------------------------------------
389 // the aluminum frame
390 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2.;
391 par_cha[0] = fCwidth[iplan-1]/2.;
392 par_cha[1] = fClengthI[iplan-1]/2.;
393 par_cha[2] = kCaframe/2.;
396 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
397 gMC->Gsposp("UAFI",iplan ,"TRD ",xpos,ypos,zpos,0,"MANY",par_cha,npar_cha);
399 // the inner part of the aluminum frame
400 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2. - kCathick;
401 par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
402 par_cha[1] = fClengthI[iplan-1]/2. - kCathick;
403 par_cha[2] = kCaframe/2.;
406 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
407 gMC->Gsposp("UAII",iplan ,"TRD ",xpos,ypos,zpos,0,"ONLY",par_cha,npar_cha);
410 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2.;
411 par_cha[0] = fCwidth[iplan-1]/2.;
412 par_cha[1] = fClengthI[iplan-1]/2.;
413 par_cha[2] = kCcframe/2.;
416 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
417 gMC->Gsposp("UCFI",iplan ,"TRD ",xpos,ypos,zpos,0,"MANY",par_cha,npar_cha);
419 // the inner part of the carbon frame
420 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2. - kCcthick;
421 par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
422 par_cha[1] = fClengthI[iplan-1]/2. - kCcthick;
423 par_cha[2] = kCcframe/2.;
426 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
427 gMC->Gsposp("UCII",iplan ,"TRD ",xpos,ypos,zpos,0,"ONLY",par_cha,npar_cha);
429 // The middle chambers --------------------------------------------------------------
431 // the aluminum frame
432 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2.;
433 par_cha[0] = fCwidth[iplan-1]/2.;
434 par_cha[1] = fClengthM[iplan-1]/2.;
435 par_cha[2] = kCaframe/2.;
437 ypos = fClengthI[iplan-1]/2. + fClengthM[iplan-1]/2.;
438 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
439 gMC->Gsposp("UAFM",iplan ,"TRD ",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
440 gMC->Gsposp("UAFM",iplan+kNplan,"TRD ",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
442 // the inner part of the aluminum frame
443 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2. - kCathick;
444 par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
445 par_cha[1] = fClengthM[iplan-1]/2. - kCathick;
446 par_cha[2] = kCaframe/2.;
448 ypos = fClengthI[iplan-1]/2. + fClengthM[iplan-1]/2.;
449 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
450 gMC->Gsposp("UAIM",iplan ,"TRD ",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
451 gMC->Gsposp("UAIM",iplan+kNplan,"TRD ",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
454 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2.;
455 par_cha[0] = fCwidth[iplan-1]/2.;
456 par_cha[1] = fClengthM[iplan-1]/2.;
457 par_cha[2] = kCcframe/2.;
459 ypos = fClengthI[iplan-1]/2. + fClengthM[iplan-1]/2.;
460 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
461 gMC->Gsposp("UCFM",iplan, "TRD ",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
462 gMC->Gsposp("UCFM",iplan+kNplan,"TRD ",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
464 // the inner part of the carbon frame
465 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2. - kCcthick;
466 par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
467 par_cha[1] = fClengthM[iplan-1]/2. - kCcthick;
468 par_cha[2] = kCcframe/2.;
470 ypos = fClengthI[iplan-1]/2. + fClengthM[iplan-1]/2.;
471 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
472 gMC->Gsposp("UCIM",iplan ,"TRD ",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
473 gMC->Gsposp("UCIM",iplan+kNplan,"TRD ",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
475 // The outer chambers ---------------------------------------------------------------
477 // the aluminum frame
478 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2.;
479 par_cha[0] = fCwidth[iplan-1]/2.;
480 par_cha[1] = fClengthO[iplan-1]/2.;
481 par_cha[2] = kCaframe/2.;
483 ypos = fClengthI[iplan-1]/2. + fClengthM[iplan-1] + fClengthO[iplan-1]/2.;
484 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
485 gMC->Gsposp("UAFO",iplan ,"TRD ",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
486 gMC->Gsposp("UAFO",iplan+kNplan,"TRD ",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
488 // the inner part of the aluminum frame
489 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2. - kCathick;
490 par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
491 par_cha[1] = fClengthO[iplan-1]/2. - kCathick;
492 par_cha[2] = kCaframe/2.;
494 ypos = fClengthI[iplan-1]/2. + fClengthM[iplan-1] + fClengthO[iplan-1]/2.;
495 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
496 gMC->Gsposp("UAIO",iplan ,"TRD ",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
497 gMC->Gsposp("UAIO",iplan+kNplan,"TRD ",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
500 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2.;
501 par_cha[0] = fCwidth[iplan-1]/2.;
502 par_cha[1] = fClengthO[iplan-1]/2.;
503 par_cha[2] = kCcframe/2.;
505 ypos = fClengthI[iplan-1]/2. + fClengthM[iplan-1] + fClengthO[iplan-1]/2.;
506 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
507 gMC->Gsposp("UCFO",iplan, "TRD ",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
508 gMC->Gsposp("UCFO",iplan+kNplan,"TRD ",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
510 // the inner part of the carbon frame
511 //par_cha[0] = kSwidth1/2. + (iplan-1) * kCwidcha/2. - kCcthick;
512 par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
513 par_cha[1] = fClengthO[iplan-1]/2. - kCcthick;
514 par_cha[2] = kCcframe/2.;
516 ypos = fClengthI[iplan-1]/2. + fClengthM[iplan-1] + fClengthO[iplan-1]/2.;
517 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
518 gMC->Gsposp("UCIO",iplan ,"TRD ",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
519 gMC->Gsposp("UCIO",iplan+kNplan,"TRD ",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
525 //_____________________________________________________________________________
526 void AliTRD::CreateMaterials()
529 // Create the materials for the TRD
533 Int_t ISXFLD = gAlice->Field()->Integ();
534 Float_t SXMGMX = gAlice->Field()->Max();
536 // For polyethilene (CH2)
537 Float_t ape[2] = { 12., 1. };
538 Float_t zpe[2] = { 6., 1. };
539 Float_t wpe[2] = { 1., 2. };
542 // For mylar (C5H4O2)
543 Float_t amy[3] = { 12., 1., 16. };
544 Float_t zmy[3] = { 6., 1., 8. };
545 Float_t wmy[3] = { 5., 4., 2. };
549 Float_t aco[2] = { 12., 16. };
550 Float_t zco[2] = { 6., 8. };
551 Float_t wco[2] = { 1., 2. };
552 Float_t dco = 0.001977;
555 Float_t awa[2] = { 1., 16. };
556 Float_t zwa[2] = { 1., 8. };
557 Float_t wwa[2] = { 2., 1. };
560 // For isobutane (C4H10)
561 Float_t ais[2] = { 12., 1. };
562 Float_t zis[2] = { 6., 1. };
563 Float_t wis[2] = { 4., 10. };
564 Float_t dis = 0.00267;
566 // For Xe/CO2-gas-mixture
567 // Xe-content of the Xe/CO2-mixture (90% / 10%)
569 // Xe-content of the Xe/Isobutane-mixture (97% / 3%)
571 Float_t dxe = .005858;
573 // General tracking parameter
574 Float_t tmaxfd = -10.;
575 Float_t stemax = -1e10;
576 Float_t deemax = -0.1;
577 Float_t epsil = 1e-4;
578 Float_t stmin = -0.001;
580 Float_t absl, radl, d, buf[1];
581 Float_t agm[2], dgm, zgm[2], wgm[2];
584 //////////////////////////////////////////////////////////////////////////
586 //////////////////////////////////////////////////////////////////////////
588 AliMaterial( 1, "Al $", 26.98, 13.0, 2.7 , 8.9 , 37.2);
589 AliMaterial( 2, "Air$", 14.61, 7.3, 0.001205, 30420.0 , 67500.0);
590 AliMaterial( 4, "Xe $", 131.29, 54.0, dxe , 1447.59, 0.0);
591 AliMaterial( 5, "Cu $", 63.54, 29.0, 8.96 , 1.43, 14.8);
592 AliMaterial( 6, "C $", 12.01, 6.0, 2.265 , 18.8 , 74.4);
593 AliMaterial(12, "G10$", 20.00, 10.0, 1.7 , 19.4 , 999.0);
596 AliMixture(3, "Polyethilene$", ape, zpe, dpe, -2, wpe);
597 AliMixture(7, "Mylar$", amy, zmy, dmy, -3, wmy);
598 AliMixture(8, "CO2$", aco, zco, dco, -2, wco);
599 AliMixture(9, "Isobutane$", ais, zis, dis, -2, wis);
600 AliMixture(13,"Water$", awa, zwa, dwa, -2, wwa);
605 // Get properties of Xe
606 gMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
607 // Get properties of CO2
608 gMC->Gfmate((*fIdmate)[8], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
609 // Create gas mixture
612 dgm = wgm[0] * dxe + wgm[1] * dco;
613 AliMixture(10, "Gas mixture 1$", agm, zgm, dgm, 2, wgm);
614 // Xe/Isobutane-mixture
615 // Get properties of Xe
616 gMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
617 // Get properties of Isobutane
618 gMC->Gfmate((*fIdmate)[9], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
619 // Create gas mixture
622 dgm = wgm[0] * dxe + wgm[1] * dis;
623 AliMixture(11, "Gas mixture 2$", agm, zgm, dgm, 2, wgm);
625 //////////////////////////////////////////////////////////////////////////
626 // Tracking Media Parameters
627 //////////////////////////////////////////////////////////////////////////
630 AliMedium(1, "Al Frame$", 1, 0, ISXFLD, SXMGMX
631 , tmaxfd, stemax, deemax, epsil, stmin);
633 AliMedium(2, "Air$", 2, 0, ISXFLD, SXMGMX
634 , tmaxfd, stemax, deemax, epsil, stmin);
636 AliMedium(3, "Radiator$", 3, 0, ISXFLD, SXMGMX
637 , tmaxfd, stemax, deemax, epsil, stmin);
639 AliMedium(4, "Xe$", 4, 1, ISXFLD, SXMGMX
640 , tmaxfd, stemax, deemax, epsil, stmin);
642 AliMedium(5, "Padplane$", 5, 1, ISXFLD, SXMGMX
643 , tmaxfd, stemax, deemax, epsil, stmin);
645 AliMedium(6, "Readout$", 1, 0, ISXFLD, SXMGMX
646 , tmaxfd, stemax, deemax, epsil, stmin);
648 AliMedium(7, "C Frame$", 6, 0, ISXFLD, SXMGMX
649 , tmaxfd, stemax, deemax, epsil, stmin);
651 AliMedium(8, "Mylar$", 7, 0, ISXFLD, SXMGMX
652 , tmaxfd, stemax, deemax, epsil, stmin);
654 // Gas-mixture (Xe/CO2)
655 AliMedium(9, "Gas-mix$", 10, 1, ISXFLD, SXMGMX
656 , tmaxfd, stemax, deemax, epsil, stmin);
659 // Gas-mixture (Xe/Isobutane)
660 AliMedium(9, "Gas-mix$", 11, 1, ISXFLD, SXMGMX
661 , tmaxfd, stemax, deemax, epsil, stmin);
663 // Nomex-honeycomb (use carbon for the time being)
664 AliMedium(10, "Nomex$", 6, 0, ISXFLD, SXMGMX
665 , tmaxfd, stemax, deemax, epsil, stmin);
666 // Kapton foils (use Mylar for the time being)
667 AliMedium(11, "Kapton$", 7, 0, ISXFLD, SXMGMX
668 , tmaxfd, stemax, deemax, epsil, stmin);
669 // Gas-filling of the radiator
670 AliMedium(12, "CO2$", 8, 0, ISXFLD, SXMGMX
671 , tmaxfd, stemax, deemax, epsil, stmin);
673 AliMedium(13, "G10-plates$",12, 0, ISXFLD, SXMGMX
674 , tmaxfd, stemax, deemax, epsil, stmin);
676 AliMedium(14, "Water$", 13, 0, ISXFLD, SXMGMX
677 , tmaxfd, stemax, deemax, epsil, stmin);
681 //_____________________________________________________________________________
682 void AliTRD::DrawModule()
685 // Draw a shaded view of the Transition Radiation Detector version 0
688 // Set everything unseen
689 gMC->Gsatt("*" ,"SEEN",-1);
691 // Set ALIC mother transparent
692 gMC->Gsatt("ALIC","SEEN", 0);
694 // Set the volumes visible
695 gMC->Gsatt("B032","SEEN", 0);
696 gMC->Gsatt("B028","SEEN", 0);
697 gMC->Gsatt("B029","SEEN", 0);
698 gMC->Gsatt("B030","SEEN", 0);
699 gMC->Gsatt("BTR1","SEEN", 0);
700 gMC->Gsatt("BTR2","SEEN", 0);
701 gMC->Gsatt("BTR3","SEEN", 0);
702 gMC->Gsatt("TRD" ,"SEEN", 0);
703 gMC->Gsatt("UCII","SEEN", 0);
704 gMC->Gsatt("UCIM","SEEN", 0);
705 gMC->Gsatt("UCIO","SEEN", 0);
706 gMC->Gsatt("UL02","SEEN", 1);
707 gMC->Gsatt("UL05","SEEN", 1);
708 gMC->Gsatt("UL06","SEEN", 1);
710 gMC->Gdopt("hide", "on");
711 gMC->Gdopt("shad", "on");
712 gMC->Gsatt("*", "fill", 7);
713 gMC->SetClipBox(".");
714 gMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 2000);
716 gMC->Gdraw("alic", 40, 30, 0, 12, 9.4, .021, .021);
717 gMC->Gdhead(1111, "Transition Radiation Detector");
718 gMC->Gdman(18, 4, "MAN");
722 //_____________________________________________________________________________
723 Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t )
726 // Distance between the mouse and the TRD detector on the screen
733 //_____________________________________________________________________________
737 // Initialise the TRD detector after the geometry has been created
743 for(i=0;i<35;i++) printf("*");
744 printf(" TRD_INIT ");
745 for(i=0;i<35;i++) printf("*");
748 // Here the TRD initialisation code (if any!)
750 printf(" Gas Mixture: 90%% Xe + 10%% CO2\n");
752 printf(" Gas Mixture: 97%% Xe + 3%% Isobutane\n");
756 //_____________________________________________________________________________
757 void AliTRD::SetGasMix(Int_t imix)
760 // Defines the gas mixture (imix=0: Xe/Isobutane imix=1: Xe/CO2)
763 if ((imix < 0) || (imix > 1)) {
764 printf("Wrong input value: %d\n",imix);
765 printf("Use standard setting\n");
776 //_____________________________________________________________________________
777 AliTRDhit::AliTRDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
784 // Store volume hierarchy
789 // Store position and charge
797 ClassImp(AliTRDdigit)
799 //_____________________________________________________________________________
800 AliTRDdigit::AliTRDdigit(Int_t *tracks, Int_t *digits)
804 // Create a TRD digit
807 // Store the volume hierarchy
809 fChamber = digits[1];
812 // Store the row, pad, and time bucket number
817 // Store the signal amplitude