Logo ROOT  
Reference Guide
geomAlice.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_geom
3 /// Script drawing a detector geometry (here ALICE).
4 ///
5 /// by default the geometry is drawn using the GL viewer
6 /// Using the TBrowser, you can select other components
7 /// if the file containing the geometry is not found in the local
8 /// directory, it is automatically read from the ROOT web site.
9 ///
10 /// \image html geom_geomAlice.png width=800px
11 /// \macro_code
12 ///
13 /// \author Rene Brun
14 
15 void geomAlice()
16 {
17  TGeoManager::Import("http://root.cern.ch/files/alice2.root");
19 // gGeoManager->SetVisLevel(4);
24  gGeoManager->GetVolume("YOUT1")->InvisibleAll();
25  gGeoManager->GetVolume("YOUT2")->InvisibleAll();
28  gGeoManager->GetVolume("RB26Pipe")->InvisibleAll();
31 // gGeoManager->GetVolume("PPRD")->InvisibleAll();
34 // gGeoManager->GetVolume("Dipole")->InvisibleAll();
50 
51  gGeoManager->GetVolume("ALIC")->Draw("ogl");
52  new TBrowser;
53 }
TBrowser
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
gGeoManager
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:602
TGeoManager::GetVolume
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
Definition: TGeoManager.cxx:2710
TGeoVolume::Draw
virtual void Draw(Option_t *option="")
draw top volume according to option
Definition: TGeoVolume.cxx:1146
TGeoManager::Import
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
Definition: TGeoManager.cxx:3817
TGeoVolume::InvisibleAll
void InvisibleAll(Bool_t flag=kTRUE)
Make volume and each of it daughters (in)visible.
Definition: TGeoVolume.cxx:764
TGeoManager::DefaultColors
void DefaultColors()
Set default volume colors according to A of material.
Definition: TGeoManager.cxx:2077