1 ///////////////////////////////////////////////////////////////////////////////
3 // Time Projection Chamber version 0 -- "coarse" TPC //
7 <img src="picts/AliTPCv0Class.gif">
12 ///////////////////////////////////////////////////////////////////////////////
15 #include <TGeometry.h>
28 //_____________________________________________________________________________
29 AliTPCv0::AliTPCv0(const char *name, const char *title)
33 // Standard creator for TPC version 0
37 //_____________________________________________________________________________
38 void AliTPCv0::CreateGeometry()
41 // Creation of the TPC coarse geometry (version 0)
42 // Origin Marek Kowalski Crakow
46 <img src="picts/AliTPCv0.gif">
51 <img src="picts/AliTPCv0Tree.gif">
55 Int_t *idtmed = fIdtmed->GetArray()-399;
57 Float_t tana, rlsl, wlsl, rssl, rlsu, wssl, wlsu,
58 rssu, wssu, alpha, x, y, sec_thick;
60 Float_t x1, z0, z1, x2, theta1, theta2, theta3, dm[21];
68 Float_t opl, opu, phi1, phi2, phi3;
70 // ----------------------------------------------------
71 // FIELD CAGE WITH ENDCAPS - CARBON FIBER
72 // THIS IS ALSO A TPC MOTHER VOLUME
73 // ----------------------------------------------------
78 gMC->Gsvolu("TPC ", "TUBE", idtmed[407], dm, 3);
79 // -------------------------------------------------------
80 // drift gas Ne/CO2 (90/10 volume) - nonsensitive
81 // field cage thickness = 0.52% X0
82 // ----------------------------------------------------
87 gMC->Gsvolu("TGAS", "TUBE", idtmed[402], dm, 3);
88 // ------------------------------------------------------
89 // "side" gas volume (the same as drift gas)
90 // here the readout chambers are positioned
91 // ------------------------------------------------------
92 dm[2] = 0.5*(275.-250.);
95 gMC->Gsvolu("TPSG", "TUBE", idtmed[401], dm, 3);
96 // ------------------------------------------------------
97 // HV midplane - 20 microns of mylar
98 // -----------------------------------------------------
101 gMC->Gsvolu("TPHV", "TUBE", idtmed[405], dm, 3);
103 // ====================================================
104 // lower and upper readout chambers
105 // ====================================================
106 // sectros opening angles in degrees
107 // ---------------------------------------------------
110 //thl = TMath::Tan(opl * .5 * kDegrad);
111 //thu = TMath::Tan(opu * .5 * kDegrad);
112 // ---------------------------------------------------
113 // S and L-sectors radii
114 // ---------------------------------------------------
119 // --------------------------------------------------
121 // --------------------------------------------------
126 // ---------------------------------------------------
127 // Sector thickness 25% of X0 (Al)
128 // ---------------------------------------------------
130 // ---------------------------------------------------
131 // S-sectors readout chambers (lower sectors)
132 // ---------------------------------------------------
135 dm[2] = sec_thick * .5;
136 dm[3] = (rssu - rssl) * .5;
140 gMC->Gsvolu("TRCS", "TRD1", idtmed[399], dm, 4);
141 // ---------------------------------------------------
142 // L-sectors readout chambers (upper sectors)
143 // ---------------------------------------------------
146 dm[2] = sec_thick * .5;
147 dm[3] = (rlsu - rlsl) * .5;
151 gMC->Gsvolu("TRCL", "TRD1", idtmed[399], dm, 4);
152 // ----------------------------------------------------
153 // positioning of the S-sector readout chambers
154 // rotation matices 1-12
155 // ----------------------------------------------------
156 z1 = -z_side + sec_thick * .5;
158 for (il = 1; il <= 12; ++il) {
159 phi1 = (il - 1) * opl + 270.;
166 phi3 = (il - 1) * opl;
171 alpha = (il - 1) * opl * kDegrad;
172 x = x0l * TMath::Cos(alpha);
173 y = x0l * TMath::Sin(alpha);
175 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
176 gMC->Gspos("TRCS", il, "TPSG", x, y, z1, idrotm[idr], "ONLY");
178 // ----------------------------------------------------
179 // positioning of the L-sector readout chambers
180 // rotation matices 13-36
181 // ----------------------------------------------------
182 for (iu = 1; iu <= 24; ++iu) {
183 phi1 = (iu - 1) * opu + 270.;
190 phi3 = (iu - 1) * opu;
194 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
196 alpha = (iu - 1) * opu * kDegrad;
197 x = x0u * TMath::Cos(alpha);
198 y = x0u * TMath::Sin(alpha);
200 gMC->Gspos("TRCL", iu, "TPSG", x, y, z1, idrotm[idr], "ONLY");
202 // --------------------------------------------------------
203 // Spoke wheel structures
204 // --------------------------------------------------------
205 gMC->Gsvolu("TSWS", "TUBE", idtmed[399], dm, 0);
213 gMC->Gsposp("TSWS", 1, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
218 gMC->Gsposp("TSWS", 2, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
223 gMC->Gsposp("TSWS", 3, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
225 // -------------------------------------------------------
226 // this volumes are to avoid overlaping
227 // -------------------------------------------------------
233 gMC->Gsposp("TSWS", 4, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
234 gMC->Gsposp("TSWS", 5, "TPC ", 0, 0, -z0,0, "ONLY", dm, 3);
238 gMC->Gsposp("TSWS", 6, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
239 gMC->Gsposp("TSWS", 7, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
242 dm[1] = 257.+0.09776;
247 gMC->Gsposp("TSWS", 8, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
248 gMC->Gsposp("TSWS", 9, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
249 // ==========================================================
251 // ==========================================================
252 // ----------------------------------------------------------
253 // Large wheel -> positioned in the TPC
254 // ----------------------------------------------------------
255 dm[0] = 257.+0.09776;
258 gMC->Gsvolu("TPW1", "TUBE", idtmed[399], dm, 3);
264 gMC->Gsvolu("TPW2", "TUBE", idtmed[498], dm, 3);
266 gMC->Gspos("TPW2", 1, "TPW1", 0, 0, 0, 0, "ONLY");
268 gMC->Gspos("TPW1", 1, "TPC ", 0, 0, z0, 0, "ONLY");
269 gMC->Gspos("TPW1", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
270 // -----------------------------------------------------------
271 // Small wheel -> positioned in the TPSG
272 // -----------------------------------------------------------
277 gMC->Gsvolu("TPW3", "TUBE", idtmed[399], dm, 3);
283 gMC->Gsvolu("TPW4", "TUBE", idtmed[401], dm, 3);
285 gMC->Gspos("TPW4", 1, "TPW3", 0, 0, 0, 0, "ONLY");
289 gMC->Gspos("TPW3", 1, "TPSG", 0, 0, z0, 0, "ONLY");
290 // ---------------------------------------------------------
291 // spokes, inner and outer, also the inner ring
292 // ---------------------------------------------------------
293 dm[0] = 0.5*(135.9-82.1);
299 gMC->Gsvolu("TSPI", "BOX ", idtmed[399], dm, 3);
304 gMC->Gsvolu("TSP1", "BOX ", idtmed[498], dm, 3);
306 gMC->Gspos("TSP1", 1, "TSPI", 0, 0, 0, 0, "ONLY");
308 dm[0] = 0.5*(256.9-142.1);
314 gMC->Gsvolu("TSPO", "BOX ", idtmed[399], dm, 3);
319 gMC->Gsvolu("TSP2", "BOX ", idtmed[498], dm, 3);
321 gMC->Gspos("TSP2", 1, "TSPO", 0, 0, 0, 0, "ONLY");
322 // --------------------------------------------------------
327 gMC->Gsvolu("TSWH", "TUBE", idtmed[399], dm, 3);
333 gMC->Gsvolu("TSW1", "TUBE", idtmed[498], dm, 3);
335 gMC->Gspos("TSW1", 1, "TSWH", 0, 0, 0, 0, "ONLY");
337 z0 = z_side - .16168 - 2.;
338 // --------------------------------------------------------
339 gMC->Gspos("TSWH", 1, "TPSG", 0, 0, z0, 0, "ONLY");
340 // -------------------------------------------------------
341 // posiioning of the inner spokes
342 // -------------------------------------------------------
343 for (il = 1; il <= 6; ++il) {
344 phi1 = opl * .5 + (il - 1) * 2. * opl;
346 phi2 = opl * .5 + 90. + (il - 1) * 2. * opl;
354 alpha = phi1 * kDegrad;
355 x = x1 * TMath::Cos(alpha);
356 y = x1 * TMath::Sin(alpha);
360 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
361 gMC->Gspos("TSPI", il, "TPSG", x, y, z0, idrotm[idr], "ONLY");
365 for (iu = 1; iu <= 12; ++iu) {
366 phi1 = opu * .5 + (iu - 1) * 2. * opu;
368 phi2 = opu * .5 + 90. + (iu - 1) * 2. * opu;
376 alpha = phi1 * kDegrad;
377 x = x2 * TMath::Cos(alpha);
378 y = x2 * TMath::Sin(alpha);
382 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
383 gMC->Gspos("TSPO", iu, "TPSG", x, y, z0, idrotm[idr], "ONLY");
385 // --------------------------------------------------------
386 // endcap cover (C, 0.86% X0)
387 // --------------------------------------------------------
392 gMC->Gsvolu("TCOV", "TUBE", idtmed[407], dm, 3);
396 gMC->Gspos("TCOV", 1, "TPSG", 0, 0, z0, 0, "ONLY");
397 // --------------------------------------------------------
398 // put the readout chambers into the TPC
399 // --------------------------------------------------------
407 AliMatrix(idrotm[55], theta1, phi1, theta2, phi2, theta3, phi3);
411 gMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY");
412 gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[55], "ONLY");
413 // ---------------------------------------------------------
414 // outer gas insulation (CO2)
415 // ---------------------------------------------------------
416 dm[0] = 257.+0.09776;
417 dm[1] = 278.-0.25004;
420 gMC->Gsvolu("TPOI", "TUBE", idtmed[406], dm, 3);
422 gMC->Gspos("TPHV", 1, "TGAS", 0, 0, 0, 0, "ONLY");
423 gMC->Gspos("TGAS", 1, "TPC ", 0, 0, 0, 0, "ONLY");
424 gMC->Gspos("TPOI", 1, "TPC ", 0, 0, 0, 0, "ONLY");
426 gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
427 // ======================================================
428 // all volumes below are positioned in ALIC
429 // ======================================================
430 // ------------------------------------------------------
431 // the last parts of the smaller wheel (TSWS)
432 // ------------------------------------------------------
439 gMC->Gsposp("TSWS", 10, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
440 gMC->Gsposp("TSWS", 11, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
446 gMC->Gsposp("TSWS", 12, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
447 gMC->Gsposp("TSWS", 13, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
448 // ----------------------------------------------------
449 // Inner vessel (PCON)
450 // This volume is to be positioned directly in ALIC
451 // ----------------------------------------------------
472 gMC->Gsvolu("TPIV", "PCON", idtmed[407], dm, 15);
473 // --------------------------------------------------------
474 // fill the inner vessel with CO2, (HV kDegrader)
475 // cone parts have different thickness
476 // than the central barrel, according to the TP
477 // --------------------------------------------------------
484 dm[3] = -(250.-0.2162);
485 dm[4] = (185.5-0.2126)*tana+0.2126;
504 dm[18] = (250.-0.2162);
505 dm[19] = (185.5-0.2126)*tana+0.2126;
508 gMC->Gsvolu("TPVD", "PCON", idtmed[406], dm, 21);
510 gMC->Gspos("TPVD", 1, "TPIV", 0, 0, 0, 0, "ONLY");
512 gMC->Gspos("TPIV", 1, "ALIC", 0, 0, 0, 0, "ONLY");
513 // ---------------------------------------------------
515 // ---------------------------------------------------
516 gMC->Gsord("TPSG", 6);
519 //_____________________________________________________________________________
520 void AliTPCv0::CreateMaterials()
523 // Define materials for the TPC
525 AliTPC::CreateMaterials();
528 //_____________________________________________________________________________
529 void AliTPCv0::DrawDetector()
532 // Draw a shaded view of the Time Projection Chamber version 0
535 // Set everything unseen
536 gMC->Gsatt("*", "seen", -1);
538 // Set ALIC mother transparent
539 gMC->Gsatt("ALIC","SEEN",0);
541 // Set the volumes visible
542 gMC->Gsatt("TPC","SEEN",0);
543 gMC->Gsatt("TGAS","SEEN",0);
544 gMC->Gsatt("TPSG","SEEN",0);
545 gMC->Gsatt("TPHV","SEEN",1);
546 gMC->Gsatt("TRCS","SEEN",1);
547 gMC->Gsatt("TRCL","SEEN",1);
548 gMC->Gsatt("TSWS","SEEN",1);
549 gMC->Gsatt("TPW1","SEEN",1);
550 gMC->Gsatt("TPW2","SEEN",1);
551 gMC->Gsatt("TPW3","SEEN",1);
552 gMC->Gsatt("TPW4","SEEN",1);
553 gMC->Gsatt("TSPI","SEEN",1);
554 gMC->Gsatt("TSP1","SEEN",0);
555 gMC->Gsatt("TSPO","SEEN",1);
556 gMC->Gsatt("TSP2","SEEN",0);
557 gMC->Gsatt("TSWH","SEEN",1);
558 gMC->Gsatt("TSW1","SEEN",1);
559 gMC->Gsatt("TPOI","SEEN",1);
560 gMC->Gsatt("TPIV","SEEN",1);
561 gMC->Gsatt("TPVD","SEEN",1);
563 gMC->Gdopt("hide", "on");
564 gMC->Gdopt("shad", "on");
565 gMC->Gsatt("*", "fill", 7);
566 gMC->SetClipBox(".");
567 gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
569 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
570 gMC->Gdhead(1111, "Time Projection Chamber");
571 gMC->Gdman(18, 4, "MAN");
572 gMC->Gdopt("hide","off");
575 //_____________________________________________________________________________
576 void AliTPCv0::Init()
579 // Initialise Time Projection Chamber version 0
581 printf("TPC version 0 initialized\n");
584 //_____________________________________________________________________________
585 void AliTPCv0::StepManager()
588 // Procedure called at each step in the TPC