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="picts/AliTRDClass.gif">
15 ///////////////////////////////////////////////////////////////////////////////
28 //_____________________________________________________________________________
32 // Default constructor
42 //_____________________________________________________________________________
43 AliTRD::AliTRD(const char *name, const char *title)
44 : AliDetector(name,title)
47 // Standard constructor for the TRD
51 // Allocate the hit array
53 fHits = new TClonesArray("AliTRDhit", 405);
62 SetMarkerColor(kWhite);
65 //_____________________________________________________________________________
66 void AliTRD::AddHit(Int_t track, Int_t *vol, Float_t *hits)
69 // Add a hit for the TRD
71 TClonesArray &lhits = *fHits;
72 new(lhits[fNhits++]) AliTRDhit(fIshunt,track,vol,hits);
75 //_____________________________________________________________________________
76 void AliTRD::BuildGeometry()
79 // Create the ROOT TNode geometry for the TRD
83 const Int_t kColorTRD = 46;
85 // Find the top node alice
86 Top=gAlice->GetGeometry()->GetNode("alice");
88 pgon = new TPGON("S_TRD","TRD","void",0,360,nsect,4);
89 Float_t ff = TMath::Cos(kDegrad * 180 / nsect);
90 Float_t rrmin = rmin / ff;
91 Float_t rrmax = rmax / ff;
92 pgon->DefineSection(0,-zmax1,rrmax,rrmax);
93 pgon->DefineSection(1,-zmax2,rrmin,rrmax);
94 pgon->DefineSection(2, zmax2,rrmin,rrmax);
95 pgon->DefineSection(3, zmax1,rrmax,rrmax);
97 Node = new TNode("TRD","TRD","S_TRD",0,0,0,"");
98 Node->SetLineColor(kColorTRD);
103 //_____________________________________________________________________________
104 void AliTRD::CreateMaterials()
108 // Create the materials for the TRD
112 AliMC* pMC = AliMC::GetMC();
114 Int_t ISXFLD = gAlice->Field()->Integ();
115 Float_t SXMGMX = gAlice->Field()->Max();
117 // For polyethilene (CH2)
118 Float_t ape[2] = { 12., 1. };
119 Float_t zpe[2] = { 6., 1. };
120 Float_t wpe[2] = { 1., 2. };
123 // For mylar (C5H4O2)
124 Float_t amy[3] = { 12., 1., 16. };
125 Float_t zmy[3] = { 6., 1., 8. };
126 Float_t wmy[3] = { 5., 4., 2. };
130 Float_t aco[2] = { 12., 16. };
131 Float_t zco[2] = { 6., 8. };
132 Float_t wco[2] = { 1., 2. };
133 Float_t dco = 0.001977;
136 Float_t awa[2] = { 1., 16. };
137 Float_t zwa[2] = { 1., 8. };
138 Float_t wwa[2] = { 2., 1. };
141 // For isobutane (C4H10)
142 Float_t ais[2] = { 12., 1. };
143 Float_t zis[2] = { 6., 1. };
144 Float_t wis[2] = { 4., 10. };
145 Float_t dis = 0.00267;
147 // For Xe/CO2-gas-mixture
148 // Xe-content of the Xe/CO2-mixture (90% / 10%)
150 // Xe-content of the Xe/Isobutane-mixture (97% / 3%)
152 Float_t dxe = .005858;
154 // General tracking parameter
155 Float_t tmaxfd = -10.;
156 Float_t stemax = -1e10;
157 Float_t deemax = -0.1;
158 Float_t epsil = 1e-4;
159 Float_t stmin = -0.001;
161 Float_t absl, radl, d, buf[1];
162 Float_t agm[2], dgm, zgm[2], wgm[2];
165 //////////////////////////////////////////////////////////////////////////
167 //////////////////////////////////////////////////////////////////////////
169 AliMaterial( 1, "Al $", 26.98, 13.0, 2.7 , 8.9 , 37.2);
170 AliMaterial( 2, "Air$", 14.61, 7.3, 0.001205, 30420.0 , 67500.0);
171 AliMaterial( 4, "Xe $", 131.29, 54.0, dxe , 1447.59, 0.0);
172 AliMaterial( 5, "Cu $", 63.54, 29.0, 8.96 , 1.43, 14.8);
173 AliMaterial( 6, "C $", 12.01, 6.0, 2.265 , 18.8 , 74.4);
174 AliMaterial(12, "G10$", 20.00, 10.0, 1.7 , 19.4 , 999.0);
177 AliMixture(3, "Polyethilene$", ape, zpe, dpe, -2, wpe);
178 AliMixture(7, "Mylar$", amy, zmy, dmy, -3, wmy);
179 AliMixture(8, "CO2$", aco, zco, dco, -2, wco);
180 AliMixture(9, "Isobutane$", ais, zis, dis, -2, wis);
181 AliMixture(13, "Water$" , awa, zwa, dwa, -2, wwa);
186 // Get properties of Xe
187 pMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
188 // Get properties of CO2
189 pMC->Gfmate((*fIdmate)[8], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
190 // Create gas mixture
193 dgm = wgm[0] * dxe + wgm[1] * dco;
194 AliMixture(10, "Gas mixture 1$", agm, zgm, dgm, 2, wgm);
195 // Xe/Isobutane-mixture
196 // Get properties of Xe
197 pMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
198 // Get properties of Isobutane
199 pMC->Gfmate((*fIdmate)[9], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
200 // Create gas mixture
203 dgm = wgm[0] * dxe + wgm[1] * dis;
204 AliMixture(11, "Gas mixture 2$", agm, zgm, dgm, 2, wgm);
206 //////////////////////////////////////////////////////////////////////////
207 // Tracking Media Parameters
208 //////////////////////////////////////////////////////////////////////////
211 AliMedium(1, "Al Frame$", 1, 0, ISXFLD, SXMGMX
212 , tmaxfd, stemax, deemax, epsil, stmin);
214 AliMedium(2, "Air$", 2, 0, ISXFLD, SXMGMX
215 , tmaxfd, stemax, deemax, epsil, stmin);
217 AliMedium(3, "Radiator$", 3, 0, ISXFLD, SXMGMX
218 , tmaxfd, stemax, deemax, epsil, stmin);
220 AliMedium(4, "Xe$", 4, 1, ISXFLD, SXMGMX
221 , tmaxfd, stemax, deemax, epsil, stmin);
223 AliMedium(5, "Padplane$", 5, 1, ISXFLD, SXMGMX
224 , tmaxfd, stemax, deemax, epsil, stmin);
226 AliMedium(6, "Readout$", 1, 0, ISXFLD, SXMGMX
227 , tmaxfd, stemax, deemax, epsil, stmin);
229 AliMedium(7, "C Frame$", 6, 0, ISXFLD, SXMGMX
230 , tmaxfd, stemax, deemax, epsil, stmin);
232 AliMedium(8, "Mylar$", 7, 0, ISXFLD, SXMGMX
233 , tmaxfd, stemax, deemax, epsil, stmin);
235 // Gas-mixture (Xe/CO2)
236 AliMedium(9, "Gas-mix$", 10, 1, ISXFLD, SXMGMX
237 , tmaxfd, stemax, deemax, epsil, stmin);
240 // Gas-mixture (Xe/Isobutane)
241 AliMedium(9, "Gas-mix$", 11, 1, ISXFLD, SXMGMX
242 , tmaxfd, stemax, deemax, epsil, stmin);
244 // Nomex-honeycomb (use carbon for the time being)
245 AliMedium(10, "Nomex$", 6, 0, ISXFLD, SXMGMX
246 , tmaxfd, stemax, deemax, epsil, stmin);
247 // Kapton foils (use Mylar for the time being)
248 AliMedium(11, "Kapton$", 7, 0, ISXFLD, SXMGMX
249 , tmaxfd, stemax, deemax, epsil, stmin);
250 // Gas-filling of the radiator
251 AliMedium(12, "CO2$", 8, 0, ISXFLD, SXMGMX
252 , tmaxfd, stemax, deemax, epsil, stmin);
254 AliMedium(13, "G10-plates$",12, 0, ISXFLD, SXMGMX
255 , tmaxfd, stemax, deemax, epsil, stmin);
257 AliMedium(14, "Water$", 13, 0, ISXFLD, SXMGMX
258 , tmaxfd, stemax, deemax, epsil, stmin);
262 //_____________________________________________________________________________
263 Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t )
266 // Distance between the mouse and the TRD detector on the screen
272 //_____________________________________________________________________________
276 // Initialise the TRD detector after the geometry has been created
281 for(i=0;i<35;i++) printf("*");
282 printf(" TRD_INIT ");
283 for(i=0;i<35;i++) printf("*");
286 // Here the TRD initialisation code (if any!)
288 printf(" Gas Mixture: 90%% Xe + 10%% CO2\n");
290 printf(" Gas Mixture: 97%% Xe + 3%% Isobutane\n");
292 printf(" Only plane %d is sensitive\n",fSensPlane);
294 printf(" Only chamber %d is sensitive\n",fSensChamber);
296 printf(" Only sector %d is sensitive\n",fSensSector);
298 for(i=0;i<80;i++) printf("*");
302 //_____________________________________________________________________________
303 void AliTRD::SetGasMix(Int_t imix)
306 if ((imix < 0) || (imix > 1)) {
307 printf("Wrong input value: %d\n",imix);
308 printf("Use standard setting\n");
317 //_____________________________________________________________________________
318 void AliTRD::SetSensPlane(Int_t iplane)
321 if ((iplane < 0) || (iplane > 6)) {
322 printf("Wrong input value: %d\n",iplane);
323 printf("Use standard setting\n");
334 //_____________________________________________________________________________
335 void AliTRD::SetSensChamber(Int_t ichamber)
338 if ((ichamber < 0) || (ichamber > 5)) {
339 printf("Wrong input value: %d\n",ichamber);
340 printf("Use standard setting\n");
347 fSensChamber = ichamber;
351 //_____________________________________________________________________________
352 void AliTRD::SetSensSector(Int_t isector)
355 if ((isector < 0) || (isector > 18)) {
356 printf("Wrong input value: %d\n",isector);
357 printf("Use standard setting\n");
364 fSensSector = isector;
370 //_____________________________________________________________________________
371 AliTRDhit::AliTRDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
379 // Store volume hierarchy
384 // Store position and charge