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.23 2000/11/01 14:53:20 cblume
19 Merge with TRD-develop
22 Revision 1.17.2.6 2000/10/15 23:29:08 cblume
23 Introduced more detailed geometry for the display
25 Revision 1.17.2.5 2000/10/06 16:49:46 cblume
28 Revision 1.17.2.4 2000/10/04 16:34:57 cblume
29 Replace include files by forward declarations
31 Revision 1.17.2.3 2000/09/22 14:45:17 cblume
32 Included changes for the tracking
34 Revision 1.17.2.2 2000/09/18 13:25:13 cblume
35 Included LoadPoints() method to display the TR photons
37 Revision 1.22 2000/10/02 21:28:19 fca
38 Removal of useless dependecies via forward declarations
40 Revision 1.21 2000/06/09 11:10:07 cblume
41 Compiler warnings and coding conventions, next round
43 Revision 1.20 2000/06/08 18:32:57 cblume
44 Make code compliant to coding conventions
46 Revision 1.19 2000/06/07 16:25:37 cblume
47 Try to remove compiler warnings on Sun and HP
49 Revision 1.18 2000/05/08 16:17:27 cblume
52 Revision 1.21 2000/06/09 11:10:07 cblume
53 Compiler warnings and coding conventions, next round
55 Revision 1.20 2000/06/08 18:32:57 cblume
56 Make code compliant to coding conventions
58 Revision 1.19 2000/06/07 16:25:37 cblume
59 Try to remove compiler warnings on Sun and HP
61 Revision 1.18 2000/05/08 16:17:27 cblume
64 Revision 1.17.2.1 2000/05/08 14:28:59 cblume
65 Introduced SetPHOShole() and SetRICHhole(). AliTRDrecPoint container is now a TObjArray
67 Revision 1.17 2000/02/28 19:10:26 cblume
68 Include the new TRD classes
70 Revision 1.16.2.2 2000/02/28 17:53:24 cblume
71 Introduce TRD geometry classes
73 Revision 1.16.2.1 2000/02/28 17:04:19 cblume
74 Include functions and data members for AliTRDrecPoint
76 Revision 1.16 2000/01/19 17:17:35 fca
77 Introducing a list of lists of hits -- more hits allowed for detector now
79 Revision 1.15 1999/11/02 17:04:25 fca
80 Small syntax change for HP compiler
82 Revision 1.14 1999/11/02 16:57:02 fca
83 Avoid non ansi warnings on HP compilers
85 Revision 1.13 1999/11/02 16:35:56 fca
86 New version of TRD introduced
88 Revision 1.12 1999/11/01 20:41:51 fca
89 Added protections against using the wrong version of FRAME
91 Revision 1.11 1999/09/29 09:24:34 fca
92 Introduction of the Copyright and cvs Log
96 ///////////////////////////////////////////////////////////////////////////////
98 // Transition Radiation Detector //
99 // This class contains the basic functions for the Transition Radiation //
102 ///////////////////////////////////////////////////////////////////////////////
105 #include <iostream.h>
109 #include <TGeometry.h>
114 #include "AliConst.h"
115 #include "AliDigit.h"
120 #include "AliTRDhit.h"
121 #include "AliTRDpoints.h"
122 #include "AliTRDdigit.h"
123 #include "AliTRDdigitizer.h"
124 #include "AliTRDclusterizer.h"
125 #include "AliTRDgeometryHole.h"
126 #include "AliTRDgeometryFull.h"
127 #include "AliTRDrecPoint.h"
128 #include "AliTRDdigitsManager.h"
132 //_____________________________________________________________________________
136 // Default constructor
157 //_____________________________________________________________________________
158 AliTRD::AliTRD(const char *name, const char *title)
159 : AliDetector(name,title)
162 // Standard constructor for the TRD
165 // Check that FRAME is there otherwise we have no place where to
167 AliModule* frame = gAlice->GetModule("FRAME");
169 Error("Ctor","TRD needs FRAME to be present\n");
173 // Define the TRD geometry according to the FRAME geometry
174 if (frame->IsVersion() == 0) {
175 // Geometry with hole
176 fGeometry = new AliTRDgeometryHole();
178 else if (frame->IsVersion() == 1) {
179 // Geometry without hole
180 fGeometry = new AliTRDgeometryFull();
183 Error("Ctor","Could not find valid FRAME version\n");
187 // Allocate the hit array
188 fHits = new TClonesArray("AliTRDhit" ,405);
189 gAlice->AddHitList(fHits);
191 // Allocate the digits array
194 // Allocate the rec point array
195 fRecPoints = new TObjArray(400);
207 SetMarkerColor(kWhite);
211 //_____________________________________________________________________________
212 AliTRD::AliTRD(const AliTRD &trd)
218 ((AliTRD &) trd).Copy(*this);
222 //_____________________________________________________________________________
237 //_____________________________________________________________________________
238 void AliTRD::AddRecPoint(Float_t *pos, Int_t *digits, Int_t det, Float_t amp
242 // Add a reconstructed point for the TRD
245 AliTRDrecPoint *recPoint = new AliTRDrecPoint();
246 TVector3 posVec(pos[0],pos[1],pos[2]);
247 recPoint->SetLocalPosition(posVec);
248 recPoint->SetDetector(det);
249 recPoint->SetEnergy(amp);
250 for (Int_t iDigit = 0; iDigit < 3; iDigit++) {
251 recPoint->AddDigit(digits[iDigit]);
254 recPoint->AddTrackIndex(tracks);
256 recPoint->SetTrackingYZ(0.,0.); // variance values set inside
257 fRecPoints->Add(recPoint);
260 //___________________________________________
261 void AliTRD::SDigits2Digits()
266 AliTRDdigitizer *Digitizer = new AliTRDdigitizer("digitizer","TRD digitizer class");
269 Digitizer->SetDiffusion();
270 Digitizer->SetVerbose(1);
272 //Digitizer->SetExB();
273 //Digitizer->SetElAttach();
274 //Digitizer->SetAttachProb();
276 Digitizer->InitDetector();
279 Digitizer->MakeDigits();
280 cout<<"After MakeDigits"<<endl;
282 // Write the digits into the input file
283 if (Digitizer->Digits()->MakeBranch(fDigitsFile))
285 Digitizer->WriteDigits();
286 cout<<"After write digits"<<endl;
288 // Save the digitizer class in the AliROOT
290 cout<<"After write digitizer"<<endl;
294 //_____________________________________________________________________________
295 void AliTRD::AddDigit(Int_t *digits, Int_t *amp)
298 // Add a digit for the TRD
301 TClonesArray &ldigits = *fDigits;
302 new(ldigits[fNdigits++]) AliTRDdigit(kFALSE,digits,amp);
306 //_____________________________________________________________________________
307 void AliTRD::AddHit(Int_t track, Int_t det, Float_t *hits, Int_t q)
310 // Add a hit for the TRD
313 TClonesArray &lhits = *fHits;
314 new(lhits[fNhits++]) AliTRDhit(fIshunt,track,det,hits,q);
318 //_____________________________________________________________________________
319 void AliTRD::BuildGeometry()
322 // Create the ROOT TNode geometry for the TRD
329 Float_t zmax1, zmax2;
331 const Int_t kColorTRD = 46;
333 // Find the top node alice
334 top = gAlice->GetGeometry()->GetNode("alice");
336 switch (fDisplayType) {
340 pgon = new TPGON("S_TRD","TRD","void",0,360,AliTRDgeometry::Nsect(),4);
341 rmin = AliTRDgeometry::Rmin();
342 rmax = AliTRDgeometry::Rmax();
343 pgon->DefineSection(0,-AliTRDgeometry::Zmax1(),rmax,rmax);
344 pgon->DefineSection(1,-AliTRDgeometry::Zmax2(),rmin,rmax);
345 pgon->DefineSection(2, AliTRDgeometry::Zmax2(),rmin,rmax);
346 pgon->DefineSection(3, AliTRDgeometry::Zmax1(),rmax,rmax);
348 node = new TNode("TRD","TRD","S_TRD",0,0,0,"");
349 node->SetLineColor(kColorTRD);
356 Float_t slope = (AliTRDgeometry::Zmax1() - AliTRDgeometry::Zmax2())
357 / (AliTRDgeometry::Rmax() - AliTRDgeometry::Rmin());
359 rmin = AliTRDgeometry::Rmin() + AliTRDgeometry::RaThick();
360 rmax = rmin + AliTRDgeometry::DrThick();
361 zmax2 = AliTRDgeometry::Zmax2() + slope * AliTRDgeometry::RaThick();
362 zmax1 = zmax2 + slope * AliTRDgeometry::DrThick();
365 for (Int_t iPlan = 0; iPlan < AliTRDgeometry::Nplan(); iPlan++) {
367 sprintf(name,"S_TRD%d",iPlan);
368 pgon = new TPGON(name,"TRD","void",0,360,AliTRDgeometry::Nsect(),4);
369 pgon->DefineSection(0,-zmax1,rmax,rmax);
370 pgon->DefineSection(1,-zmax2,rmin,rmax);
371 pgon->DefineSection(2, zmax2,rmin,rmax);
372 pgon->DefineSection(3, zmax1,rmax,rmax);
374 node = new TNode("TRD","TRD",name,0,0,0,"");
375 node->SetLineColor(kColorTRD);
378 Float_t height = AliTRDgeometry::Cheight() + AliTRDgeometry::Cspace();
379 rmin = rmin + height;
380 rmax = rmax + height;
381 zmax1 = zmax1 + slope * height;
382 zmax2 = zmax2 + slope * height;
392 //_____________________________________________________________________________
393 void AliTRD::Copy(TObject &trd)
399 ((AliTRD &) trd).fGasMix = fGasMix;
400 ((AliTRD &) trd).fGeometry = fGeometry;
401 ((AliTRD &) trd).fRecPoints = fRecPoints;
402 ((AliTRD &) trd).fNRecPoints = fNRecPoints;
403 ((AliTRD &) trd).fGasDensity = fGasDensity;
404 ((AliTRD &) trd).fFoilDensity = fFoilDensity;
405 ((AliTRD &) trd).fDrawTR = fDrawTR;
406 ((AliTRD &) trd).fDisplayType = fDisplayType;
408 //AliDetector::Copy(trd);
412 //_____________________________________________________________________________
413 void AliTRD::CreateGeometry()
416 // Creates the volumes for the TRD chambers
419 // Check that FRAME is there otherwise we have no place where to put the TRD
420 AliModule* frame = gAlice->GetModule("FRAME");
422 printf(" The TRD needs the FRAME to be defined first\n");
426 fGeometry->CreateGeometry(fIdtmed->GetArray() - 1299);
430 //_____________________________________________________________________________
431 void AliTRD::CreateMaterials()
434 // Create the materials for the TRD
438 Int_t isxfld = gAlice->Field()->Integ();
439 Float_t sxmgmx = gAlice->Field()->Max();
441 // For polyethilene (CH2)
442 Float_t ape[2] = { 12., 1. };
443 Float_t zpe[2] = { 6., 1. };
444 Float_t wpe[2] = { 1., 2. };
447 // For mylar (C5H4O2)
448 Float_t amy[3] = { 12., 1., 16. };
449 Float_t zmy[3] = { 6., 1., 8. };
450 Float_t wmy[3] = { 5., 4., 2. };
454 Float_t aco[2] = { 12., 16. };
455 Float_t zco[2] = { 6., 8. };
456 Float_t wco[2] = { 1., 2. };
457 Float_t dco = 0.001977;
460 Float_t awa[2] = { 1., 16. };
461 Float_t zwa[2] = { 1., 8. };
462 Float_t wwa[2] = { 2., 1. };
465 // For isobutane (C4H10)
466 Float_t ais[2] = { 12., 1. };
467 Float_t zis[2] = { 6., 1. };
468 Float_t wis[2] = { 4., 10. };
469 Float_t dis = 0.00267;
471 // For Xe/CO2-gas-mixture
472 // Xe-content of the Xe/CO2-mixture (90% / 10%)
474 // Xe-content of the Xe/Isobutane-mixture (97% / 3%)
476 Float_t dxe = .005858;
478 // General tracking parameter
479 Float_t tmaxfd = -10.;
480 Float_t stemax = -1e10;
481 Float_t deemax = -0.1;
482 Float_t epsil = 1e-4;
483 Float_t stmin = -0.001;
485 Float_t absl, radl, d, buf[1];
486 Float_t agm[2], zgm[2], wgm[2];
490 //////////////////////////////////////////////////////////////////////////
492 //////////////////////////////////////////////////////////////////////////
494 AliMaterial( 1, "Al $", 26.98, 13.0, 2.7 , 8.9 , 37.2);
495 AliMaterial( 2, "Air$", 14.61, 7.3, 0.001205, 30420.0 , 67500.0);
496 AliMaterial( 4, "Xe $", 131.29, 54.0, dxe , 1447.59, 0.0);
497 AliMaterial( 5, "Cu $", 63.54, 29.0, 8.96 , 1.43, 14.8);
498 AliMaterial( 6, "C $", 12.01, 6.0, 2.265 , 18.8 , 74.4);
499 AliMaterial(12, "G10$", 20.00, 10.0, 1.7 , 19.4 , 999.0);
502 AliMixture(3, "Polyethilene$", ape, zpe, dpe, -2, wpe);
503 AliMixture(7, "Mylar$", amy, zmy, dmy, -3, wmy);
504 AliMixture(8, "CO2$", aco, zco, dco, -2, wco);
505 AliMixture(9, "Isobutane$", ais, zis, dis, -2, wis);
506 AliMixture(13,"Water$", awa, zwa, dwa, -2, wwa);
511 // Get properties of Xe
512 gMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
513 // Get properties of CO2
514 gMC->Gfmate((*fIdmate)[8], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
515 // Create gas mixture
518 dgm1 = wgm[0] * dxe + wgm[1] * dco;
519 AliMixture(10, "Gas mixture 1$", agm, zgm, dgm1, 2, wgm);
520 // Xe/Isobutane-mixture
521 // Get properties of Xe
522 gMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
523 // Get properties of Isobutane
524 gMC->Gfmate((*fIdmate)[9], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
525 // Create gas mixture
528 dgm2 = wgm[0] * dxe + wgm[1] * dis;
529 AliMixture(11, "Gas mixture 2$", agm, zgm, dgm2, 2, wgm);
531 //////////////////////////////////////////////////////////////////////////
532 // Tracking Media Parameters
533 //////////////////////////////////////////////////////////////////////////
536 AliMedium(1, "Al Frame$", 1, 0, isxfld, sxmgmx
537 , tmaxfd, stemax, deemax, epsil, stmin);
539 AliMedium(2, "Air$", 2, 0, isxfld, sxmgmx
540 , tmaxfd, stemax, deemax, epsil, stmin);
542 AliMedium(3, "Radiator$", 3, 0, isxfld, sxmgmx
543 , tmaxfd, stemax, deemax, epsil, stmin);
545 AliMedium(4, "Xe$", 4, 1, isxfld, sxmgmx
546 , tmaxfd, stemax, deemax, epsil, stmin);
548 AliMedium(5, "Padplane$", 5, 1, isxfld, sxmgmx
549 , tmaxfd, stemax, deemax, epsil, stmin);
551 AliMedium(6, "Readout$", 1, 0, isxfld, sxmgmx
552 , tmaxfd, stemax, deemax, epsil, stmin);
554 AliMedium(7, "C Frame$", 6, 0, isxfld, sxmgmx
555 , tmaxfd, stemax, deemax, epsil, stmin);
557 AliMedium(8, "Mylar$", 7, 0, isxfld, sxmgmx
558 , tmaxfd, stemax, deemax, epsil, stmin);
560 // Gas-mixture (Xe/CO2)
561 AliMedium(9, "Gas-mix$", 10, 1, isxfld, sxmgmx
562 , tmaxfd, stemax, deemax, epsil, stmin);
565 // Gas-mixture (Xe/Isobutane)
566 AliMedium(9, "Gas-mix$", 11, 1, isxfld, sxmgmx
567 , tmaxfd, stemax, deemax, epsil, stmin);
569 // Nomex-honeycomb (use carbon for the time being)
570 AliMedium(10, "Nomex$", 6, 0, isxfld, sxmgmx
571 , tmaxfd, stemax, deemax, epsil, stmin);
572 // Kapton foils (use Mylar for the time being)
573 AliMedium(11, "Kapton$", 7, 0, isxfld, sxmgmx
574 , tmaxfd, stemax, deemax, epsil, stmin);
575 // Gas-filling of the radiator
576 AliMedium(12, "CO2$", 8, 0, isxfld, sxmgmx
577 , tmaxfd, stemax, deemax, epsil, stmin);
579 AliMedium(13, "G10-plates$",12, 0, isxfld, sxmgmx
580 , tmaxfd, stemax, deemax, epsil, stmin);
582 AliMedium(14, "Water$", 13, 0, isxfld, sxmgmx
583 , tmaxfd, stemax, deemax, epsil, stmin);
585 // Save the density values for the TRD absorbtion
594 //_____________________________________________________________________________
595 void AliTRD::DrawModule()
598 // Draw a shaded view of the Transition Radiation Detector version 0
601 // Set everything unseen
602 gMC->Gsatt("*" ,"SEEN",-1);
604 // Set ALIC mother transparent
605 gMC->Gsatt("ALIC","SEEN", 0);
607 // Set the volumes visible
608 if (fGeometry->IsVersion() == 0) {
609 gMC->Gsatt("B071","SEEN", 0);
610 gMC->Gsatt("B074","SEEN", 0);
611 gMC->Gsatt("B075","SEEN", 0);
612 gMC->Gsatt("B077","SEEN", 0);
613 gMC->Gsatt("BTR1","SEEN", 0);
614 gMC->Gsatt("BTR2","SEEN", 0);
615 gMC->Gsatt("BTR3","SEEN", 0);
616 gMC->Gsatt("TRD1","SEEN", 0);
617 gMC->Gsatt("TRD2","SEEN", 0);
618 gMC->Gsatt("TRD3","SEEN", 0);
621 gMC->Gsatt("B071","SEEN", 0);
622 gMC->Gsatt("B074","SEEN", 0);
623 gMC->Gsatt("B075","SEEN", 0);
624 gMC->Gsatt("B077","SEEN", 0);
625 gMC->Gsatt("BTR1","SEEN", 0);
626 gMC->Gsatt("BTR2","SEEN", 0);
627 gMC->Gsatt("BTR3","SEEN", 0);
628 gMC->Gsatt("TRD1","SEEN", 0);
629 if (fGeometry->GetPHOShole())
630 gMC->Gsatt("TRD2","SEEN", 0);
631 if (fGeometry->GetRICHhole())
632 gMC->Gsatt("TRD3","SEEN", 0);
634 gMC->Gsatt("UCII","SEEN", 0);
635 gMC->Gsatt("UCIM","SEEN", 0);
636 gMC->Gsatt("UCIO","SEEN", 0);
637 gMC->Gsatt("UL02","SEEN", 1);
638 gMC->Gsatt("UL05","SEEN", 1);
639 gMC->Gsatt("UL06","SEEN", 1);
641 gMC->Gdopt("hide", "on");
642 gMC->Gdopt("shad", "on");
643 gMC->Gsatt("*", "fill", 7);
644 gMC->SetClipBox(".");
645 gMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 2000);
647 gMC->Gdraw("alic", 40, 30, 0, 12, 9.4, .021, .021);
648 gMC->Gdhead(1111, "Transition Radiation Detector");
649 gMC->Gdman(18, 4, "MAN");
653 //_____________________________________________________________________________
654 Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t )
657 // Distance between the mouse and the TRD detector on the screen
664 //_____________________________________________________________________________
668 // Initialize the TRD detector after the geometry has been created
674 for (i = 0; i < 35; i++) printf("*");
675 printf(" TRD_INIT ");
676 for (i = 0; i < 35; i++) printf("*");
680 if (fGeometry->IsVersion() == 0) {
681 printf(" Geometry for spaceframe with holes initialized.\n\n");
683 else if (fGeometry->IsVersion() == 1) {
684 printf(" Geometry for spaceframe without holes initialized.\n");
685 if (fGeometry->GetPHOShole())
686 printf(" Leave space in front of PHOS free.\n");
687 if (fGeometry->GetRICHhole())
688 printf(" Leave space in front of RICH free.\n");
693 printf(" Gas Mixture: 90%% Xe + 10%% CO2\n\n");
695 printf(" Gas Mixture: 97%% Xe + 3%% Isobutane\n\n");
699 //_____________________________________________________________________________
700 void AliTRD::LoadPoints(Int_t track)
703 // Store x, y, z of all hits in memory.
704 // Hit originating from TR photons are given a different color
708 AliDetector::LoadPoints(track);
712 if (fHits == 0) return;
714 Int_t nhits = fHits->GetEntriesFast();
715 if (nhits == 0) return;
717 Int_t tracks = gAlice->GetNtrack();
718 if (fPoints == 0) fPoints = new TObjArray(tracks);
722 Int_t *ntrkE = new Int_t[tracks];
723 Int_t *ntrkT = new Int_t[tracks];
724 Int_t *limiE = new Int_t[tracks];
725 Int_t *limiT = new Int_t[tracks];
726 Float_t **coorE = new Float_t*[tracks];
727 Float_t **coorT = new Float_t*[tracks];
728 for(Int_t i = 0; i < tracks; i++) {
737 AliTRDpoints *points = 0;
740 Int_t chunk = nhits / 4 + 1;
742 // Loop over all the hits and store their position
743 for (Int_t hit = 0; hit < nhits; hit++) {
745 ahit = (AliTRDhit *) fHits->UncheckedAt(hit);
748 if (ahit->GetCharge() >= 0) {
750 trk = ahit->GetTrack();
751 if (ntrkE[trk] == limiE[trk]) {
752 // Initialise a new track
753 fp = new Float_t[3*(limiE[trk]+chunk)];
755 memcpy(fp,coorE[trk],sizeof(Float_t)*3*limiE[trk]);
756 delete [] coorE[trk];
764 fp[3*ntrkE[trk] ] = ahit->X();
765 fp[3*ntrkE[trk]+1] = ahit->Y();
766 fp[3*ntrkE[trk]+2] = ahit->Z();
773 trk = ahit->GetTrack();
774 if (ntrkT[trk] == limiT[trk]) {
775 // Initialise a new track
776 fp = new Float_t[3*(limiT[trk]+chunk)];
778 memcpy(fp,coorT[trk],sizeof(Float_t)*3*limiT[trk]);
779 delete [] coorT[trk];
787 fp[3*ntrkT[trk] ] = ahit->X();
788 fp[3*ntrkT[trk]+1] = ahit->Y();
789 fp[3*ntrkT[trk]+2] = ahit->Z();
796 for (trk = 0; trk < tracks; ++trk) {
798 if (ntrkE[trk] || ntrkT[trk]) {
800 points = new AliTRDpoints();
801 points->SetDetector(this);
802 points->SetParticle(trk);
804 // Set the dEdx points
806 points->SetMarkerColor(GetMarkerColor());
807 points->SetMarkerSize(GetMarkerSize());
808 points->SetPolyMarker(ntrkE[trk],coorE[trk],GetMarkerStyle());
809 delete [] coorE[trk];
813 // Set the TR photon points
815 points->SetTRpoints(ntrkT[trk],coorT[trk]);
816 delete [] coorT[trk];
820 fPoints->AddAt(points,trk);
835 //_____________________________________________________________________________
836 void AliTRD::MakeBranch(Option_t* option, char *file)
839 // Create Tree branches for the TRD digits and cluster.
842 //Int_t buffersize = 4000;
843 //Char_t branchname[15];
845 AliDetector::MakeBranch(option,file);
847 //Char_t *r = strstr(option,"R");
848 //sprintf(branchname,"%srecPoints",GetName());
849 //if (fRecPoints && gAlice->TreeR() && r) {
850 // MakeBranchInTree(gAlice->TreeR(),
851 // branchname, &fRecPoints,buffersize, file) ;
856 //_____________________________________________________________________________
857 void AliTRD::ResetRecPoints()
860 // Reset number of reconstructed points and the point array
865 Int_t nentr = fRecPoints->GetEntriesFast();
866 for(Int_t i = 0; i < nentr; i++) delete fRecPoints->RemoveAt(i);
871 //_____________________________________________________________________________
872 void AliTRD::SetTreeAddress()
875 // Set the branch addresses for the trees.
878 Char_t branchname[15];
880 AliDetector::SetTreeAddress();
883 TTree *treeR = gAlice->TreeR();
886 sprintf(branchname,"%srecPoints",GetName());
888 branch = treeR->GetBranch(branchname);
890 branch->SetAddress(&fRecPoints);
897 //_____________________________________________________________________________
898 void AliTRD::SetGasMix(Int_t imix)
901 // Defines the gas mixture (imix=0: Xe/Isobutane imix=1: Xe/CO2)
904 if ((imix < 0) || (imix > 1)) {
905 printf("Wrong input value: %d\n",imix);
906 printf("Use standard setting\n");
915 //_____________________________________________________________________________
916 void AliTRD::SetPHOShole()
919 // Selects a geometry with a hole in front of the PHOS
922 fGeometry->SetPHOShole();
926 //_____________________________________________________________________________
927 void AliTRD::SetRICHhole()
930 // Selects a geometry with a hole in front of the RICH
933 fGeometry->SetRICHhole();
937 //_____________________________________________________________________________
938 AliTRD &AliTRD::operator=(const AliTRD &trd)
941 // Assignment operator
944 if (this != &trd) ((AliTRD &) trd).Copy(*this);