Logo ROOT   6.12/07
Reference Guide
na49visible.py
Go to the documentation of this file.
1 ## \file
2 ## \ingroup tutorial_pyroot
3 ## Set visibility attributes for the NA49 geometry
4 ## Set Shape attributes
5 ##
6 ## \macro_code
7 ##
8 ## \author Wim Lavrijsen
9 
10 import ROOT
11 
12 ROOT.YK01.SetVisibility( 0 )
13 ROOT.YK03.SetLineColor( 2 )
14 ROOT.YK04.SetLineColor( 5 )
15 ROOT.SEC1.SetLineColor( 6 )
16 ROOT.SEC2.SetLineColor( 6 )
17 ROOT.SEC3.SetLineColor( 3 )
18 ROOT.SEC4.SetLineColor( 3 )
19 ROOT.TOFR.SetLineColor( 5 )
20 ROOT.COI1.SetLineColor( 4 )
21 ROOT.COI2.SetLineColor( 4 )
22 ROOT.COI3.SetLineColor( 4 )
23 ROOT.COI4.SetLineColor( 4 )
24 ROOT.CS38.SetLineColor( 5 )
25 ROOT.CS28.SetLineColor( 5 )
26 ROOT.CS18.SetLineColor( 5 )
27 ROOT.TF4D.SetLineColor( 3 )
28 ROOT.OGB4.SetLineColor( 3 )
29 ROOT.TF3D.SetLineColor( 3 )
30 ROOT.OGB3.SetLineColor( 3 )
31 ROOT.TF4A.SetLineColor( 3 )
32 ROOT.OGB4.SetLineColor( 3 )
33 ROOT.TF3A.SetLineColor( 3 )
34 ROOT.OGB3.SetLineColor( 3 )
35 
36 # Copy shape attributes (colors,etc) in nodes referencing the shapse
37 CAVE1 = ROOT.gGeometry.FindObject( 'CAVE1' )
38 CAVE1.ImportShapeAttributes( )
39 
40 # Set Node attributes
41 CAVE1.SetVisibility( 2 ) # node is not drawn but its sons are drawn
42 ROOT.gGeometry.FindObject( 'VT1_1' ).SetVisibility( -4 ) # Node is not drawn.
43  # Its immediate sons are drawn
44 ROOT.gGeometry.FindObject( 'VT2_1' ).SetVisibility( -4 )
45 ROOT.gGeometry.FindObject( 'MTL_1' ).SetVisibility( -4 )
46 ROOT.gGeometry.FindObject( 'MTR_1' ).SetVisibility( -4 )
47 ROOT.gGeometry.FindObject( 'TOFR1' ).SetVisibility( -4 )
48