Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMS Tutorial, September 2004 September, 2004 Ianna Osborne, Northeastern University IGUANACMS Tutorial Ianna Osborne, Shahzad Muzaffar,

Similar presentations


Presentation on theme: "CMS Tutorial, September 2004 September, 2004 Ianna Osborne, Northeastern University IGUANACMS Tutorial Ianna Osborne, Shahzad Muzaffar,"— Presentation transcript:

1 CMS Tutorial, September 2004 September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch IGUANACMS Tutorial Ianna Osborne, Shahzad Muzaffar, Giulio Eulisse, Lassi Tuura Northeastern University

2 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 2 Introduction

3 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 3 IGUANA and IGUANACMS v IGUANA and IGUANACMS are two different SCRAM-based projects. v IGUANA defines a generic object model and a framework *) for interactive 2D and 3D visualisation. It provides a number of services/tools to generate and manipulate those objects and to manage user interactions. r iguana command, iguana studio v IGUANACMS is a composite **) framework linking IGUANA and other frameworks such as COBRA and Geant4. It provides modules and services that shape the abstract object model of IGUANA into a concrete CMS-specific application. r iguana studio session setup *) framework - [n] a set of classes that embodies an abstract design for solutions to a number of related problems. **) composite - [adj] consisting of separate interconnected parts.

4 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 4 IGUANACMS Today v Visualisation applications for ORCA, OSCAR, test-beams (DAQ application); v Visualisation of reconstructed and simulated objects: tracks, hits, digis, vertices, etc.; v Full DDD detector visualisation; v Magnetic field visualisation; v Interactive modification of configurables at run-time; v Custom tracker selection; v Event browser;

5 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 5 Software Requirements v This tutorial is based on IGUANACMS 1.10.0 v Operating system: r Linux RedHat (CERN distribution); r X-windows server with GLX module enabled; r Native OpenGL (optional). v Follow the instructions given: Commands given in this font can and should be executed by a user.

6 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 6 What is Installed v To check which versions of IGUANACMS are available at your site: > scram list IGUANACMS Listing installed projects.... -------------------------------------------------------------------------------- | Project Name | Project Version | Project Location | -------------------------------------------------------------------------------- IGUANACMS IGUANACMS_1_3_1 --> /afs/cern.ch/cms/Releases/IGUANACMS/IGUANACMS_1_3_1 IGUANACMS IGUANACMS_1_9_0 --> /afs/cern.ch/cms/Releases/IGUANACMS/IGUANACMS_1_9_0 IGUANACMS IGUANACMS_1_8_0 --> /afs/cern.ch/cms/Releases/IGUANACMS/IGUANACMS_1_8_0 IGUANACMS IGUANACMS_1_9_1 --> /afs/cern.ch/cms/Releases/IGUANACMS/IGUANACMS_1_9_1 IGUANACMS IGUANACMS_1_10_0 --> /afs/cern.ch/cms/Releases/IGUANACMS/IGUANACMS_1_10_0 Projects available for platform >> Linux__2.4 << > scram list IGUANACMS Listing installed projects.... -------------------------------------------------------------------------------- | Project Name | Project Version | Project Location | -------------------------------------------------------------------------------- IGUANACMS IGUANACMS_1_3_1 --> /afs/cern.ch/cms/Releases/IGUANACMS/IGUANACMS_1_3_1 IGUANACMS IGUANACMS_1_9_0 --> /afs/cern.ch/cms/Releases/IGUANACMS/IGUANACMS_1_9_0 IGUANACMS IGUANACMS_1_8_0 --> /afs/cern.ch/cms/Releases/IGUANACMS/IGUANACMS_1_8_0 IGUANACMS IGUANACMS_1_9_1 --> /afs/cern.ch/cms/Releases/IGUANACMS/IGUANACMS_1_9_1 IGUANACMS IGUANACMS_1_10_0 --> /afs/cern.ch/cms/Releases/IGUANACMS/IGUANACMS_1_10_0 Projects available for platform >> Linux__2.4 <<

7 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 7 Part 2: Getting Started

8 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 8 Getting Started v Prepare your developers area: v Set up run-time environment: v A user knows the data she/he wants to visualize; v Hint for a lazy user: data cards from the release area; v Test samples from ORCA web page: r http://cmsdoc.cern.ch/orca/testdata.html > ssh -X lxplus > cd $LOCALSCRATCH > scram project IGUANACMS IGUANACMS_1_10_0 > cd IGUANACMS_1_10_0/src > project IGUANACMS > cvs co -r IGUANACMS_1_10_0 VisDocumentation/VisTutorial > cd VisDocumentation/VisTutorial > ssh -X lxplus > cd $LOCALSCRATCH > scram project IGUANACMS IGUANACMS_1_10_0 > cd IGUANACMS_1_10_0/src > project IGUANACMS > cvs co -r IGUANACMS_1_10_0 VisDocumentation/VisTutorial > cd VisDocumentation/VisTutorial > eval `scram ru -csh`

9 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 9 iguana Command Options v iguana --list gives the full list of plugins available at runtime; r Note for advanced user: you must run this command after modifying visualisation plugins. v iguana --help v iguana -c passes the configuration file to COBRA. > iguana --help Usage: iguana --help or: iguana --version or: iguana --list or: iguana [--verbose] [--preload LIBRARY]... [--profile] [--memstats] [--driver|-D DRIVER] [DRIVER-OPTIONS...] The $SEAL_PLUGINS environment variable should be set to point to the module registration directories, with directories separated ':' as with normal paths. If no DRIVER is given, I will attempt to load `IGUANA'. > iguana --help Usage: iguana --help or: iguana --version or: iguana --list or: iguana [--verbose] [--preload LIBRARY]... [--profile] [--memstats] [--driver|-D DRIVER] [DRIVER-OPTIONS...] The $SEAL_PLUGINS environment variable should be set to point to the module registration directories, with directories separated ':' as with normal paths. If no DRIVER is given, I will attempt to load `IGUANA'.

10 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 10 What is in orcarc v InputFileCatalogURL defines the location of the data you want to work with - POOL catalog; v InputCollections defines a collection within the POOL catalog; v GeaneUsed if set true initializes the geane tables needed for muon reconstruction; v Optionally TraceOnThrow will produce a stack trace printout on each throw (for debugging purposes). InputFileCatalogURL = @{xmlcatalog_http://cmsdoc.cern.ch/orca/catalog/PoolFileCatalog_8_3_0.xml}@ InputCollections=/System/StW830DST/h300eemm/h300eemm # Visualisation:DataProxies=COBRA/Core:ORCA/Event:ORCA/G3Detector # TraceOnThrow=true MonRecAlisaBuilder=false GeaneUsed = true Visualisation:Application=Applications/ORCA/Rec Application InputFileCatalogURL = @{xmlcatalog_http://cmsdoc.cern.ch/orca/catalog/PoolFileCatalog_8_3_0.xml}@ InputCollections=/System/StW830DST/h300eemm/h300eemm # Visualisation:DataProxies=COBRA/Core:ORCA/Event:ORCA/G3Detector # TraceOnThrow=true MonRecAlisaBuilder=false GeaneUsed = true Visualisation:Application=Applications/ORCA/Rec Application

11 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 11 iguana Studio Session v When iguana starts it presents the list of available session types to the user. Select one of them to load a predefined configuration that will allow you to work with one of the applications: ORCA, OSCAR or iguana examples. > project IGUANACMS > scram project IGUANACMS IGUANACMS_1_10_0 > cd IGUANACMS_1_10_0/src > cvs co -r IGUANACMS_1_10_0 VisDocumentation/VisTutorial > cd VisDocumentation/VisTutorial > iguana -c orcarc Select ORCA. > project IGUANACMS > scram project IGUANACMS IGUANACMS_1_10_0 > cd IGUANACMS_1_10_0/src > cvs co -r IGUANACMS_1_10_0 VisDocumentation/VisTutorial > cd VisDocumentation/VisTutorial > iguana -c orcarc Select ORCA.

12 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 12 Part 3: Graphical User Interface

13 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 13 Typical Visualisation Application MDI Workspace 3D Browser Text Info Twig Browser Menu Bar Tool Bar Status Bar Text info window will show reach text output for selected object. The workspace hosts browsers: 3D, 2D, Lego. 3D representation of visible objects are shown in 3D window. Twig window shows the list of loaded Twigs. They can be selected and made visible. Menu bar hosts loaded services. Tool bar provides short-cuts to most common actions.

14 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 14 Menu Bar v Menu bar contains a number of pull-down menus. Menus are the services. r Default iguana studio services which are loaded for any application: File, View, Window, Debug, and Help. v The keyboard shortcuts to activate a menu from the menu bar: r File r View r Window r Event r Config r Debug r Help

15 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 15 Tool Bar v Some more often used actions from the menu bar are exposed on the tool bar: Save As..., Print As..., Control Center; v Other buttons correspond to the actions which can be performed on a selected window; v If an action cannot be performed on the selected window, the button is disabled (grayed out); v If a mode is selected, button is pressed. User can tear it off

16 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 16 Save As... v 3D scene graph from selected window can be saved as an ASCII or binary iv file; v Save As... pops-up a dialog: r type in a file name; r click save. An iv file can be read by a lightweight iguana application - Vis Example--Open Inventor File Reader An iv file can be read by a lightweight iguana application - Vis Example--Open Inventor File Reader

17 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 17 Print As... v A scene from selected window can be printed as vector postscript (recommended), 300 dpi tiff, rgb, jpeg. v Print As... pops up a dialog: r type in a file name; r click save. Printing of raster formats depends on GL hardware and drivers, and may not work correctly for remote rendering. Check that your GL drivers are up-to-date.

18 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 18 Control Centre v Presents the available control categories for the selected view (2D, 3D, lego); v Clicking “File -> Control centre” menu item will pop-up the control centre dialog box; v Double clicking a category icon will show the details of that category. Go back one level Close the control centre Revert changes Apply changes made via the GUI Different control categories

19 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 19 New... v 2D Window: opens a 2D view where every object has been sliced by a plane: XY, ZX, or ZY; v 3D Window: opens the usual 3D view; v Lego Window: opens a window that displays the lego plots associated to some of the twigs; v Open Inventor View: allows to open an.iv file as a separate twig tree; v Python shell: opens an interactive python shell. The number of newly opened windows is limited by the resources of your computer.

20 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 20 Quit v When an application quits, the request is send to all threads (up to four) and other frameworks (COBRA, Mantis, Geant4, etc.) to finish their jobs; v It can happen that something went wrong at this stage. To check if there are processes left: > ps PID TTY TIME CMD 16876 pts/6 00:00:00 tcsh 16949 pts/6 00:00:24 iguana 16950 pts/6 00:00:00 iguana 16951 pts/6 00:00:24 iguana 16952 pts/6 00:00:00 iguana 16955 pts/6 00:00:00 perl 16967 pts/6 00:00:55 iguana 16968 pts/6 00:00:00 perl 16982 pts/6 00:00:00 ps > ps PID TTY TIME CMD 16876 pts/6 00:00:00 tcsh 16949 pts/6 00:00:24 iguana 16950 pts/6 00:00:00 iguana 16951 pts/6 00:00:24 iguana 16952 pts/6 00:00:00 iguana 16955 pts/6 00:00:00 perl 16967 pts/6 00:00:55 iguana 16968 pts/6 00:00:00 perl 16982 pts/6 00:00:00 ps

21 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 21 Configuration Data Cards

22 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 22 Configuration Editor v Menu Config -> Edit... : an interactive editor for simple configurables; v A user can change and create data cards. Changing some of the configurables may have no effect: the code that defines or uses the configurable must also observe changes to it. Validity range is not checked

23 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 23 Visualisation Configurables Name Default Value TypeDescription Visualisation:PtMin1.0floatVisualisation cut on PtMin Visualisation:EtaMax2.4floatVisualisation cut on EtaMax Visualisation:G4TrajStep1floatShow every n-th step Visualisation:MinEnergyEcalHit0.1floatVisualisation cut VisEcalBHitsTwig:offset0.23floatOffset 3D rep VisEcalBHitsTwig:energyScale0.1floatScale 3D rep VisEcalEHitsTwig:offset0.35floatOffset 3D rep VisEcalEHitsTwig:energyScale0.1floatScale 3D rep VisEcalEHitsTwig:minEnergy0.001floatVisualisation cut VisHcalBHitsTwig:offset0.0floatOffset 3D rep VisHcalBHitsTwig:energyScale100.0floatScale 3D rep VisHcalBHitsTwig:minEnergy0.001floatVisualisation cut VisHcalFHitsTwig:offset0.0floatOffset 3D rep VisHcalFHitsTwig:energyScale0.1floatScale 3D rep VisHcalFHitsTwig:minEnergy0.1floatVisualisation cut Visualisation:EventStatusBartrueboolShow event status bar Visualisation:DataProxiesnonestringList of visualisation plugins to load

24 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 24 Visualisation Configurables (small print) v Some configurables simplify specific visualisation applications. For example, if you want to use only geant3 detector visualisation, you can prevent the loading of other plug-ins. r Attention: Do not use if unsure of the consequences! r Visualisation:Application = Applications/ORCA/Rec Application Automatically selects type of ORCA visualisation application, bypassing configuration dialog at start-up; r Visualisation:DataProxies = Cobra/Core:ORCA/Event:ORCA/G3Detector Load only the three named plug-ins and nothing else.

25 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 25 3D Browser

26 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 26 3D Browser Actions v Zoom In/Out Zoom in to or out of the scene graph. v Select/Pick Button Selects object manipulation or pick mode (and deselects camera or viewer mode). The cursor shape will change to an arrow. In this mode, the user is manipulating objects in the scene graph. Seek button will be disable in this mode. v View Button Selects camera or viewer mode (and deselects object manipulation or pick mode). The cursor shape will change to two half circle arrows. In this mode, the user is moving the camera in 3D space. v Home Button Returns the camera to its home position (initial position if not reset). v Set Home Button Resets the home position to the current camera position. v View All Button Brings the entire scene graph into view. v Seek Button Allows the user to select a new center of rotation for the camera. When clicked on (and in viewer mode) the cursor changes to a cross-hair. The next left mouse buttonpress causes whatever is underneath the cursor to be selected as the new center of rotation. Once the button is released, the camera either jumps or animates to its new position depending on the current setting of the seek time in the preferences dialog box. v Camera Alignment Buttons Select the axis of alignment (Z, Y, or X) of the camera. Only displayed for Plane Viewers. v Grid Button shows/hides a 1 m by 1 m grid. v Show/Hide Feedback axis Show/Hide feed back axis on the scene graph. v Projection Button Selects the type of camera used by the viewer. It toggles between the two available camera types -- perspective and orthographic. Only displayed for Examiner and Plane viewers. v Invert Camera Invert the camera through origin i.e rotate the camera 180 degree anti-clockwise.

27 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 27 2D Browser

28 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 28 2D view v Open the “File/New...” menu v Select “2D Window”

29 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 29

30 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 30

31 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 31 Use the toolbar buttons to select the wanted view

32 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 32 Layers Configuration File v It is possible to specify a configuration file (layers.dat) with the ordering of the layers and whether or not some volumes should be cut: # /Objects/Event/* twigs in front of # /Objects/Detector/* ones. # Do not cut /Objects/Events/* /Objects/Event=nocut /Objects/Detector

33 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 33 Twig Browser

34 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 34 Twig Browser v Twig browser can be used for correlated selection, visibility control and requesting text info output; r Selecting the “Object” text field: – updates the text info window; – highlights corresponding 3D, 2D, and Lego representations if those are visible; r Ticking on/off the visibility box shows/hides the 3D/2D representation; r If a twig is disabled (the name is grayed out), it should be enabled first, then it can be visualized. Parent Twigs (mother volumes) do not control visibility of their children

35 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 35 Twig Options Menu v Right button mouse click on the twig will pop up an options menu for this twig; v The options menu can be different for every twig. You will only be able to use available options; v Enable/Disable Children: since the full Geant4 tree can be heavy to deal with, this allows you to quickly choose parts you want to work with; v Physical/Logical Children: twig tree shows physical or logical Geant4 volumes; v Show/Hide By Level: to view enabled twigs by the level. Also automatically enables subtree; v Show This: make visible and enable all parents. Think before you ask what to visualize: it can be costly

36 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 36 Twig Options Menu (2) v Show/Hide By Category: ask to visualize (in)- sensitive detectors as defined in OSCAR; v Show By Material...: the materials defined in DDD. User defined filter has to be implemented by a user.

37 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 37 Twig Options Menu (3) v Appearance...: an interactive material editor for volumes made of Geant4 materials; v Slice: defines a slice planes for this object and its subtree (see Control Center on how to manipulate the slices); v Clip: defines a clip plane for this object. See Control Center on how to manipulate the slices and clip planes.

38 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 38 Other Services

39 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 39 Debug Service The list of available plugins with attached marked. Information about loaded shared libraries Information about resource consumption by the program

40 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 40 Help Service v Help service is available from the menu bar:

41 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 41 Part 4: ORCA Visualisation

42 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 42 ORCA Visualisation Multiple 2D, 3D. Lego windows Interactive configuration editor Python shell and scripts Multiple twig browsers Text information for selected objects Tracks Jets Vertices Reconstruction Geometry

43 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 43 ORCA Visualisation v When a user chooses ORCA session type from the session setup dialog, the ORCA session queries plugin database on registered ORCA applications and presents a list of them to the user to select from; Your choice of the application type depends on the input data you set in the configuration

44 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 44 Tracker SimHits v To visualize tracker Sim Hits tick the visibility box on in the Twig browser. v Tracker Sim Hits position shown as a point in 3D space. const CmsTracker::DetContainer& dets = FullTracker::instance ()->dets (); CmsTracker::DetIterator iDet; SoVertexProperty *verticies = new SoVertexProperty; for (iDet = dets.begin (); iDet != dets.end (); iDet++) { SimDet *simDet = iDet->simDet (); if (simDet && !simDet->simHits ().empty ()) { const SimDet::SimHitContainer& sits = simDet->simHits (); for (SimDet::SimhitIterator is = sits.begin (); is != sits.end (); is++) { float x = (*is).globalPosition ().x () / 100.0; float y = (*is).globalPosition ().y () / 100.0; float z = (*is).globalPosition ().z () / 100.0; verticies->vertex.set1Value (nVrx, SbVec3f (x, y, z)); nVrx++; } nSimHits += sits.size (); }

45 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 45 Filtered Tracker SimHits v Show only the SimHits from a signal event: MultipleFilter simFilter; SimTrackFromTriggerFilter sfFromTrigger; SimTrackEfficiencyFilter sfEffic; simFilter.add (&sfFromTrigger); simFilter.add (&sfEffic); typedef TkSimEvent::TrackContainer SimTrackContainer; typedef TkSimTrack::SimHitContainer SimHitContainer; TkSimEventFromCarf simEvent (observed ()); SimTrackContainer simTracks = simEvent.tracks (simFilter); SimHitContainer goodHits; for (SimTrackContainer::iterator isim = simTracks.begin (); isim != simTracks.end (); isim++) { SimHitContainer tmp = (**isim).hits (); goodHits.insert (goodHits.end (), tmp.begin (), tmp.end ()); }

46 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 46 DetUnits with Filtered SimHits v Show DetUnits with SimHits: // Get Tracker event TkSimEventFromCarf simev (observed ()); MultipleFilter simFilter; SimTrackFromTriggerFilter sfFromTrigger; SimTrackEfficiencyFilter sfEffic; simFilter.add (&sfFromTrigger); simFilter.add (&sfEffic); vector simTracks = simev.tracks (simFilter); for (vector ::iterator isim = simTracks.begin (); isim != simTracks.end (); isim++) { // Loop on SimHits of the TkSimTrack TkSimTrack::SimHitContainer simHits = (*isim)->hits (); // Check that the track contains more then one simhit // otherwise we are not interested in drawing it. if (simHits.size () > 1) { for (TkSimTrack::SimHitContainer::const_iterator iSimHit = simHits.begin(); iSimHit != simHits.end(); iSimHit++) { const DetUnit& detector = (*iSimHit)->det(); SoSeparator *separator = new SoSeparator; addWafer (separator, &detector); detUSep->addChild (separator); }

47 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 47 RecHits v RecHits are shown as points in 3D space. They show a position of the signal for stereo detectors and a middle of a strip for the rest: const CmsTracker::DetContainer& dets = FullTracker::instance ()->dets (); CmsTracker::DetIterator iDet; SoVertexProperty *verticies = new SoVertexProperty; for (iDet = dets.begin (); iDet != dets.end (); iDet++) { if (!(*iDet).recHits ().empty ()) { DetUnit::RecHitContainer rits = (*iDet).recHits (); for (DetUnit::RecHitIterator ir = rits.begin (); ir != rits.end (); ir++) { float x = (*ir).globalPosition ().x () / 100.0; // cm -> m float y = (*ir).globalPosition ().y () / 100.0; // cm -> m float z = (*ir).globalPosition ().z () / 100.0; // cm -> m verticies->vertex.set1Value (nVrx, SbVec3f (x, y, z)); nVrx++; } nRecHits += rits.size (); }

48 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 48 Tracker SimTracks v Tracker SimTracks are shown as points in 3D space indicating a position of a SimHit connected with straight line; v The SimHits are ordered in time and the first SimHit carries information about particle ID; r Muons are shown red; r Electrons are shown green; r Pions are shown blue; r The rest of the tracks are shown cyan.

49 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 49 Filtered SimTracks // Get Tracker event TkSimEventFromCarf simev (observed ()); MultipleFilter simFilter; SimTrackFromTriggerFilter sfFromTrigger; SimTrackEfficiencyFilter sfEffic; simFilter.add (&sfFromTrigger); simFilter.add (&sfEffic); vector simTracks = simev.tracks (simFilter); for (vector ::iterator isim = simTracks.begin (); isim != simTracks.end (); isim++) { // Loop on SimHits of the TkSimTrack TkSimTrack::SimHitContainer simHits = (*isim)->hits (); TkSimTrack::SimHitContainer::const_iterator iSimHit; int nGpart = 0; if (simHits.size () > 0 ) { iSimHit = simHits.begin (); nGpart = (*iSimHit)->particleType (); // GEANT particle code // Obtain ID from first hit }

50 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 50 Gammas v The straight line showing gammas connects two points, it starts at vertex and ends when they convert;

51 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 51 SimTracks Decay Tree v The SimTracks decay tree doesn’t show the location of the tracks;

52 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 52 SimTracks: Full Table v The text info window can be undocked. Select the handle and drug it out:

53 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 53 DST Visualisation List of containers in the event: updated for each event. Name and version for RecCollection. RecMuon TTrack Formatted text information for selected RecCollection iCobra event browser: graphical structure of event

54 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 54 ORCA Visualisation v InputCollection: bt03_ttH115_6j1l r ttH event with mH = 115 GeV at low luminosity (2*10^33 cm-2s-1)

55 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 55 Part 5: OSCAR Visualisation

56 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 56 Geant4 Trajectories

57 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 57 Lego

58 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 58 Part 6: DAQ Visualisation

59 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 59 DDD Visualisation v To create your own detector description see the Detector Description Language XML Tutorial (by Michael E. Case): r http://cmsdoc.cern.ch/cms/software/ddd/www/xmltutorial/index.html > iguana -c myGeometry Select OSCAR. > iguana -c myGeometry Select OSCAR.

60 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 60 Part 7: Control Centre

61 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 61 Control Centre v Selecting different views (3D, 2D, Lego etc.) will automatically update the control centre for its available categories Categories registered for 2D View Categories registered for Lego view Categories registered for 3D View

62 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 62 Animators Category v A category to manage 3D animators. List of available animators Add/remove animators Automatically apply the changes made via GUI Start/Stop animation Axis of animation Align to x, y or z axis Opens the Animators category in the control centre

63 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 63 Clip Plane Category v A category to manage clip planes. List of available clip planes Add/remove clip planes Automatically apply the changes made via GUI Turn On/Off the 3D plane manipulator Align to x, y or z axis Opens the clip planes category in the control centre Activate/de-activate clip plane

64 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 64 Slicers Category v A category to manage the slicers. List of available slicers Add/remove slicers Automatically apply the changes made via GUI Turn On/Off the 3D slicer manipulator Align to x, y or z axis Opens the slicers category in the control centre Activate/de-activate slicer Thickness of the slicer

65 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 65 Lights Category v A category to manage 3D lights. List of available lights Add/remove lights (Head light can not be removed) Automatically apply the changes made via GUI Turn On/Off the 3D light manipulator Align to x, y or z axis Opens the lights category in the control centre Turn On/Off light Color of the light Type of the light Light intensity

66 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 66 View points Category v A category to manage 3D view points. List of available view points Add/remove view points (Current viewpoint can not be removed) Automatically apply the changes made via GUI Turn On/Off auto clipping (automatic adjustment of the near/far clip planes) Align camera to x, y or z axis Opens the view points category in the control centre Zoom In/out Near/Far clip plane distance Rotate view

67 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 67 Field Planes Category v A category to manage 3D field planes. Opens the field planes category in the control centre Automatically apply the changes made via GUI Turn On/Off the 3D manipulator List of available field planes X, Z density and segment ratio Coloring scheme Show/hide field, field color map or field segments

68 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 68 Print/View Properties Category… (Examiner Viewer) v This section of the category allows you to control different properties of the examiner viewer Opens the print/view property category in the control centre Turn On/Off the 3D animation and detail seek Make mouse cursor visible/invisible Drawing style when camera is standing still Drawing style when the end user is interacting with the scene camera, causing continuos animation redraws Seek time for seek mode Turning On/Off the auto clipping of near/far clip planes Enable/Disable Stereo viewing Other properties. Click on these to get the details

69 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 69 Print/View Properties Category… (Scene Manager) v This section of the category allows you to control different properties of the 3D scene manager Opens the print/view property category in the control centre Select the back ground color of the scene Enable/Disable RGB mode and real time updates

70 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 70 Print/View Properties Category… (GL Render) v This section of the category allows you to control different properties for the GL Render Opens the print/view property category in the control centre Enable/Disable antialiasing passes, auto redraw and updates on render pass Transparency types and redraw priorty

71 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 71 Print/View Properties Category… (QT Properties) v This section of the category allows you to control different properties of the QT properties Opens the print/view property category in the control centre Window style of the iguana application

72 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 72 Print/View Properties Category… (Print Properties) v This section of the category allows you to control different properties of the Printing Opens the print/view property category in the control centre Enable/disable the best root finding algorithm Enable/Disable the printing of the scene back ground Enable/disable simple line offset Enable/disable occlusion culling Enable/disable landscape printing

73 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 73 3D Node Manipulator Category… v A category to manipulate the fields of any 3D node. v Select a node, from twig tree or 3D Browser (in pick/select mode), and open 3D node manipulator category to manipulate that node Opens the 3D node manipulator category in the control centre Node and its children list Different controllable fields of selected node Selected node Automatically apply the changes made via GUI

74 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 74 3D Node Manipulator Category… v If there are no controllable fields then the 3D node manipulator category will be empty

75 IGUANACMS Tutorial, September, 2004 Shahzad Muzaffar, Northeastern University http://iguana.cern.ch 75 Range Controller v Right clicking mouse on any range controller will pop-up the menu from where one can select “Edit” to set the step size, range, precision (float values only) and value of that field. Range Controllers Min/Max Range Small/Long Step size Precision

76 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 76 Part 8: IGUANACMS and Python

77 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 77 Python v Object-oriented programming language introduced in the beginning of the 90s; v Easy to learn but powerful; v It is currently the selected scripting language of choice for COBRA & IGUANA.

78 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 78 IGUANA & Python v IGUANA provides support for python scripting in two different ways: Through the interactive shell Through the embedded interpreter service.

79 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 79 Interactive Python Shell v Go to the “File/New...” menu v Select “Python shell”

80 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 80 Interactive Python Shell v A new embedded window should popup; v A Scripts service is added to the menu bar. You can either type the commands in the python shell or load and execute earlier prepared python script.

81 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 81 Using Python for Selecting Twigs v There are two ways of doing this: Easy way; Hard (but powerful) way.

82 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 82 Easy Way from PyIgTwigNavigation import * enableTwig ("/Objects/Detector/OCMS") enableTwig ("/Objects/Detector/OCMS/CMSE") and then re-disable the twigs with: disableTwig ("/Objects/Detector/OCMS/CMSE") disableTwig ("/Objects/Detector/OCMS") disableTwig ("/Objects/Detector/OCMS/CMSE") disableTwig ("/Objects/Detector/OCMS") This is done using the PyIgTwigNavigation module:

83 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 83

84 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 84

85 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 85 Hard (but powerful) Way This is done using the IGUANA framework: from PyIgObjectBrowser import * from PyIgCommonData import * from PyIgQtPython import * from PyIgStudio import * def setTwigVisibility (twigName, visibility): state = IgPythonState.get () rootTwig = twigName.split ("/")[1] assert (rootTwig != None) dd = IgDocumentData.get (state) twig = dd.root (rootTwig, False) assert (twig != None) modifiedTwig = twig.lookup (twigName) modifiedTwig.selfVisible (visibility) IgRepSet.update (modifiedTwig, -1) from PyIgObjectBrowser import * from PyIgCommonData import * from PyIgQtPython import * from PyIgStudio import * def setTwigVisibility (twigName, visibility): state = IgPythonState.get () rootTwig = twigName.split ("/")[1] assert (rootTwig != None) dd = IgDocumentData.get (state) twig = dd.root (rootTwig, False) assert (twig != None) modifiedTwig = twig.lookup (twigName) modifiedTwig.selfVisible (visibility) IgRepSet.update (modifiedTwig, -1)

86 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 86 Hard (but powerful) Way from PyIgObjectBrowser import * from PyIgCommonData import * from PyIgQtPython import * from PyIgStudio import * def setTwigVisibility (twigName, visibility): state = IgPythonState.get () rootTwig = twigName.split ("/")[1] assert (rootTwig != None) dd = IgDocumentData.get (state) twig = dd.root (rootTwig, False) assert (twig != None) modifiedTwig = twig.lookup (twigName) modifiedTwig.selfVisible (visibility) IgRepSet.update (modifiedTwig, -1) from PyIgObjectBrowser import * from PyIgCommonData import * from PyIgQtPython import * from PyIgStudio import * def setTwigVisibility (twigName, visibility): state = IgPythonState.get () rootTwig = twigName.split ("/")[1] assert (rootTwig != None) dd = IgDocumentData.get (state) twig = dd.root (rootTwig, False) assert (twig != None) modifiedTwig = twig.lookup (twigName) modifiedTwig.selfVisible (visibility) IgRepSet.update (modifiedTwig, -1) This is done using the IGUANA framework:

87 IGUANACMS Tutorial, September, 2004 Giulio Eulisse, Northeastern University http://iguana.cern.ch 87 Hard (but powerful) Way from PyIgObjectBrowser import * from PyIgCommonData import * from PyIgQtPython import * from PyIgStudio import * def setTwigVisibility (twigName, visibility): state = IgPythonState.get () rootTwig = twigName.split ("/")[1] assert (rootTwig != None) dd = IgDocumentData.get (state) twig = dd.root (rootTwig, False) assert (twig != None) modifiedTwig = twig.lookup (twigName) modifiedTwig.selfVisible (visibility) IgRepSet.update (modifiedTwig, -1) from PyIgObjectBrowser import * from PyIgCommonData import * from PyIgQtPython import * from PyIgStudio import * def setTwigVisibility (twigName, visibility): state = IgPythonState.get () rootTwig = twigName.split ("/")[1] assert (rootTwig != None) dd = IgDocumentData.get (state) twig = dd.root (rootTwig, False) assert (twig != None) modifiedTwig = twig.lookup (twigName) modifiedTwig.selfVisible (visibility) IgRepSet.update (modifiedTwig, -1) This is done using the IGUANA framework:

88 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 88 Conclusion

89 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 89 Troubleshooting v Run toolchecker.pl to check the correctness of your configuration; v If you working with data stored remotely: check that the data you want to visualize are accessible (rfdir, rfcp, etc.); v If you run visualisation on a remote node: check network traffic and afs performance; v Use TraceOnThrow to see what was the problem of the crash; v Ask iguana to give detailed output: r env LOG=stderr iguana -c orcarc Check Savannah bug reporting system and submit a report: http://savannah.cern.ch/bugs/?group=iguana

90 IGUANACMS Tutorial, September, 2004 Ianna Osborne, Northeastern University http://iguana.cern.ch 90 v There are known problems: r We are investigating why 2D and Lego representations do not properly work in multi-threaded ORCA visualisaton applications which have asynchronous updates of the representations; r Some mirrored volumes have troubles; r We are aware of performance issues with handling very large number of volumes and memory leaks. Known Problems Savannah bug reporting system: http://savannah.cern.ch/bugs/?group=iguana


Download ppt "CMS Tutorial, September 2004 September, 2004 Ianna Osborne, Northeastern University IGUANACMS Tutorial Ianna Osborne, Shahzad Muzaffar,"

Similar presentations


Ads by Google