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