Fleshed out geometry of FMD2 and 3. All should be in now. Still missing
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Nov 2008 15:25:39 +0000 (15:25 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Nov 2008 15:25:39 +0000 (15:25 +0000)
final geometry of FMD1 (will be done soon).

FMD/AliFMD2.cxx
FMD/AliFMD3.cxx
FMD/AliFMDGeometryBuilder.cxx
FMD/AliFMDGeometryBuilder.h
FMD/Config.C
FMD/scripts/DrawGeometry.C [new file with mode: 0644]
FMD/scripts/ShowFMDITS.C [new file with mode: 0644]

index a62546e..3bdaaaf 100644 (file)
@@ -45,9 +45,11 @@ AliFMD2::AliFMD2(AliFMDRing* inner, AliFMDRing* outer)
   // Constructor 
   // SetInnerZ(83.4);
   // SetOuterZ(75.2);
-  AliWarning("Z position of FMD2 rings may be wrong by 2.35cm!");
-  SetInnerZ(83.4+2.35);
-  SetOuterZ(75.2+2.35);
+  Double_t off = 0; // 2.35
+  if (off != 0) 
+    AliWarning(Form("Z position of FMD2 rings may be wrong by %fcm!", off));
+  SetInnerZ(83.4+off);
+  SetOuterZ(75.2+off);
 }
 
 
index dfa944a..32cf2fc 100644 (file)
@@ -54,22 +54,23 @@ AliFMD3::AliFMD3(AliFMDRing* inner, AliFMDRing* outer)
     fFiducialRadius(.25),
     fConeInnerAngle(0),
     fConeOuterAngle(0),
-    fHoleOffset(7),      // From drawing
+    fHoleOffset(6.9),    // From drawing
     fHoleDepth(2),       // What's needed
-    fHoleLength(0),      
-    fHoleLowWidth(4),    // What's needed
-    fHoleHighWidth(18),  // What's needed
+    fHoleLength(31.2),   // From drawing
+    fHoleLowWidth(3), // 4),    // What's needed
+    fHoleHighWidth(18.5), // 17.5), // 18),  // What's needed
     fBoltLength(1),      // Guessed
     fBoltRadius(0.15),   // Estimate
     fConeRadii(6),    
     fFiducialHoles(4)
 {
   // Constructor. 
-  // SetInnerZ(-62.8);             // By design
-  // SetOuterZ(-75.2);             // By design
-  AliWarning("Z position of FMD3 rings may be off by 0.25cm!");
-  SetInnerZ(-63.05);             // Slightly off (2.5mm) from design
-  SetOuterZ(-75.45);             // Slightly off (2.5mm) from design
+  Double_t off = -0.25;
+  if (off != 0) 
+    AliWarning(Form("Z position of FMD3 rings may be off by %fcm!", off));
+
+  SetInnerZ(-62.8+off);             // By design
+  SetOuterZ(-75.2+off);             // By design
 
   SetInnerHoneyLowR(4.18207);   // From drawing
   SetInnerHoneyHighR(19.74922); // From drawing
@@ -111,8 +112,10 @@ AliFMD3::Init()
   fConeOuterAngle  = TMath::ATan2(v3.Y()-v2.Y(), v3.X()-v2.X());
   
   Double_t    hz1  = -fHoleOffset+fInnerZ+fNoseZ;
+#if 0
   fHoleLength      = TMath::Sqrt(TMath::Power(v4.Z()-ConeR(hz1),2) + 
                                 TMath::Power(v4.X()-fHoleOffset,2));  
+#endif
 }
 
 //____________________________________________________________________
index eed735b..7ca71e2 100644 (file)
@@ -41,6 +41,7 @@
 #include <TGeoVolume.h>                // ROOT_TGeoVolume
 #include <TGeoXtru.h>          // ROOT_TGeoXtru
 #include <TGeoPcon.h>          // ROOT_TGeoPcon
+#include <TGeoTorus.h>         // ROOT_TGeoTorus
 #include <TGeoCompositeShape.h>
 #include <TMath.h>
 #include <TVector2.h>          // ROOT_TVector2
@@ -170,7 +171,8 @@ AliFMDGeometryBuilder::RingGeometry(AliFMDRing* r)
     return 0;
   }
   Char_t        id       = r->GetId();
-  const Char_t* lName    = (id == 'i' || id == 'I' ? "inner" : "outer");
+  Char_t        rng      = toupper(id);
+  const Char_t* lName    = (rng == 'I' ? "inner" : "outer");
   Double_t      siThick  = r->GetSiThickness();
   const Int_t   knv      = r->GetNVerticies();
   TVector2*     a        = r->GetVertex(5);
@@ -246,9 +248,9 @@ AliFMDGeometryBuilder::RingGeometry(AliFMDRing* r)
     sensorVolume->AddNodeOverlap(activeVolume, 0);
   }
   
-  switch (id) {
-  case 'i': case 'I': fActiveId[0] = sid; break;
-  case 'o': case 'O': fActiveId[1] = sid; break;
+  switch (rng) {
+  case 'I': fActiveId[0] = sid; break;
+  case 'O': fActiveId[1] = sid; break;
   }
 
   // Shape of Printed circuit Board 
@@ -365,7 +367,7 @@ AliFMDGeometryBuilder::RingGeometry(AliFMDRing* r)
   Double_t clipWY = 0;
   Double_t clipY  = 1;
   
-  if (id == 'I' || id == 'i') { 
+  if (rng == 'I') { 
     clipWX = ddhr;
     clipWY = ddhr/2;
   }
@@ -425,10 +427,10 @@ AliFMDGeometryBuilder::RingGeometry(AliFMDRing* r)
   AliFMDDebug(10, ("making %d modules in ring %c", nmod, id));
   for (Int_t i = 0; i < nmod; i++) {
     if (i == nmod / 2) halfRing = ringBotVolume;
-    Bool_t      front =  (i % 2 == 0);
+    Bool_t      front =  (i % 2 == (rng == 'I' ? 1 : 0));
     TGeoVolume* vol   =  (front ? frontVolume : backVolume);
     // vol->AddNode(sensorVolume, i, new TGeoTranslation(0,0,siThick/2));
-    Double_t    z1    =  (i % 2) * modSpace;
+    Double_t    z1    =  (front ? 0 : modSpace);
     Double_t    th    =  (2 * i + 1) * theta;
     TGeoMatrix* mat1  =  new TGeoCombiTrans(0,0,z1,0); 
     mat1->RotateZ(th);
@@ -530,6 +532,27 @@ AliFMDGeometryBuilder::HoneycombShape(Int_t id, Char_t ring,
   return shape;
 }
 
+//____________________________________________________________________
+TGeoVolume* 
+AliFMDGeometryBuilder::TensionBox()
+{
+  static TGeoVolumeAssembly* tensionBox = 0;
+  if (tensionBox) return tensionBox;
+  
+  TGeoBBox* tensionEndS = new TGeoBBox("FMD_tension_end", .6, 3,  .25);
+  TGeoBBox* tensionTopS = new TGeoBBox("FMD_tension_top", .1, .5, 3.5);
+  TGeoVolume* tensionEndV = new TGeoVolume("FMD_tension_end", tensionEndS,fAl);
+  TGeoVolume* tensionTopV = new TGeoVolume("FMD_tension_top", tensionTopS,fAl);
+  tensionBox = new TGeoVolumeAssembly("FMD_tension_box");
+  tensionBox->AddNode(tensionEndV, 1, new TGeoTranslation(.6, 0,   -3.75));
+  tensionBox->AddNode(tensionEndV, 2, new TGeoTranslation(.6, 0,   +3.75));
+  tensionBox->AddNode(tensionTopV, 1, new TGeoTranslation(0.1, +2.5, 0));
+  tensionBox->AddNode(tensionTopV, 2, new TGeoTranslation(0.1, -2.5, 0));
+  tensionBox->AddNode(tensionTopV, 3, new TGeoTranslation(1.1, +2.5, 0));
+  tensionBox->AddNode(tensionTopV, 4, new TGeoTranslation(1.1, -2.5, 0));
+  return tensionBox;
+}
+
 
 //____________________________________________________________________
 TGeoVolume*
@@ -761,7 +784,7 @@ AliFMDGeometryBuilder::FMD1Geometry(AliFMD1* fmd1,
                   fmd1TopVolume->GetName(), fmd1BotVolume->GetName(), z));
   top->AddNode(fmd1TopVolume, fmd1->GetId(), matrix);
   top->AddNode(fmd1BotVolume, fmd1->GetId(), matrix);
-
+  
   return 0;
 }
 
@@ -779,16 +802,17 @@ AliFMDGeometryBuilder::FMD2Geometry(AliFMD2* fmd2,
   // See also AliFMDGeometryBuilder::DetectorGeometry 
   // 
   if (!fmd2 || !innerTop || !innerBot || !outerTop || !outerBot) return 0;
-  AliFMDRing* r             = fmd2->GetOuter();
+  // AliFMDRing* r          = fmd2->GetOuter();
   Double_t    z             = fmd2->GetOuterZ();  
-  Double_t    framelr       = fmd2->GetOuterHoneyHighR()+0.5;
-  Double_t    framehr       = fmd2->GetOuterHoneyHighR()+1.8;
-  Double_t    framelz       = -.5;
-  Double_t    framehz       = (fmd2->GetInnerZ()-z) + r->GetFullDepth() + .5;
-  Double_t    framel        = framehz - framelz;
-  Double_t    coverlr       = fmd2->GetInner()->GetLowR()+1;
-  Double_t    backth        = 0.05;
-
+  Double_t    framelr       = 32.01;  // fmd2->GetOuterHoneyHighR()+0.5;
+  Double_t    framehr       = 33.611; // fmd2->GetOuterHoneyHighR()+1.8;
+  Double_t    framel        = 14.8; // framehz - framelz;
+  Double_t    backth        = 0.3;
+  Double_t    framelz       = -0.8;
+  // Double_t    framehz       = framelz + backth + framel;
+  Double_t    coverlr       = 4.3; // fmd2->GetInner()->GetLowR()+1;
+  Double_t    coverhr       = framehr; //  - 1;
+  
   TGeoVolume* fmd2TopVolume = new TGeoVolumeAssembly(Form(fgkFMDName, 
                                                          fmd2->GetId(), 'T'));
   TGeoVolume* fmd2BotVolume = new TGeoVolumeAssembly(Form(fgkFMDName, 
@@ -799,10 +823,11 @@ AliFMDGeometryBuilder::FMD2Geometry(AliFMD2* fmd2,
   DetectorGeometry(fmd2, fmd2TopVolume, fmd2BotVolume, z, 
                   innerTop, innerBot, outerTop, outerBot);
 
+  TGeoVolumeAssembly* support = new TGeoVolumeAssembly("FMD2_support");
   TGeoShape*  cylinderShape   = new TGeoTubeSeg(framelr,framehr,framel/2,0,180);
   TGeoVolume* cylinderVolume  = new TGeoVolume(Form(fgkBackName, fmd2->GetId()),
                                               cylinderShape, fC);
-  TGeoShape*  coverShape      = new TGeoTubeSeg(coverlr,framehr,backth/2,0,180);
+  TGeoShape*  coverShape      = new TGeoTubeSeg(coverlr,coverhr,backth/2,0,180);
   TGeoVolume* coverVolume     = new TGeoVolume(Form(fgkTopName, fmd2->GetId()), 
                                               coverShape, fC);
   cylinderShape->SetName(Form(fgkBackName, fmd2->GetId()));
@@ -814,69 +839,135 @@ AliFMDGeometryBuilder::FMD2Geometry(AliFMD2* fmd2,
   coverVolume->SetTitle("FMD2 cover");
   coverVolume->SetTransparency(63);
   
-  for (Int_t i = 0; i  < 2; i++) {
-    TGeoVolume*   mother = (i == 0 ? fmd2TopVolume : fmd2BotVolume);
-    
-    Double_t      phi    = 360. / 2 * i;
-    TGeoRotation* rot    = new TGeoRotation(Form("FMD2 support rot %d",i)); 
-    rot->RotateZ(phi);
-    TGeoMatrix*   matrix = new TGeoCombiTrans(Form("FMD2 cyl trans %d", i),
-                                             0, 0, framelz+framel/2, rot);
-    mother->AddNode(cylinderVolume, i, matrix);    
-    matrix               = new TGeoCombiTrans(Form("FMD2 fcov trans %d", i),
-                                             0, 0, framelz-backth/2, rot);
-    mother->AddNode(coverVolume, 2*i+0, matrix);    
-    matrix               = new TGeoCombiTrans(Form("FMD2 bcov trans %d", i),
-                                             0, 0, framelz+framel+backth/2, 
-                                             rot);
-    mother->AddNode(coverVolume, 2*i+1, matrix);    
-  }
+  TGeoTranslation* trans = 0;
+  support->AddNode(coverVolume,1, new TGeoTranslation(0,0,backth/2));
+  support->AddNode(cylinderVolume, 1, new TGeoTranslation(0,0,backth+framel/2));
+  
 
+  Double_t    f1l            = 15.6085;
+  Double_t    f1w            = 6;
+  Double_t    f1d            = 1;
+  Int_t       nFiducialHoles = 4;
+  Double_t    precHoles[][2] = { { 32.4948, 29.6663 },
+                                { 33.9104, 31.0819 },
+                                { 34.8177, 33.4035 }, 
+                                { 35.5028, 32.6744 } };
+  Double_t    precRadius     = .25;
+  Double_t    flangeA        = TMath::Pi()/4;
+  
+  new TGeoBBox("FMD2_flange_base", f1l/2, f1w/2, f1d/2);
+  new TGeoTube("FMD2_fiducial_hole", 0, precRadius, f1d/2+.1);
+  Double_t         flangeX        = framehr + f1l/2;
+  TVector2         flangeC(flangeX * TMath::Cos(flangeA), 
+                          flangeX * TMath::Sin(flangeA));
+  TString          flangeComb("FMD2_flange_base-(");  
+  new TGeoBBox("FMD2_flange_slit", 7./2, 1.5/2, f1d/2+.1);
+  trans = new TGeoTranslation(-f1l/2+1+7./2, +.5+1.5/2, 0);
+  trans->SetName("FMD2_flange_slit_mat1");
+  trans->RegisterYourself();
+  trans = new TGeoTranslation(-f1l/2+1+7./2, -.5-1.5/2, 0);
+  trans->SetName("FMD2_flange_slit_mat2");
+  trans->RegisterYourself();
+  flangeComb.Append("FMD2_flange_slit:FMD2_flange_slit_mat1+"
+                   "FMD2_flange_slit:FMD2_flange_slit_mat2+");
+  for (Int_t i = 0; i < nFiducialHoles; i++) { 
+    TVector2         v(precHoles[i][0], precHoles[i][1]);
+    v                   -= flangeC;
+    TVector2         r  =  v.Rotate(-flangeA);
+    TGeoTranslation* t1 =  new TGeoTranslation(r.X(),  r.Y(), 0);
+    TGeoTranslation* t2 =  new TGeoTranslation(r.X(), -r.Y(), 0);
+    t1->SetName(Form("FMD2_fiducial_hole_rot%d", 2*i+0));
+    t2->SetName(Form("FMD2_fiducial_hole_rot%d", 2*i+1));
+    t1->RegisterYourself();
+    t2->RegisterYourself();
+    flangeComb.Append(Form("FMD2_fiducial_hole:FMD2_fiducial_hole_rot%d+"
+                          "FMD2_fiducial_hole:FMD2_fiducial_hole_rot%d%c",
+                          2*i+0, 2*i+1, (i == nFiducialHoles-1 ? ')' : '+')));
+  }
+  // Final flange shape, and at to full shape 
+  TGeoCompositeShape* flangeS = new TGeoCompositeShape(flangeComb.Data());
+  flangeS->SetName("FMD2_flange");
+  TGeoVolume* flangeV = new TGeoVolume("FMD2_flange", flangeS, fAl);
+  
+  Double_t f2l = 7;
+  Double_t f2d = 12.5;
+  Double_t f2w = 1;
 
-  Double_t    f1l           = 10;
-  Double_t    f1w           = 6;
-  Double_t    f1d           = 1;
+  new TGeoBBox("FMD2_flange_spacer_base", f2l/2, f2w/2, f2d/2);
+  new TGeoTube("FMD2_flange_spacer_hole", 0, 2.5, f2w/2+.1);
+  TGeoRotation* holeRot = new TGeoRotation();
+  holeRot->RotateY(90);
+  holeRot->RotateZ(90);
+  TGeoCombiTrans* combo = 0;
+  combo = new TGeoCombiTrans(0, 0, f2d/2-.5-2.5, holeRot);
+  combo->SetName("FMD2_flange_spacer_hole_mat1");
+  combo->RegisterYourself();
+  combo = new TGeoCombiTrans(0, 0, -f2d/2+.5+2.5, holeRot);
+  combo->SetName("FMD2_flange_spacer_hole_mat2");
+  combo->RegisterYourself();
+  TString spacerComp("FMD2_flange_spacer_base-("
+                    "FMD2_flange_spacer_hole:FMD2_flange_spacer_hole_mat1+"
+                    "FMD2_flange_spacer_hole:FMD2_flange_spacer_hole_mat2)");
+  TGeoCompositeShape* spacerS = new TGeoCompositeShape(spacerComp.Data());
+  TGeoVolume*         spacerV = new TGeoVolume("FMD2_flange_spacer",
+                                              spacerS, fAl);
+
+  Double_t            extraL  = framehr-framelr;
+  TGeoBBox*           extraS  = new TGeoBBox("FMD2_flange_extra", 
+                                            extraL/2, f1w/2, f1d/2);
+  TGeoVolume*         extraV  = new TGeoVolume("FMD2_flange_extra", extraS,fAl);
+  TGeoVolumeAssembly* wingV   = new TGeoVolumeAssembly("FMD2_wing");
+  TGeoVolume*         tension = TensionBox();
+  TGeoTube*           wireS   = new TGeoTube(0, .05, (framehr-coverlr)/2);
+  TGeoVolume*         wireV   = new TGeoVolume("FMD2_tension_wire", 
+                                              wireS, fSteel);
+  wingV->AddNode(flangeV, 1, new TGeoTranslation(f1l/2,    0, f1d/2));
+  wingV->AddNode(flangeV, 2, new TGeoTranslation(f1l/2,    0, -f2d-f1d/2));
+  wingV->AddNode(extraV, 1, new TGeoCombiTrans(-extraL/2, 0, f1d/2, 0));
+  wingV->AddNode(spacerV, 1, new TGeoTranslation(1+f2l/2,-f2w/2+f1w/2,
+                                                -f2d/2));
+  wingV->AddNode(spacerV, 2, new TGeoTranslation(1+f2l/2,+f2w/2-f1w/2,
+                                                -f2d/2));
+  TGeoRotation* tensionR = new TGeoRotation;
+  tensionR->RotateY(90);
+  wingV->AddNode(tension, 1, new TGeoCombiTrans(4, 0, f1d+1, tensionR));
+  TGeoRotation* wireR = new TGeoRotation;
+  wireR->RotateY(90);
+  wingV->AddNode(wireV, 1, new TGeoCombiTrans(-(framehr-coverlr)/2, 0, f1d+1,
+                                             wireR));
   
-  TGeoBBox*   flange1Shape  = new TGeoBBox(f1l/2, f1w/2, f1d/2);
-  TGeoVolume* flange1Volume = new TGeoVolume(Form(fgkFlangeName, fmd2->GetId()),
-                                            flange1Shape, fAl);
-  TGeoBBox*   flange2Shape  = new TGeoBBox(f1w/2, f1d/2, (framel+backth)/2);
-  TGeoVolume* flange2Volume = new TGeoVolume(Form("F%dSG", fmd2->GetId()),
-                                            flange2Shape, fAl);
-  flange1Shape->SetName(Form(fgkFlangeName, fmd2->GetId()));
-  flange1Shape->SetTitle("FMD2 vertical flange");
-  flange1Volume->SetTitle("FMD2 vertical flange");
-  flange2Shape->SetName(Form("F%dSG", fmd2->GetId()));
-  flange2Shape->SetTitle("FMD2 horizontal flange");
-  flange2Volume->SetTitle("FMD2 horizontal flange ");
+  TGeoCombiTrans* extraM1 = new TGeoCombiTrans(coverhr-extraL/2,0,0,0);
+  extraM1->RotateZ(45);
+  extraM1->RegisterYourself();
+  extraM1->SetName("FMD2_back_cover_slit1");
+  TGeoCombiTrans* extraM2 = new TGeoCombiTrans(coverhr-extraL/2,0,0,0);
+  extraM2->RotateZ(135);
+  extraM2->RegisterYourself();
+  extraM2->SetName("FMD2_back_cover_slit2");
+  TString coverComp(Form(fgkTopName, fmd2->GetId()));
+  coverComp.Append("-(FMD2_flange_extra:FMD2_back_cover_slit1"
+                  "+FMD2_flange_extra:FMD2_back_cover_slit2)");
+  TGeoCompositeShape* cover2Shape = new TGeoCompositeShape(coverComp.Data());
+  cover2Shape->SetName("FMD2_back_cover");
+  TGeoVolume* cover2Volume = new TGeoVolume("FMD2_back_cover", cover2Shape,fC);
+  support->AddNode(cover2Volume,2, 
+                  new TGeoTranslation(0,0,backth+framel+backth/2));
+
+  TGeoCombiTrans* trans1 = new TGeoCombiTrans(framehr, 0, backth+framel, 0);
+  TGeoCombiTrans* trans2 = new TGeoCombiTrans(framehr, 0, backth+framel, 0);
+  trans1->RotateZ(45);
+  trans2->RotateZ(135);
+  support->AddNode(wingV, 1, trans1);
+  support->AddNode(wingV, 2, trans2);
   
-  flange1Volume->SetTransparency(42);
-  for (Int_t i = 0; i  < 4; i++) {
-    TGeoVolume*   mother = (i < 2 ? fmd2TopVolume : fmd2BotVolume);
+  for (Int_t i = 0; i  < 2; i++) {
+    TGeoVolume*   mother = (i < 1 ? fmd2TopVolume : fmd2BotVolume);
     
-    Double_t      phi    = 360. / 4 * i - 45;
-    Double_t      rphi   = TMath::Pi()*phi/180;
-    Double_t      x      = (framelr + f1l/2) * TMath::Sin(rphi);
-    Double_t      y      = (framelr + f1l/2) * TMath::Cos(rphi);
+    Double_t      phi    = 360. / 2 * i;
     TGeoRotation* rot    = new TGeoRotation(Form("FMD2 support rot %d",i)); 
     rot->RotateZ(phi);
-    TGeoMatrix*   matrix = new TGeoCombiTrans(Form("FMD2 flange 1 trans %d", i),
-                                             x,y, framelz-backth-f1d/2, rot);
-    mother->AddNode(flange1Volume, 2*i+0, matrix);    
-    matrix               = new TGeoCombiTrans(Form("FMD2 flange 2 trans %d", i),
-                                             x,y,framelz+framel+backth+f1d/2, 
-                                             rot);
-    mother->AddNode(flange1Volume, 2*i+1, matrix);    
-    Double_t x1 = x - (f1w-f1d) / 2 * TMath::Cos(rphi); 
-    Double_t y1 = y + (f1w-f1d) / 2 * TMath::Sin(rphi);
-    matrix               = new TGeoCombiTrans(Form("FMD2 flange 3 trans %d", i),
-                                             x1,y1,framelz+framel/2, rot);
-    mother->AddNode(flange2Volume, 2*i+0, matrix);    
-    Double_t x2 = x + (f1w-f1d) / 2 * TMath::Cos(rphi); 
-    Double_t y2 = y - (f1w-f1d) / 2 * TMath::Sin(rphi);
-    matrix               = new TGeoCombiTrans(Form("FMD2 flange 4 trans %d", i),
-                                             x2,y2,framelz+framel/2, rot);
-    mother->AddNode(flange2Volume, 2*i+1, matrix);    
+    TGeoMatrix*   matrix = new TGeoCombiTrans(0, 0, framelz, rot);
+    mother->AddNode(support, i, matrix);    
   }
   
   // Must be done after filling the assemblies 
@@ -976,9 +1067,9 @@ AliFMDGeometryBuilder::FMD3Geometry(AliFMD3* fmd3,
     flangeComb.Append(Form("FMD3_fiducial_hole:FMD3_fiducial_hole_rot%d+"
                           "FMD3_fiducial_hole:FMD3_fiducial_hole_rot%d%c",
                           2*i+0, 2*i+1, (i == nFiducialHoles-1 ? ')' : '+')));
-#if 1 // For debugging geometry 
-    // support->AddNode(fiducialVolume, 2*i+0, t1);
-    // support->AddNode(fiducialVolume, 2*i+1, t2);
+#if 0 // For debugging geometry 
+    support->AddNode(fiducialVolume, 2*i+0, t1);
+    support->AddNode(fiducialVolume, 2*i+1, t2);
 #endif
   }
   
@@ -1000,21 +1091,25 @@ AliFMDGeometryBuilder::FMD3Geometry(AliFMD3* fmd3,
   
   //__________________________________________________________________
   // Holes 
-  Double_t holeL  = (fmd3->GetHoleLength()-1)/2;
+  Double_t holeL  = fmd3->GetHoleLength()/2;
   Double_t holeD  = fmd3->GetHoleDepth()/2;
   Double_t holeLW = fmd3->GetHoleLowWidth()/2;
   Double_t holeHW = fmd3->GetHoleHighWidth()/2;
-  Double_t holeA  = fmd3->GetConeOuterAngle() - 1 * TMath::Pi() / 180;
-  Double_t holeZ  = (fmd3->GetHoleOffset() 
-                    + holeL * TMath::Cos(holeA)
-                    - holeD * TMath::Sin(holeA));
-  Double_t holeX  = (fmd3->ConeR(-holeZ + fmd3->GetInnerZ() + fmd3->GetNoseZ()) 
-                    - holeD * TMath::Cos(holeA));
-  Double_t plateZ  = (fmd3->GetHoleOffset() 
+  Double_t holeA  = fmd3->GetConeOuterAngle();
+  Double_t holeA2 = TMath::Pi() - fmd3->GetConeOuterAngle();
+  Double_t holeO  = fmd3->GetHoleOffset();
+  Double_t holeZ  = (holeO
                     + holeL * TMath::Cos(holeA)
-                    - 0.033 * TMath::Sin(holeA));
-  Double_t plateX = (fmd3->ConeR(-plateZ + fmd3->GetInnerZ()+fmd3->GetNoseZ()) 
-                    - 0.033 * TMath::Cos(holeA));
+                    - holeD * TMath::Sin(holeA2));
+  Double_t holeX  = (fmd3->ConeR(-holeZ + fmd3->GetInnerZ() + fmd3->GetNoseZ())
+                    - holeD * TMath::Sin(holeA2));
+  // Double_t plateA  = holeA - 2. / 180 * TMath::Pi();
+  // Double_t plateA2 = TMath::Pi() - plateA;
+  // Double_t plateZ  = (holeO
+  // + holeL * TMath::Cos(plateA)
+  // - 0.033 * TMath::Sin(plateA2));
+  // Double_t plateX = (fmd3->ConeR(-plateZ + fmd3->GetInnerZ()+fmd3->GetNoseZ()) 
+  // - 0.033 * TMath::Sin(plateA2));
   new TGeoTrd1("FMD3_cone_hole", holeLW, holeHW, holeD, holeL);
   TGeoTrd1* plateShape = new TGeoTrd1("FMD3_cooling_plate", 
                                      holeLW, holeHW, .033, holeL);
@@ -1024,7 +1119,12 @@ AliFMDGeometryBuilder::FMD3Geometry(AliFMD3* fmd3,
   holeRot->RotateY(holeA*180/TMath::Pi());
   TGeoCombiTrans* holeBaseTrans = new TGeoCombiTrans(holeX, 0, holeZ, holeRot);
   holeBaseTrans->SetName("FMD3_cone_hole_base_matrix");
-  TGeoCombiTrans* plateBaseTrans = new TGeoCombiTrans(plateX, 0,plateZ,holeRot);
+  // TGeoRotation* plateRot = new TGeoRotation();
+  // plateRot->SetName("FMD3_cone_plate_rotation");
+  // plateRot->RotateZ(90);
+  // plateRot->RotateY(plateA*180/TMath::Pi());
+  // TGeoCombiTrans* plateBaseTrans = new 
+  //                  TGeoCombiTrans(plateX,0,plateZ,plateRot);
   TGeoVolume* plateVolume = new TGeoVolume("FMD3_cooling_plate", 
                                           plateShape, fAl);
   plateShape->SetTitle("FMD3 cooling plate");
@@ -1035,7 +1135,7 @@ AliFMDGeometryBuilder::FMD3Geometry(AliFMD3* fmd3,
     trans->RotateZ(ang);
     trans->SetName(Form("FMD3_cone_hole_matrix%d", i));
     trans->RegisterYourself();
-    trans = new TGeoCombiTrans(*plateBaseTrans);
+    trans = new TGeoCombiTrans(*holeBaseTrans);
     trans->RotateZ(ang);
     trans->SetName(Form("FMD3_cooling_plate_matrix%d", i));
     coneComb.Append(Form("FMD3_cone_hole:FMD3_cone_hole_matrix%d+", i));
@@ -1073,7 +1173,7 @@ AliFMDGeometryBuilder::FMD3Geometry(AliFMD3* fmd3,
   coneComb.Append("FMD3_bolt_hole:FMD3_bolt_matrix1"
                  "+FMD3_bolt_hole:FMD3_bolt_matrix2"
                  "+FMD3_bolt_hole:FMD3_bolt_matrix3"
-                 "+FMD3_bolt_hole:FMD3_bolt_matrix4)");
+                 "+FMD3_bolt_hole:FMD3_bolt_matrix4");
   TGeoVolume*     boltVolume = new TGeoVolume("FMD3_bolt", boltShape, fSteel);
   support->AddNode(boltVolume, 1, boltTrans1);
   support->AddNode(boltVolume, 2, boltTrans2);
@@ -1081,6 +1181,68 @@ AliFMDGeometryBuilder::FMD3Geometry(AliFMD3* fmd3,
   boltVolume->SetTitle("FMD3 steering bolt");
   
   //__________________________________________________________________
+  // Cut-outs for tension wheel sheeve 
+  new TGeoBBox("FMD3_sheeve_hole", .55, .75, 1.16);
+  Double_t        sheeveHoleZ = fmd3->GetInnerZ() + fmd3->GetNoseZ() - .75;
+  Double_t        sheeveHoleR = fmd3->ConeR(sheeveHoleZ) - .55 + .2572222;
+  TGeoCombiTrans* sheeveMat1  = new TGeoCombiTrans(sheeveHoleR,0,1.15,0);
+  TGeoCombiTrans* sheeveMat2  = new TGeoCombiTrans(sheeveHoleR,0,1.15,0);
+  sheeveMat1->RotateZ(45);
+  sheeveMat2->RotateZ(135);
+  sheeveMat1->SetName("FMD3_sheeve_hole_matrix1");
+  sheeveMat2->SetName("FMD3_sheeve_hole_matrix2");
+  sheeveMat1->RegisterYourself();
+  sheeveMat2->RegisterYourself();
+  coneComb.Append("+FMD3_sheeve_hole:FMD3_sheeve_hole_matrix1"
+                 "+FMD3_sheeve_hole:FMD3_sheeve_hole_matrix2)");
+  
+  //__________________________________________________________________
+  // Sheeve boxes 
+  Double_t       sheeveL     = 1.15;
+  TGeoBBox*      sheeveSideS = new TGeoBBox("FMD3_sheeve_side",
+                                          .55, .25, 1.15);
+  TGeoBBox*      sheeveBackS = new TGeoBBox("FMD3_sheeve_back", 
+                                           .55, .25, .15);
+  TGeoBBox*      sheeveWingS = new TGeoBBox("FMD3_sheeve_wing", 
+                                           .15, .15, 1.15);
+  TGeoPcon*      sheeveWheelS = new TGeoPcon("FMD3_sheeve_wheel", 0, 360, 9);
+  Double_t       sheeveInnerR = 0; // .2;
+  Double_t       sheeveR      = .875;
+  Double_t       sheeveWheelZ = .95;
+  sheeveWheelS->DefineSection(0, -.25,   sheeveInnerR, 1);
+  sheeveWheelS->DefineSection(1, -.125,  sheeveInnerR, 1);
+  sheeveWheelS->DefineSection(2, -.125,  sheeveInnerR, sheeveWheelZ);
+  sheeveWheelS->DefineSection(3, -.0625, sheeveInnerR, sheeveR+.02);
+  sheeveWheelS->DefineSection(4, 0.000,  sheeveInnerR, sheeveR);
+  sheeveWheelS->DefineSection(5, +.0625, sheeveInnerR, sheeveR+.02);
+  sheeveWheelS->DefineSection(6, +.125,  sheeveInnerR, sheeveWheelZ);
+  sheeveWheelS->DefineSection(7, +.125,  sheeveInnerR, 1);
+  sheeveWheelS->DefineSection(8, +.25,   sheeveInnerR, 1);
+  TGeoVolume*    sheeveSideV = new TGeoVolume("FMD3_sheeve_side", 
+                                             sheeveSideS, fPlastic);
+  TGeoVolume*    sheeveBackV = new TGeoVolume("FMD3_sheeve_back", 
+                                             sheeveBackS, fPlastic);
+  TGeoVolume*    sheeveWingV = new TGeoVolume("FMD3_sheeve_wing", 
+                                             sheeveWingS, fPlastic);
+  TGeoVolume*    sheeveWheelV= new TGeoVolume("FMD3_sheeve_wheel", 
+                                             sheeveWheelS, fPlastic);
+  TGeoVolumeAssembly* sheeveBox = new TGeoVolumeAssembly("FMD3_sheeve_box");
+  sheeveBox->AddNode(sheeveSideV, 1, new TGeoTranslation(0, -.5, 0));
+  sheeveBox->AddNode(sheeveSideV, 2, new TGeoTranslation(0, +.5, 0));
+  sheeveBox->AddNode(sheeveBackV, 1, new TGeoTranslation(0, 0, 2.0+.15-1.15));
+  sheeveBox->AddNode(sheeveWingV, 1, new TGeoTranslation(.55-.15, -.90, 0));
+  sheeveBox->AddNode(sheeveWingV, 2, new TGeoTranslation(.55-.15, +.90, 0));
+  TGeoRotation*   sheeveWheelR = new TGeoRotation;
+  sheeveWheelR->RotateX(90);
+  TGeoCombiTrans* sheeveWheelM = new TGeoCombiTrans(0, 0, sheeveWheelZ-sheeveL,
+                                                   sheeveWheelR);
+  sheeveBox->AddNode(sheeveWheelV, 1, sheeveWheelM);
+  support->AddNode(sheeveBox, 1, sheeveMat1);
+  support->AddNode(sheeveBox, 2, sheeveMat2);
+  
+  
+
+  //__________________________________________________________________
   // Final cone
   TGeoCompositeShape* coneShape = new TGeoCompositeShape(coneComb.Data());
   coneShape->SetName("FMD3_cone");
@@ -1091,63 +1253,96 @@ AliFMDGeometryBuilder::FMD3Geometry(AliFMD3* fmd3,
 
   //__________________________________________________________________
   // Tension boxes. 
-  TGeoBBox* tensionOuter = new TGeoBBox("FMD3_tension_outer", .5, 3, 5);
-  new TGeoBBox("FMD3_tension_inner", .51, 2.5, 4.6);
-  TString tensionExpr("FMD3_tension_outer-FMD3_tension_inner");
-  TGeoCompositeShape* tensionShape = new TGeoCompositeShape(tensionExpr.Data());
-  tensionShape->SetName("FMD3_tension_box");
-  tensionShape->SetTitle("FMD3 tension box");
-  TGeoVolume*      tensionFrame = new TGeoVolume("FMD3_tension_frame",
-                                                 tensionShape, fAl);
-  TGeoTube*        springShape  = new TGeoTube("FMD3_tension_spring", 
-                                              0, .3, 4.3/2);
-  TGeoVolume*      springVolume = new TGeoVolume("FMD3_tension_spring", 
-                                                springShape, fSteel);
-  TGeoVolume*      tensionBox   = new TGeoVolume("FMD3_tension_box", 
-                                                tensionOuter, fAir);
-  tensionBox->AddNode(tensionFrame, 0);
-  tensionBox->AddNode(springVolume, 0, new TGeoTranslation(0,0,4.2/2));
+  TGeoVolume*     tensionBox = TensionBox();
+  Double_t        tensionH  = .6;
+  Double_t        tensionL  = 4;
+  Double_t        tensionZ  = 23.654;
+  Double_t        tensionR  = fmd3->ConeR(fmd3->GetInnerZ() + fmd3->GetNoseZ() 
+                                         -  tensionZ);
+  Double_t       tensionAr = fmd3->GetConeOuterAngle();
+  Double_t       tensionA  = tensionAr * 180 / TMath::Pi();
+  TGeoRotation*   tensionQ  = new TGeoRotation;
+  tensionQ->RotateY(tensionA);
+  TGeoCombiTrans* tensionM1 = new TGeoCombiTrans(tensionR,0,tensionZ, tensionQ);
+  TGeoCombiTrans* tensionM2 = new TGeoCombiTrans(tensionR,0,tensionZ, tensionQ);
+  tensionM1->RotateZ(45);
+  tensionM2->RotateZ(135);
+  support->AddNode(tensionBox, 1, tensionM1);
+  support->AddNode(tensionBox, 2, tensionM2);
   
-  Double_t         tensionD     = 5*TMath::Cos(fmd3->GetConeOuterAngle());
-  Double_t         tensionZ     = (r4->Z() - 2 * tensionD - 5 -
-                                  2*.5*TMath::Cos(fmd3->GetConeOuterAngle()));
-  Double_t         tensionX     = (fmd3->ConeR(fmd3->GetInnerZ()
-                                              +fmd3->GetNoseZ() 
-                                              -tensionZ) + 
-                                  2*.5*TMath::Cos(fmd3->GetConeOuterAngle())); 
-  TGeoRotation*    tensionRot   = new TGeoRotation();
-  tensionRot->RotateY(180/TMath::Pi()*fmd3->GetConeOuterAngle());
-  TGeoCombiTrans*  tensionBase  = new TGeoCombiTrans(tensionX, 0, tensionZ, 
-                                                    tensionRot);
+  // Double_t         tensionHR    = 0.15;
+  Double_t         wireT        = .1/2;
+  Double_t         wireZ1       = (tensionZ
+                                  - tensionL * TMath::Cos(tensionAr) 
+                                  - tensionH * TMath::Sin(tensionAr));
+  Double_t         wireR1       = (tensionR 
+                                  - tensionL * TMath::Sin(tensionAr) 
+                                  + tensionH * TMath::Cos(tensionAr));
+  AliFMDDebug(0, ("Wire Z1: %f=%f-%f*cos(%f)-%f*sin(%f)", 
+                 wireZ1, tensionZ, tensionL, tensionAr, tensionH, tensionAr));
+  AliFMDDebug(0, ("Wire R1: %f=%f-%f*sin(%f)-%f*cos(%f)", 
+                 wireR1, tensionR, tensionL, tensionAr, tensionH, tensionAr));
   
-  Double_t         wireT        = .1;
-  Double_t         wireR1       = fmd3->ConeR(fmd3->GetInnerZ()
-                                             +fmd3->GetNoseZ()) + wireT;
-  Double_t         wireR2       = fmd3->ConeR(fmd3->GetInnerZ()
-                                             +fmd3->GetNoseZ()-
-                                             tensionZ+tensionD) + wireT;
-  Double_t         wireL        = TMath::Sqrt(TMath::Power(wireR1-wireR2,2)+ 
-                                             TMath::Power(tensionZ-
-                                                          tensionD,2));
-  Double_t         wireAngle    = TMath::ATan2(wireR2-wireR1,tensionZ-tensionD);
+  Double_t         wireStartA   = 42.3 * TMath::Pi() / 180;
+  Double_t         wireZ2       = (sheeveWheelZ * (1 - TMath::Sin(wireStartA))
+                                  // - sheeveL - 
+                                  - wireT * TMath::Sin(wireStartA));
+  /* (sheeveWheelZ * (1 - TMath::Sin(wireStartA))
+                                  - wireT * TMath::Sin(wireStartA) 
+                                  - sheeveL); */
+  AliFMDDebug(0, ("wireZ2=%f=%f*(1-%f)", wireZ2, sheeveWheelZ, 
+                 TMath::Sin(wireStartA)));
+  Double_t         wireR2       = (sheeveHoleR + 
+                                  sheeveWheelZ * TMath::Cos(wireStartA) + 
+                                  wireT * TMath::Cos(wireStartA));
+  Double_t         wireDR       = wireR1-wireR2;
+  Double_t         wireDZ       = wireZ1-wireZ2;
+  Double_t         wireL        = TMath::Sqrt(wireDR*wireDR+wireDZ*wireDZ)-.01;
+  Double_t         wireAngle    = TMath::ATan2(wireDR,wireDZ);
   TGeoTube*        wireShape    = new TGeoTube("FMD3_wire", 0, wireT, wireL/2);
   TGeoVolume*      wireVolume   = new TGeoVolume("FMD3_wire", wireShape,fSteel);
   TGeoRotation*    wireRot      = new TGeoRotation();
   wireRot->RotateY(180/TMath::Pi()*wireAngle);
-  TGeoCombiTrans*  wireBase     = new TGeoCombiTrans((wireR2-wireR1)/2+wireR1
-                                                    +.1*TMath::Cos(wireAngle),
-                                                    0,(tensionZ-tensionD)/2,
-                                                    wireRot);
-  for (Int_t i = 0; i < 2; i++) { 
-    Double_t        thisAngle = (i+.5) * 90;
-    TGeoCombiTrans* thisTrans = new TGeoCombiTrans(*tensionBase);
-    thisTrans->RotateZ(thisAngle);
-    support->AddNode(tensionBox, i, thisTrans);
-    thisTrans = new TGeoCombiTrans(*wireBase);
-    thisTrans->RotateZ(thisAngle);
-    support->AddNode(wireVolume, i, thisTrans);
-  }
+  Double_t         wireR        = wireR2 + wireDR / 2;
+  Double_t         wireZ        = wireZ2 + wireDZ / 2;
+  TGeoCombiTrans*  wireM1       = new TGeoCombiTrans(wireR, 0,wireZ, wireRot);
+  TGeoCombiTrans*  wireM2       = new TGeoCombiTrans(wireR, 0,wireZ, wireRot);
+  wireM1->RotateZ(45);
+  wireM2->RotateZ(135);
+  support->AddNode(wireVolume, 1, wireM1);
+  support->AddNode(wireVolume, 2, wireM2);
+
+
+  TGeoTorus*       wireTS  = new TGeoTorus(sheeveWheelZ+wireT, 0, wireT, 0, 
+                                          90-wireStartA*180/TMath::Pi());
+  TGeoVolume*      wireTV  = new TGeoVolume("FMD3_bend_wire",wireTS,fSteel);
+  TGeoRotation*    wireTR  = new TGeoRotation;
+  wireTR->RotateY(90);
+  wireTR->RotateZ(-90);
+  Double_t         wireTZ  = sheeveWheelZ;
+  TGeoCombiTrans*  wireTM1 = new TGeoCombiTrans(sheeveHoleR,0,wireTZ,wireTR);
+  TGeoCombiTrans*  wireTM2 = new TGeoCombiTrans(sheeveHoleR,0,wireTZ,wireTR);
+  wireTM1->RotateZ(45);
+  wireTM2->RotateZ(135);
+  support->AddNode(wireTV, 1, wireTM1);
+  support->AddNode(wireTV, 2, wireTM2);
+
+  Double_t         colarR = 4.05;
+  Double_t         wireEL = sheeveHoleR - colarR;
+  TGeoTube*        wireES = new TGeoTube("FMD3_end_wire", 0, wireT, wireEL/2);
+  TGeoVolume*      wireEV = new TGeoVolume("FMD3_end_wire", wireES, fSteel);
+  TGeoRotation*    wireER = new TGeoRotation;
+  wireER->RotateY(90);
+  TGeoCombiTrans*  wireEM1 = new TGeoCombiTrans(colarR+wireEL/2,0,-wireT,wireER);
+  TGeoCombiTrans*  wireEM2 = new TGeoCombiTrans(colarR+wireEL/2,0,-wireT,wireER);
+  wireEM1->RotateZ(45);
+  wireEM2->RotateZ(135);
+  support->AddNode(wireEV, 1, wireEM1);
+  support->AddNode(wireEV, 2, wireEM2);
+  
+  
 
+  
   //__________________________________________________________________
   // Place support volumes in half-detector volumes 
   Double_t         z  = fmd3->GetInnerZ();
index 888a448..eb6fc31 100644 (file)
@@ -104,6 +104,13 @@ protected:
   virtual TGeoShape* HoneycombShape(Int_t id, Char_t ring,
                                    double r1, double r2, 
                                    double w, double t, double c=0.3);
+  /** 
+   * Get the tension box volume
+   * 
+   * 
+   * @return 
+   */
+  virtual TGeoVolume* TensionBox();
   /** Make a detector volume 
       @param d Detector geometry 
       @param motherTop Mother volume (detector volume)
index 88efeac..a4306cc 100644 (file)
@@ -41,7 +41,7 @@
 #include "STRUCT/AliHALL.h"
 #include "STRUCT/AliFRAMEv2.h"
 #include "STRUCT/AliSHILv2.h"
-#include "STRUCT/AliPIPEv0.h"
+#include "STRUCT/AliPIPEv3.h"
 #include "ITS/AliITSvPPRasymmFMD.h"
 #include "TPC/AliTPCv2.h"
 #include "TOF/AliTOFv4T0.h"
@@ -461,11 +461,11 @@ Config()
   Bool_t useFMD   = kTRUE; 
   Bool_t useFRAME = kFALSE; 
   Bool_t useHALL  = kFALSE; 
-  Bool_t useITS   = kFALSE;
+  Bool_t useITS   = kTRUE;
   Bool_t useMAG   = kFALSE; 
   Bool_t useMUON  = kFALSE; 
   Bool_t usePHOS  = kFALSE; 
-  Bool_t usePIPE  = kFALSE; 
+  Bool_t usePIPE  = kTRUE; 
   Bool_t usePMD   = kFALSE; 
   Bool_t useHMPID = kFALSE; 
   Bool_t useSHIL  = kFALSE; 
@@ -522,7 +522,7 @@ Config()
 
   if (usePIPE) {
     // ================== PIPE parameters ============================
-    AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
+    AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
   }
   
   if (useITS) {
diff --git a/FMD/scripts/DrawGeometry.C b/FMD/scripts/DrawGeometry.C
new file mode 100644 (file)
index 0000000..adef786
--- /dev/null
@@ -0,0 +1,9 @@
+void
+DrawGeometry(const char* vol="ALIC")
+{
+  AliLog::SetModuleDebugLevel("FMD", 1);
+  gAlice->InitMC("$ALICE_ROOT/FMD/Config.C");
+  gGeoManager->GetVolume(vol)->Draw("ogl");
+  new TBrowser("geoBrowser", gGeoManager);
+}
+
diff --git a/FMD/scripts/ShowFMDITS.C b/FMD/scripts/ShowFMDITS.C
new file mode 100644 (file)
index 0000000..6760db4
--- /dev/null
@@ -0,0 +1,66 @@
+void
+ShowFMDITS(const char* name="ALIC")
+{
+  // AliLog::SetModuleDebugLevel("FMD", 1);
+  gAlice->InitMC("$ALICE_ROOT/FMD/Config.C");
+
+  const char* inv[] = { "RB24", "RB26Pipe", 
+                       "ICYL", 
+                       "ICU1", "ICU2", "ICU3", "ICU4", 
+                       "ICU5", "ICU6", "ICU7", "ICU8",
+                       "ICC1", "ICC2", "ICC3", "ICC4", 
+                       "ICC5", "ICC6", "ICC7", "ICC8", 
+                       "IHK1", "IHK2", 
+                       "ISR1", "ISR2", "ISR3", "ISR6",
+                       "ITSSPD", 
+                       "ITSsddLayer3", "ITSsddLayer4", 
+                       "ITSssdLayer5", "ITSssdLayer6", 
+                       "ITSsddForward3Pos", "ITSsddForward3Neg", 
+                       "ITSsddForward4Pos", "ITSsddForward4Neg", 
+                       "Lay5LadderSupportRing", "Lay6LadderSupportRing",
+                       "EndCapSupportSystemLayer5Sx",
+                       "EndCapSupportSystemLayer5Dx",
+                       "EndCapSupportSystemLayer6Sx",
+                       "EndCapSupportSystemLayer6Dx",
+                       "SDDCarbonFiberCylinder",
+                       "SDDCarbonFiberCone", 
+                       "SSDexternalcylinder", 
+                       "SSDfoamcylinder",
+                       "ITSssdCone", 
+                       "ITScablesSDDpcon1Plast",
+                       "ITScablesSDDpcon3Plast",
+                       "vSddCableInterCyl",
+                       "vpcon1container",
+                       "vpcon2container",
+                       "vpcon3container",
+                       0 };
+  const char** ptr = inv;
+  TGeoVolume*  vol = 0;
+  while (*ptr) {
+    const char* n = *ptr++;
+    vol = gGeoManager->GetVolume(n);
+    if (!vol) { 
+      std::cerr << "Volume " << n << " not found" << std::endl;
+      continue;
+    }
+    std::cout << "Processing " << n << std::endl;
+    vol->SetVisDaughters(kFALSE);
+    vol->SetVisContainers(kTRUE);
+    vol->SetVisibility(kFALSE);
+    vol->InvisibleAll(kTRUE);
+  }
+  vol = gGeoManager->GetVolume("SPDcentralomega");
+  if (vol) vol->SetTransparency(64);
+  vol = gGeoManager->GetVolume("SPDendcabomaga");
+  if (vol) vol->SetTransparency(64);
+  vol = gGeoManager->GetVolume("SPDconeshieldH1");
+  if (vol) vol->SetTransparency(64);
+  vol = gGeoManager->GetVolume("SPDconeshieldH2");
+  if (vol) vol->SetTransparency(64);
+
+  vol = gGeoManager->GetVolume(name);
+  if (!vol) return;
+  new TBrowser("geoBrowser", gGeoManager);
+  vol->Draw("ogl");
+}
+