1 ///////////////////////////////////////////////////////////////////////////////
3 // Time Projection Chamber version 0 -- "coarse" TPC //
7 <img src="gif/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="gif/AliTPCv0.gif">
51 <img src="gif/AliTPCv0Tree.gif">
55 AliMC* pMC = AliMC::GetMC();
57 Int_t *idtmed = gAlice->Idtmed();
59 Float_t tana, rlsl, wlsl, rssl, rlsu, wssl, wlsu,
60 rssu, wssu, alpha, x, y, sec_thick;
62 Float_t x1, z0, z1, x2, theta1, theta2, theta3, dm[21];
70 Float_t opl, opu, phi1, phi2, phi3;
72 // ----------------------------------------------------
73 // FIELD CAGE WITH ENDCAPS - CARBON FIBER
74 // THIS IS ALSO A TPC MOTHER VOLUME
75 // ----------------------------------------------------
80 pMC->Gsvolu("TPC ", "TUBE", idtmed[407], dm, 3);
81 // -------------------------------------------------------
82 // drift gas Ne/CO2 (90/10 volume) - nonsensitive
83 // field cage thickness = 0.52% X0
84 // ----------------------------------------------------
89 pMC->Gsvolu("TGAS", "TUBE", idtmed[402], dm, 3);
90 // ------------------------------------------------------
91 // "side" gas volume (the same as drift gas)
92 // here the readout chambers are positioned
93 // ------------------------------------------------------
94 dm[2] = 0.5*(275.-250.);
97 pMC->Gsvolu("TPSG", "TUBE", idtmed[401], dm, 3);
98 // ------------------------------------------------------
99 // HV midplane - 20 microns of mylar
100 // -----------------------------------------------------
103 pMC->Gsvolu("TPHV", "TUBE", idtmed[405], dm, 3);
105 // ====================================================
106 // lower and upper readout chambers
107 // ====================================================
108 // sectros opening angles in degrees
109 // ---------------------------------------------------
112 //thl = TMath::Tan(opl * .5 * kDegrad);
113 //thu = TMath::Tan(opu * .5 * kDegrad);
114 // ---------------------------------------------------
115 // S and L-sectors radii
116 // ---------------------------------------------------
121 // --------------------------------------------------
123 // --------------------------------------------------
128 // ---------------------------------------------------
129 // Sector thickness 25% of X0 (Al)
130 // ---------------------------------------------------
132 // ---------------------------------------------------
133 // S-sectors readout chambers (lower sectors)
134 // ---------------------------------------------------
137 dm[2] = sec_thick * .5;
138 dm[3] = (rssu - rssl) * .5;
142 pMC->Gsvolu("TRCS", "TRD1", idtmed[399], dm, 4);
143 // ---------------------------------------------------
144 // L-sectors readout chambers (upper sectors)
145 // ---------------------------------------------------
148 dm[2] = sec_thick * .5;
149 dm[3] = (rlsu - rlsl) * .5;
153 pMC->Gsvolu("TRCL", "TRD1", idtmed[399], dm, 4);
154 // ----------------------------------------------------
155 // positioning of the S-sector readout chambers
156 // rotation matices 1-12
157 // ----------------------------------------------------
158 z1 = -z_side + sec_thick * .5;
160 for (il = 1; il <= 12; ++il) {
161 phi1 = (il - 1) * opl + 270.;
168 phi3 = (il - 1) * opl;
173 alpha = (il - 1) * opl * kDegrad;
174 x = x0l * TMath::Cos(alpha);
175 y = x0l * TMath::Sin(alpha);
177 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
178 pMC->Gspos("TRCS", il, "TPSG", x, y, z1, idrotm[idr], "ONLY");
180 // ----------------------------------------------------
181 // positioning of the L-sector readout chambers
182 // rotation matices 13-36
183 // ----------------------------------------------------
184 for (iu = 1; iu <= 24; ++iu) {
185 phi1 = (iu - 1) * opu + 270.;
192 phi3 = (iu - 1) * opu;
196 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
198 alpha = (iu - 1) * opu * kDegrad;
199 x = x0u * TMath::Cos(alpha);
200 y = x0u * TMath::Sin(alpha);
202 pMC->Gspos("TRCL", iu, "TPSG", x, y, z1, idrotm[idr], "ONLY");
204 // --------------------------------------------------------
205 // Spoke wheel structures
206 // --------------------------------------------------------
207 pMC->Gsvolu("TSWS", "TUBE", idtmed[399], dm, 0);
215 pMC->Gsposp("TSWS", 1, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
220 pMC->Gsposp("TSWS", 2, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
225 pMC->Gsposp("TSWS", 3, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
227 // -------------------------------------------------------
228 // this volumes are to avoid overlaping
229 // -------------------------------------------------------
235 pMC->Gsposp("TSWS", 4, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
236 pMC->Gsposp("TSWS", 5, "TPC ", 0, 0, -z0,0, "ONLY", dm, 3);
240 pMC->Gsposp("TSWS", 6, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
241 pMC->Gsposp("TSWS", 7, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
244 dm[1] = 257.+0.09776;
249 pMC->Gsposp("TSWS", 8, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
250 pMC->Gsposp("TSWS", 9, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
251 // ==========================================================
253 // ==========================================================
254 // ----------------------------------------------------------
255 // Large wheel -> positioned in the TPC
256 // ----------------------------------------------------------
257 dm[0] = 257.+0.09776;
260 pMC->Gsvolu("TPW1", "TUBE", idtmed[399], dm, 3);
266 pMC->Gsvolu("TPW2", "TUBE", idtmed[498], dm, 3);
268 pMC->Gspos("TPW2", 1, "TPW1", 0, 0, 0, 0, "ONLY");
270 pMC->Gspos("TPW1", 1, "TPC ", 0, 0, z0, 0, "ONLY");
271 pMC->Gspos("TPW1", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
272 // -----------------------------------------------------------
273 // Small wheel -> positioned in the TPSG
274 // -----------------------------------------------------------
279 pMC->Gsvolu("TPW3", "TUBE", idtmed[399], dm, 3);
285 pMC->Gsvolu("TPW4", "TUBE", idtmed[401], dm, 3);
287 pMC->Gspos("TPW4", 1, "TPW3", 0, 0, 0, 0, "ONLY");
291 pMC->Gspos("TPW3", 1, "TPSG", 0, 0, z0, 0, "ONLY");
292 // ---------------------------------------------------------
293 // spokes, inner and outer, also the inner ring
294 // ---------------------------------------------------------
295 dm[0] = 0.5*(135.9-82.1);
301 pMC->Gsvolu("TSPI", "BOX ", idtmed[399], dm, 3);
306 pMC->Gsvolu("TSP1", "BOX ", idtmed[498], dm, 3);
308 pMC->Gspos("TSP1", 1, "TSPI", 0, 0, 0, 0, "ONLY");
310 dm[0] = 0.5*(256.9-142.1);
316 pMC->Gsvolu("TSPO", "BOX ", idtmed[399], dm, 3);
321 pMC->Gsvolu("TSP2", "BOX ", idtmed[498], dm, 3);
323 pMC->Gspos("TSP2", 1, "TSPO", 0, 0, 0, 0, "ONLY");
324 // --------------------------------------------------------
329 pMC->Gsvolu("TSWH", "TUBE", idtmed[399], dm, 3);
335 pMC->Gsvolu("TSW1", "TUBE", idtmed[498], dm, 3);
337 pMC->Gspos("TSW1", 1, "TSWH", 0, 0, 0, 0, "ONLY");
339 z0 = z_side - .16168 - 2.;
340 // --------------------------------------------------------
341 pMC->Gspos("TSWH", 1, "TPSG", 0, 0, z0, 0, "ONLY");
342 // -------------------------------------------------------
343 // posiioning of the inner spokes
344 // -------------------------------------------------------
345 for (il = 1; il <= 6; ++il) {
346 phi1 = opl * .5 + (il - 1) * 2. * opl;
348 phi2 = opl * .5 + 90. + (il - 1) * 2. * opl;
356 alpha = phi1 * kDegrad;
357 x = x1 * TMath::Cos(alpha);
358 y = x1 * TMath::Sin(alpha);
362 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
363 pMC->Gspos("TSPI", il, "TPSG", x, y, z0, idrotm[idr], "ONLY");
367 for (iu = 1; iu <= 12; ++iu) {
368 phi1 = opu * .5 + (iu - 1) * 2. * opu;
370 phi2 = opu * .5 + 90. + (iu - 1) * 2. * opu;
378 alpha = phi1 * kDegrad;
379 x = x2 * TMath::Cos(alpha);
380 y = x2 * TMath::Sin(alpha);
384 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
385 pMC->Gspos("TSPO", iu, "TPSG", x, y, z0, idrotm[idr], "ONLY");
387 // --------------------------------------------------------
388 // endcap cover (C, 0.86% X0)
389 // --------------------------------------------------------
394 pMC->Gsvolu("TCOV", "TUBE", idtmed[407], dm, 3);
398 pMC->Gspos("TCOV", 1, "TPSG", 0, 0, z0, 0, "ONLY");
399 // --------------------------------------------------------
400 // put the readout chambers into the TPC
401 // --------------------------------------------------------
409 AliMatrix(idrotm[55], theta1, phi1, theta2, phi2, theta3, phi3);
413 pMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY");
414 pMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[55], "ONLY");
415 // ---------------------------------------------------------
416 // outer gas insulation (CO2)
417 // ---------------------------------------------------------
418 dm[0] = 257.+0.09776;
419 dm[1] = 278.-0.25004;
422 pMC->Gsvolu("TPOI", "TUBE", idtmed[406], dm, 3);
424 pMC->Gspos("TPHV", 1, "TGAS", 0, 0, 0, 0, "ONLY");
425 pMC->Gspos("TGAS", 1, "TPC ", 0, 0, 0, 0, "ONLY");
426 pMC->Gspos("TPOI", 1, "TPC ", 0, 0, 0, 0, "ONLY");
428 pMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
429 // ======================================================
430 // all volumes below are positioned in ALIC
431 // ======================================================
432 // ------------------------------------------------------
433 // the last parts of the smaller wheel (TSWS)
434 // ------------------------------------------------------
441 pMC->Gsposp("TSWS", 10, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
442 pMC->Gsposp("TSWS", 11, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
448 pMC->Gsposp("TSWS", 12, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
449 pMC->Gsposp("TSWS", 13, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
450 // ----------------------------------------------------
451 // Inner vessel (PCON)
452 // This volume is to be positioned directly in ALIC
453 // ----------------------------------------------------
474 pMC->Gsvolu("TPIV", "PCON", idtmed[407], dm, 15);
475 // --------------------------------------------------------
476 // fill the inner vessel with CO2, (HV kDegrader)
477 // cone parts have different thickness
478 // than the central barrel, according to the TP
479 // --------------------------------------------------------
486 dm[3] = -(250.-0.2162);
487 dm[4] = (185.5-0.2126)*tana+0.2126;
506 dm[18] = (250.-0.2162);
507 dm[19] = (185.5-0.2126)*tana+0.2126;
510 pMC->Gsvolu("TPVD", "PCON", idtmed[406], dm, 21);
512 pMC->Gspos("TPVD", 1, "TPIV", 0, 0, 0, 0, "ONLY");
514 pMC->Gspos("TPIV", 1, "ALIC", 0, 0, 0, 0, "ONLY");
515 // ---------------------------------------------------
517 // ---------------------------------------------------
518 pMC->Gsord("TPSG", 6);
521 //_____________________________________________________________________________
522 void AliTPCv0::CreateMaterials()
525 // Define materials for the TPC
527 AliTPC::CreateMaterials();
530 //_____________________________________________________________________________
531 void AliTPCv0::DrawModule()
534 // Draw a shaded view of the Time Projection Chamber version 0
537 AliMC* pMC = AliMC::GetMC();
539 // Set everything unseen
540 pMC->Gsatt("*", "seen", -1);
542 // Set ALIC mother transparent
543 pMC->Gsatt("ALIC","SEEN",0);
545 // Set the volumes visible
546 pMC->Gsatt("TPC","SEEN",0);
547 pMC->Gsatt("TGAS","SEEN",0);
548 pMC->Gsatt("TPSG","SEEN",0);
549 pMC->Gsatt("TPHV","SEEN",1);
550 pMC->Gsatt("TRCS","SEEN",1);
551 pMC->Gsatt("TRCL","SEEN",1);
552 pMC->Gsatt("TSWS","SEEN",1);
553 pMC->Gsatt("TPW1","SEEN",1);
554 pMC->Gsatt("TPW2","SEEN",1);
555 pMC->Gsatt("TPW3","SEEN",1);
556 pMC->Gsatt("TPW4","SEEN",1);
557 pMC->Gsatt("TSPI","SEEN",1);
558 pMC->Gsatt("TSP1","SEEN",0);
559 pMC->Gsatt("TSPO","SEEN",1);
560 pMC->Gsatt("TSP2","SEEN",0);
561 pMC->Gsatt("TSWH","SEEN",1);
562 pMC->Gsatt("TSW1","SEEN",1);
563 pMC->Gsatt("TPOI","SEEN",1);
564 pMC->Gsatt("TPIV","SEEN",1);
565 pMC->Gsatt("TPVD","SEEN",1);
567 pMC->Gdopt("hide", "on");
568 pMC->Gdopt("shad", "on");
569 pMC->Gsatt("*", "fill", 7);
570 pMC->SetClipBox(".");
571 pMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
573 pMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
574 pMC->Gdhead(1111, "Time Projection Chamber");
575 pMC->Gdman(18, 4, "MAN");
576 pMC->Gdopt("hide","off");
579 //_____________________________________________________________________________
580 void AliTPCv0::Init()
583 // Initialise Time Projection Chamber version 0
585 printf("TPC version 0 initialized\n");
588 //_____________________________________________________________________________
589 void AliTPCv0::StepManager()
592 // Procedure called at each step in the TPC