Документ взят из кэша поисковой машины. Адрес оригинального документа : http://acat02.sinp.msu.ru/presentations/tuura/userguide.pdf
Дата изменения: Thu Jun 27 00:47:34 2002
Дата индексирования: Mon Oct 1 20:14:28 2012
Кодировка:
Available on CMS information server

CMS NOTE :

Draft

The Compact Muon Solenoid Experiment


Mailing address: CMS CERN, CH-1211 GENEVA 23, Switzerland

CMS Note
IGUANA User Guide
for IGUANA 3.0.0, 3.0.1 ORCA 5.4.4 and 6.1.0 OSCAR 1.3.2

May 15, 2002

G. Alversona) , I. Osb orneb) , L. Taylorc) , and L. Tuurad)
Northeastern University, Boston, USA

Abstract IGUANA, or "Interactive Graphics for User Analysis", is a generic C++ project which provides a visualisation framework based on plug-ins and a toolkit of 2D and 3D graphics and user interface components. It includes extensions for HEP event displays and interactive GEANT3 and GEANT4 systems. This guide is the ORCA or even C++ is can just start aimed at potential users of IGUANA, in particular CMS PRS physicists wishing to use OSCAR/GEANT4 visualisation programs. No prior expertise in ORCA, OSCAR, nor assumed. If running on a system at CERN, no installation of software is required, you visualising.

a) b) c) b)

George.Alverson@cern.ch (D0 scan) Ianna.Osborne@cern.ch (CMS ORCA visualisation) Lucas.Taylor@cern.ch (IGUANA coordination) Lassi.Tuura@cern.ch (CMS OSCAR visualisation)


1 About This Document
This guide aims to get you started with the IGUANAbased visualisation systems of ORCA and OSCAR as quickly as possible, with essentially no knowledge of the software, and without the need to install software (if running at CERN). More comprehensive design, reference, planning and other documentation may be found on the IGUANA web site (http://iguana.cern.ch). IGUANA software is used by the CMS, D0, and L3 experiments; this guide, however, focuses on CMS. This document is structured in largely self-contained sections, as follows: · · · · · ORCA Visualisation: section 2. OSCAR Visualisation: section 3. Using IGUANA browsers: section 4. IGUANA and related software: section 5. Plans for 2002 for IGUANA, ORCA, and OSCAR visualisation: section 6. Figure 1: Viewer shown at OrcaVis startup.

GUI pops up (Fig. 1), consisting of three tiled windows: a 3D view window on the left, a scene controller window on the right, and an information window at the bottom right. Initially the 3D view is empty (black), because no objects have been requested to be shown. You can request an object to be shown by making it visible in the scene controller tree. This Commands to be entered and the output they gen- triggers a chain of COBRA action-on-demand requests erate are shown as: command. Magenta is used until the object can be displayed. For example, if you to highlight cross-references, citations, and glossary make reconstructed tracks visible, a request is made items. If you run into problems, have questions or to COBRA to create them if they do not already exist. can offer new ideas, please contact us at iguana- This might in turn initiate action-on-demand requests to create digitisations, loading of hits, mounting of developers@cern.ch. tapes and so on. In general most common objects are present and do not need to be re-created however. Figures 2 and 3 show the ORCA visualisation system with raw hits, reconstructed event data, and the CMS detector. The 3D view has its own menu bar, a pop-up menu and various controls on both sides of the view. The main menu bar contains only three menus: File, Windows, and Help. The File menu item New Scan creates another set of windows: a 3D view, a scene Figure 4: File controller, and an information window. menu. Exit ends the session and closes the GUI. The Windows menu shows the names of all the windows in the workspace; selecting a window activates it. You can also arrange the windows either tiled or cascaded. The Help menu provides a brief description about the program version (Ab out) and access to the context help (What's This). When OrcaVisMain starts, the first event is dispatched automatically. Subsequent events can be triggered using the Events menu item of the menu bar on the 3D Figure 5: Events menu. view window. See section 4 for more details on how to use the GUI, including the scene controller. 2

2 ORCA Visualisation
The visualisation executable OrcaVisMain is built along with the ORCA release. You can run it directly from the release area as follows:
> > > > > cd /afs/cern.ch/cms/Releases/ORCA cd ORCA_6_1_0/src eval `scram runtime -csh` cd source /afs/cern.ch/cms/Releases ORCA/ORCA_6_1_0/src/Visualisation OrcaVis/test/testfed.csh > OrcaVisMain

You may also rebuild it in your own developer area as described in section 5.2. Note that testfed.csh sets the location of the Objectivity federation through $OO FD BOOT. You should check that it points to a valid federation; by default it points to one at CERN (see section 5). When OrcaVisMain starts you will see the usual COBRA framework printout. Once this completes, the


Figure 2: Example of the ORCA Visualisation system.

Figure 3: Prototype 2D view of ORCA visualisation.

3


2 1

3

4

7 5
Figure 6: OSCAR visualisation. empty until then, fills up (Fig. 6). There are three main windows: a 3D view on the left, a hierarchical scene controller on top right (Fig. 6, ), and an information window on bottom right (Fig. 6, ). The main menu (Fig. 8) is in its usual place at the top of the main window (Fig. 6, ) and has the following items: File, 3D View, Overlap Detection, and Debug. The Geant4 command line is in the terminal window. When you begin, the 3D view is empty (black): no objects are shown by default. Use the scene controller (Fig. 6, ) to make objects visible as described in section 4.3.

6

3 OSCAR Visualisation
This section introduces the visualisation subsystem of the OSCAR project. This is normally built as a part of each release. Thus you should be able to simply use it directly from an existing release area, as follows (to re-build it yourself, see section 5.3):
> > > > cd /afs/cern.ch/cms/Releases/OSCAR cd OSCAR_1_3_2/src eval `scram runtime -csh` iguana

You will be greeted with an OSCAR session configuration wizard (Fig. 7). Pick the detector construction, physics list and the user actions you would like to use. For a fast-loading overlap detection run, pick "Overlap Detection" physics list and no user actions. Once you hit "Finish", OSCAR proper will begin to load and will be configured as you requested.

Figure 7: OSCAR setup wizard.

The only currently available item on the File menu is Quit, which quits the Figure 8: Main menu. As OSCAR proper starts, you will see the COBRA application. Other ways to leave are to press the Control and Q keys simultaneand OSCAR start-up output in the terminal window where you started iguana. Once the initialisation is ously in the main window, and to type exit on the complete, the IGUANA main window, which has been Geant4 Idle> prompt. 4


3.1 Overlap Detection
The Overlaps menu (Fig. 6, ; Fig. 9; Fig. 10) provides a graphical interface to Martin Liendl's overlap detection (OSCAR's Examples/OverlapDetection). By default overlap detection is off; to enable the mode, select the "Overlap Mo de" menu item. This causes Geant4 to be reconfigured for overlap detection and the menu to be enabled.

to receive before the detection is interrupted, respectively. Logging is intended to configure the overlap detection log file but is currently not implemented.

To launch an overlap detection, use either of the two "Trigger" menu items. Trigger Single Detection examines the next volume while Figure 11: Overlap results. Trigger Full Scan examines The overlaps are shown as a list (Fig. 11). The hithe next n volumes. The erarchical list allows you to study the details of each latter is normally applied to overlap: expand the list items for progressively more 100 (the default) or more voldetail. umes at a time. A window will show the overlaps As overlaps are selected in the results list, they are also found when the scan is comshown in 3D view and in the scene controller. The deplete (Fig. 11). The detectector tree is automatically rooted at the appropriate tion is stopped automatically Figure 10: Enabled overlap mother volume, and the volumes involved in the overif more than 50 overlaps are menu. lap are made visible. The overlap span is drawn as a found. bright green line and appears as a separate 3D object The overlap detection operates by changing the world in the scene controller under "Annotations." Often volume to each logical volume in turn and then doing the best way to visualise the overlap is to show all the the overlap checks. A single check steps to the next involved volumes as wire-frame, or one in wire-frame volume in the Geant4 logical volume store; you will and the other as a solid. If the overlap is still difsee the detector geometry change in the hierarchical ficult to see, right click on it in the scene controller viewer (to restore the geometry back to the original full and select Seek To (see section 4.2.1 for more details detector, select Restore Geometry from the menu). on these options). If the overlap is very small, e.g. A full scan steps over the requested number of volumes microns in length, it will be difficult to view it in 3D in one go and automatically restores the geometry at as moving the camera close enough to distinguish the the end. The overlap detection keeps track of a "cur- object will lose most of the surrounding context. rent" volume: a cursor over the Geant4 logical volume store. Every volume check continues from this current position (that is, where the detection last left off ) and then advances it to the next volume. You can show the current volume with Show World and set it to a specific volume with Select World. You can list volumes whose names match a regular expression by selecting List Volumes. At the moment the list is generated to the standard output on the terminal, not graphically. The Set Delta, Set Grid and Set Result Threshold items allow you to set the overlap detection delta, the grid density and the maximum number of overlaps 5 The reported overlaps do not always match the detector hierarchy. The symptom is that only one of the relevant volumes is made visible. If this happens, locate the other volume by hand, it will be either the mother or one of the siblings. The problem seems to be related to reflected volumes or volume copy numbers. We are investigating the source of this problem.

Figure 9: Disabled overlap menu.


4 Using the IGUANA Viewers
this section describes the main features of the interactive IGUANA viewers used by both the ORCA and OSCAR visualisation systems.

Projection--Set the camera projection by toggling between the perspective and orthographic modes. Camera Alignment--Align the camera axis with the X, Y, or Z axis, respectively. Does not move the camera otherwise, nor change its focal length. To see how the axes relate to the current camera position, right click on the scene in view mode, select "Preferences...", and then check the "Show point of rotation axes" box (see next section for more details). Camera Inversion--Invert the camera orientation and position through origin. Rotation Thumb Wheels--(Fig. 6, ) Drag the wheels to rotate the scene graph in the respective direction. Dolly Thumb Wheel--(Fig. 6, ) In perspective mode drag the wheel to move the camera closer to (downwards) or further away from (upwards) from the scene. In orthographic mode drag the wheel to zoom in (downwards) or out (upwards).

4.1 3D Viewer Buttons
The 3D viewer is associated with a scene graph controller described in section 4.3. The buttons on the left (Fig. 6, ) and on the right (Fig. 6, ) sides of the viewer help to navigate in the 3D space. (If the 3D window is too small, not all of these buttons will be visible.) Select/Pick--Switch to object manipulation or pick mode and leave the camera or viewer mode. The mouse cursor changes to an arrow. In this mode, you can pick and manipulate objects in the scene. View--Switch to the camera or viewer mode and leave the object manipulation mode. The mouse cursor changes to a hand icon. In this mode, you can move and reorient the camera in 3D space. This is the default mode when you start the application. Help--Provide help about the application. Home--Return the camera to its home position, or the initial one if no home position is set. Set Home--Mark current camera position as home. View All--Adjust the view to include the entire scene. Seek To--Seek towards an object (only active in the viewer mode). The mouse cursor turns into a cross-hair when the button is clicked. The next left mouse button click in the 3D view causes the object underneath the cursor to be selected as the new centre of rotation and view. The camera will either jump or animate to this new position, depending on the current setting of seek time in the view preferences dialog (see the next section).

4.2 3D Menus
The 3D viewer menu pops up when right mouse button is clicked in a 3D view in viewer mode (the menu does not appear in pick mode!). The menu provides options for changing viewing settings, such as rendering preferences and camera parameters. Changing rendering Figure 12: 3D viewer parameters through the view settings. alters how the whole scene is rendered; changing rendering parameters in the object menus (see section 4.3) changes the appearance of individual objects. The 3D View menu (Fig. 6, ) applies operations to the current 3D window and has the following items: Save as..., Print as..., Background..., Z Slice..., and a number of submenus. Save as... prompts you with a dialog for saving the displayed scene as an OpenInventor file; you can choose between Figure menu. plain text or binary format.

13: 3D

Print as... prompts you with a dialog for printing and saving the displayed scene as a GIF, TIFF, JPEG or 6


a PostScript image file. Background... prompts you with a dialog to select a new background colour for the 3D view. Z Slice... prompts you with a dialog controlling a Z slicer (a pair of clip planes, normally along the Z axis) in the scene. It is quite useful for scanning the detector or the event along the Z axis.

4.3 Scene Controller

The scene controller shows the tree of objects currently availThe Clips submenu provides acable for display cess to clip planes and their main the 3D view. nipulators. To create new clip In ORCA this is plane, select New... and prodetermined by vide a name for the new clip what was built plane. Existing clip planes can into OrcaVisbe activated and deactivated by Figure 14: Clip Planes. Main and can selecting the corresponding menu items; a tick mark be changed by by an item indicates the plane is active. To delete a modifying the click plane, select it under the Delete submenu. BuildFile in VisualisaThe Lights submenu provides tion/Orcaacces to scene lights and their Vis/test and manipulators similarly to clip rebuilding the planes. To move and reorient executable. For the lights, select Show Maexample, to nipulators; reselect the item Figure 17: Scene controller. remove tracker to hide the manipulators (the visualisation, remove all tracker-related libraries and name of the menu item reflects rebuild the executable. Next time you run, the the current state). Create a "Tracker" subtree will not appear and the application Figure 15: Lights. new light through items in the will be "slimmer". In OSCAR the tree contents are New submenu. Remove an existing light by selecting more dynamic; no rebuild is necessary. it under the Delete submenu. Activate and deactive The check boxes by the objects control their visibillights by selecting the corresponding menu item. ity. When an object is requested to be visible, it is first constructed if it doesn't exist yet (action on deThe Animations submenu allows you mand). The tree groups objects into categories, in to manage predefined camera paths ORCA fairly coarsely, in OSCAR in more detail down across the 3D scene and Viewp oints to every Geant4 volume. allows you to manage predefined camBy default all objects are invisible. In ORCA, a parent's children are by default enabled, while they are disabled. In ORCA, a parent node has no representation itself; in OSCAR, it is the mother volume's 4.2.1 3D Object Menu envelope. In ORCA, the parent's visibility also controls the children's visibility: subtrees can be turned Right-clicking on an object in the scene controller pops off by toggling the parent's visibility. In OSCAR the up an object-specific context menu (Fig. 19 in sec- visibility check box applies to that tree node only; the tion 4.3). If the object is shown in 3D window, you children are enabled and disabled separately via the will see at least the Seek To menu item. Clicking on object context menu (see below). it moves the camera such that the object is in view. This is a convenient way to seek to an object if you The scene controller have lost it from sight. above disGeant4 volumes also provide two rendering options: plays the Render and Render All. The first changes how a ORCA particular volume is to drawn, either As Is (to inherit Figure 18: OSCAR scene controller. hierarchy the current 3D viewer setting), Solid or Wireframe. (Fig. 17). In it, "HCAL Barrel" is visible when all the The second applies the preferences recursively for the groups "CMS Detector and Event", "Detector", and whole subtree. Note that the whole scene can be ren"HCAL" and the barrel itself are set visible. dered in various ways independent of individual object In the OSCAR controller (Fig. 18) "BarrelPixelDesettings (section 4.2). 7 era locations and orientations.
Figure 16: Animations.


tector" is visible; the visibility of its children is controlled from the pop-up menu's "Disable Children" item ("Enable Children" if the children are currently disabled); if a parent's children are disabled, they are grayed out to indicate this status. To open or close the branches of the tree either doubleclick on the tree node name or click on the small box on the left of the name. Right-clicking on an object in the scene controller pops up an object-specific context menu (Fig. 19). Depending on the object different actions will be available. Typical actions are shown on the right.

· Op enInventor An object-oriented 3D toolkit presenting a programming model based on a stored-mode 3D scene database [3]. Built on top of OpenGL. Graphics performance issues are addressed elsewhere [4]. While IGUANA is mainly driven by the needs of the CMS experiement at the LHC most of IGUANA is independent of CMS and may be freely used by others. IGUANA is currently used by the CMS, D0, and L3 experiments.

5.2 IGUANA with ORCA
To optimise or customise visualisation it is recommended that you create your own copy of it as described here. First create a SCRAM developer area for the ORCA project; you would normally do this against an already released ORCA. To list all released ORCA versions at your site use the command scram list ORCA.
Figure 19: Object menu.

> project ORCA > scram project ORCA ORCA_6_1_0 > cd ORCA_6_1_0/src

Next check out Visualisation from CVS:

5 IGUANA Software
5.1 Overview
The IGUANA project aims to provide a generic software framework and toolkit for interactive 2D and 3D graphics, with emphasis on event display and interactive Geant3 and Geant4 visualisation. The philosophy is to provide a modular toolkit from which the application developer or end-user can select only those parts which are relevant for a particular application. The code is written in C++ and is supported on Linux and Solaris. Porting to other varieties of Unix is reasonably straightforward. There are no fundamental impediments nor choices of external packages that precludes the use of IGUANA on Windows NT/2000. IGUANA is exported to a number of different sites using scram. IGUANA uses four main graphics packages: · X11 the basic Unix windowing system (notably XFree version 4 on Linux for hardware acceleration); · Qt A high-performance object-oriented framework/toolkit for developing graphical user interface (GUI) applications [1]. · Op enGL A cross-platform standard for 3D rendering and 3D hardware acceleration [2]. 8

> cvs co -r ORCA_6_1_0 Visualisation

You may now want to change the source or the BuildFiles, or simply rebuild the libraries and then the executable:
> > > > cd Visualisation scram build cd Visualisation/OrcaVis/test scram build bin

You are now almost ready to execute the program. You must however first set up the SCRAM run-time environment:
> eval `scram runtime -csh`

You must set the $OO FD BOOT environment variable to point to the federated database you will be working with. You also need a .orcarc configuration file. We provide a simple testfed.csh script in Visualisation/OrcaVis/test to do these in one step:
> cd Visualisation/OrcaVis/test > source testfed.csh

Now start the executable:
> OrcaVisMain


The testfed.csh script defines several Objectivity-related environment variables, including $OO FD BOOT, sets up SCRAM run-time environment, and writes out an .orcarc. To switch federated databases you need to exit OrcaVisMain and point $OO FD BOOT to another valid federated database, like this (all in one line):
> setenv OO_FD_BOOT cmsc01.cern.ch:: /shift/cmsc01/data22/cmsprod/ btauProd/UserFed510/ORCATEST.boot

visualisation program begins, you can also use the Geant4 command line interface as usual. All the OSCAR-specific Geant4 commands are also available.

6 IGUANA Plan for 2002
In 2001 the IGUANA development concentrated on creating a solid foundation upon which a wide variety of interactive visualisation applications could be built. This included development of the architecture, the visualisation sub-framework, integration of generic graphics toolkits, and development of browser components. A functional application was deployed in the context of ORCA to provide 3D detector and event display for the PRS groups. In 2002, the main focus will be very much on functionality. The solid IGUANA foundations will be exploited to broaden the applications provided by IGUANA to the PRS groups, particularly: · many incremental improvements to the ORCA visualisation; · provision of a new interactive GEANT4 visualisation program for OSCAR; · visualisation for the "Detector Description Database" (DDD); and · some support for specialised applications such as test beam monitoring and control. Figure 20 shows the main milestones (M1 to M7) for IGUANA development in 2002. The deliverables associated to these milestones are described in detail elsewhere [5] and summarised below. There are two major releases foreseen, with many intermediate releases as required. IGUANA 3, foreseen for April 2002, will include the first major release of the generic GEANT4 visualisation system with at least the basic core functionality of interactive GEANT3. This will be based on the new IGUANA plug-in architecture (M2: March 2002 (IGUANA 3.0)). This must include the display of the full CMS detector (from OSCAR) with the ability to control visibility of the detector tree, zooms, rotations, cut planes, and picking to query volumes or the tree. It should be integrated with the pre-existing overlap detection software of OSCAR and generally facilitate the user interaction with OSCAR. IGUANA 4, foreseen for October 2002, should include: coherent fully functional ORCA and OSCAR visualisation systems, based on the new IGUANA plugin architecture (M3: May 2002 (IGUANA 3.1)); an interactive DDD visualisation system (M4: July 2002 (IGUANA 3.2)); integrated 3D and 2D browsers (M5: 9

Then modify .orcarc (again all on one line):
InputCollections = /System/RecHits/ barrel100bb_d/barrel100bb_d

Finally restart the program:
> OrcaVisMain

5.3 IGUANA with OSCAR
Check out visualisation and build it:
> > > > > > > > project OSCAR scram project OSCAR OSCAR_1_3_2 cd OSCAR_1_3_2/src cvs co -r OSCAR_1_3_2 Visualisation (cd OscarVisPreload; scram b) (cd OscarVisSetup; scram b) (cd OscarVis; scram b) (cd OverlapVis; scram b)

Now prepare the IGUANA plug-in database. The output should include a number of OSCAR-related plugins, including Runtime/OSCAR/Main.1)
> eval `scram runtime -csh` > iguana --list

Finally, run the visualisation as in the previous section:

> iguana

The OSCAR environment is set up with eval `scram runtime -csh`. To change preferences the setup wizard does not allow you to change, define a new runtime environment and source it with scram--and please let us know which new settings should be added to the wizard. Once the
1)

On Linux systems the last command may crash producing a stack trace from libc start, but it will have done its job; this is a known problem with dynamic loading of Geant4 libraries for which we are waiting a resolution.


Figure 20: IGUANA tasks and milestones for 2002 (CMS v31 planning). Aug 2002 (IGUANA 3.3)); complete range of the asso- Qt: C++ User Interface Library from Troll-Tech ciated IGUANA infrastructure including items such as software configuration, build, release and documenta- SCRAM: Software Configuration, Release And Mantions systems; and design, user, developer, and main- agement (CMS software product) tainer documentation (M6: Oct 2002 (IGUANA 4.0)). The final task for 2002 focuses on polishing the ORCA, OSCAR, and DDD applications based on IGUANA 4 References (M7: Dec 2002 (IGUANA 4.1)). [1] M. Kalle Dalheimer. Programming with Qt. O'Reilly Verlag GmbH & Co. KG, KЁ 1999. See oln, also: http://www.trolltech.com/. [2] http://www.sgi.com/software/. T. Davis, Jackie, Neider, M. Woo, OpenGL Programming Guide: The Official Guide to Learning OpenGL, Addison-Wesley, Massachusetts, (1993).

Glossary
COBRA: Coherent Object-Oriented Base for Reconstruction and Analysis (CMS Framework superseding CARF) CVS: Concurrent Versions System

GEANT3: Fortran based detector simulation program [3] http://www.sgi.com/Technology/ Inventor.html. GEANT4: C++ based detector simulation toolkit GUI: Graphical User Interface [4] I. Osborne and G. Raymond. 3D Graphics Under Linux. CMS IN/2002-xxx, in preparation. IGUANA: Interactive Graphical User ANAlysis (CMS software project) [5] I. Osborne, L. Taylor, and L. Tuura. IGUANA Plan Objectivity: Object Database System from Objectivfor 2002. CMS IN/2002-018. ity Corporation Op enGL: A low-level, vendor-neutral software interface for interactive 3D graphics applications, originally designed by Silicon Graphics, Inc. Op enInventor: High-level C++ 3D visualisation library designed for OpenGL ORCA: Object-oriented Reconstruction for CMS Analysis (CMS software project) OSCAR: Object-oriented Simulation for CMS Analysis and Reconstruction (CMS software project) 10