Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
geomAlice.C File Reference

Detailed Description

Script drawing a detector geometry (here ALICE).

by default the geometry is drawn using the GL viewer Using the TBrowser, you can select other components if the file containing the geometry is not found in the local directory, it is automatically read from the ROOT web site.

void geomAlice()
{
TGeoManager::Import("http://root.cern/files/alice2.root");
// gGeoManager->SetVisLevel(4);
// gGeoManager->GetVolume("PPRD")->InvisibleAll();
// gGeoManager->GetVolume("Dipole")->InvisibleAll();
gGeoManager->GetVolume("ALIC")->Draw("ogl");
new TBrowser;
}
R__EXTERN TGeoManager * gGeoManager
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
void DefaultColors()
Set default volume colors according to A of material.
void Draw(Option_t *option="") override
draw top volume according to option
void InvisibleAll(Bool_t flag=kTRUE)
Make volume and each of it daughters (in)visible.
Author
Rene Brun

Definition in file geomAlice.C.