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 = gAlice->Idtmed();
90 AliMC* pMC = AliMC::GetMC();
92 //////////////////////////////////////////////////////////////////////////
93 // Definition of Volumes
94 //////////////////////////////////////////////////////////////////////////
96 // Definition of the mother volume for the TRD (Al)
107 pMC->Gsvolu("TRD ", "PGON", idtmed[1301-1], par_mo, nparmo);
108 pMC->Gsdvn("UTRS", "TRD ", nsect, 2);
110 // The minimal width of a sector in rphi-direction
111 Float_t widmi = rmin * TMath::Sin(kPI/nsect);
112 // The maximal width of a sector in rphi-direction
113 Float_t widma = rmax * TMath::Sin(kPI/nsect);
114 // The total thickness of the spaceframe (Al + Air)
115 Float_t frame = widmi - (widpl1 / 2);
117 // Definition of the inner part of the detector frame (Air)
118 par_fr[0] = widmi - alframe / 2.;
119 par_fr[1] = widma - alframe / 2.;
121 par_fr[3] = (rmax - rmin) / 2;
122 pMC->Gsvolu("UTRI", "TRD1", idtmed[1302-1], par_fr, nparfr);
125 // The outer chambers
128 // Calculate some shape-parameter
129 Float_t tanzr = (zmax1 - zmax2) / (rmax - rmin);
130 Float_t theoc = -kRaddeg * TMath::ATan(tanzr / 2);
132 // The carbon frame (C)
133 par_oc[0] = (rmax - rmin) / 2;
136 par_oc[3] = (zmax2 - zlenn - zleni/2) / 2;
137 par_oc[4] = widmi - frame;
138 par_oc[5] = widmi - frame;
140 par_oc[7] = (zmax1 - zlenn - zleni/2) / 2;
141 par_oc[8] = widma - frame;
142 par_oc[9] = widma - frame;
144 pMC->Gsvolu("UTCO", "TRAP", idtmed[1307-1], par_oc, nparoc);
146 // The inner part (Air)
147 par_oc[3] -= ccframe;
148 par_oc[4] -= ccframe;
149 par_oc[5] -= ccframe;
150 par_oc[7] -= ccframe;
151 par_oc[8] -= ccframe;
152 par_oc[9] -= ccframe;
153 pMC->Gsvolu("UTIO", "TRAP", idtmed[1302-1], par_oc, nparoc);
155 // Definition of the six modules within each chamber
156 pMC->Gsdvn("UTMO", "UTIO", nmodul, 3);
158 // Definition of the layers of each chamber
169 // G10 layer (radiator layer)
170 par_oc[0] = sethick / 2;
171 pMC->Gsvolu("UT0O", "TRAP", idtmed[1313-1], par_oc, nparoc);
172 // CO2 layer (radiator)
173 par_oc[0] = rathick / 2;
174 pMC->Gsvolu("UT1O", "TRAP", idtmed[1312-1], par_oc, nparoc);
175 // PE layer (radiator)
176 par_oc[0] = pethick / 2;
177 pMC->Gsvolu("UT2O", "TRAP", idtmed[1303-1], par_oc, nparoc);
178 // Mylar layer (entrance window + HV cathode)
179 par_oc[0] = mythick / 2;
180 pMC->Gsvolu("UT3O", "TRAP", idtmed[1308-1], par_oc, nparoc);
181 // Xe/Isobutane layer (gasvolume)
182 par_oc[0] = xethick / 2;
183 pMC->Gsvolu("UT4O", "TRAP", idtmed[1309-1], par_oc, nparoc);
184 // Cu layer (pad plane)
185 par_oc[0] = cuthick / 2;
186 pMC->Gsvolu("UT5O", "TRAP", idtmed[1305-1], par_oc, nparoc);
187 // G10 layer (support structure)
188 par_oc[0] = suthick / 2;
189 pMC->Gsvolu("UT6O", "TRAP", idtmed[1313-1], par_oc, nparoc);
190 // Cu layer (FEE + signal lines)
191 par_oc[0] = fethick / 2;
192 pMC->Gsvolu("UT7O", "TRAP", idtmed[1305-1], par_oc, nparoc);
193 // PE layer (cooling devices)
194 par_oc[0] = cothick / 2;
195 pMC->Gsvolu("UT8O", "TRAP", idtmed[1303-1], par_oc, nparoc);
196 // Water layer (cooling)
197 par_oc[0] = wathick / 2;
198 pMC->Gsvolu("UT9O", "TRAP", idtmed[1314-1], par_oc, nparoc);
201 // The neighbouring chambers
204 // The carbon frame (C)
205 par_nc[0] = widmi - frame;
206 par_nc[1] = widma - frame;
207 par_nc[2] = zlenn / 2;
208 par_nc[3] = (rmax - rmin) / 2;
209 pMC->Gsvolu("UTCN", "TRD1", idtmed[1307-1], par_nc, nparnc);
211 // The inner part (Air)
212 par_nc[0] -= ccframe;
213 par_nc[1] -= ccframe;
214 par_nc[2] -= ccframe;
215 pMC->Gsvolu("UTIN", "TRD1", idtmed[1302-1], par_nc, nparnc);
217 // Definition of the six modules within each outer chamber
218 pMC->Gsdvn("UTMN", "UTIN", nmodul, 3);
220 // Definition of the layers of each chamber
224 // G10 layer (radiator layer)
225 par_nc[3] = sethick / 2;
226 pMC->Gsvolu("UT0N", "TRD1", idtmed[1313-1], par_nc, nparnc);
227 // CO2 layer (radiator)
228 par_nc[3] = rathick / 2;
229 pMC->Gsvolu("UT1N", "TRD1", idtmed[1312-1], par_nc, nparnc);
230 // PE layer (radiator)
231 par_nc[3] = pethick / 2;
232 pMC->Gsvolu("UT2N", "TRD1", idtmed[1303-1], par_nc, nparnc);
233 // Mylar layer (entrance window + HV cathode)
234 par_nc[3] = mythick / 2;
235 pMC->Gsvolu("UT3N", "TRD1", idtmed[1308-1], par_nc, nparnc);
236 // Xe/Isobutane layer (gasvolume)
237 par_nc[3] = xethick / 2;
238 pMC->Gsvolu("UT4N", "TRD1", idtmed[1309-1], par_nc, nparnc);
239 // Cu layer (pad plane)
240 par_nc[3] = cuthick / 2;
241 pMC->Gsvolu("UT5N", "TRD1", idtmed[1305-1], par_nc, nparnc);
242 // G10 layer (support structure)
243 par_nc[3] = suthick / 2;
244 pMC->Gsvolu("UT6N", "TRD1", idtmed[1313-1], par_nc, nparnc);
245 // Cu layer (FEE + signal lines)
246 par_nc[3] = fethick / 2;
247 pMC->Gsvolu("UT7N", "TRD1", idtmed[1305-1], par_nc, nparnc);
248 // PE layer (cooling devices)
249 par_nc[3] = cothick / 2;
250 pMC->Gsvolu("UT8N", "TRD1", idtmed[1303-1], par_nc, nparnc);
251 // Water layer (cooling)
252 par_nc[3] = wathick / 2;
253 pMC->Gsvolu("UT9N", "TRD1", idtmed[1314-1], par_nc, nparnc);
259 // The carbon frame (C)
260 par_ic[0] = widmi - frame;
261 par_ic[1] = widma - frame;
262 par_ic[2] = zleni / 2;
263 par_ic[3] = (rmax - rmin) / 2;
264 pMC->Gsvolu("UTCI", "TRD1", idtmed[1307-1], par_ic, nparic);
266 // The inner part (Air)
267 par_ic[0] -= ccframe;
268 par_ic[1] -= ccframe;
269 par_ic[2] -= ccframe;
270 pMC->Gsvolu("UTII", "TRD1", idtmed[1302-1], par_ic, nparic);
272 // Definition of the six modules within each outer chamber
273 pMC->Gsdvn("UTMI", "UTII", nmodul, 3);
275 // Definition of the layers of each inner chamber
279 // G10 layer (radiator layer)
280 par_ic[3] = sethick / 2;
281 pMC->Gsvolu("UT0I", "TRD1", idtmed[1313-1], par_ic, nparic);
282 // CO2 layer (radiator)
283 par_ic[3] = rathick / 2;
284 pMC->Gsvolu("UT1I", "TRD1", idtmed[1312-1], par_ic, nparic);
285 // PE layer (radiator)
286 par_ic[3] = pethick / 2;
287 pMC->Gsvolu("UT2I", "TRD1", idtmed[1303-1], par_ic, nparic);
288 // Mylar layer (entrance window + HV cathode)
289 par_ic[3] = mythick / 2;
290 pMC->Gsvolu("UT3I", "TRD1", idtmed[1308-1], par_ic, nparic);
291 // Xe/Isobutane layer (gasvolume)
292 par_ic[3] = xethick / 2;
293 pMC->Gsvolu("UT4I", "TRD1", idtmed[1309-1], par_ic, nparic);
294 // Cu layer (pad plane)
295 par_ic[3] = cuthick / 2;
296 pMC->Gsvolu("UT5I", "TRD1", idtmed[1305-1], par_ic, nparic);
297 // G10 layer (support structure)
298 par_ic[3] = suthick / 2;
299 pMC->Gsvolu("UT6I", "TRD1", idtmed[1313-1], par_ic, nparic);
300 // Cu layer (FEE + signal lines)
301 par_ic[3] = fethick / 2;
302 pMC->Gsvolu("UT7I", "TRD1", idtmed[1305-1], par_ic, nparic);
303 // PE layer (cooling devices)
304 par_ic[3] = cothick / 2;
305 pMC->Gsvolu("UT8I", "TRD1", idtmed[1303-1], par_ic, nparic);
306 // Water layer (cooling)
307 par_ic[3] = wathick / 2;
308 pMC->Gsvolu("UT9I", "TRD1", idtmed[1314-1], par_ic, nparic);
310 //////////////////////////////////////////////////////////////////////////
311 // Positioning of Volumes
312 //////////////////////////////////////////////////////////////////////////
314 // The rotation matrices
315 AliMatrix(idmat[0], 90., 90., 180., 0., 90., 0.);
316 AliMatrix(idmat[1], 90., 180., 90., 270., 0., 0.);
318 // Position of the layers in a TRD module
319 f = TMath::Tan(theoc * kDegrad);
320 pMC->Gspos("UT9O", 1, "UTMO", 0., f*wazpos, wazpos, 0, "ONLY");
321 pMC->Gspos("UT8O", 1, "UTMO", 0., f*cozpos, cozpos, 0, "ONLY");
322 pMC->Gspos("UT7O", 1, "UTMO", 0., f*fezpos, fezpos, 0, "ONLY");
323 pMC->Gspos("UT6O", 1, "UTMO", 0., f*suzpos, suzpos, 0, "ONLY");
324 pMC->Gspos("UT5O", 1, "UTMO", 0., f*cuzpos, cuzpos, 0, "ONLY");
325 pMC->Gspos("UT4O", 1, "UTMO", 0., f*xezpos, xezpos, 0, "ONLY");
326 pMC->Gspos("UT3O", 1, "UTMO", 0., f*myzpos, myzpos, 0, "ONLY");
327 pMC->Gspos("UT1O", 1, "UTMO", 0., f*razpos, razpos, 0, "ONLY");
328 pMC->Gspos("UT0O", 1, "UTMO", 0., f*sezpos, sezpos, 0, "ONLY");
329 pMC->Gspos("UT2O", 1, "UT1O", 0., f*pezpos, pezpos, 0, "ONLY");
331 pMC->Gspos("UT9N", 1, "UTMN", 0., 0., wazpos, 0, "ONLY");
332 pMC->Gspos("UT8N", 1, "UTMN", 0., 0., cozpos, 0, "ONLY");
333 pMC->Gspos("UT7N", 1, "UTMN", 0., 0., fezpos, 0, "ONLY");
334 pMC->Gspos("UT6N", 1, "UTMN", 0., 0., suzpos, 0, "ONLY");
335 pMC->Gspos("UT5N", 1, "UTMN", 0., 0., cuzpos, 0, "ONLY");
336 pMC->Gspos("UT4N", 1, "UTMN", 0., 0., xezpos, 0, "ONLY");
337 pMC->Gspos("UT3N", 1, "UTMN", 0., 0., myzpos, 0, "ONLY");
338 pMC->Gspos("UT1N", 1, "UTMN", 0., 0., razpos, 0, "ONLY");
339 pMC->Gspos("UT0N", 1, "UTMN", 0., 0., sezpos, 0, "ONLY");
340 pMC->Gspos("UT2N", 1, "UT1N", 0., 0., pezpos, 0, "ONLY");
342 pMC->Gspos("UT9I", 1, "UTMI", 0., 0., wazpos, 0, "ONLY");
343 pMC->Gspos("UT8I", 1, "UTMI", 0., 0., cozpos, 0, "ONLY");
344 pMC->Gspos("UT7I", 1, "UTMI", 0., 0., fezpos, 0, "ONLY");
345 pMC->Gspos("UT6I", 1, "UTMI", 0., 0., suzpos, 0, "ONLY");
346 pMC->Gspos("UT5I", 1, "UTMI", 0., 0., cuzpos, 0, "ONLY");
347 pMC->Gspos("UT4I", 1, "UTMI", 0., 0., xezpos, 0, "ONLY");
348 pMC->Gspos("UT3I", 1, "UTMI", 0., 0., myzpos, 0, "ONLY");
349 pMC->Gspos("UT1I", 1, "UTMI", 0., 0., razpos, 0, "ONLY");
350 pMC->Gspos("UT0I", 1, "UTMI", 0., 0., sezpos, 0, "ONLY");
351 pMC->Gspos("UT2I", 1, "UT1I", 0., 0., pezpos, 0, "ONLY");
353 // Position of the inner part of the chambers
357 pMC->Gspos("UTII", 1, "UTCI", xpos, ypos, zpos, 0, "ONLY");
358 pMC->Gspos("UTIN", 1, "UTCN", xpos, ypos, zpos, 0, "ONLY");
359 pMC->Gspos("UTIO", 1, "UTCO", xpos, ypos, zpos, 0, "ONLY");
361 // Position of the chambers in the support frame
363 ypos = ((zmax1 + zmax2) / 2 + zlenn + zleni / 2) / 2;
365 pMC->Gspos("UTCO", 1, "UTRI", xpos, ypos, zpos, idmat[1], "ONLY");
366 pMC->Gspos("UTCO", 2, "UTRI", xpos,-ypos, zpos, 0 , "ONLY");
368 ypos = (zlenn + zleni) / 2;
370 pMC->Gspos("UTCN", 1, "UTRI", xpos, ypos, zpos, 0 , "ONLY");
371 pMC->Gspos("UTCN", 2, "UTRI", xpos,-ypos, zpos, 0 , "ONLY");
375 pMC->Gspos("UTCI", 1, "UTRI", xpos, ypos, zpos, 0 , "ONLY");
377 // Position of the inner part of the detector frame
378 xpos = (rmax + rmin) / 2;
381 pMC->Gspos("UTRI", 1, "UTRS", xpos, ypos, zpos, idmat[0], "ONLY");
383 // Position of the TRD mother volume in the ALICE experiment
387 pMC->Gspos("TRD ", 1, "ALIC", xpos, ypos, zpos, 0, "ONLY");
391 //_____________________________________________________________________________
392 void AliTRDv0::DrawModule()
396 // Draw a shaded view of the Transition Radiation Detector version 0
399 AliMC* pMC = AliMC::GetMC();
401 // Set everything unseen
402 pMC->Gsatt("*", "seen", -1);
404 // Set ALIC mother transparent
405 pMC->Gsatt("ALIC","SEEN",0);
407 // Set the volumes visible
408 pMC->Gsatt("TRD" ,"SEEN",0);
409 pMC->Gsatt("UTRS","SEEN",0);
410 pMC->Gsatt("UTRI","SEEN",0);
411 pMC->Gsatt("UTCO","SEEN",0);
412 pMC->Gsatt("UTIO","SEEN",0);
413 pMC->Gsatt("UTMO","SEEN",0);
414 pMC->Gsatt("UTCN","SEEN",0);
415 pMC->Gsatt("UTIN","SEEN",0);
416 pMC->Gsatt("UTMN","SEEN",0);
417 pMC->Gsatt("UTCI","SEEN",0);
418 pMC->Gsatt("UTII","SEEN",0);
419 pMC->Gsatt("UTMI","SEEN",0);
420 pMC->Gsatt("UT1O","SEEN",1);
421 pMC->Gsatt("UT4O","SEEN",1);
422 pMC->Gsatt("UT1N","SEEN",1);
423 pMC->Gsatt("UT4N","SEEN",1);
424 pMC->Gsatt("UT1I","SEEN",1);
425 pMC->Gsatt("UT4I","SEEN",1);
427 pMC->Gdopt("hide", "on");
428 pMC->Gdopt("shad", "on");
429 pMC->Gsatt("*", "fill", 7);
430 pMC->SetClipBox(".");
431 pMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 2000);
433 pMC->Gdraw("alic", 40, 30, 0, 12, 9.4, .021, .021);
434 pMC->Gdhead(1111, "Transition Radiation Detector Version 0");
435 pMC->Gdman(18, 4, "MAN");
439 //_____________________________________________________________________________
440 void AliTRDv0::CreateMaterials()
443 // Create materials for the Transition Radiation Detector
445 AliTRD::CreateMaterials();
448 //_____________________________________________________________________________
449 void AliTRDv0::Init()
452 // Initialise Transition Radiation Detector after geometry is built
455 AliMC* pMC = AliMC::GetMC();
457 // Retrieve the numeric identifier of the sensitive volumes (gas volume)
458 fIdSens1 = pMC->VolId("UT4I");
459 fIdSens2 = pMC->VolId("UT4N");
460 fIdSens3 = pMC->VolId("UT4O");
463 //_____________________________________________________________________________
464 void AliTRDv0::StepManager()
467 // Procedure called at every step in the TRD
471 Int_t icopy, idSens, icSens;
475 TClonesArray &lhits = *fHits;
477 AliMC* pMC = AliMC::GetMC();
479 // Use only charged tracks and count them only once per volume
480 if (pMC->TrackCharge() && pMC->TrackExiting()) {
482 // Check on sensitive volume
483 idSens = pMC->CurrentVol(0,icSens);
484 if ((idSens == fIdSens1) ||
485 (idSens == fIdSens2) ||
486 (idSens == fIdSens3)) {
489 pMC->CurrentVolOff(5,0,icopy);
492 // The chamber number
494 // 2: neighbouring left
496 // 4: neighbouring right
498 pMC->CurrentVolOff(3,0,icopy);
499 if (idSens == fIdSens3)
500 vol[1] = 4 * icopy - 3;
501 else if (idSens == fIdSens2)
507 pMC->CurrentVolOff(1,0,icopy);
511 Int_t addthishit = 1;
512 if ((fSensPlane) && (vol[2] != fSensPlane )) addthishit = 0;
513 if ((fSensChamber) && (vol[1] != fSensChamber)) addthishit = 0;
514 if ((fSensSector) && (vol[0] != fSensSector )) addthishit = 0;
516 pMC->TrackPosition(hits);
518 new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
522 pMC->TrackPosition(hits);
524 new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);