-
-//_____________________________________________________________________________
-void AliTRD::BuildGeometry()
-{
- //
- // Create the ROOT TNode geometry for the TRD
- //
-
- TNode *node;
- TNode *top;
- TPGON *pgon;
-
- // The dimensions of the TRD super module
- const Float_t kRmin = 291.0;
- const Float_t kRmax = 369.0;
- const Float_t kZmax1 = 378.35;
- const Float_t kZmax2 = 302.0;
-
- Float_t rmin;
- Float_t rmax;
- Float_t zmax1;
- Float_t zmax2;
-
- Int_t iPlan;
-
- const Int_t kColorTRD = 46;
-
- // Find the top node alice
- top = gAlice->GetGeometry()->GetNode("alice");
-
- if (fDisplayType == 0) {
-
- pgon = new TPGON("S_TRD","TRD","void",0,360,AliTRDgeometry::Nsect(),4);
- rmin = kRmin;
- rmax = kRmax;
- pgon->DefineSection(0,-kZmax1,rmax,rmax);
- pgon->DefineSection(1,-kZmax2,rmin,rmax);
- pgon->DefineSection(2, kZmax2,rmin,rmax);
- pgon->DefineSection(3, kZmax1,rmax,rmax);
- top->cd();
- node = new TNode("TRD","TRD","S_TRD",0,0,0,"");
- node->SetLineColor(kColorTRD);
- fNodes->Add(node);
-
- }
- else if (fDisplayType == 1) {
-
- Char_t name[7];
-
- Float_t slope = (kZmax1 - kZmax2) / (kRmax - kRmin);
-
- rmin = kRmin + AliTRDgeometry::CraHght();
- rmax = rmin + AliTRDgeometry::CdrHght();
-
- Float_t thickness = rmin - kRmin;
- zmax2 = kZmax2 + slope * thickness;
- zmax1 = zmax2 + slope * AliTRDgeometry::DrThick();
-
- for (iPlan = 0; iPlan < AliTRDgeometry::Nplan(); iPlan++) {
-
- sprintf(name,"S_TR1%d",iPlan);
- pgon = new TPGON(name,"TRD","void",0,360,AliTRDgeometry::Nsect(),4);
- pgon->DefineSection(0,-zmax1,rmax,rmax);
- pgon->DefineSection(1,-zmax2,rmin,rmax);
- pgon->DefineSection(2, zmax2,rmin,rmax);
- pgon->DefineSection(3, zmax1,rmax,rmax);
- top->cd();
- node = new TNode("TRD","TRD",name,0,0,0,"");
- node->SetLineColor(kColorTRD);
- fNodes->Add(node);
-
- Float_t height = AliTRDgeometry::Cheight() + AliTRDgeometry::Cspace();
- rmin = rmin + height;
- rmax = rmax + height;
- zmax1 = zmax1 + slope * height;
- zmax2 = zmax2 + slope * height;
-
- }
-
- thickness += AliTRDgeometry::DrThick();
- rmin = kRmin + thickness;
- rmax = rmin + AliTRDgeometry::AmThick();
- zmax2 = kZmax2 + slope * thickness;
- zmax1 = zmax2 + slope * AliTRDgeometry::AmThick();
-
- for (iPlan = 0; iPlan < AliTRDgeometry::Nplan(); iPlan++) {
-
- sprintf(name,"S_TR2%d",iPlan);
- pgon = new TPGON(name,"TRD","void",0,360,AliTRDgeometry::Nsect(),4);
- pgon->DefineSection(0,-zmax1,rmax,rmax);
- pgon->DefineSection(1,-zmax2,rmin,rmax);
- pgon->DefineSection(2, zmax2,rmin,rmax);
- pgon->DefineSection(3, zmax1,rmax,rmax);
- top->cd();
- node = new TNode("TRD","TRD",name,0,0,0,"");
- node->SetLineColor(kColorTRD);
- fNodes->Add(node);
-
- Float_t height = AliTRDgeometry::Cheight() + AliTRDgeometry::Cspace();
- rmin = rmin + height;
- rmax = rmax + height;
- zmax1 = zmax1 + slope * height;
- zmax2 = zmax2 + slope * height;
-
- }
-
- }
-
-}