Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
Thomas Ruf Panoramix Introduction
Panoramix Introductionfrom a physicist
Getting startedEnvironment, run, local installation, option file
Basic Menus and CommandsDetector tree, Event tree
Predefined views
Controlling and Customizing PanoramixOnX menus
Callbacks
Python scripts
More Useful Things
Panoramix: Interactive Data Visualization for LHCb
Author: Guy Barrand (Framework)
+ contribution from many individuals
Web page: http://lhcb-comp.web.cern.ch/lhcb-comp/Frameworks/Visualization/
v1.5
Latest version: v16r2
Thomas Ruf Panoramix Introduction
Getting started I using an already existing Panoramix installation
Setup the environment:This part only for local installations:
linux: source $MYSITEROOT/scripts/ExtCMT.csh
windows: call %MYSITEROOT%\scripts\ExtCMT.bat
SetupProject Panoramix v16r1
Specify your use case :
python $myPanoramix -h
Thomas Ruf Panoramix Introduction
Getting started II using an already existing Panoramix installation
Example
python $myPanoramix -f
/afs/cern.ch/lhcb/group/tracking/vol1/Bsjpsiphi_00001620_00000004_5.dst
The last configuration is stored in last_settings.py. Can be directly
used for another session or edited and changed:
python $myPanoramix -c last_settings.py
MDF files are also supported by checking the file type, raw or mdf.
Thomas Ruf Panoramix Introduction
Panoramix Configuration
Tasks
Default LHCb configuration
Visualization
Input data set
Options for your specific use caseRead DST, raw data decoding, unpack MC
Read DIGI, run full reconstruction
Read DST, run HLT
Read DST, run your favourite Physics selections
No input file, only detector visualization
…
Thomas Ruf Panoramix Introduction
Making your local Panoramix installation
Use install script, http://lhcbproject.web.cern.ch/lhcbproject/dist/install_project.py
Requires following environment variables to be set:$MYSITEROOT: full path to the top level directory of this installation
e.g. C:\LHCb_Software
$CMTCONFIG: binary directory name
e.g. win32_vc71_dbg or slc4_ia32_gcc34
Installation:
Copy install_project.py to $MYSITEROOT
Run: python install_project.py –p Panoramix –v v16r1 –b
Have a coffee
It is recommended to run on your local machine for speed reasons, although at CERN it is not so bad anymore running on lxplus.
Thomas Ruf Panoramix Introduction
Basic Menus
Detector Tree
Some useful buttons
Event Tree
OnX data accessor
Special Views
Printout
Thomas Ruf Panoramix Introduction
Detector Tree
Useful for quick overview of detector
geometry, material inventory, XML
debugging, …
Thomas Ruf Panoramix Introduction
Basic Operations
Zoom wheelRotation wheels
Viewing mode
Picking mode
Free Rotation: Left mouse
Translation: Ctrl + left mouse
Thomas Ruf Panoramix Introduction
Basic Operations II
Viewing mode
Picking mode
Right mouse button
Home
Set Home
View All: Map to window size
Torch or Seek: ask for picking and
center the scene over a picked point
orthographic to perspective
Thomas Ruf Panoramix Introduction
Opening and Closing
Opening volumes: ctrl/pick
Closing volumes: shift/pickPicking mode
Thomas Ruf Panoramix Introduction
Opening and Closing II
Opening volumes: ctrl/pick
Closing volumes: shift/pickPicking mode
Thomas Ruf Panoramix Introduction
Deleting
2. Deleting selected objects or all the rest
1. Selecting objects with left mouse click
Picking mode
Thomas Ruf Panoramix Introduction
Deleting II
Thomas Ruf Panoramix Introduction
Online Mode
When running at the Pit and receiving events from the data
manager, the Panoramix GUI is configured to show only
the most important menus:
All other menus are hidden behind Panoramix menus
Reading Events
After Panoramix is started, first event is read by clicking
on single event arrow. (In online mode, this is done
automatically.)
If the current view is known to Panoramix, the next event
will be displayed with the same view.
Views are created by Python scripts and can be
registered in a Python dictionary.
Thomas Ruf Panoramix Introduction
Single event Loop over events
Stop loop Fast Stop of Panoramix
Reading Events II
Direct jump to a given event, via event and run (optional)
number.
Rewind file, back to first event.
Write current event to disk.
Thomas Ruf Panoramix Introduction
Thomas Ruf Panoramix Introduction
Event Tree
• Useful for quick overview of transient event store
• Whatever has a converter is displayed
• Otherwise, attempt is made to print information
(next page)
Thomas Ruf Panoramix Introduction
Event Tree II
• Useful for quick overview of transient event store
• Whatever has a converter is displayed
• Otherwise, attempt is made to print information
Thomas Ruf Panoramix Introduction
Event Tree III
Decoding of all raw data and
unpacking of MC Particles only on demand
Thomas Ruf Panoramix Introduction
Detector Tree
Access to Geometry (logical volumes) and Structure
(physical volumes). Objects in the structure tree are
displayed in the LHCb global coordinate system, whereas
objects in the geometry tree are displayed in their local
coordinate system.
Thomas Ruf Panoramix Introduction
Conditions
Access to Conditions. The print
method of the object is called.
Thomas Ruf Panoramix Introduction
Conditions II
Access to Conditions. The print
method of the object is called.
Thomas Ruf Panoramix Introduction
Material
Information about Materials.
Thomas Ruf Panoramix Introduction
Properties of Objects
By clicking on displayed objects, their properties are
printed. Properties are defined in SoEvent, Types.cpp
Pick mode
Output format controlled by session().setParameter('AccessorManager.dumpMode', 'raw/table')or via Scene/Dump mode raw/table
Thomas Ruf Panoramix Introduction
Colours
With Qt: $myPanoramix --qt
Thomas Ruf Panoramix Introduction
OnX data accessor
Thomas Ruf Panoramix Introduction
New Page
Thomas Ruf Panoramix Introduction
New Page II
Clone Viewer_1: Standard 3d page
New Plane page: Only translations and zoom, no rotations
Thomas Ruf Panoramix Introduction
Pages and Regions
Create two regions on one page
Switch from one region to another:
Change to picking mode
Use left and right mouse key
Thomas Ruf Panoramix Introduction
Root Histograms
1st step: Initialize
2nd step: New canvas
3rd step: Plot histogram
With right mouse click, access to all ROOT gadgets
Thomas Ruf Panoramix Introduction
Printout
GL2PS gives best quality
JPEG for smaller files
Thomas Ruf Panoramix Introduction
Saving 3d files
Currently supported
iv, hiv: Inventor file, can be read back by
Panoramix
wrl: VRML file, can be viewed using
external viewers, see http://lhcb-
reconstruction.web.cern.ch/lhcb-
reconstruction/Panoramix/3d/free_vmrl_viewers.
htm
Thomas Ruf Panoramix Introduction
Predefined Views: Detectors
Thomas Ruf Panoramix Introduction
Predefined Views: Detectors II
Thomas Ruf Panoramix Introduction
MC Particle Viewer
Use predefined color coding of MCParticles
Select Decay
Explains all
Thomas Ruf Panoramix Introduction
MC Particle Viewer II
zx projection, z-axis scaled by 1:8
Thomas Ruf Panoramix Introduction
Ruler and Frame
Not yet perfect, but better than nothing
Thomas Ruf Panoramix Introduction
Track Viewer
Thomas Ruf Panoramix Introduction
Track Viewer II
Only works with track reconstruction on:#include "$PANORAMIXROOT/options/PanoramixFullRec.opts"
Explains all
Thomas Ruf Panoramix Introduction
Calo Viewer
Explains all
Thomas Ruf Panoramix Introduction
Rich Photons
Only works with track reconstruction on:#include "$PANORAMIXROOT/options/PanoramixFullRec.opts"
1st step
2nd step
Thomas Ruf Panoramix Introduction
Rich Rings
Only works with track reconstruction on:#include "$PANORAMIXROOT/options/PanoramixFullRec.opts"
Thomas Ruf Panoramix Introduction
Velo RZ Projection
RZ projection:
R = sqrt(x2 + y2), x>0
R = -sqrt(x2 + y2), x<0
Scale: R:Z = 1:8.4
Tracks crossing VELO halves might look strange,
however less busy plot compared to +RZ projection
Projection only makes sense around VELO
R-strips points
Phi-strips vertical lines
Selected MCParticles can be displayed in 3d with
corresponding detector hits and reconstructed track(s)
Thomas Ruf Panoramix Introduction
Velo RZ Projection II
Thomas Ruf Panoramix Introduction
Velo RZ Projection III
Thomas Ruf Panoramix Introduction
Colour codings
Vertices:
Production vertex:
Interaction vertex:
MCParticles:
e,u, ,k,p from B : red
Other particles
associated to tracks : golden
Thomas Ruf Panoramix Introduction
Colour codings
VELO clusters:
Used R-clusters : red
Unused R-clusters : white
Phi clusters: magenta
Tracks:
VELO back : green yellow
VELO : green
VELO-TT : cyan
Forward : blue
Match : skyblue
MatchForwardVELO
VELO back
Velo-TT
Thomas Ruf Panoramix Introduction
Background Color
Thomas Ruf Panoramix Introduction
Using python:
Region().setBackgroundolor(,aColor)
# aColor could be a common name like 'red', 'blue', etc...
# or a string with RGBS, for example '1 1 0' for a yellow.
Details about the Display of
Mcparticles and Tracks
MCParticles:
Production vertex inside Velo and decay vertex outside VELO:
Straight line defined by momentum vector
Production vertex outside Velo and decay vertex outside VELO:
Straight line connecting production vertex and decay vertices
Production vertex inside Velo and decay vertex inside VELO:
Straight line connecting production vertex and decay vertex
Tracks:
Use of parabolic extrapolator if states with momentum information available,
otherwise straight line between states
Thomas Ruf Panoramix Introduction
Thomas Ruf Panoramix Introduction
Associations
Select objects, right mouse click in picking mode
Thomas Ruf Panoramix Introduction
Event Information
Thomas Ruf Panoramix Introduction
Primary Vertex Information
Thomas Ruf Panoramix Introduction
Trigger Information
Needs to be extended for the HLT-Alley summaries
Thomas Ruf Panoramix Introduction
Particle Information
Online Views
Thomas Ruf Panoramix Introduction
Support for viewing and
searching cosmics in the muon
stations and calorimeter
Controlling and
Customizing Panoramix
Thomas Ruf Panoramix Introduction
Thomas Ruf Panoramix Introduction
Defining your menus and buttons
OnX scripts…\scripts\OnX\Panoramix.onx
…\Examples\Python\Examples.onx
Thomas Ruf Panoramix Introduction
Defining your menus and buttons II
Starting Python scripts…\Examples\Python\Examples_detviews.onx
Starting cpp code…\scripts\Rich.onx
will trigger void RICH_Digits_Rings in Rich.cpp in Panoramix\src
Thomas Ruf Panoramix Introduction
Object Properties
Properties of a Panoramix object XXX are usually defined
in XXXType.h and XXXType.cpp. Most of the definitions
are in SoEvent, SoCalo, SoRich and SoDet.
These properties are printed by clicking on an object and
can also be used for filtering.
Example: TrackType.cpp in SoEvent:
Clicking on a track object:
Thomas Ruf Panoramix Introduction
Object Properties II
Filter objects for display:
cpp
Python
Thomas Ruf Panoramix Introduction
Python Scripts
Three ways of operating:
1. Python prompt
Exit Panoramix: >>>
Back to Panoramix by typing >>> toui()
2. Menu button
Triggered by OnX script from a menu button, see page 43
3. Panoramix command line
Enter script name
x(‘your script.py’)
Execute any script
Thomas Ruf Panoramix Introduction
Panoramixmodule, basics
from panoramixmodule import *
toui(): return to gui
ui(): access to OnX
da(): access to OnX
session(): access to session parameters
Page(), Region() : access to page and region for modifying
their attributes
Camera(): control camera settings
Object_visualize(anyObject): visualizes any displayable object
in the current page
ui().synchronize(): synchronize display with recent changes
Style(): control style settings
Onx: OnX module
HEPVis: coin module
Thomas Ruf Panoramix Introduction
Panoramixmodule, Style
Style()
setTextSize(aValue), showText(), hideText()
setColor(aString), setRGB(R,G,B)
setLineWidth(aValue)
setMarkerSize(aValue), setMarkerStyle()
dontUseVisSvc(): overwrite default visualization attributes
useVisSvc(): use default visualization attributes
setOpened(), setClosed(), setTransparency()
setWireFrame(), setSolid()
Thomas Ruf Panoramix Introduction
Panoramixmodule, Parameters
session()
session().availableParameters()
session().setParameter(aParameter,aValue)
session(). parameterValue(aParameter)
Thomas Ruf Panoramix Introduction
Panoramixmodule, data manipulation
aData = ‘MCParticle’, ‘Track’, …
da().collect(aData,cuts)
da().filter(aData,filters)
da().dump()
da().values(aParameter): properties of the aData object
da().visualize()
Thomas Ruf Panoramix Introduction
Panoramixmodule, Camera
Camera()
lookAt(x,y,z)
pointAt(x,y,z)
setHeight(height)
setNearFar(near,far)
setOrientation(x,y,z,phi)
setPosition(x,y,z)
Thomas Ruf Panoramix Introduction
Panoramixmodule, Gaudi related
appMgr: application manager
det : detector service
evt: event service
sel: event selector
partsvc: particle service
toolsvc: tool service
rootSvc: display of AIDA histograms with ROOT
linkedFrom and linkedTo: Linker relations
doxygen(anyObject): open webbrowser of doxygen page
nodes(aDataSvc,force,<leave>) : Get list of nodes from data
service (det or evt), force=True, force to read all leaves,
<leave> optional start if not root.
Thomas Ruf Panoramix Introduction
Associations in Panoramix
Plot xxx associated with yyysession.setParameter('modeling.what', 'xxx')
data_collect('yyy',filter)
data_visualize()
session.setParameter('modeling.what','no')
Example: Plot long tracks with pt > 1 GeV/c and their clusters
Thomas Ruf Panoramix Introduction
Other Python Examples
x('truf_RecPart_o')
Thomas Ruf Panoramix Introduction
Other Python Examples
Most predefined views are made by Python scripts
Event
MC Particle Viewer
Track Viewer
Calo Viewer
Examples
Thomas Ruf Panoramix Introduction
Another Example
sys_import('truf_RichHPD')
sys_import(‘truf_RichRec’)
Taken from layouts.cpp,
made by Chris Jones
Thomas Ruf Panoramix Introduction
Algorithms
Useful for finding out properties of the
algorithms used in your program.
Panoramix Online
Thomas Ruf Panoramix Introduction
Using $myPanoramix script:If input file is specified with extension mdf/raw, the right options
for mdf files are used
If input file == online, then events are read from buffer manager
End