1 ///////////////////////////////////////////////////////////////////////////////
3 // Transition Radiation Detector version 1 -- coarse simulation //
4 // This version has two detector arms, leaving the space in front of the //
5 // HMPID and PHOS empty //
9 <img src="picts/AliTRDv1Class.gif">
14 ///////////////////////////////////////////////////////////////////////////////
27 //_____________________________________________________________________________
28 AliTRDv1::AliTRDv1(const char *name, const char *title)
32 // Standard constructor for the Transition Radiation Detector version 1
34 fIdSens1 = fIdSens2 = fIdSens3 = 0;
37 //_____________________________________________________________________________
38 void AliTRDv1::CreateGeometry()
41 // Create the geometry for the Transition Radiation Detector version 1
42 // --- The coarse geometry of the TRD, that can be used for background
43 // studies. This version leaves the space in front of the PHOS and
45 // --- Author : Christoph Blume (GSI) 18/5/99
48 // TRD --> Mother TRD volume (Air)
49 // UTRD --> The detector arms (Al)
50 // UTRS --> Sectors of the sub-detector (Al)
51 // UTRI --> Inner part of the detector frame (Air)
52 // UTCI(N,O) --> Frames of the inner, neighbouring and outer chambers (C)
53 // UTII(N,O) --> Inner part of the chambers (Air)
54 // UTMI(N,O) --> Modules in the chambers (Air)
55 // UT0I(N,O) --> Radiator seal (G10)
56 // UT1I(N,O) --> Radiator (CO2)
57 // UT2I(N,O) --> Polyethylene of radiator (PE)
58 // UT3I(N,O) --> Entrance window (Mylar)
59 // UT4I(N,O) --> Gas volume (sensitive) (Xe/Isobutane)
60 // UT5I(N,O) --> Pad plane (Cu)
61 // UT6I(N,O) --> Support structure (G10)
62 // UT7I(N,O) --> FEE + signal lines (Cu)
63 // UT8I(N,O) --> Polyethylene of cooling device (PE)
64 // UT9I(N,O) --> Cooling water (Water)
68 <img src="picts/AliTRDv1.gif">
73 <img src="picts/AliTRDv1Tree.gif">
77 Float_t xpos, ypos, zpos, f;
80 const Int_t nparmo = 10;
81 const Int_t nparar = 10;
82 const Int_t nparfr = 4;
83 const Int_t nparic = 4;
84 const Int_t nparnc = 4;
85 const Int_t nparoc = 11;
87 Float_t par_mo[nparmo];
88 Float_t par_ar[nparar];
89 Float_t par_fr[nparfr];
90 Float_t par_ic[nparic];
91 Float_t par_nc[nparnc];
92 Float_t par_oc[nparoc];
94 Int_t *idtmed = gAlice->Idtmed();
96 AliMC* pMC = AliMC::GetMC();
98 //////////////////////////////////////////////////////////////////////////
99 // Definition of Volumes
100 //////////////////////////////////////////////////////////////////////////
102 // Definition of the mother volume for the TRD (Air)
113 pMC->Gsvolu("TRD ", "PGON", idtmed[1302-1], par_mo, nparmo);
115 Float_t phisec = 360. / nsect;
116 // Definition of the two detector arms (Al)
118 par_ar[1] = narmsec * phisec;
127 pMC->Gsvolu("UTRD", "PGON", idtmed[1301-1], par_ar, nparar);
128 pMC->Gsdvn("UTRS", "UTRD", narmsec, 2);
130 // The minimal width of a sector in rphi-direction
131 Float_t widmi = rmin * TMath::Sin(kPI/nsect);
132 // The maximal width of a sector in rphi-direction
133 Float_t widma = rmax * TMath::Sin(kPI/nsect);
134 // The total thickness of the spaceframe (Al + Air)
135 Float_t frame = widmi - (widpl1 / 2);
137 // Definition of the inner part of the detector frame (Air)
138 par_fr[0] = widmi - alframe / 2;
139 par_fr[1] = widma - alframe / 2;
141 par_fr[3] = (rmax - rmin) / 2;
142 pMC->Gsvolu("UTRI", "TRD1", idtmed[1302-1], par_fr, nparfr);
145 // The outer chambers
148 // Calculate some shape-parameter
149 Float_t tanzr = (zmax1 - zmax2) / (rmax - rmin);
150 Float_t theoc = -kRaddeg * TMath::ATan(tanzr / 2);
152 // The carbon frame (C)
153 par_oc[0] = (rmax - rmin) / 2;
156 par_oc[3] = (zmax2 - zlenn - zleni/2) / 2;
157 par_oc[4] = widmi - frame;
158 par_oc[5] = widmi - frame;
160 par_oc[7] = (zmax1 - zlenn - zleni/2) / 2;
161 par_oc[8] = widma - frame;
162 par_oc[9] = widma - frame;
164 pMC->Gsvolu("UTCO", "TRAP", idtmed[1307-1], par_oc, nparoc);
166 // The inner part (Air)
167 par_oc[3] -= ccframe;
168 par_oc[4] -= ccframe;
169 par_oc[5] -= ccframe;
170 par_oc[7] -= ccframe;
171 par_oc[8] -= ccframe;
172 par_oc[9] -= ccframe;
173 pMC->Gsvolu("UTIO", "TRAP", idtmed[1302-1], par_oc, nparoc);
175 // Definition of the six modules within each chamber
176 pMC->Gsdvn("UTMO", "UTIO", nmodul, 3);
178 // Definition of the layers of each chamber
189 // G10 layer (radiator layer)
190 par_oc[0] = sethick / 2;
191 pMC->Gsvolu("UT0O", "TRAP", idtmed[1313-1], par_oc, nparoc);
192 // CO2 layer (radiator)
193 par_oc[0] = rathick / 2;
194 pMC->Gsvolu("UT1O", "TRAP", idtmed[1312-1], par_oc, nparoc);
195 // PE layer (radiator)
196 par_oc[0] = pethick / 2;
197 pMC->Gsvolu("UT2O", "TRAP", idtmed[1303-1], par_oc, nparoc);
198 // Mylar layer (entrance window + HV cathode)
199 par_oc[0] = mythick / 2;
200 pMC->Gsvolu("UT3O", "TRAP", idtmed[1308-1], par_oc, nparoc);
201 // Xe/Isobutane layer (gasvolume)
202 par_oc[0] = xethick / 2;
203 pMC->Gsvolu("UT4O", "TRAP", idtmed[1309-1], par_oc, nparoc);
204 // Cu layer (pad plane)
205 par_oc[0] = cuthick / 2;
206 pMC->Gsvolu("UT5O", "TRAP", idtmed[1305-1], par_oc, nparoc);
207 // G10 layer (support structure)
208 par_oc[0] = suthick / 2;
209 pMC->Gsvolu("UT6O", "TRAP", idtmed[1313-1], par_oc, nparoc);
210 // Cu layer (FEE + signal lines)
211 par_oc[0] = fethick / 2;
212 pMC->Gsvolu("UT7O", "TRAP", idtmed[1305-1], par_oc, nparoc);
213 // PE layer (cooling devices)
214 par_oc[0] = cothick / 2;
215 pMC->Gsvolu("UT8O", "TRAP", idtmed[1303-1], par_oc, nparoc);
216 // Water layer (cooling)
217 par_oc[0] = wathick / 2;
218 pMC->Gsvolu("UT9O", "TRAP", idtmed[1314-1], par_oc, nparoc);
221 // The neighbouring chambers
224 // The carbon frame (C)
225 par_nc[0] = widmi - frame;
226 par_nc[1] = widma - frame;
227 par_nc[2] = zlenn / 2;
228 par_nc[3] = (rmax - rmin) / 2;
229 pMC->Gsvolu("UTCN", "TRD1", idtmed[1307-1], par_nc, nparnc);
231 // The inner part (Air)
232 par_nc[0] -= ccframe;
233 par_nc[1] -= ccframe;
234 par_nc[2] -= ccframe;
235 pMC->Gsvolu("UTIN", "TRD1", idtmed[1302-1], par_nc, nparnc);
237 // Definition of the six modules within each outer chamber
238 pMC->Gsdvn("UTMN", "UTIN", nmodul, 3);
240 // Definition of the layers of each chamber
244 // G10 layer (radiator layer)
245 par_nc[3] = sethick / 2;
246 pMC->Gsvolu("UT0N", "TRD1", idtmed[1313-1], par_nc, nparnc);
247 // CO2 layer (radiator)
248 par_nc[3] = rathick / 2;
249 pMC->Gsvolu("UT1N", "TRD1", idtmed[1312-1], par_nc, nparnc);
250 // PE layer (radiator)
251 par_nc[3] = pethick / 2;
252 pMC->Gsvolu("UT2N", "TRD1", idtmed[1303-1], par_nc, nparnc);
253 // Mylar layer (entrance window + HV cathode)
254 par_nc[3] = mythick / 2;
255 pMC->Gsvolu("UT3N", "TRD1", idtmed[1308-1], par_nc, nparnc);
256 // Xe/Isobutane layer (gasvolume)
257 par_nc[3] = xethick / 2;
258 pMC->Gsvolu("UT4N", "TRD1", idtmed[1309-1], par_nc, nparnc);
259 // Cu layer (pad plane)
260 par_nc[3] = cuthick / 2;
261 pMC->Gsvolu("UT5N", "TRD1", idtmed[1305-1], par_nc, nparnc);
262 // G10 layer (support structure)
263 par_nc[3] = suthick / 2;
264 pMC->Gsvolu("UT6N", "TRD1", idtmed[1313-1], par_nc, nparnc);
265 // Cu layer (FEE + signal lines)
266 par_nc[3] = fethick / 2;
267 pMC->Gsvolu("UT7N", "TRD1", idtmed[1305-1], par_nc, nparnc);
268 // PE layer (cooling devices)
269 par_nc[3] = cothick / 2;
270 pMC->Gsvolu("UT8N", "TRD1", idtmed[1303-1], par_nc, nparnc);
271 // Water layer (cooling)
272 par_nc[3] = wathick / 2;
273 pMC->Gsvolu("UT9N", "TRD1", idtmed[1314-1], par_nc, nparnc);
279 // The carbon frame (C)
280 par_ic[0] = widmi - frame;
281 par_ic[1] = widma - frame;
282 par_ic[2] = zleni / 2;
283 par_ic[3] = (rmax - rmin) / 2;
284 pMC->Gsvolu("UTCI", "TRD1", idtmed[1307-1], par_ic, nparic);
286 // The inner part (Air)
287 par_ic[0] -= ccframe;
288 par_ic[1] -= ccframe;
289 par_ic[2] -= ccframe;
290 pMC->Gsvolu("UTII", "TRD1", idtmed[1302-1], par_ic, nparic);
292 // Definition of the six modules within each outer chamber
293 pMC->Gsdvn("UTMI", "UTII", nmodul, 3);
295 // Definition of the layers of each inner chamber
299 // G10 layer (radiator layer)
300 par_ic[3] = sethick / 2;
301 pMC->Gsvolu("UT0I", "TRD1", idtmed[1313-1], par_ic, nparic);
302 // CO2 layer (radiator)
303 par_ic[3] = rathick / 2;
304 pMC->Gsvolu("UT1I", "TRD1", idtmed[1312-1], par_ic, nparic);
305 // PE layer (radiator)
306 par_ic[3] = pethick / 2;
307 pMC->Gsvolu("UT2I", "TRD1", idtmed[1303-1], par_ic, nparic);
308 // Mylar layer (entrance window + HV cathode)
309 par_ic[3] = mythick / 2;
310 pMC->Gsvolu("UT3I", "TRD1", idtmed[1308-1], par_ic, nparic);
311 // Xe/Isobutane layer (gasvolume)
312 par_ic[3] = xethick / 2;
313 pMC->Gsvolu("UT4I", "TRD1", idtmed[1309-1], par_ic, nparic);
314 // Cu layer (pad plane)
315 par_ic[3] = cuthick / 2;
316 pMC->Gsvolu("UT5I", "TRD1", idtmed[1305-1], par_ic, nparic);
317 // G10 layer (support structure)
318 par_ic[3] = suthick / 2;
319 pMC->Gsvolu("UT6I", "TRD1", idtmed[1313-1], par_ic, nparic);
320 // Cu layer (FEE + signal lines)
321 par_ic[3] = fethick / 2;
322 pMC->Gsvolu("UT7I", "TRD1", idtmed[1305-1], par_ic, nparic);
323 // PE layer (cooling devices)
324 par_ic[3] = cothick / 2;
325 pMC->Gsvolu("UT8I", "TRD1", idtmed[1303-1], par_ic, nparic);
326 // Water layer (cooling)
327 par_ic[3] = wathick / 2;
328 pMC->Gsvolu("UT9I", "TRD1", idtmed[1314-1], par_ic, nparic);
330 //////////////////////////////////////////////////////////////////////////
331 // Positioning of Volumes
332 //////////////////////////////////////////////////////////////////////////
334 // The rotation matrices
335 AliMatrix(idmat[0], 90., 180., 90., 90., 0., 0.);
336 AliMatrix(idmat[1], 90., 90., 180., 0., 90., 0.);
337 AliMatrix(idmat[2], 90., 180., 90., 270., 0., 0.);
339 // Position of the layers in a TRD module
340 f = TMath::Tan(theoc * kDegrad);
341 pMC->Gspos("UT9O", 1, "UTMO", 0., f*wazpos, wazpos, 0, "ONLY");
342 pMC->Gspos("UT8O", 1, "UTMO", 0., f*cozpos, cozpos, 0, "ONLY");
343 pMC->Gspos("UT7O", 1, "UTMO", 0., f*fezpos, fezpos, 0, "ONLY");
344 pMC->Gspos("UT6O", 1, "UTMO", 0., f*suzpos, suzpos, 0, "ONLY");
345 pMC->Gspos("UT5O", 1, "UTMO", 0., f*cuzpos, cuzpos, 0, "ONLY");
346 pMC->Gspos("UT4O", 1, "UTMO", 0., f*xezpos, xezpos, 0, "ONLY");
347 pMC->Gspos("UT3O", 1, "UTMO", 0., f*myzpos, myzpos, 0, "ONLY");
348 pMC->Gspos("UT1O", 1, "UTMO", 0., f*razpos, razpos, 0, "ONLY");
349 pMC->Gspos("UT0O", 1, "UTMO", 0., f*sezpos, sezpos, 0, "ONLY");
350 pMC->Gspos("UT2O", 1, "UT1O", 0., f*pezpos, pezpos, 0, "ONLY");
352 pMC->Gspos("UT9N", 1, "UTMN", 0., 0., wazpos, 0, "ONLY");
353 pMC->Gspos("UT8N", 1, "UTMN", 0., 0., cozpos, 0, "ONLY");
354 pMC->Gspos("UT7N", 1, "UTMN", 0., 0., fezpos, 0, "ONLY");
355 pMC->Gspos("UT6N", 1, "UTMN", 0., 0., suzpos, 0, "ONLY");
356 pMC->Gspos("UT5N", 1, "UTMN", 0., 0., cuzpos, 0, "ONLY");
357 pMC->Gspos("UT4N", 1, "UTMN", 0., 0., xezpos, 0, "ONLY");
358 pMC->Gspos("UT3N", 1, "UTMN", 0., 0., myzpos, 0, "ONLY");
359 pMC->Gspos("UT1N", 1, "UTMN", 0., 0., razpos, 0, "ONLY");
360 pMC->Gspos("UT0N", 1, "UTMN", 0., 0., sezpos, 0, "ONLY");
361 pMC->Gspos("UT2N", 1, "UT1N", 0., 0., pezpos, 0, "ONLY");
363 pMC->Gspos("UT9I", 1, "UTMI", 0., 0., wazpos, 0, "ONLY");
364 pMC->Gspos("UT8I", 1, "UTMI", 0., 0., cozpos, 0, "ONLY");
365 pMC->Gspos("UT7I", 1, "UTMI", 0., 0., fezpos, 0, "ONLY");
366 pMC->Gspos("UT6I", 1, "UTMI", 0., 0., suzpos, 0, "ONLY");
367 pMC->Gspos("UT5I", 1, "UTMI", 0., 0., cuzpos, 0, "ONLY");
368 pMC->Gspos("UT4I", 1, "UTMI", 0., 0., xezpos, 0, "ONLY");
369 pMC->Gspos("UT3I", 1, "UTMI", 0., 0., myzpos, 0, "ONLY");
370 pMC->Gspos("UT1I", 1, "UTMI", 0., 0., razpos, 0, "ONLY");
371 pMC->Gspos("UT0I", 1, "UTMI", 0., 0., sezpos, 0, "ONLY");
372 pMC->Gspos("UT2I", 1, "UT1I", 0., 0., pezpos, 0, "ONLY");
374 // Position of the inner part of the chambers
378 pMC->Gspos("UTII", 1, "UTCI", xpos, ypos, zpos, 0, "ONLY");
379 pMC->Gspos("UTIN", 1, "UTCN", xpos, ypos, zpos, 0, "ONLY");
380 pMC->Gspos("UTIO", 1, "UTCO", xpos, ypos, zpos, 0, "ONLY");
382 // Position of the chambers in the support frame
384 ypos = ((zmax1 + zmax2) / 2 + zlenn + zleni / 2) / 2;
386 pMC->Gspos("UTCO", 1, "UTRI", xpos, ypos, zpos, idmat[2], "ONLY");
387 pMC->Gspos("UTCO", 2, "UTRI", xpos,-ypos, zpos, 0 , "ONLY");
389 ypos = (zlenn + zleni) / 2;
391 pMC->Gspos("UTCN", 1, "UTRI", xpos, ypos, zpos, 0 , "ONLY");
392 pMC->Gspos("UTCN", 2, "UTRI", xpos,-ypos, zpos, 0 , "ONLY");
396 pMC->Gspos("UTCI", 1, "UTRI", xpos, ypos, zpos, 0 , "ONLY");
398 // Position of the inner part of the detector frame
399 xpos = (rmax + rmin) / 2;
402 pMC->Gspos("UTRI", 1, "UTRS", xpos, ypos, zpos, idmat[1], "ONLY");
404 // Position of the two arms of the detector
408 pMC->Gspos("UTRD", 1, "TRD ", xpos, ypos, zpos, 0, "ONLY");
409 pMC->Gspos("UTRD", 2, "TRD ", xpos, ypos, zpos, idmat[0], "ONLY");
411 // Position of TRD mother volume in ALICE experiment
415 pMC->Gspos("TRD ", 1, "ALIC", xpos, ypos, zpos, 0, "ONLY");
419 //_____________________________________________________________________________
420 void AliTRDv1::DrawModule()
423 // Draw a shaded view of the Transition Radiation Detector version 1
426 AliMC* pMC = AliMC::GetMC();
428 // Set everything unseen
429 pMC->Gsatt("*", "seen", -1);
431 // Set ALIC mother transparent
432 pMC->Gsatt("ALIC","SEEN",0);
434 // Set the volumes visible
435 pMC->Gsatt("TRD" ,"SEEN",0);
436 pMC->Gsatt("UTRD","SEEN",0);
437 pMC->Gsatt("UTRS","SEEN",0);
438 pMC->Gsatt("UTRI","SEEN",0);
439 pMC->Gsatt("UTCO","SEEN",0);
440 pMC->Gsatt("UTIO","SEEN",0);
441 pMC->Gsatt("UTMO","SEEN",0);
442 pMC->Gsatt("UTCN","SEEN",0);
443 pMC->Gsatt("UTIN","SEEN",0);
444 pMC->Gsatt("UTMN","SEEN",0);
445 pMC->Gsatt("UTCI","SEEN",0);
446 pMC->Gsatt("UTII","SEEN",0);
447 pMC->Gsatt("UTMI","SEEN",0);
448 pMC->Gsatt("UT1O","SEEN",1);
449 pMC->Gsatt("UT4O","SEEN",1);
450 pMC->Gsatt("UT1N","SEEN",1);
451 pMC->Gsatt("UT4N","SEEN",1);
452 pMC->Gsatt("UT1I","SEEN",1);
453 pMC->Gsatt("UT4I","SEEN",1);
455 pMC->Gdopt("hide", "on");
456 pMC->Gdopt("shad", "on");
457 pMC->Gsatt("*", "fill", 7);
458 pMC->SetClipBox(".");
459 pMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 2000);
461 pMC->Gdraw("alic", 40, 30, 0, 12, 9.4, .021, .021);
462 pMC->Gdhead(1111, "Transition Radiation Detector Version 1");
463 pMC->Gdman(18, 4, "MAN");
466 //_____________________________________________________________________________
467 void AliTRDv1::CreateMaterials()
470 // Create materials for the Transition Radiation Detector version 1
472 AliTRD::CreateMaterials();
475 //_____________________________________________________________________________
476 void AliTRDv1::Init()
479 // Initialise the Transition Radiation Detector after the geometry is built
482 AliMC* pMC = AliMC::GetMC();
484 // Retrieve the numeric identifier of the sensitive volumes (gas volume)
485 fIdSens1 = pMC->VolId("UT4I");
486 fIdSens2 = pMC->VolId("UT4N");
487 fIdSens3 = pMC->VolId("UT4O");
490 //_____________________________________________________________________________
491 void AliTRDv1::StepManager()
494 // Procedure called at every step in the TRD
498 Int_t icopy1, icopy2;
499 Int_t idSens, icSens;
503 TClonesArray &lhits = *fHits;
505 AliMC* pMC = AliMC::GetMC();
507 // Use only charged tracks and count them only once per volume
508 if (pMC->TrackCharge() && pMC->TrackExiting()) {
510 // Check on sensitive volume
511 idSens = pMC->CurrentVol(0,icSens);
513 // Check on sensitive volume
514 idSens = pMC->CurrentVol(0,icSens);
515 if ((idSens == fIdSens1) ||
516 (idSens == fIdSens2) ||
517 (idSens == fIdSens3)) {
520 pMC->CurrentVolOff(5,0,icopy1);
521 pMC->CurrentVolOff(6,0,icopy2);
525 vol[0] = 6 - icopy1 + 5;
527 // The chamber number
529 // 2: neighbouring left
531 // 4: neighbouring right
533 pMC->CurrentVolOff(3,0,icopy1);
534 if (idSens == fIdSens3)
535 vol[1] = 4 * icopy1 - 3;
536 else if (idSens == fIdSens2)
542 pMC->CurrentVolOff(1,0,icopy1);
546 Int_t addthishit = 1;
547 if ((fSensPlane) && (vol[2] != fSensPlane )) addthishit = 0;
548 if ((fSensChamber) && (vol[1] != fSensChamber)) addthishit = 0;
549 if ((fSensSector) && (vol[0] != fSensSector )) addthishit = 0;
551 pMC->TrackPosition(hits);
553 new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
557 pMC->TrackPosition(hits);
559 new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);