Visualisation GUI and Analysis http cern chgeant 4

  • Slides: 69
Download presentation
Visualisation, (G)UI and Analysis http: //cern. ch/geant 4 Visualisation & (G)UI Geant 4 Course

Visualisation, (G)UI and Analysis http: //cern. ch/geant 4 Visualisation & (G)UI Geant 4 Course

Contents (1) n Part 1: How to perform visualisation n n Introduction Visualisable Objects

Contents (1) n Part 1: How to perform visualisation n n Introduction Visualisable Objects Visualisation Attributes Polyline and Marker Visualisation Drivers main() Function Visualisation Commands How to Visualise from C++ Codes Exercises Information Visualisation & (G)UI - Geant 4 Course 2

Contents (2) n Part 2: Geant 4 GUI n n n Select (G)UI Environmental

Contents (2) n Part 2: Geant 4 GUI n n n Select (G)UI Environmental variables Useful GUI Tools Released by Geant 4 Developers Visualisation & (G)UI - Geant 4 Course 3

Contents (3) n Part 3: DAVID and DTREE n n Graphically detecting overlaps in

Contents (3) n Part 3: DAVID and DTREE n n Graphically detecting overlaps in geometry Display of the detector geometry tree Visualisation & (G)UI - Geant 4 Course 4

Contents (4) n Part 4: AIDA and binding to analysis n n AIDA abstract

Contents (4) n Part 4: AIDA and binding to analysis n n AIDA abstract interfaces Geant 4 setup and analysis tools Visualisation & (G)UI - Geant 4 Course 5

PART 1 Geant 4 Visualisation & (G)UI Geant 4 Course

PART 1 Geant 4 Visualisation & (G)UI Geant 4 Course

1. Introduction n Geant 4 Visualisation must respond to varieties of user requirements n

1. Introduction n Geant 4 Visualisation must respond to varieties of user requirements n n n n Quick response to survey successive events Impressive special effects for demonstration High-quality output to prepare journal papers Flexible camera control for debugging geometry Highlighting overlapping of physical volumes Interactive picking of visualised objects … Visualisation & (G)UI - Geant 4 Course 7

2. Visualisable Objects (1) n Simulation data can be visualised such as: n n

2. Visualisable Objects (1) n Simulation data can be visualised such as: n n n Detector components A hierarchical structure of physical volumes A piece of physical volume, logical volume, and solid Particle trajectories and tracking steps Hits of particles in detector components Visualisation is performed either with commands or by writing C++ source codes of user-action classes Visualisation & (G)UI - Geant 4 Course 8

2. Visualisable Objects (2) n You can also visualise other user defined objects such

2. Visualisable Objects (2) n You can also visualise other user defined objects such as: A polyline, that is, a set of successive line segments (example: coordinate axes) n A marker which marks an arbitrary 3 D position (example: eye guides) n Texts n • character strings for description • comments or titles … Visualisation & (G)UI - Geant 4 Course 9

3. Visualisation Attributes n n Necessary for visualisation, but not included in geometrical information

3. Visualisation Attributes n n Necessary for visualisation, but not included in geometrical information n Colour, visibility, forced-wireframe style, etc n A set of visualisation attributes is held by the class G 4 Vis. Attributes A G 4 Vis. Attributes object is assigned to a visualisable object with its method Set. Vis. Attributes() : n experimental. Hall_logical -> Set. Vis. Attributes (G 4 Vis. Attributes: : Invisible) Visualisation & (G)UI - Geant 4 Course 10

3. 1 Constructors of G 4 Vis. Attributes The following constructors are supported by

3. 1 Constructors of G 4 Vis. Attributes The following constructors are supported by class G 4 Vis. Attributes: n n G 4 Vis. Attributes () (G 4 bool visibility) (const G 4 Colour& colour) (G 4 bool visibility, const G 4 Colour& colour) Visualisation & (G)UI - Geant 4 Course 11

3. 2 Visibility A boolean flag (G 4 bool) to control the visibility of

3. 2 Visibility A boolean flag (G 4 bool) to control the visibility of objects n Access function n n G 4 Vis. Attributes: : Set. Visibility (G 4 bool visibility) n If false is given as argument, visualisation is skipped for objects for which this set of visualisation attributes is assigned. The default value of visibility is true. Visualisation & (G)UI - Geant 4 Course 12

3. 3 Colour (1) n Class G 4 Vis. Attributes holds its colour entry

3. 3 Colour (1) n Class G 4 Vis. Attributes holds its colour entry as an instance of class G 4 Colour n n An equivalent class name, G 4 Color, is also available G 4 Colour is instantiated by giving RGB components to its constructor: n n n G 4 Colour: : G 4 Colour(G 4 double r = 1. 0, G 4 double g = 1. 0, G 4 double b = 1. 0 ) 0. 0 <= r, g, b <= 1. 0 The default arguments define “white” color Visualisation & (G)UI - Geant 4 Course 13

3. 3 Colour (2) n Access functions of G 4 Vis. Attributes to set

3. 3 Colour (2) n Access functions of G 4 Vis. Attributes to set G 4 Colour n Set. Colour(const G 4 Colour& colour) n Set. Colour( G 4 double r , G 4 double g , G 4 double b) Visualisation & (G)UI - Geant 4 Course 14

3. 4 Assigning G 4 Vis. Attributes to a logical volume Class G 4

3. 4 Assigning G 4 Vis. Attributes to a logical volume Class G 4 Logical. Volume holds a pointer of G 4 Vis. Attributes n Access functions of G 4 Logical. Volume n n Set. Vis. Attributes ( const G 4 Vis. Attributes* pva ) Visualisation & (G)UI - Geant 4 Course 15

Sample C++ Code: //----- C++ source codes: Assigning G 4 Vis. Attributes to a

Sample C++ Code: //----- C++ source codes: Assigning G 4 Vis. Attributes to a logical volume // Instantiation of a logical volume my. Target. Log = new G 4 Logical. Volume( my. Target. Tube, BGO, "TLog", 0, 0, 0); // Instantiation of a set of visualization // attributes with cyan colour G 4 Vis. Attributes * cal. Tube. Vis. Att = new G 4 Vis. Attributes(G 4 Colour(0. , 1. )); // Set the forced wireframe style cal. Tube. Vis. Att->Set. Force. Wireframe(true); // Assignment of the visualization attributes // to the logical volume my. Target. Log->Set. Vis. Attributes(cal. Tube. Vis. Att); Visualisation & (G)UI - Geant 4 Course 16

4. Polyline and Marker n Polyline and marker are defined in the graphics_reps category

4. Polyline and Marker n Polyline and marker are defined in the graphics_reps category n They are available to model 3 D scenes for visualisation Visualisation & (G)UI - Geant 4 Course 17

4. 1 Polyline A set of successive line segments n Defined with a class

4. 1 Polyline A set of successive line segments n Defined with a class G 4 Polyline n Used to visualise tracking steps, particle trajectories, coordinate axes, etc n G 4 Polyline is defined as a list of G 4 Point 3 D objects. Elements of the list define vertex positions of a polyline. n Visualisation & (G)UI - Geant 4 Course 18

Sample C++ Code: //-- C++ source code: An example of defining a line segment

Sample C++ Code: //-- C++ source code: An example of defining a line segment // Instantiation G 4 Polyline x_axis; // Vertex positions x_axis. append ( G 4 Point 3 D ( 0. , 0. ) ); x_axis. append ( G 4 Point 3 D ( 5. * cm, 0. ) ); // Color G 4 Colour red ( 1. 0, 0. 0 ); // color for x-axis G 4 Vis. Attributes att ( red ); x_axis. Set. Vis. Attributes( att ); //-- end of C++ source code Visualisation & (G)UI - Geant 4 Course 19

4. 2 Marker (1) n n n Set a mark to an arbitrary 3

4. 2 Marker (1) n n n Set a mark to an arbitrary 3 D position Usually used to visualise hits of particles Designed as a 2 -dimensional primitive with shape (square, circle, etc), color, and special properties of n n (a) always facing the camera and (b) having the possibility of its size (diameter) defined either in real 3 D or 2 D screen units (pixels) Visualisation & (G)UI - Geant 4 Course 20

4. 2 Marker (2) n Kinds of markers Square : G 4 Square n

4. 2 Marker (2) n Kinds of markers Square : G 4 Square n Circle : G 4 Circle n Text : G 4 Text n n Constructors n n n G 4 Circle (const G 4 Point 3 D& pos) G 4 Square (const G 4 Point 3 D& pos) G 4 Text (const G 4 String& text, const G 4 Point 3 D& pos) Visualisation & (G)UI - Geant 4 Course 21

4. 2 Marker (3) n Each marker class inherits class n All access functions

4. 2 Marker (3) n Each marker class inherits class n All access functions of G 4 VMarker are available. For example, G 4 VMarker n Set. Position( const G 4 Point 3 D& ) Set. World. Size( G 4 double real_3 d_size ) n Set. Screen. Size( G 4 double 2 d_size_pixel ) n etc. n Visualisation & (G)UI - Geant 4 Course 22

Sample C++ Code: Definition of a small red circle as a marker : G

Sample C++ Code: Definition of a small red circle as a marker : G 4 Circle circle(position); // Instantiate a circle with its 3 D position. The // argument "position" is defined as G 4 Point 3 D instance circle. Set. Screen. Diameter (1. 0); circle. Set. Fill. Style (G 4 Circle: : filled); // Make it a filled circle G 4 Colour colour(1. , 0. ); // Define red color G 4 Vis. Attributes attribs(colour); // Define a red visualization attribute circle. Set. Vis. Attributes(attribs); // Assign the red attribute to the circle //-- end of C++ source code Visualisation & (G)UI - Geant 4 Course 23

5. Visualisation Drivers n n Visualisation drivers are interfaces to 3 D graphics software

5. Visualisation Drivers n n Visualisation drivers are interfaces to 3 D graphics software You can select your favorite one(s) depending on your purposes such as n n n Demo Preparing precise figures for journal papers Publication of results on Web Debugging geometry Etc Visualisation & (G)UI - Geant 4 Course 24

5. 1 Available Graphics Software n Geant 4 provides visualisation drivers: DAWN : Technical

5. 1 Available Graphics Software n Geant 4 provides visualisation drivers: DAWN : Technical High-quality Post. Script output n OPACS: Interactivity, unified GUI n Open. GL: Quick and flexible visualisation n Open. Inventor: Interactivity, virtual reality, etc n Ray. Tracer : Photo-realistic rendering n VRML: Interactivity, 3 D graphics on Web n Visualisation & (G)UI - Geant 4 Course 25

5. 2 Available Visualisation Drivers n n n n DAWN OPENGLX Hep. Rep OIX

5. 2 Available Visualisation Drivers n n n n DAWN OPENGLX Hep. Rep OIX Ray. Tracer VRML etc Fukui Renderer DAWN Open. GL with Xlib Hep. Rep graphics Open. Inventor with Xlib JPEG files VRML 1. 0/2. 0 Visualisation & (G)UI - Geant 4 Course 26

5. 3 How to Use Visualisation Drivers n Users can select/use visualisation driver(s) by

5. 3 How to Use Visualisation Drivers n Users can select/use visualisation driver(s) by setting environmental variables before compilation: n n Example n n setenv G 4 VIS_USE_DRIVERNAME 1 (DAWN, Open. GLXlib, and VRML drivers): setenv G 4 VIS_USE_DAWN 1 setenv G 4 VIS_USE_OPENGLX 1 setenv G 4 VIS_USE_VRML 1 Note that Geant 4 library should be installed with setting the corresponding environmental variables G 4 VIS_BUILD_DRIVERNAME_DRIVER to “ 1” beforehand , e. g. , n setenv G 4 VIS_BUILD_DAWN_DRIVER 1 Visualisation & (G)UI - Geant 4 Course 27

6. main() Function (1) n n Derive your own concrete class from G 4

6. main() Function (1) n n Derive your own concrete class from G 4 Vis. Manager according to your computer environments Describe the followings in the main() : Include the header file of the chosen visualisation manager n Instantiate and initialize the visualisation manager. The Initialize() method do the initialization n Delete the visualisation manager at the end n You can use the C macro “G 4 VIS_USE”, n which is automatically set if you incorporate a visualisation driver in compilation Visualisation & (G)UI - Geant 4 Course 28

6. main() Function (2) n A typical form of main() function : // Include

6. main() Function (2) n A typical form of main() function : // Include the header file of your // visualisation manager #ifdef G 4 VIS_USE #include “Ex. N 03 Vis. Manager. hh” #endif // Instantiate and initialize the // visualisation manager #ifdef G 4 VIS_USE G 4 Vis. Manager* vis. Manager = new Ex. N 03 Vis. Manager; vis. Manager->Initialize(); #endif // Delete the visualisation manager #ifdef G 4 VIS_USE delete vis. Manager; #endif Visualisation & (G)UI - Geant 4 Course 29

7. Visualisation commands Here, we introduce some frequentlyused built-in visualisation commands n For simplicity,

7. Visualisation commands Here, we introduce some frequentlyused built-in visualisation commands n For simplicity, we assume that the Geant 4 executable is compiled, incorporating DAWN, OPENGLX, and VRML drivers n setenv G 4 VIS_USE_DAWN 1 n setenv G 4 VIS_USE_OPENGLX 1 n setenv G 4 VIS_USE_VRML 1 n Visualisation & (G)UI - Geant 4 Course 30

7. 1 Scene, Scene Hander, Viewer n n n n In order to use

7. 1 Scene, Scene Hander, Viewer n n n n In order to use visualisation commands, ideas of “scene”, “scene handler”, and “viewer” must be understood. Scene: A set of visualizable 3 D data Scene handler: Computer Graphics data modeler, which uses raw data in a scene Viewer: Image generator Each scene handler is assigned to a scene Each viewer is assigned to a scene handler “visualisation driver” = “scene_handler” + “viewer” Visualisation & (G)UI - Geant 4 Course 31

7. 2 Steps of Visualisation Step n 1: 2: 3: 4: Create a scene

7. 2 Steps of Visualisation Step n 1: 2: 3: 4: Create a scene handler and a viewer Create an empty scene Add 3 D data to the created scene Attach the current scene handler to the current scene n Step 5: Set camera parameters, drawing style (wireframe/surface), etc n Step 6: Make the viewer execute visualisation n Step 7: Declare the end of visualisation Visualisation & (G)UI - Geant 4 Course 32

7. 3 An Example of Visualising Detector # Invoke the OGLIX driver: # Create

7. 3 An Example of Visualising Detector # Invoke the OGLIX driver: # Create a scene handler and a viewer. /vis/open OGLIX # Set camera and drawing style /vis/viewer/reset /vis/viewer/viewpoint. Theta. Phi 70 20 /vis/viewer/set/style wireframe # # Visualize of the whole detector geometry The “/vis/draw. Volume” create a scene, add the world volume to it, and let viewer execute visualisation. /vis/draw. Volume # Declare the end of visualisation /vis/viewer/update Visualisation & (G)UI - Geant 4 Course 33

7. 4 An Example of Visualizing Events # Store particle trajactories for visualisation /tracking/store.

7. 4 An Example of Visualizing Events # Store particle trajactories for visualisation /tracking/store. Trajectory # Invoke the DAWN driver: Create a scene # handler and a viewer. /vis/open DAWN # Camera setting, and drawing style selection, # if necessary … # Create a new empty scene /vis/scene/create # Add the world volume and trajectories to the # current scene /vis/scene/add/volume /vis/scene/add/trajectories # Let the viewer visualise the scene, and declare # the end of visualisation /run/beam. On 10 Visualisation & (G)UI - Geant 4 Course 34

7. 5 /vis/open Command n Idle> /vis/open <driver_tag_name> n The “driver_tag_name” is a name

7. 5 /vis/open Command n Idle> /vis/open <driver_tag_name> n The “driver_tag_name” is a name which shows “driver name” + “mode” Action: Create a visualisation driver n In other words, create a scene hander and a viewer Example: Creating the OPENGLX driver in the immediate mode: n Idle> /vis/open OGLIX How to list available driver_tag_name n Idle> help /vis/open or Idle> help /vis/scene. Handler/create Visualisation & (G)UI - Geant 4 Course 35

7. 6 /vis/viewer/… Commands n Viewpoint setting: Idle> /vis/viewer/viewpoint. Theta. Phi <theta_deg> <phi_deg> n

7. 6 /vis/viewer/… Commands n Viewpoint setting: Idle> /vis/viewer/viewpoint. Theta. Phi <theta_deg> <phi_deg> n Zooming Idle> /vis/viewer/zoom <scale_factor> n Initialization of camera parameters: Idle> /vis/viewer/reset Visualisation & (G)UI - Geant 4 Course 36

7. 7 /vis/viewer/set/style Command n Idle> /vis/viewer/set/style <style_name> n The “style_name” can be “wireframe”

7. 7 /vis/viewer/set/style Command n Idle> /vis/viewer/set/style <style_name> n The “style_name” can be “wireframe” or “surface” Visualisation & (G)UI - Geant 4 Course 37

7. 8 /vis/draw. Volume /vis/viewer/update n and Commands: n Idle> /vis/draw. Volume <physical-volume-name> (Default:

7. 8 /vis/draw. Volume /vis/viewer/update n and Commands: n Idle> /vis/draw. Volume <physical-volume-name> (Default: world) Idle> /vis/viewer/update Note that /vis/viewer/update should be executed to declare end of visualisation. You can add visualisation commands of, say, coordinate axes between the two commands. For example, n n Idle> /vis/draw. Volume Idle> /vis/scene/add/axes <Ox> <Oy> <Oz> <length> <unit> Idle> /vis/viewer/update Visualisation & (G)UI - Geant 4 Course 38

7. 9 Commands to Visualize Events n Commands n n Idle> /tracking/store. Trajectory 1

7. 9 Commands to Visualize Events n Commands n n Idle> /tracking/store. Trajectory 1 Idle> /vis/scene/add/trajectories Idle> /run/beam. On <number_of_events> Action: n Automatic visualisation of events Visualisation & (G)UI - Geant 4 Course 39

Sample Visualisation (1) Visualisation & (G)UI - Geant 4 Course 40

Sample Visualisation (1) Visualisation & (G)UI - Geant 4 Course 40

Sample Visualisation (2) Visualisation & (G)UI - Geant 4 Course 41

Sample Visualisation (2) Visualisation & (G)UI - Geant 4 Course 41

Sample Visualisation (3) Visualisation & (G)UI - Geant 4 Course 42

Sample Visualisation (3) Visualisation & (G)UI - Geant 4 Course 42

8. Visualisation from C++ codes n n It is also possible to perform visualisation

8. Visualisation from C++ codes n n It is also possible to perform visualisation from the C++ code You can describe the visualisation commands in C++ codes via the Apply. Command() method of the UI manager, as for any other command: n n p. UI->Apply. Command(“/vis/…”); Or you can use Draw() methods of visualizable classes Visualisation & (G)UI - Geant 4 Course 43

9. Exercises n Read and execute sample visualisation macros for examples/novice/N 03 The macro

9. Exercises n Read and execute sample visualisation macros for examples/novice/N 03 The macro files are “ex. N 03 Vis. X. mac”, where X=0, 1, 2, … n Explanation of macros is all described in the macro files as comment lines n Visualisation & (G)UI - Geant 4 Course 44

10. Information n n Geant 4 User Guide (and source codes) README file: n

10. Information n n Geant 4 User Guide (and source codes) README file: n n geant 4/source/visualisation/README On-line documentation on Geant 4 visualisation n http: //cern. ch/geant 4/G 4 Users. Documents/Users. Guides/ For. Application. Developer/html/Visualization Visualisation & (G)UI - Geant 4 Course 45

PART 2 Geant 4 GUI Visualisation & (G)UI Geant 4 Course

PART 2 Geant 4 GUI Visualisation & (G)UI Geant 4 Course

1. Select (G)UI (1) n In the main(), according to the computer environments, construct

1. Select (G)UI (1) n In the main(), according to the computer environments, construct a G 4 UIsession concrete class provided by Geant 4 and invoke its session. Start() method. n Example: n G 4 UIsession* session=0; if (argc==1) // Define UI session for interactive mode. { // G 4 UIterminal is a (dumb) terminal session = new G 4 UIterminal; } Visualisation & (G)UI - Geant 4 Course 47

1. Select (G)UI (2) n Geant 4 provides the following interfaces for various (G)UI:

1. Select (G)UI (2) n Geant 4 provides the following interfaces for various (G)UI: n n n G 4 UIterminal: C-shell like character terminal G 4 UItcsh: tcsh-like character terminal with command completion, history, etc G 4 UIGAG: Java based GUI G 4 UIXm: Motif-based GUI, command completion, etc Note for G 4 UItcsh: n Use G 4 UIterminal with argument G 4 UItcsh* : session = new G 4 UIterminal (new G 4 UItcsh); Visualisation & (G)UI - Geant 4 Course 48

2. Environmental Variables n Users can select and plug in (G)UI by setting environmental

2. Environmental Variables n Users can select and plug in (G)UI by setting environmental variables before compilation • setenv G 4 UI_USE_GUINAME n Example: • setenv G 4 UI_USE_TERMINAL • setenv G 4 UI_USE_GAG • setenv G 4 UI_USE_XM n 1 1 1 Note that Geant 4 library should be installed with setting the corresponding environmental variable G 4 VIS_BUILD_GUINAME_SESSION to “ 1” beforehand Visualisation & (G)UI - Geant 4 Course 49

3. Useful GUI Tools Released by Geant 4 Developers n GGE: Geometry editor based

3. Useful GUI Tools Released by Geant 4 Developers n GGE: Geometry editor based on Java GUI n n GPE: Physics editor based on Java GUI n n http: //erpc 1. naruto-u. ac. jp/~geant 4 Open. Scientist: Interactive environment n http: //www. lal. in 2 p 3. fr/Open. Scientist Visualisation & (G)UI - Geant 4 Course 50

PART 3 Geant 4 DAVID & DTREE Visualisation & (G)UI Geant 4 Course

PART 3 Geant 4 DAVID & DTREE Visualisation & (G)UI Geant 4 Course

1. Volume-Overlapping Detection with DAVID (1) n DAVID (DAWN-based Visual Volume Intersection Debugger) n

1. Volume-Overlapping Detection with DAVID (1) n DAVID (DAWN-based Visual Volume Intersection Debugger) n n n Automatically detects and highlights overlapping volumes • Precise visualization with DAWN • Interactive visualisation with VRML DAVID also generates log files describing detailed information on the detected overlaps Info & source: • http: //geant 4. kek. jp/~tanaka Visualisation & (G)UI - Geant 4 Course 52

1. Volume-Overlapping Detection with DAVID (2) n Usage of DAVID n Switch the viewer

1. Volume-Overlapping Detection with DAVID (2) n Usage of DAVID n Switch the viewer of the DAWNFILE driver from renderer DAWN (default) to DAVID. • setenv G 4 DAWNFILE_VIEWER david n Then visualize volumes as usual with the DAWNFILE driver Overlapping volumes (if any) are visualized • The view is stored in files g 4 david. prim (DAWN format) and g 4 david. eps (Post. Script format) • Log file: g 4 david. log n Visualisation & (G)UI - Geant 4 Course 53

1. Volume-Overlapping Detection with DAVID (3) n Sample visualisation with overlapping volumes highlighted Visualisation

1. Volume-Overlapping Detection with DAVID (3) n Sample visualisation with overlapping volumes highlighted Visualisation & (G)UI - Geant 4 Course 54

1. Volume-Overlapping Detection with DAVID (4) n n Log file format n Phys. Vol.

1. Volume-Overlapping Detection with DAVID (4) n n Log file format n Phys. Vol. Name. Copy. No Shape line_num n The “line_num” is the line number of the overlapping volume in the DAWN-fomat file “g 4. prim file” generated by Geant 4 Sample log file : . . . !!! INTERSECTED VOLUMES !!! calo. Phys. 0: Tubs: line 17 calo. Phys. 1: Tubs: line 25. . . Visualisation & (G)UI - Geant 4 Course 55

1. Volume-Overlapping Dection with DAVID (5) n If no overlaps are detected, DAVID displays

1. Volume-Overlapping Dection with DAVID (5) n If no overlaps are detected, DAVID displays the following message: --------------------------!!! Number of intersected volumes : 0 !!! Congratulations ! (^o^)/ !!! --------------------------Visualisation & (G)UI - Geant 4 Course 56

2. DTREE: Visualising Detector Geometry Tree (1) n n DTREE is the function to

2. DTREE: Visualising Detector Geometry Tree (1) n n DTREE is the function to visualise detector-geometry tree. Selection of outputs: n n ASCII-text format GAG-window XML file How to display a tree: n Idle> /vis/draw. Tree ! XXXTree (XXX = ATree, GAGTree, XMLTree, etc) Visualisation & (G)UI - Geant 4 Course 57

2. DTREE: Visualising Detector Geometry Tree (2) n n How to display a tree:

2. DTREE: Visualising Detector Geometry Tree (2) n n How to display a tree: n Idle> /vis/draw. Tree ! XXXTree n XXX = ATree, GAGTree, XMLTree, etc Detail level is controlled with the “verbose” command: n /vis/XXXTree/verbose n Visualisation & (G)UI - Geant 4 Course 58

2. DTREE: Visualising Detector Geometry Tree (3 -1) n ASCII Tree (ATree) : verbose

2. DTREE: Visualising Detector Geometry Tree (3 -1) n ASCII Tree (ATree) : verbose level 0 (default) Format: PV_name + copy_number World "Calorimeter", copy no. 0 "Layer", copy no. -1 (10 replicas) "Absorber", copy no. 0 "Gap", copy no. 0 Visualisation & (G)UI - Geant 4 Course 59

2. DTREE: Visualising Detector Geometry Tree (3 -2) n ASCII Tree (ATree) : verbose

2. DTREE: Visualising Detector Geometry Tree (3 -2) n ASCII Tree (ATree) : verbose level 1 Format: PV_name + copy_number + LV_name "World", copy no. 0, belongs to logical volume "World" "Calorimeter", copy no. 0, belongs to logical volume "Calorimeter" "Layer", copy no. -1, belongs to logical volume "Layer" (10 replicas) "Absorber", copy no. 0, belongs to logical volume "Absorber" "Gap", copy no. 0, belongs to logical volume "Gap" Visualisation & (G)UI - Geant 4 Course 60

2. DTREE: Visualising Detector Geometry Tree (3 -3) n ASCII Tree (ATree) : verbose

2. DTREE: Visualising Detector Geometry Tree (3 -3) n ASCII Tree (ATree) : verbose level 2 Format: PV_name + copy_number + LV_name + solid_type "World", copy no. 0, belongs to logical volume "World" and is composed of solid "World" of type "G 4 Box" "Calorimeter", copy no. 0, belongs to logical volume "Calorimeter" and is composed of solid "Calorimeter" of type "G 4 Box" "Layer", copy no. -1, belongs to logical volume "Layer" and is composed of solid "Layer" of type "G 4 Box" (10 replicas) "Absorber", copy no. 0, belongs to logical volume "Absorber" and is composed of solid "Absorber" of type "G 4 Box" "Gap", copy no. 0, belongs to logical volume "Gap" and is composed of solid "Gap" of type "G 4 Box" Visualisation & (G)UI - Geant 4 Course 61

2. DTREE: Visualising Detector Geometry Tree (3 -4) n ASCII Tree (ATree) : verbose

2. DTREE: Visualising Detector Geometry Tree (3 -4) n ASCII Tree (ATree) : verbose level 10 Format: PV_name + copy_number (replicas etc. expanded) "World", copy no. 0 "Calorimeter", copy no. 0 "Layer", copy no. -1 "Absorber", copy no. 0 "Gap", copy no. 0 "Layer", copy no. -1 …. . Visualisation & (G)UI - Geant 4 Course 62

2. DTREE: Visualising Detector Geometry Tree (4) n GAG Tree Visualisation & (G)UI -

2. DTREE: Visualising Detector Geometry Tree (4) n GAG Tree Visualisation & (G)UI - Geant 4 Course 63

2. DTREE: Visualising Detector Geometry Tree (5 -1) n XML Tree Visualisation & (G)UI

2. DTREE: Visualising Detector Geometry Tree (5 -1) n XML Tree Visualisation & (G)UI - Geant 4 Course 64

2. DTREE: Visualising Detector Geometry Tree (5 -2) n XML Tree (find) Visualisation &

2. DTREE: Visualising Detector Geometry Tree (5 -2) n XML Tree (find) Visualisation & (G)UI - Geant 4 Course 65

PART 4 Geant 4 AIDA & analysis Visualisation & (G)UI Geant 4 Course

PART 4 Geant 4 AIDA & analysis Visualisation & (G)UI Geant 4 Course

1. Interface to AIDA Through abstract interfaces AIDA No dependence Minimize coupling of components

1. Interface to AIDA Through abstract interfaces AIDA No dependence Minimize coupling of components AIDA & Analysis Tools PI Java Analysis Studio Visualisation & (G)UI - Geant 4 Course 67

2. Interfacing to Geant 4 n AIDA (Abstract Interfaces for Data Analysis) can be

2. Interfacing to Geant 4 n AIDA (Abstract Interfaces for Data Analysis) can be used in Geant 4 by selecting the environmental variable G 4 ANALYSIS_USE n n n Requires AIDA headers installed in the system Requires an AIDA compliant tool for analysis Tools for analysis compliant with AIDA interfaces currently are: n n n PI (Physicist Interfaces for AIDA Analysis) JAS (Java Analysis Studio) Open Scientist Lab & (G)UI - Geant 4 Course Visualisation 68

3. References … n AIDA n n PI n n http: //cern. ch/PI/ JAS

3. References … n AIDA n n PI n n http: //cern. ch/PI/ JAS (Java Analysis Studio) n n http: //aida. freehep. org http: //jas. freehep. org Open Scientist Lab n http: //www. lal. in 2 p 3. fr/Open. Scientist Visualisation & (G)UI - Geant 4 Course 69