ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
geomD0.C
Go to the documentation of this file.
1 //script drawing a detector geometry (here D0)
2 //by default the geometry is drawn using the GL viewer
3 //Using the TBrowser, you can select other components
4 //if the file containing the geometry is not found in the local
5 //directory, it is automatically read from the ROOT web site.
6 // run with .x geomD0.C top level detectors are transparent
7 // or .x geomD0.C(1) top level detectors are visible
8 //
9 // Authors: Bertrand Bellenot, Rene Brun
10 
13 
14 void geomD0(Int_t allVisible=0) {
15  TGeoManager::Import("http://root.cern.ch/files/d0.root");
18  //gGeoManager->SetVisLevel(4);
19  if (!allVisible) {
25  }
26 
27  gGeoManager->GetVolume("D0")->Draw("ogl");
28 }
29 
31 {
32  vol->InvisibleAll();
33  Int_t nd = vol->GetNdaughters();
34  for (Int_t i=0; i<nd; i++) {
36  }
37 }
38 
40 {
41  vol->SetTransparency(transp);
42  Int_t nd = vol->GetNdaughters();
43  for (Int_t i=0; i<nd; i++) {
45  }
46 }
void RecursiveInvisible(TGeoVolume *vol)
Definition: geomD0.C:30
TGeoVolume * GetVolume() const
Definition: TGeoNode.h:106
virtual void Draw(Option_t *option="")
draw top volume according to option
int Int_t
Definition: RtypesCore.h:41
Int_t GetNdaughters() const
Definition: TGeoVolume.h:362
void InvisibleAll(Bool_t flag=kTRUE)
Make volume and each of it daughters (in)visible.
Definition: TGeoVolume.cxx:780
void SetMaxVisNodes(Int_t maxnodes=10000)
set the maximum number of visible nodes.
void DefaultColors()
Set default volume colors according to A of material.
void SetTransparency(Char_t transparency=0)
Definition: TGeoVolume.h:233
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:556
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
void geomD0(Int_t allVisible=0)
Definition: geomD0.C:14
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
void RecursiveTransparency(TGeoVolume *vol, Int_t transp)
Definition: geomD0.C:39
void transp()
Definition: transp.C:17