New code from Piergiorgio added
[u/mrichter/AliRoot.git] / TRD / AliTRD.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/*
17$Log$
dd9a6ee3 18Revision 1.20 2000/06/08 18:32:57 cblume
19Make code compliant to coding conventions
20
8230f242 21Revision 1.19 2000/06/07 16:25:37 cblume
22Try to remove compiler warnings on Sun and HP
23
9d0b222b 24Revision 1.18 2000/05/08 16:17:27 cblume
25Merge TRD-develop
26
6f1e466d 27Revision 1.17.2.1 2000/05/08 14:28:59 cblume
28Introduced SetPHOShole() and SetRICHhole(). AliTRDrecPoint container is now a TObjArray
29
30Revision 1.17 2000/02/28 19:10:26 cblume
31Include the new TRD classes
32
851d3db9 33Revision 1.16.2.2 2000/02/28 17:53:24 cblume
34Introduce TRD geometry classes
35
36Revision 1.16.2.1 2000/02/28 17:04:19 cblume
37Include functions and data members for AliTRDrecPoint
38
39Revision 1.16 2000/01/19 17:17:35 fca
40Introducing a list of lists of hits -- more hits allowed for detector now
41
1cedd08a 42Revision 1.15 1999/11/02 17:04:25 fca
43Small syntax change for HP compiler
44
94c641ff 45Revision 1.14 1999/11/02 16:57:02 fca
46Avoid non ansi warnings on HP compilers
47
8459a454 48Revision 1.13 1999/11/02 16:35:56 fca
49New version of TRD introduced
50
5c7f4665 51Revision 1.12 1999/11/01 20:41:51 fca
52Added protections against using the wrong version of FRAME
53
ab76897d 54Revision 1.11 1999/09/29 09:24:34 fca
55Introduction of the Copyright and cvs Log
56
4c039060 57*/
58
fe4da5cc 59///////////////////////////////////////////////////////////////////////////////
60// //
61// Transition Radiation Detector //
62// This class contains the basic functions for the Transition Radiation //
6f1e466d 63// Detector. //
fe4da5cc 64// //
65///////////////////////////////////////////////////////////////////////////////
66
5c7f4665 67#include <stdlib.h>
68
fe4da5cc 69#include <TMath.h>
fe4da5cc 70#include <TNode.h>
fe4da5cc 71#include <TPGON.h>
72
fe4da5cc 73#include "AliTRD.h"
74#include "AliRun.h"
d3f347ff 75#include "AliConst.h"
851d3db9 76#include "AliTRDdigitizer.h"
77#include "AliTRDclusterizer.h"
78#include "AliTRDgeometryHole.h"
79#include "AliTRDgeometryFull.h"
80#include "AliTRDrecPoint.h"
fe4da5cc 81
82ClassImp(AliTRD)
83
84//_____________________________________________________________________________
85AliTRD::AliTRD()
86{
87 //
88 // Default constructor
89 //
82bbf98a 90
d3f347ff 91 fIshunt = 0;
92 fGasMix = 0;
99d5402e 93 fHits = 0;
94 fDigits = 0;
5c7f4665 95
851d3db9 96 fRecPoints = 0;
97 fNRecPoints = 0;
5c7f4665 98
851d3db9 99 fGeometry = 0;
82bbf98a 100
fe4da5cc 101}
102
103//_____________________________________________________________________________
104AliTRD::AliTRD(const char *name, const char *title)
105 : AliDetector(name,title)
106{
107 //
108 // Standard constructor for the TRD
109 //
110
5c7f4665 111 // Check that FRAME is there otherwise we have no place where to
112 // put TRD
8230f242 113 AliModule* frame = gAlice->GetModule("FRAME");
114 if (!frame) {
5c7f4665 115 Error("Ctor","TRD needs FRAME to be present\n");
116 exit(1);
117 }
118
119 // Define the TRD geometry according to the FRAME geometry
8230f242 120 if (frame->IsVersion() == 0) {
851d3db9 121 // Geometry with hole
122 fGeometry = new AliTRDgeometryHole();
123 }
8230f242 124 else if (frame->IsVersion() == 1) {
851d3db9 125 // Geometry without hole
126 fGeometry = new AliTRDgeometryFull();
127 }
128 else {
129 Error("Ctor","Could not find valid FRAME version\n");
130 exit(1);
131 }
5c7f4665 132
fe4da5cc 133 // Allocate the hit array
6f1e466d 134 fHits = new TClonesArray("AliTRDhit" ,405);
1cedd08a 135 gAlice->AddHitList(fHits);
99d5402e 136
137 // Allocate the digits array
851d3db9 138 fDigits = 0;
5c7f4665 139
851d3db9 140 // Allocate the rec point array
6f1e466d 141 fRecPoints = new TObjArray(400);
851d3db9 142 fNRecPoints = 0;
99d5402e 143
82bbf98a 144 fIshunt = 0;
145 fGasMix = 0;
146
fe4da5cc 147 SetMarkerColor(kWhite);
82bbf98a 148
fe4da5cc 149}
99d5402e 150
151//_____________________________________________________________________________
dd9a6ee3 152AliTRD::AliTRD(const AliTRD &trd)
8230f242 153{
154 //
155 // Copy constructor
156 //
157
dd9a6ee3 158 ((AliTRD &) trd).Copy(*this);
8230f242 159
160}
161
162//_____________________________________________________________________________
99d5402e 163AliTRD::~AliTRD()
164{
165 //
166 // TRD destructor
167 //
168
169 fIshunt = 0;
170
851d3db9 171 delete fGeometry;
99d5402e 172 delete fHits;
851d3db9 173 delete fRecPoints;
5c7f4665 174
175}
176
177//_____________________________________________________________________________
851d3db9 178void AliTRD::AddRecPoint(Float_t *pos, Int_t *digits, Int_t det, Float_t amp)
5c7f4665 179{
180 //
851d3db9 181 // Add a reconstructed point for the TRD
182 //
6f1e466d 183
8230f242 184 AliTRDrecPoint *recPoint = new AliTRDrecPoint();
851d3db9 185 TVector3 posVec(pos[0],pos[1],pos[2]);
8230f242 186 recPoint->SetLocalPosition(posVec);
187 recPoint->SetDetector(det);
188 recPoint->SetEnergy(amp);
851d3db9 189 for (Int_t iDigit = 0; iDigit < 3; iDigit++) {
8230f242 190 recPoint->AddDigit(digits[iDigit]);
851d3db9 191 }
99d5402e 192
8230f242 193 fRecPoints->Add(recPoint);
6f1e466d 194
99d5402e 195}
196
197//_____________________________________________________________________________
9d0b222b 198void AliTRD::AddDigit(Int_t *digits, Int_t *amp)
99d5402e 199{
200 //
201 // Add a digit for the TRD
202 //
203
204 TClonesArray &ldigits = *fDigits;
9d0b222b 205 new(ldigits[fNdigits++]) AliTRDdigit(kFALSE,digits,amp);
99d5402e 206
207}
208
fe4da5cc 209//_____________________________________________________________________________
8230f242 210void AliTRD::AddHit(Int_t track, Int_t *det, Float_t *hits)
fe4da5cc 211{
212 //
213 // Add a hit for the TRD
214 //
82bbf98a 215
fe4da5cc 216 TClonesArray &lhits = *fHits;
851d3db9 217 new(lhits[fNhits++]) AliTRDhit(fIshunt,track,det,hits);
82bbf98a 218
fe4da5cc 219}
220
221//_____________________________________________________________________________
222void AliTRD::BuildGeometry()
223{
224 //
225 // Create the ROOT TNode geometry for the TRD
226 //
82bbf98a 227
8230f242 228 TNode *node, *top;
fe4da5cc 229 TPGON *pgon;
230 const Int_t kColorTRD = 46;
d3f347ff 231
fe4da5cc 232 // Find the top node alice
8230f242 233 top = gAlice->GetGeometry()->GetNode("alice");
d3f347ff 234
82bbf98a 235 pgon = new TPGON("S_TRD","TRD","void",0,360,kNsect,4);
236 Float_t ff = TMath::Cos(kDegrad * 180 / kNsect);
237 Float_t rrmin = kRmin / ff;
238 Float_t rrmax = kRmax / ff;
239 pgon->DefineSection(0,-kZmax1,rrmax,rrmax);
240 pgon->DefineSection(1,-kZmax2,rrmin,rrmax);
241 pgon->DefineSection(2, kZmax2,rrmin,rrmax);
242 pgon->DefineSection(3, kZmax1,rrmax,rrmax);
8230f242 243 top->cd();
244 node = new TNode("TRD","TRD","S_TRD",0,0,0,"");
245 node->SetLineColor(kColorTRD);
246 fNodes->Add(node);
d3f347ff 247
fe4da5cc 248}
249
250//_____________________________________________________________________________
dd9a6ee3 251void AliTRD::Copy(TObject &trd)
8230f242 252{
253 //
254 // Copy function
255 //
256
dd9a6ee3 257 ((AliTRD &) trd).fGasMix = fGasMix;
258 ((AliTRD &) trd).fGeometry = fGeometry;
259 ((AliTRD &) trd).fRecPoints = fRecPoints;
260 ((AliTRD &) trd).fNRecPoints = fNRecPoints;
8230f242 261
262 //AliDetector::Copy(trd);
263
264}
265
266//_____________________________________________________________________________
82bbf98a 267void AliTRD::CreateGeometry()
fe4da5cc 268{
82bbf98a 269 //
270 // Creates the volumes for the TRD chambers
271 //
82bbf98a 272
273 // Check that FRAME is there otherwise we have no place where to put the TRD
8230f242 274 AliModule* frame = gAlice->GetModule("FRAME");
275 if (!frame) {
851d3db9 276 printf(" The TRD needs the FRAME to be defined first\n");
277 return;
82bbf98a 278 }
d3f347ff 279
851d3db9 280 fGeometry->CreateGeometry(fIdtmed->GetArray() - 1299);
5c7f4665 281
82bbf98a 282}
283
284//_____________________________________________________________________________
285void AliTRD::CreateMaterials()
286{
fe4da5cc 287 //
288 // Create the materials for the TRD
289 // Origin Y.Foka
290 //
291
8230f242 292 Int_t isxfld = gAlice->Field()->Integ();
293 Float_t sxmgmx = gAlice->Field()->Max();
fe4da5cc 294
d3f347ff 295 // For polyethilene (CH2)
296 Float_t ape[2] = { 12., 1. };
297 Float_t zpe[2] = { 6., 1. };
298 Float_t wpe[2] = { 1., 2. };
299 Float_t dpe = 0.95;
300
301 // For mylar (C5H4O2)
302 Float_t amy[3] = { 12., 1., 16. };
303 Float_t zmy[3] = { 6., 1., 8. };
304 Float_t wmy[3] = { 5., 4., 2. };
fe4da5cc 305 Float_t dmy = 1.39;
d3f347ff 306
307 // For CO2
308 Float_t aco[2] = { 12., 16. };
309 Float_t zco[2] = { 6., 8. };
310 Float_t wco[2] = { 1., 2. };
311 Float_t dco = 0.001977;
312
313 // For water
314 Float_t awa[2] = { 1., 16. };
315 Float_t zwa[2] = { 1., 8. };
316 Float_t wwa[2] = { 2., 1. };
317 Float_t dwa = 1.0;
318
319 // For isobutane (C4H10)
320 Float_t ais[2] = { 12., 1. };
321 Float_t zis[2] = { 6., 1. };
322 Float_t wis[2] = { 4., 10. };
323 Float_t dis = 0.00267;
324
325 // For Xe/CO2-gas-mixture
326 // Xe-content of the Xe/CO2-mixture (90% / 10%)
327 Float_t fxc = .90;
328 // Xe-content of the Xe/Isobutane-mixture (97% / 3%)
329 Float_t fxi = .97;
fe4da5cc 330 Float_t dxe = .005858;
331
d3f347ff 332 // General tracking parameter
fe4da5cc 333 Float_t tmaxfd = -10.;
334 Float_t stemax = -1e10;
d3f347ff 335 Float_t deemax = -0.1;
336 Float_t epsil = 1e-4;
337 Float_t stmin = -0.001;
fe4da5cc 338
339 Float_t absl, radl, d, buf[1];
340 Float_t agm[2], dgm, zgm[2], wgm[2];
d3f347ff 341 Int_t nbuf;
fe4da5cc 342
d3f347ff 343 //////////////////////////////////////////////////////////////////////////
fe4da5cc 344 // Define Materials
d3f347ff 345 //////////////////////////////////////////////////////////////////////////
346
347 AliMaterial( 1, "Al $", 26.98, 13.0, 2.7 , 8.9 , 37.2);
348 AliMaterial( 2, "Air$", 14.61, 7.3, 0.001205, 30420.0 , 67500.0);
349 AliMaterial( 4, "Xe $", 131.29, 54.0, dxe , 1447.59, 0.0);
350 AliMaterial( 5, "Cu $", 63.54, 29.0, 8.96 , 1.43, 14.8);
351 AliMaterial( 6, "C $", 12.01, 6.0, 2.265 , 18.8 , 74.4);
352 AliMaterial(12, "G10$", 20.00, 10.0, 1.7 , 19.4 , 999.0);
353
354 // Mixtures
355 AliMixture(3, "Polyethilene$", ape, zpe, dpe, -2, wpe);
356 AliMixture(7, "Mylar$", amy, zmy, dmy, -3, wmy);
357 AliMixture(8, "CO2$", aco, zco, dco, -2, wco);
358 AliMixture(9, "Isobutane$", ais, zis, dis, -2, wis);
82bbf98a 359 AliMixture(13,"Water$", awa, zwa, dwa, -2, wwa);
d3f347ff 360
361 // Gas mixtures
82bbf98a 362 Char_t namate[21];
d3f347ff 363 // Xe/CO2-mixture
364 // Get properties of Xe
cfce8870 365 gMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
d3f347ff 366 // Get properties of CO2
cfce8870 367 gMC->Gfmate((*fIdmate)[8], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
d3f347ff 368 // Create gas mixture
369 wgm[0] = fxc;
370 wgm[1] = 1. - fxc;
fe4da5cc 371 dgm = wgm[0] * dxe + wgm[1] * dco;
d3f347ff 372 AliMixture(10, "Gas mixture 1$", agm, zgm, dgm, 2, wgm);
373 // Xe/Isobutane-mixture
374 // Get properties of Xe
cfce8870 375 gMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
d3f347ff 376 // Get properties of Isobutane
cfce8870 377 gMC->Gfmate((*fIdmate)[9], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
d3f347ff 378 // Create gas mixture
379 wgm[0] = fxi;
380 wgm[1] = 1. - fxi;
381 dgm = wgm[0] * dxe + wgm[1] * dis;
382 AliMixture(11, "Gas mixture 2$", agm, zgm, dgm, 2, wgm);
383
384 //////////////////////////////////////////////////////////////////////////
fe4da5cc 385 // Tracking Media Parameters
d3f347ff 386 //////////////////////////////////////////////////////////////////////////
387
388 // Al Frame
8230f242 389 AliMedium(1, "Al Frame$", 1, 0, isxfld, sxmgmx
d3f347ff 390 , tmaxfd, stemax, deemax, epsil, stmin);
391 // Air
8230f242 392 AliMedium(2, "Air$", 2, 0, isxfld, sxmgmx
d3f347ff 393 , tmaxfd, stemax, deemax, epsil, stmin);
394 // Polyethilene
8230f242 395 AliMedium(3, "Radiator$", 3, 0, isxfld, sxmgmx
d3f347ff 396 , tmaxfd, stemax, deemax, epsil, stmin);
397 // Xe
8230f242 398 AliMedium(4, "Xe$", 4, 1, isxfld, sxmgmx
d3f347ff 399 , tmaxfd, stemax, deemax, epsil, stmin);
400 // Cu pads
8230f242 401 AliMedium(5, "Padplane$", 5, 1, isxfld, sxmgmx
d3f347ff 402 , tmaxfd, stemax, deemax, epsil, stmin);
403 // Fee + cables
8230f242 404 AliMedium(6, "Readout$", 1, 0, isxfld, sxmgmx
d3f347ff 405 , tmaxfd, stemax, deemax, epsil, stmin);
406 // C frame
8230f242 407 AliMedium(7, "C Frame$", 6, 0, isxfld, sxmgmx
d3f347ff 408 , tmaxfd, stemax, deemax, epsil, stmin);
409 // Mylar foils
8230f242 410 AliMedium(8, "Mylar$", 7, 0, isxfld, sxmgmx
d3f347ff 411 , tmaxfd, stemax, deemax, epsil, stmin);
412 if (fGasMix == 1) {
413 // Gas-mixture (Xe/CO2)
8230f242 414 AliMedium(9, "Gas-mix$", 10, 1, isxfld, sxmgmx
d3f347ff 415 , tmaxfd, stemax, deemax, epsil, stmin);
416 }
417 else {
418 // Gas-mixture (Xe/Isobutane)
8230f242 419 AliMedium(9, "Gas-mix$", 11, 1, isxfld, sxmgmx
d3f347ff 420 , tmaxfd, stemax, deemax, epsil, stmin);
421 }
422 // Nomex-honeycomb (use carbon for the time being)
8230f242 423 AliMedium(10, "Nomex$", 6, 0, isxfld, sxmgmx
d3f347ff 424 , tmaxfd, stemax, deemax, epsil, stmin);
425 // Kapton foils (use Mylar for the time being)
8230f242 426 AliMedium(11, "Kapton$", 7, 0, isxfld, sxmgmx
d3f347ff 427 , tmaxfd, stemax, deemax, epsil, stmin);
428 // Gas-filling of the radiator
8230f242 429 AliMedium(12, "CO2$", 8, 0, isxfld, sxmgmx
d3f347ff 430 , tmaxfd, stemax, deemax, epsil, stmin);
431 // G10-plates
8230f242 432 AliMedium(13, "G10-plates$",12, 0, isxfld, sxmgmx
d3f347ff 433 , tmaxfd, stemax, deemax, epsil, stmin);
434 // Cooling water
8230f242 435 AliMedium(14, "Water$", 13, 0, isxfld, sxmgmx
d3f347ff 436 , tmaxfd, stemax, deemax, epsil, stmin);
437
fe4da5cc 438}
439
440//_____________________________________________________________________________
82bbf98a 441void AliTRD::DrawModule()
442{
443 //
444 // Draw a shaded view of the Transition Radiation Detector version 0
445 //
446
447 // Set everything unseen
448 gMC->Gsatt("*" ,"SEEN",-1);
449
450 // Set ALIC mother transparent
451 gMC->Gsatt("ALIC","SEEN", 0);
452
453 // Set the volumes visible
851d3db9 454 if (fGeometry->IsVersion() == 0) {
5c7f4665 455 gMC->Gsatt("B071","SEEN", 0);
456 gMC->Gsatt("B074","SEEN", 0);
457 gMC->Gsatt("B075","SEEN", 0);
458 gMC->Gsatt("B077","SEEN", 0);
459 gMC->Gsatt("BTR1","SEEN", 0);
460 gMC->Gsatt("BTR2","SEEN", 0);
461 gMC->Gsatt("BTR3","SEEN", 0);
462 gMC->Gsatt("TRD1","SEEN", 0);
463 gMC->Gsatt("TRD2","SEEN", 0);
464 gMC->Gsatt("TRD3","SEEN", 0);
465 }
466 else {
467 gMC->Gsatt("B071","SEEN", 0);
468 gMC->Gsatt("B074","SEEN", 0);
469 gMC->Gsatt("B075","SEEN", 0);
470 gMC->Gsatt("B077","SEEN", 0);
471 gMC->Gsatt("BTR1","SEEN", 0);
472 gMC->Gsatt("BTR2","SEEN", 0);
473 gMC->Gsatt("BTR3","SEEN", 0);
474 gMC->Gsatt("TRD1","SEEN", 0);
6f1e466d 475 if (fGeometry->GetPHOShole())
476 gMC->Gsatt("TRD2","SEEN", 0);
477 if (fGeometry->GetRICHhole())
478 gMC->Gsatt("TRD3","SEEN", 0);
5c7f4665 479 }
82bbf98a 480 gMC->Gsatt("UCII","SEEN", 0);
481 gMC->Gsatt("UCIM","SEEN", 0);
482 gMC->Gsatt("UCIO","SEEN", 0);
483 gMC->Gsatt("UL02","SEEN", 1);
484 gMC->Gsatt("UL05","SEEN", 1);
485 gMC->Gsatt("UL06","SEEN", 1);
486
487 gMC->Gdopt("hide", "on");
488 gMC->Gdopt("shad", "on");
489 gMC->Gsatt("*", "fill", 7);
490 gMC->SetClipBox(".");
491 gMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 2000);
492 gMC->DefaultRange();
493 gMC->Gdraw("alic", 40, 30, 0, 12, 9.4, .021, .021);
494 gMC->Gdhead(1111, "Transition Radiation Detector");
495 gMC->Gdman(18, 4, "MAN");
496
497}
498
499//_____________________________________________________________________________
fe4da5cc 500Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t )
501{
502 //
503 // Distance between the mouse and the TRD detector on the screen
504 // Dummy routine
82bbf98a 505
506 return 9999;
507
fe4da5cc 508}
509
510//_____________________________________________________________________________
511void AliTRD::Init()
512{
513 //
851d3db9 514 // Initialize the TRD detector after the geometry has been created
fe4da5cc 515 //
82bbf98a 516
5c7f4665 517 Int_t i;
851d3db9 518
5c7f4665 519 printf("\n");
851d3db9 520 for (i = 0; i < 35; i++) printf("*");
5c7f4665 521 printf(" TRD_INIT ");
851d3db9 522 for (i = 0; i < 35; i++) printf("*");
523 printf("\n");
5c7f4665 524 printf("\n");
5c7f4665 525
851d3db9 526 if (fGeometry->IsVersion() == 0) {
6f1e466d 527 printf(" Geometry for spaceframe with holes initialized.\n\n");
851d3db9 528 }
529 else if (fGeometry->IsVersion() == 1) {
6f1e466d 530 printf(" Geometry for spaceframe without holes initialized.\n");
531 if (fGeometry->GetPHOShole())
532 printf(" Leave space in front of PHOS free.\n");
533 if (fGeometry->GetRICHhole())
534 printf(" Leave space in front of RICH free.\n");
535 printf("\n");
5c7f4665 536 }
537
851d3db9 538 if (fGasMix == 1)
539 printf(" Gas Mixture: 90%% Xe + 10%% CO2\n\n");
540 else
541 printf(" Gas Mixture: 97%% Xe + 3%% Isobutane\n\n");
5c7f4665 542
543}
544
545//_____________________________________________________________________________
546void AliTRD::MakeBranch(Option_t* option)
547{
548 //
549 // Create Tree branches for the TRD digits and cluster.
550 //
551
552 Int_t buffersize = 4000;
553 Char_t branchname[15];
554
555 AliDetector::MakeBranch(option);
556
8230f242 557 Char_t *r = strstr(option,"R");
851d3db9 558 sprintf(branchname,"%srecPoints",GetName());
8230f242 559 if (fRecPoints && gAlice->TreeR() && r) {
6f1e466d 560 gAlice->TreeR()->Branch(branchname,fRecPoints->IsA()->GetName()
561 ,&fRecPoints,buffersize,0);
851d3db9 562 printf("* AliTRD::MakeBranch * Making Branch %s for points in TreeR\n",branchname);
5c7f4665 563 }
564
851d3db9 565}
566
567//_____________________________________________________________________________
568void AliTRD::ResetRecPoints()
569{
570 //
571 // Reset number of reconstructed points and the point array
572 //
573
574 fNRecPoints = 0;
6f1e466d 575 if (fRecPoints) fRecPoints->Delete();
5c7f4665 576
577}
578
579//_____________________________________________________________________________
580void AliTRD::SetTreeAddress()
581{
582 //
583 // Set the branch addresses for the trees.
584 //
585
586 Char_t branchname[15];
587
588 AliDetector::SetTreeAddress();
589
590 TBranch *branch;
851d3db9 591 TTree *treeR = gAlice->TreeR();
592
593 if (treeR) {
594 sprintf(branchname,"%srecPoints",GetName());
595 if (fRecPoints) {
596 branch = treeR->GetBranch(branchname);
597 if (branch) {
598 branch->SetAddress(&fRecPoints);
599 }
5c7f4665 600 }
601 }
602
fe4da5cc 603}
604
d3f347ff 605//_____________________________________________________________________________
b060c36f 606void AliTRD::SetGasMix(Int_t imix)
d3f347ff 607{
82bbf98a 608 //
609 // Defines the gas mixture (imix=0: Xe/Isobutane imix=1: Xe/CO2)
610 //
611
d3f347ff 612 if ((imix < 0) || (imix > 1)) {
613 printf("Wrong input value: %d\n",imix);
614 printf("Use standard setting\n");
615 fGasMix = 0;
616 return;
617 }
618
619 fGasMix = imix;
620
621}
622
dd9a6ee3 623//_____________________________________________________________________________
624AliTRD &AliTRD::operator=(const AliTRD &trd)
625{
626 //
627 // Assignment operator
628 //
629
630 if (this != &trd) ((AliTRD &) trd).Copy(*this);
631 return *this;
632
633}