1 ///////////////////////////////////////////////////////////////////////////////
3 // Transition Radiation Detector //
4 // This class contains the basic functions for the Transition Radiation //
5 // detector. Functions specific to one particular geometry are //
6 // contained in the derived classes //
10 <img src="gif/AliTRDClass.gif">
15 ///////////////////////////////////////////////////////////////////////////////
20 #include <TGeometry.h>
22 #include <TObjectTable.h>
26 #include "GParticle.h"
36 //_____________________________________________________________________________
40 // Default constructor
45 //_____________________________________________________________________________
46 AliTRD::AliTRD(const char *name, const char *title)
47 : AliDetector(name,title)
50 // Standard constructor for the TRD
54 // Allocate the hit array
56 fHits = new TClonesArray("AliTRDhit", 405);
60 SetMarkerColor(kWhite);
63 //_____________________________________________________________________________
64 void AliTRD::AddHit(Int_t track, Int_t *vol, Float_t *hits)
67 // Add a hit for the TRD
69 TClonesArray &lhits = *fHits;
70 new(lhits[fNhits++]) AliTRDhit(fIshunt,track,vol,hits);
73 //_____________________________________________________________________________
74 void AliTRD::BuildGeometry()
77 // Create the ROOT TNode geometry for the TRD
81 const Int_t kColorTRD = 46;
83 // Find the top node alice
84 Top=gAlice->GetGeometry()->GetNode("alice");
86 pgon = new TPGON("S_TRD","TRD","void",0,360,18,2);
87 pgon->DefineSection(0,-351.2,285.335,355.686);
88 pgon->DefineSection(1, 351.2,285.335,355.686);
90 Node = new TNode("TRD","TRD","S_TRD",0,0,0,"");
91 Node->SetLineColor(kColorTRD);
95 //_____________________________________________________________________________
96 void AliTRD::CreateMaterials()
99 // Create the materials for the TRD
103 AliMC* pMC = AliMC::GetMC();
105 Int_t ISXFLD = gAlice->Field()->Integ();
106 Float_t SXMGMX = gAlice->Field()->Max();
108 // --- For polyethilene (CH2)
109 Float_t ape[2] = { 12.,1. };
110 Float_t zpe[2] = { 6.,1. };
111 Float_t wpe[2] = { .33,.67 };
113 // --- For mylar (C5H4O2)
114 Float_t amy[3] = { 12.,1.,16. };
115 Float_t zmy[3] = { 6.,1.,8. };
116 Float_t wmy[3] = { 5.,4.,2. };
119 Float_t aco[2] = { 12.,16. };
120 Float_t zco[2] = { 6.,8. };
121 Float_t wco[2] = { 1.,2. };
122 Float_t dco = .001977;
123 // --- For Xe/CO2-gas-mixture
124 // --- Xe-content of the gas-mixture (90% / 10%)
126 Float_t dxe = .005858;
128 // --- General tracking parameter
129 Float_t tmaxfd = -10.;
130 Float_t stemax = -1e10;
131 Float_t deemax = -.1;
132 Float_t epsil = 1e-4;
133 Float_t stmin = -.001;
135 Float_t absl, radl, d, buf[1];
136 Float_t agm[2], dgm, zgm[2], wgm[2];
141 // ***********************************************************************
142 AliMaterial(1, "Al $", 26.98, 13., 2.7, 8.9, 37.2);
143 AliMaterial(2, "Air$", 14.61, 7.3, .001205, 30420., 67500);
144 AliMaterial(4, "Xe $", 131.29, 54., dxe, 1447.59, 0);
145 AliMaterial(5, "Cu $", 63.54, 29., 8.96, 1.43, 14.8);
146 AliMaterial(6, "C $", 12.01, 6., 2.265, 18.8, 74.4);
148 AliMixture(3, "Polyethilene$", ape, zpe, dpe, -2, wpe);
149 AliMixture(7, "Mylar$", amy, zmy, dmy, -3, wmy);
150 AliMixture(8, "CO2$", aco, zco, dco, -2, wco);
152 // --- Get properties of Xe
153 pMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
154 // --- Get properties of CO2
155 pMC->Gfmate((*fIdmate)[8], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
156 // --- Create gas mixture
159 dgm = wgm[0] * dxe + wgm[1] * dco;
160 AliMixture(9, "Gas mixture$", agm, zgm, dgm, 2, wgm);
161 // ***********************************************************************
163 // Tracking Media Parameters
165 // ***********************************************************************
167 AliMedium(1301, "Al Frame$", 1, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
169 AliMedium(1302, "Air$", 2, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
171 AliMedium(1303, "Radiator$", 3, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
173 AliMedium(1304, "Xe$", 4, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
175 AliMedium(1305, "Padplane$", 5, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
177 AliMedium(1306, "Readout$", 1, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
179 AliMedium(1307, "C Frame$", 6, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
181 AliMedium(1308, "Mylar$", 7, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
183 AliMedium(1309, "Gas-mix$", 9, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
184 // --- Nomex-honeycomb (use carbon for the time being)
185 AliMedium(1310, "Nomex$", 6, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
186 // --- Kapton foils (use Mylar for the time being)
187 AliMedium(1311, "Kapton$", 7, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
188 // --- Gas-filling of the radiator
189 AliMedium(1312, "CO2$", 8, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
192 //_____________________________________________________________________________
193 Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t )
196 // Distance between the mouse and the TRD detector on the screen
202 //_____________________________________________________________________________
206 // Initialise the TRD detector after the geometry has been created
211 for(i=0;i<35;i++) printf("*");
212 printf(" TRD_INIT ");
213 for(i=0;i<35;i++) printf("*");
216 // Here the TRD initialisation code (if any!)
217 for(i=0;i<80;i++) printf("*");
223 //_____________________________________________________________________________
224 AliTRDhit::AliTRDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
232 // Store volume hierarchy
237 // Store position and charge