1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.14 2000/04/17 09:37:33 kowal2
19 removed obsolete AliTPCDigitsDisplay.C
21 Revision 1.13.8.2 2000/04/10 08:33:44 kowal2
23 Updated readout chambers
25 Revision 1.13.8.1 2000/04/10 07:56:53 kowal2
26 Not used anymore - removed
28 Revision 1.13 1999/11/04 17:28:06 fca
29 Correct barrel part of HV Degrader
31 Revision 1.12 1999/10/08 06:27:23 fca
32 Corrected bug in the HV degrader geometry, thanks to G.Tabary
34 Revision 1.11 1999/10/04 13:39:54 fca
35 Correct array index problem
37 Revision 1.10 1999/09/29 09:24:34 fca
38 Introduction of the Copyright and cvs Log
42 ///////////////////////////////////////////////////////////////////////////////
44 // Time Projection Chamber version 0 -- "coarse" TPC //
48 <img src="picts/AliTPCv0Class.gif">
53 ///////////////////////////////////////////////////////////////////////////////
56 #include <TGeometry.h>
66 #include "AliTPCParam.h"
67 #include "AliTPCDigitsArray.h"
71 //_____________________________________________________________________________
72 AliTPCv0::AliTPCv0(const char *name, const char *title)
76 // Standard creator for TPC version 0
80 //_____________________________________________________________________________
81 void AliTPCv0::CreateGeometry()
84 // Creation of the TPC coarse geometry (version 0)
85 // Origin Marek Kowalski Cracow
89 <img src="picts/AliTPCv0.gif">
94 <img src="picts/AliTPCv0Tree.gif">
99 Int_t *idtmed = fIdtmed->GetArray();
107 // ----------------------------------------------------
108 // FIELD CAGE WITH ENDCAPS - G10
109 // THIS IS ALSO A TPC MOTHER VOLUME
110 // ----------------------------------------------------
116 gMC->Gsvolu("TPC ", "TUBE", idtmed[8], dm, 3);
118 //-----------------------------------------------------
119 // Endcap cover c-fibre 0.86% X0
120 //-----------------------------------------------------
126 gMC->Gsvolu("TPEC","TUBE",idtmed[10],dm,3);
128 //-----------------------------------------------------
129 // Drift gas , leave 2 cm at the outer radius
131 //-----------------------------------------------------
137 gMC->Gsvolu("TGAS", "TUBE", idtmed[3], dm, 3);
140 //------------------------------------------------------
141 // membrane holder - carbon fiber
142 //------------------------------------------------------
145 gMC->Gsvolu("TPMH","TUBE",idtmed[6],dm,0);
151 gMC->Gsposp("TPMH",1,"TGAS",0.,0.,0.,0,"ONLY",dm,3);
157 gMC->Gsposp("TPMH",2,"TGAS",0.,0.,0.,0,"ONLY",dm,3);
159 //----------------------------------------------------------
160 // HV membrane - 25 microns of mylar
161 //----------------------------------------------------------
167 gMC->Gsvolu("TPHV","TUBE",idtmed[5],dm,3);
169 gMC->Gspos("TPHV",1,"TGAS",0.,0.,0.,0,"ONLY");
171 gMC->Gspos("TGAS",1,"TPC ",0.,0.,0.,0,"ONLY");
173 //----------------------------------------------------------
174 // "side" gas volume, the same as the drift gas
175 // the readout chambers are placed there.
176 //----------------------------------------------------------
180 dm[2] = 0.5*(275. - 250.);
182 gMC->Gsvolu("TPSG", "TUBE", idtmed[2], dm, 3);
184 Float_t z_side = dm[2]; // 1/2 of the side gas thickness
186 //-----------------------------------------------------------
187 // Readout chambers , 25% of X0, I use Al as the material
188 //-----------------------------------------------------------
190 Float_t InnerOpenAngle = fTPCParam->GetInnerAngle();
191 Float_t OuterOpenAngle = fTPCParam->GetOuterAngle();
193 Float_t InnerAngleShift = fTPCParam->GetInnerAngleShift();
194 Float_t OuterAngleShift = fTPCParam->GetOuterAngleShift();
197 Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
198 Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
201 Float_t InSecLowEdge = fTPCParam->GetInnerRadiusLow();
202 Float_t InSecUpEdge = fTPCParam->GetInnerRadiusUp();
204 Float_t OuSecLowEdge = fTPCParam->GetOuterRadiusLow();
205 Float_t OuSecUpEdge = fTPCParam->GetOuterRadiusUp();
207 Float_t SecThick = 2.225; // Al
212 Float_t LowEdge = fTPCParam->GetInnerFrameSpace();
214 dm[0] = InSecLowEdge*TMath::Tan(0.5*InnerOpenAngle)-LowEdge;
215 dm[1] = InSecUpEdge*TMath::Tan(0.5*InnerOpenAngle)-LowEdge;
217 dm[3] = 0.5*(InSecUpEdge-InSecLowEdge);
219 Float_t xCenterS = InSecLowEdge+dm[3];
221 gMC->Gsvolu("TRCS", "TRD1", idtmed[0], dm, 4);
225 Float_t UpEdge = fTPCParam->GetOuterFrameSpace();
227 dm[0] = OuSecLowEdge*TMath::Tan(0.5*OuterOpenAngle)-UpEdge;
228 dm[1] = OuSecUpEdge*TMath::Tan(0.5*OuterOpenAngle)-UpEdge;
230 dm[3] = 0.5*(OuSecUpEdge-OuSecLowEdge);
232 Float_t xCenterL = OuSecLowEdge+dm[3];
234 gMC->Gsvolu("TRCL", "TRD1", idtmed[0], dm, 4);
236 Float_t z1 = -z_side + SecThick*0.5;
238 //------------------------------------------------------------------
239 // Positioning of the S-sector readout chambers
240 //------------------------------------------------------------------
243 Float_t theta1,theta2,theta3;
244 Float_t phi1,phi2,phi3;
248 for(ns=0;ns<nInnerSector;ns++){
250 phi1 = ns * InnerOpenAngle + 270.*kDegrad + InnerAngleShift;
251 phi1 *= kRaddeg; // in degrees
253 phi1 = (Float_t)TMath::Nint(phi1);
255 if (phi1 > 360.) phi1 -= 360.;
260 phi3 = ns * InnerOpenAngle + InnerAngleShift;
261 phi3 *= kRaddeg; // in degrees
263 phi3 = (Float_t)TMath::Nint(phi3);
265 if(phi3 > 360.) phi3 -= 360.;
269 alpha = phi3*kDegrad;
271 x = xCenterS * TMath::Cos(alpha);
272 y = xCenterS * TMath::Sin(alpha);
274 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
276 gMC->Gspos("TRCS", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY");
282 //-------------------------------------------------------------------
283 // Positioning of the L-sectors readout chambers
284 //-------------------------------------------------------------------
286 for(ns=0;ns<nOuterSector;ns++){
287 phi1 = ns * OuterOpenAngle + 270.*kDegrad + OuterAngleShift;
288 phi1 *= kRaddeg; // in degrees
290 phi1 = (Float_t)TMath::Nint(phi1);
293 if (phi1 > 360.) phi1 -= 360.;
298 phi3 = ns * OuterOpenAngle+OuterAngleShift;
299 phi3 *= kRaddeg; // in degrees
301 phi3 = (Float_t)TMath::Nint(phi3);
304 if(phi3 > 360.) phi3 -= 360.;
308 alpha = phi3*kDegrad;
310 x = xCenterL * TMath::Cos(alpha);
311 y = xCenterL * TMath::Sin(alpha);
313 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
316 gMC->Gspos("TRCL", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY");
322 Float_t z0 = z_side - 0.95;
324 gMC->Gspos("TPEC",1,"TPSG",0.,0.,z0,0,"ONLY");
326 // ==========================================================
328 // ==========================================================
331 // auxilary structures
335 gMC->Gsvolu("TPWI","TUBE",idtmed[24],dm,0); // "air"
337 // ----------------------------------------------------------
338 // Large wheel -> positioned in the TPC
339 // ----------------------------------------------------------
342 z0 = 263.5; // TPC length - 1/2 spoke wheel width
348 gMC->Gsvolu("TPWL", "TUBE", idtmed[0], dm, 3);
354 gMC->Gsposp("TPWI",1,"TPWL",0.,0.,0.,0,"ONLY",dm,3);
356 gMC->Gspos("TPWL", 1, "TPC ", 0, 0, z0, 0, "ONLY");
357 gMC->Gspos("TPWL", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
360 // Outer vessel + CO2 HV degrader
367 gMC->Gsvolu("TPCO","TUBE",idtmed[12],dm,3);
372 gMC->Gsvolu("TPOV","TUBE",idtmed[10],dm,3);
374 gMC->Gspos("TPOV",1,"TPCO",0.,0.,0.,0,"ONLY");
378 gMC->Gspos("TPCO",1,"TPC ",0.,0.,0.,0,"ONLY");
381 //----------------------------------------------------------
382 // Small wheel -> positioned in "side gas
383 //----------------------------------------------------------
389 gMC->Gsvolu("TPWS", "TUBE", idtmed[0], dm, 3);
395 gMC->Gsvolu("TPW1", "TUBE", idtmed[2], dm, 3);
397 gMC->Gspos("TPW1", 1, "TPWS", 0., 0., 0., 0, "ONLY");
399 z0 = 1.; // spoke wheel is shifted w.r.t. center of the "side gas"
401 gMC->Gspos("TPWS", 1, "TPSG", 0, 0, z0, 0, "ONLY");
410 gMC->Gsvolu("TPS1","TUBE",idtmed[0],dm,3);
414 gMC->Gsvolu("TPS2","TUBE",idtmed[24],dm,3);
416 gMC->Gspos("TPS2",1,"TPS1",0.,0.,0.,0,"ONLY");
420 gMC->Gspos("TPS1",1,"TPC ",0.,0.,z0,0,"ONLY");
421 gMC->Gspos("TPS1",2,"TPC ",0.,0.,-z0,0,"ONLY");
429 gMC->Gsvolu("TPG2","TUBE",idtmed[8],dm,3);
433 gMC->Gspos("TPG2",1,"TPC ",0.,0.,z0,0,"ONLY");
434 gMC->Gspos("TPG2",2,"TPC ",0.,0.,-z0,0,"ONLY");
437 //---------------------------------------------------------
438 // central wheel 6 (radial direction) x 4 (along z) cm2
439 //---------------------------------------------------------
445 gMC->Gsvolu("TPWC","TUBE",idtmed[0],dm,3);
451 gMC->Gsposp("TPWI",2,"TPWC",0.,0.,0.,0,"ONLY",dm,3);
453 z0 = z_side - 1.9 - 2.;
455 gMC->Gspos("TPWC",1,"TPSG",0.,0.,z0,0,"ONLY");
459 gMC->Gsvolu("TPSE","BOX ",idtmed[24],dm,0); // "empty" part of the spoke
462 //---------------------------------------------------------
463 // inner spokes (nSectorInner)
464 //---------------------------------------------------------
466 dm[0] = 0.5*(139.9-82.1);
470 Float_t x1 = dm[0]+82.;
472 gMC->Gsvolu("TPSI","BOX",idtmed[0],dm,3);
477 gMC->Gsposp("TPSE",1,"TPSI",0.,0.,0.,0,"ONLY",dm,3);
479 for(ns=0;ns<nInnerSector;ns++){
481 phi1 = 0.5*InnerOpenAngle + ns*InnerOpenAngle + InnerAngleShift;
485 phi1 = (Float_t)TMath::Nint(phi1);
488 if(phi2>360.) phi2 -= 360.;
493 alpha = phi1 * kDegrad;
494 x = x1 * TMath::Cos(alpha);
495 y = x1 * TMath::Sin(alpha);
497 AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3);
499 gMC->Gspos("TPSI",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY");
505 //-------------------------------------------------------------
506 // outer spokes (nSectorOuter)
507 //-------------------------------------------------------------
509 dm[0] = 0.5*(257.9-146.1);
515 gMC->Gsvolu("TPSO","BOX ",idtmed[0],dm,3);
520 gMC->Gsposp("TPSE",2,"TPSO",0.,0.,0.,0,"ONLY",dm,3);
522 for(ns=0;ns<nOuterSector;ns++){
524 phi1 = 0.5*OuterOpenAngle + ns*OuterOpenAngle + OuterAngleShift;
528 phi1 = (Float_t)TMath::Nint(phi1);
531 if(phi2>360.) phi2 -= 360.;
536 alpha = phi1 * kDegrad;
537 x = x1 * TMath::Cos(alpha);
538 y = x1 * TMath::Sin(alpha);
540 AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3);
542 gMC->Gspos("TPSO",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY");
550 // --------------------------------------------------------
551 // put the readout chambers into the TPC
552 // --------------------------------------------------------
561 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
565 gMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY");
566 gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[nRotMat], "ONLY");
568 gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
570 //----------------------------------------------------
571 // Inner vessel and HV degrader
572 //----------------------------------------------------
594 gMC->Gsvolu("TPVD", "PCON", idtmed[12], dm, 15); // CO2
611 gMC->Gsvolu("TIVC","PCON",idtmed[11],dm,9); // C-fibre
613 gMC->Gspos("TIVC",1,"TPVD",0.,0.,0.,0,"ONLY");
614 gMC->Gspos("TIVC",2,"TPVD",0.,0.,0.,idrotm[nRotMat],"ONLY");
622 gMC->Gsvolu("TIVB","TUBE",idtmed[9],dm,3);
624 gMC->Gspos("TIVB",1,"TPVD",0.,0.,0.,0,"ONLY");
626 gMC->Gspos("TPVD",1,"ALIC",0.,0.,0.,0,"ONLY");
632 // ---------------------------------------------------
634 // ---------------------------------------------------
635 gMC->Gsord("TPSG", 6);
640 //_____________________________________________________________________________
641 void AliTPCv0::CreateMaterials()
644 // Define materials for the TPC
646 AliTPC::CreateMaterials();
649 //_____________________________________________________________________________
650 void AliTPCv0::DrawDetector()
653 // Draw a shaded view of the Time Projection Chamber version 0
656 // Set everything unseen
657 gMC->Gsatt("*", "seen", -1);
659 // Set ALIC mother transparent
660 gMC->Gsatt("ALIC","SEEN",0);
662 // Set the volumes visible
663 gMC->Gsatt("TPC","SEEN",0);
664 gMC->Gsatt("TGAS","SEEN",0);
665 gMC->Gsatt("TPSG","SEEN",0);
666 gMC->Gsatt("TPHV","SEEN",1);
667 gMC->Gsatt("TPMH","SEEN",1);
668 gMC->Gsatt("TPEC","SEEN",0);
669 gMC->Gsatt("TRCS","SEEN",1);
670 gMC->Gsatt("TRCL","SEEN",1);
671 gMC->Gsatt("TPWL","SEEN",1);
672 gMC->Gsatt("TPWI","SEEN",1);
673 gMC->Gsatt("TPWS","SEEN",1);
674 gMC->Gsatt("TPW1","SEEN",1);
675 gMC->Gsatt("TPS1","SEEN",1);
676 gMC->Gsatt("TPS2","SEEN",1);
677 gMC->Gsatt("TPG1","SEEN",1);
678 gMC->Gsatt("TPG2","SEEN",1);
679 gMC->Gsatt("TPWC","SEEN",1);
680 gMC->Gsatt("TPSI","SEEN",1);
681 gMC->Gsatt("TPSO","SEEN",1);
682 gMC->Gsatt("TPCO","SEEN",1);
683 gMC->Gsatt("TPOV","SEEN",1);
684 gMC->Gsatt("TPVD","SEEN",1);
686 gMC->Gdopt("hide", "on");
687 gMC->Gdopt("shad", "on");
688 gMC->Gsatt("*", "fill", 7);
689 gMC->SetClipBox(".");
690 gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
692 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
693 gMC->Gdhead(1111, "Time Projection Chamber");
694 gMC->Gdman(18, 4, "MAN");
695 gMC->Gdopt("hide","off");
698 //_____________________________________________________________________________
699 void AliTPCv0::Init()
702 // Initialise Time Projection Chamber version 0
704 printf("TPC version 0 initialized\n");
707 //_____________________________________________________________________________
708 void AliTPCv0::StepManager()
711 // Procedure called at each step in the TPC