1 ///////////////////////////////////////////////////////////////////////////////
3 // Transition Radiation Detector version 0 -- coarse simulation //
7 <img src="picts/AliTRDv0Class.gif">
12 ///////////////////////////////////////////////////////////////////////////////
25 //_____________________________________________________________________________
26 AliTRDv0::AliTRDv0(const char *name, const char *title)
30 // Standard constructor for Transition Radiation Detector version 0
32 fIdSens1 = fIdSens2 = fIdSens3 = 0;
35 //_____________________________________________________________________________
36 void AliTRDv0::CreateGeometry()
39 // Create the GEANT geometry for the Transition Radiation Detector
40 // --- The coarse geometry of the TRD, that can be used for background
41 // studies. This version covers the full azimuth.
42 // --- Author : Christoph Blume (GSI) 17/5/99
45 // TRD --> Mother TRD volume (Al)
46 // UTRS --> Sectors of the sub-detector (Al)
47 // UTRI --> Inner part of the detector frame (Air)
48 // UTCI(N,O) --> Frames of the inner, neighbouring and outer chambers (C)
49 // UTII(N,O) --> Inner part of the chambers (Air)
50 // UTMI(N,O) --> Modules in the chambers (Air)
51 // UT0I(N,O) --> Radiator seal (G10)
52 // UT1I(N,O) --> Radiator (CO2)
53 // UT2I(N,O) --> Polyethylene of radiator (PE)
54 // UT3I(N,O) --> Entrance window (Mylar)
55 // UT4I(N,O) --> Gas volume (sensitive) (Xe/Isobutane)
56 // UT5I(N,O) --> Pad plane (Cu)
57 // UT6I(N,O) --> Support structure (G10)
58 // UT7I(N,O) --> FEE + signal lines (Cu)
59 // UT8I(N,O) --> Polyethylene of cooling device (PE)
60 // UT9I(N,O) --> Cooling water (Water)
64 <img src="picts/AliTRDv0.gif">
69 <img src="picts/AliTRDv0Tree.gif">
73 Float_t xpos, ypos, zpos, f;
76 const Int_t nparmo = 10;
77 const Int_t nparfr = 4;
78 const Int_t nparic = 4;
79 const Int_t nparnc = 4;
80 const Int_t nparoc = 11;
82 Float_t par_mo[nparmo];
83 Float_t par_fr[nparfr];
84 Float_t par_ic[nparic];
85 Float_t par_nc[nparnc];
86 Float_t par_oc[nparoc];
88 Int_t *idtmed =fIdtmed->GetArray()-1299;
90 //////////////////////////////////////////////////////////////////////////
91 // Definition of Volumes
92 //////////////////////////////////////////////////////////////////////////
94 // Definition of the mother volume for the TRD (Al)
105 gMC->Gsvolu("TRD ", "PGON", idtmed[1301-1], par_mo, nparmo);
106 gMC->Gsdvn("UTRS", "TRD ", nsect, 2);
108 // The minimal width of a sector in rphi-direction
109 Float_t widmi = rmin * TMath::Tan(kPI/nsect);
110 // The maximal width of a sector in rphi-direction
111 Float_t widma = rmax * TMath::Tan(kPI/nsect);
112 // The total thickness of the spaceframe (Al + Air)
113 Float_t frame = widmi - (widpl1 / 2);
115 // Definition of the inner part of the detector frame (Air)
116 par_fr[0] = widmi - alframe / 2.;
117 par_fr[1] = widma - alframe / 2.;
119 par_fr[3] = (rmax - rmin) / 2;
120 gMC->Gsvolu("UTRI", "TRD1", idtmed[1302-1], par_fr, nparfr);
123 // The outer chambers
126 // Calculate some shape-parameter
127 Float_t tanzr = (zmax1 - zmax2) / (rmax - rmin);
128 Float_t theoc = -kRaddeg * TMath::ATan(tanzr / 2);
130 // The carbon frame (C)
131 par_oc[0] = (rmax - rmin) / 2;
134 par_oc[3] = (zmax2 - zlenn - zleni/2) / 2;
135 par_oc[4] = widmi - frame;
136 par_oc[5] = widmi - frame;
138 par_oc[7] = (zmax1 - zlenn - zleni/2) / 2;
139 par_oc[8] = widma - frame;
140 par_oc[9] = widma - frame;
142 gMC->Gsvolu("UTCO", "TRAP", idtmed[1307-1], par_oc, nparoc);
144 // The inner part (Air)
145 par_oc[3] -= ccframe;
146 par_oc[4] -= ccframe;
147 par_oc[5] -= ccframe;
148 par_oc[7] -= ccframe;
149 par_oc[8] -= ccframe;
150 par_oc[9] -= ccframe;
151 gMC->Gsvolu("UTIO", "TRAP", idtmed[1302-1], par_oc, nparoc);
153 // Definition of the six modules within each chamber
154 gMC->Gsdvn("UTMO", "UTIO", nmodul, 3);
156 // Definition of the layers of each chamber
167 // G10 layer (radiator layer)
168 par_oc[0] = sethick / 2;
169 gMC->Gsvolu("UT0O", "TRAP", idtmed[1313-1], par_oc, nparoc);
170 // CO2 layer (radiator)
171 par_oc[0] = rathick / 2;
172 gMC->Gsvolu("UT1O", "TRAP", idtmed[1312-1], par_oc, nparoc);
173 // PE layer (radiator)
174 par_oc[0] = pethick / 2;
175 gMC->Gsvolu("UT2O", "TRAP", idtmed[1303-1], par_oc, nparoc);
176 // Mylar layer (entrance window + HV cathode)
177 par_oc[0] = mythick / 2;
178 gMC->Gsvolu("UT3O", "TRAP", idtmed[1308-1], par_oc, nparoc);
179 // Xe/Isobutane layer (gasvolume)
180 par_oc[0] = xethick / 2;
181 gMC->Gsvolu("UT4O", "TRAP", idtmed[1309-1], par_oc, nparoc);
182 // Cu layer (pad plane)
183 par_oc[0] = cuthick / 2;
184 gMC->Gsvolu("UT5O", "TRAP", idtmed[1305-1], par_oc, nparoc);
185 // G10 layer (support structure)
186 par_oc[0] = suthick / 2;
187 gMC->Gsvolu("UT6O", "TRAP", idtmed[1313-1], par_oc, nparoc);
188 // Cu layer (FEE + signal lines)
189 par_oc[0] = fethick / 2;
190 gMC->Gsvolu("UT7O", "TRAP", idtmed[1305-1], par_oc, nparoc);
191 // PE layer (cooling devices)
192 par_oc[0] = cothick / 2;
193 gMC->Gsvolu("UT8O", "TRAP", idtmed[1303-1], par_oc, nparoc);
194 // Water layer (cooling)
195 par_oc[0] = wathick / 2;
196 gMC->Gsvolu("UT9O", "TRAP", idtmed[1314-1], par_oc, nparoc);
199 // The neighbouring chambers
202 // The carbon frame (C)
203 par_nc[0] = widmi - frame;
204 par_nc[1] = widma - frame;
205 par_nc[2] = zlenn / 2;
206 par_nc[3] = (rmax - rmin) / 2;
207 gMC->Gsvolu("UTCN", "TRD1", idtmed[1307-1], par_nc, nparnc);
209 // The inner part (Air)
210 par_nc[0] -= ccframe;
211 par_nc[1] -= ccframe;
212 par_nc[2] -= ccframe;
213 gMC->Gsvolu("UTIN", "TRD1", idtmed[1302-1], par_nc, nparnc);
215 // Definition of the six modules within each outer chamber
216 gMC->Gsdvn("UTMN", "UTIN", nmodul, 3);
218 // Definition of the layers of each chamber
222 // G10 layer (radiator layer)
223 par_nc[3] = sethick / 2;
224 gMC->Gsvolu("UT0N", "TRD1", idtmed[1313-1], par_nc, nparnc);
225 // CO2 layer (radiator)
226 par_nc[3] = rathick / 2;
227 gMC->Gsvolu("UT1N", "TRD1", idtmed[1312-1], par_nc, nparnc);
228 // PE layer (radiator)
229 par_nc[3] = pethick / 2;
230 gMC->Gsvolu("UT2N", "TRD1", idtmed[1303-1], par_nc, nparnc);
231 // Mylar layer (entrance window + HV cathode)
232 par_nc[3] = mythick / 2;
233 gMC->Gsvolu("UT3N", "TRD1", idtmed[1308-1], par_nc, nparnc);
234 // Xe/Isobutane layer (gasvolume)
235 par_nc[3] = xethick / 2;
236 gMC->Gsvolu("UT4N", "TRD1", idtmed[1309-1], par_nc, nparnc);
237 // Cu layer (pad plane)
238 par_nc[3] = cuthick / 2;
239 gMC->Gsvolu("UT5N", "TRD1", idtmed[1305-1], par_nc, nparnc);
240 // G10 layer (support structure)
241 par_nc[3] = suthick / 2;
242 gMC->Gsvolu("UT6N", "TRD1", idtmed[1313-1], par_nc, nparnc);
243 // Cu layer (FEE + signal lines)
244 par_nc[3] = fethick / 2;
245 gMC->Gsvolu("UT7N", "TRD1", idtmed[1305-1], par_nc, nparnc);
246 // PE layer (cooling devices)
247 par_nc[3] = cothick / 2;
248 gMC->Gsvolu("UT8N", "TRD1", idtmed[1303-1], par_nc, nparnc);
249 // Water layer (cooling)
250 par_nc[3] = wathick / 2;
251 gMC->Gsvolu("UT9N", "TRD1", idtmed[1314-1], par_nc, nparnc);
257 // The carbon frame (C)
258 par_ic[0] = widmi - frame;
259 par_ic[1] = widma - frame;
260 par_ic[2] = zleni / 2;
261 par_ic[3] = (rmax - rmin) / 2;
262 gMC->Gsvolu("UTCI", "TRD1", idtmed[1307-1], par_ic, nparic);
264 // The inner part (Air)
265 par_ic[0] -= ccframe;
266 par_ic[1] -= ccframe;
267 par_ic[2] -= ccframe;
268 gMC->Gsvolu("UTII", "TRD1", idtmed[1302-1], par_ic, nparic);
270 // Definition of the six modules within each outer chamber
271 gMC->Gsdvn("UTMI", "UTII", nmodul, 3);
273 // Definition of the layers of each inner chamber
277 // G10 layer (radiator layer)
278 par_ic[3] = sethick / 2;
279 gMC->Gsvolu("UT0I", "TRD1", idtmed[1313-1], par_ic, nparic);
280 // CO2 layer (radiator)
281 par_ic[3] = rathick / 2;
282 gMC->Gsvolu("UT1I", "TRD1", idtmed[1312-1], par_ic, nparic);
283 // PE layer (radiator)
284 par_ic[3] = pethick / 2;
285 gMC->Gsvolu("UT2I", "TRD1", idtmed[1303-1], par_ic, nparic);
286 // Mylar layer (entrance window + HV cathode)
287 par_ic[3] = mythick / 2;
288 gMC->Gsvolu("UT3I", "TRD1", idtmed[1308-1], par_ic, nparic);
289 // Xe/Isobutane layer (gasvolume)
290 par_ic[3] = xethick / 2;
291 gMC->Gsvolu("UT4I", "TRD1", idtmed[1309-1], par_ic, nparic);
292 // Cu layer (pad plane)
293 par_ic[3] = cuthick / 2;
294 gMC->Gsvolu("UT5I", "TRD1", idtmed[1305-1], par_ic, nparic);
295 // G10 layer (support structure)
296 par_ic[3] = suthick / 2;
297 gMC->Gsvolu("UT6I", "TRD1", idtmed[1313-1], par_ic, nparic);
298 // Cu layer (FEE + signal lines)
299 par_ic[3] = fethick / 2;
300 gMC->Gsvolu("UT7I", "TRD1", idtmed[1305-1], par_ic, nparic);
301 // PE layer (cooling devices)
302 par_ic[3] = cothick / 2;
303 gMC->Gsvolu("UT8I", "TRD1", idtmed[1303-1], par_ic, nparic);
304 // Water layer (cooling)
305 par_ic[3] = wathick / 2;
306 gMC->Gsvolu("UT9I", "TRD1", idtmed[1314-1], par_ic, nparic);
308 //////////////////////////////////////////////////////////////////////////
309 // Positioning of Volumes
310 //////////////////////////////////////////////////////////////////////////
312 // The rotation matrices
313 AliMatrix(idmat[0], 90., 90., 180., 0., 90., 0.);
314 AliMatrix(idmat[1], 90., 180., 90., 270., 0., 0.);
316 // Position of the layers in a TRD module
317 f = TMath::Tan(theoc * kDegrad);
318 gMC->Gspos("UT9O", 1, "UTMO", 0., f*wazpos, wazpos, 0, "ONLY");
319 gMC->Gspos("UT8O", 1, "UTMO", 0., f*cozpos, cozpos, 0, "ONLY");
320 gMC->Gspos("UT7O", 1, "UTMO", 0., f*fezpos, fezpos, 0, "ONLY");
321 gMC->Gspos("UT6O", 1, "UTMO", 0., f*suzpos, suzpos, 0, "ONLY");
322 gMC->Gspos("UT5O", 1, "UTMO", 0., f*cuzpos, cuzpos, 0, "ONLY");
323 gMC->Gspos("UT4O", 1, "UTMO", 0., f*xezpos, xezpos, 0, "ONLY");
324 gMC->Gspos("UT3O", 1, "UTMO", 0., f*myzpos, myzpos, 0, "ONLY");
325 gMC->Gspos("UT1O", 1, "UTMO", 0., f*razpos, razpos, 0, "ONLY");
326 gMC->Gspos("UT0O", 1, "UTMO", 0., f*sezpos, sezpos, 0, "ONLY");
327 gMC->Gspos("UT2O", 1, "UT1O", 0., f*pezpos, pezpos, 0, "ONLY");
329 gMC->Gspos("UT9N", 1, "UTMN", 0., 0., wazpos, 0, "ONLY");
330 gMC->Gspos("UT8N", 1, "UTMN", 0., 0., cozpos, 0, "ONLY");
331 gMC->Gspos("UT7N", 1, "UTMN", 0., 0., fezpos, 0, "ONLY");
332 gMC->Gspos("UT6N", 1, "UTMN", 0., 0., suzpos, 0, "ONLY");
333 gMC->Gspos("UT5N", 1, "UTMN", 0., 0., cuzpos, 0, "ONLY");
334 gMC->Gspos("UT4N", 1, "UTMN", 0., 0., xezpos, 0, "ONLY");
335 gMC->Gspos("UT3N", 1, "UTMN", 0., 0., myzpos, 0, "ONLY");
336 gMC->Gspos("UT1N", 1, "UTMN", 0., 0., razpos, 0, "ONLY");
337 gMC->Gspos("UT0N", 1, "UTMN", 0., 0., sezpos, 0, "ONLY");
338 gMC->Gspos("UT2N", 1, "UT1N", 0., 0., pezpos, 0, "ONLY");
340 gMC->Gspos("UT9I", 1, "UTMI", 0., 0., wazpos, 0, "ONLY");
341 gMC->Gspos("UT8I", 1, "UTMI", 0., 0., cozpos, 0, "ONLY");
342 gMC->Gspos("UT7I", 1, "UTMI", 0., 0., fezpos, 0, "ONLY");
343 gMC->Gspos("UT6I", 1, "UTMI", 0., 0., suzpos, 0, "ONLY");
344 gMC->Gspos("UT5I", 1, "UTMI", 0., 0., cuzpos, 0, "ONLY");
345 gMC->Gspos("UT4I", 1, "UTMI", 0., 0., xezpos, 0, "ONLY");
346 gMC->Gspos("UT3I", 1, "UTMI", 0., 0., myzpos, 0, "ONLY");
347 gMC->Gspos("UT1I", 1, "UTMI", 0., 0., razpos, 0, "ONLY");
348 gMC->Gspos("UT0I", 1, "UTMI", 0., 0., sezpos, 0, "ONLY");
349 gMC->Gspos("UT2I", 1, "UT1I", 0., 0., pezpos, 0, "ONLY");
351 // Position of the inner part of the chambers
355 gMC->Gspos("UTII", 1, "UTCI", xpos, ypos, zpos, 0, "ONLY");
356 gMC->Gspos("UTIN", 1, "UTCN", xpos, ypos, zpos, 0, "ONLY");
357 gMC->Gspos("UTIO", 1, "UTCO", xpos, ypos, zpos, 0, "ONLY");
359 // Position of the chambers in the support frame
361 ypos = ((zmax1 + zmax2) / 2 + zlenn + zleni / 2) / 2;
363 gMC->Gspos("UTCO", 1, "UTRI", xpos, ypos, zpos, idmat[1], "ONLY");
364 gMC->Gspos("UTCO", 2, "UTRI", xpos,-ypos, zpos, 0 , "ONLY");
366 ypos = (zlenn + zleni) / 2;
368 gMC->Gspos("UTCN", 1, "UTRI", xpos, ypos, zpos, 0 , "ONLY");
369 gMC->Gspos("UTCN", 2, "UTRI", xpos,-ypos, zpos, 0 , "ONLY");
373 gMC->Gspos("UTCI", 1, "UTRI", xpos, ypos, zpos, 0 , "ONLY");
375 // Position of the inner part of the detector frame
376 xpos = (rmax + rmin) / 2;
379 gMC->Gspos("UTRI", 1, "UTRS", xpos, ypos, zpos, idmat[0], "ONLY");
381 // Position of the TRD mother volume in the ALICE experiment
385 gMC->Gspos("TRD ", 1, "ALIC", xpos, ypos, zpos, 0, "ONLY");
389 //_____________________________________________________________________________
390 void AliTRDv0::DrawModule()
394 // Draw a shaded view of the Transition Radiation Detector version 0
397 // Set everything unseen
398 gMC->Gsatt("*", "seen", -1);
400 // Set ALIC mother transparent
401 gMC->Gsatt("ALIC","SEEN",0);
403 // Set the volumes visible
404 gMC->Gsatt("TRD" ,"SEEN",0);
405 gMC->Gsatt("UTRS","SEEN",0);
406 gMC->Gsatt("UTRI","SEEN",0);
407 gMC->Gsatt("UTCO","SEEN",0);
408 gMC->Gsatt("UTIO","SEEN",0);
409 gMC->Gsatt("UTMO","SEEN",0);
410 gMC->Gsatt("UTCN","SEEN",0);
411 gMC->Gsatt("UTIN","SEEN",0);
412 gMC->Gsatt("UTMN","SEEN",0);
413 gMC->Gsatt("UTCI","SEEN",0);
414 gMC->Gsatt("UTII","SEEN",0);
415 gMC->Gsatt("UTMI","SEEN",0);
416 gMC->Gsatt("UT1O","SEEN",1);
417 gMC->Gsatt("UT4O","SEEN",1);
418 gMC->Gsatt("UT1N","SEEN",1);
419 gMC->Gsatt("UT4N","SEEN",1);
420 gMC->Gsatt("UT1I","SEEN",1);
421 gMC->Gsatt("UT4I","SEEN",1);
423 gMC->Gdopt("hide", "on");
424 gMC->Gdopt("shad", "on");
425 gMC->Gsatt("*", "fill", 7);
426 gMC->SetClipBox(".");
427 gMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 2000);
429 gMC->Gdraw("alic", 40, 30, 0, 12, 9.4, .021, .021);
430 gMC->Gdhead(1111, "Transition Radiation Detector Version 0");
431 gMC->Gdman(18, 4, "MAN");
435 //_____________________________________________________________________________
436 void AliTRDv0::CreateMaterials()
439 // Create materials for the Transition Radiation Detector
441 AliTRD::CreateMaterials();
444 //_____________________________________________________________________________
445 void AliTRDv0::Init()
448 // Initialise Transition Radiation Detector after geometry is built
452 // Retrieve the numeric identifier of the sensitive volumes (gas volume)
453 fIdSens1 = gMC->VolId("UT4I");
454 fIdSens2 = gMC->VolId("UT4N");
455 fIdSens3 = gMC->VolId("UT4O");
458 //_____________________________________________________________________________
459 void AliTRDv0::StepManager()
462 // Procedure called at every step in the TRD
466 Int_t icopy, idSens, icSens, i;
471 TClonesArray &lhits = *fHits;
473 // Use only charged tracks and count them only once per volume
474 if (gMC->TrackCharge() && gMC->IsTrackExiting()) {
476 // Check on sensitive volume
477 idSens = gMC->CurrentVolID(icSens);
478 if ((idSens == fIdSens1) ||
479 (idSens == fIdSens2) ||
480 (idSens == fIdSens3)) {
483 gMC->CurrentVolOffID(5,icopy);
486 // The chamber number
488 // 2: neighbouring left
490 // 4: neighbouring right
492 gMC->CurrentVolOffID(3,icopy);
493 if (idSens == fIdSens3)
494 vol[1] = 4 * icopy - 3;
495 else if (idSens == fIdSens2)
501 gMC->CurrentVolOffID(1,icopy);
505 Int_t addthishit = 1;
506 if ((fSensPlane) && (vol[2] != fSensPlane )) addthishit = 0;
507 if ((fSensChamber) && (vol[1] != fSensChamber)) addthishit = 0;
508 if ((fSensSector) && (vol[0] != fSensSector )) addthishit = 0;
510 gMC->TrackPosition(p);
511 for(i=0;i<3;++i) hits[i]=p[i];
513 new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
517 gMC->TrackPosition(p);
518 for(i=0;i<3;++i) hits[i]=p[i];
520 new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);