FROG Visualization
This document will explain how to use FROG for visualisation of TOTEM geometry and events (OFFLINE and ONLINE).
Assumptions:
- I assume you have installed opengl (GLUT) and curl libraries
In case of any difficulties with the installation and compilation, do not hesistate to contact
maciej.besta@gmailNOSPAMPLEASE.com
Short introduction
FROG consists of two parts:
The Analyzer and
The Displayer.
- The Analyzer is a part of the CMSSW, it is responsible for providing the binary files containing the information on events and geometry for The Displayer
- The Displayer works independently of the CMSSW - it is stored together with the CMSSW in TOTEM repository in Frog_Analyzer/soft, however it can be compiled and launched on any Linux machine.
In the first place I will provide a short tutorial to
The Displayer to show the capabilities of the tool. All the necessary example files are provided.
The Displayer
The Displayer is independent of the CMSSW - it means you can check it out on your private Linux machine:
svn co svn+ssh://your_login@svn.cern.ch/reps/totem/trunk/offline/cmssw/src/Visualisation/Frog_Analyzer/soft your_directory
cd your_directory
make clean
make
If you want to proceed on SLC, I do recommend to
check out the newest CMSSW:
svn co svn+ssh://svn.cern.ch/reps/totem/trunk/offline/cmssw/src CMSSW_4_2_4/src/
cd CMSSW_4_2_4/src/Visualisation/Frog_Analyzer/soft
make clean
make
VERY (!!!) important remark - if you have previously run commands such as:
source
eval
Then the compilation may (but not necessarily) fail. To prevent it, compile The Displayer using a freshly-opened terminal tab.
You need to wait a little bit for the compilation to be over. If the compilation is not successfull (which might happen very rarely, and is always connected with the lack of some libraries on your computer), please let me know at
maciej.besta@gmailNOSPAMPLEASE.com. Otherwise let's see a few examples:
STEP 2 - FROG examples
In this step I'll show you how to operate FROG by using a few examples which are have been prepared by me and which are included in the software by default.
Example 1 - T2
Let's have a look at T2:
cd soft
./show_example_events.sh
T2
After the loading process you should see a T2 arm, which is by default the main view. On your left and at the bottom there are Roman Pot miniscreens, and on your right - T1 and T2 miniscreens. To see T1 with its events, simply
click on any of T1 mini screens. It will appear in the 2DZ and 2DY main views.
The set of views which you are currently viewing is so called
Analysis configuration. It allows users to select any subpart and subplate of any detector, enlarge it and study the events on it. There are also other types of configurations, which I will describe in detail later on.
Very important notes and shortcuts for the 3D view:
- You can rotate the view by pressing right-mouse button and then moving the mouse,
- Press f to maximize/minimize the main 3D view,
- Press right / left in order to switch between events,
- To type in the event number, press ENTER, then type in the number and again ENTER. However, have in mind that the example files contain only 4 to 5 events. You will have the opportunity to view bigger files at the end of this tutorial, when I'll describe how to use The Analyzer,
- Press m / p to zoom in / zoom out,
- Press [ / ] to increase/decrease transparency rate
- Press space for enabling/disabling auto-rotation,
- Press up / down to increase/decrease rotation,
- Press F1 for help screen,
- Press q to exit program,
The arrows point to the Interaction Point 5. You can turn them OFF by pressing
v.
maximized main view
Try to find an event which contains lots of tracks, pads and strips (as it is written above, do it with the
left and
right arrow). Then play a little with the above shortcuts. After a while, let's have a real fun:
- You can select (by clicking on a 3D view) any plate of any of the detectors to enlarge it and study the events on it. The selected plate has different colour than the rest. Try to do it for any of T2 arms to see the results.
- You can TURN ON/OFF any kids of events.: F5 (RP and T2strips), F6 (T2 Pads), F7 (T1, T2, RP Tracks). F8 (T1 wires), F9 (T1 strips A), F12 (T1 strips B), F11 (T1 hits).
- You can swap between 2DZ/2DY and 3D View by clicking on any of them. Thanks to it, you can enlarge at will any 2D part.
Let's see the results:
Subpart of T2 arm selected for detailed overview. Tracks are switched OFF
Subpart of T2 arm selected for detailed overview. Tracks and strips are switched OFF. You can see which detector plane has been selected - it has more intensive colours.
Another interesting event. Arrows pointing to the Interaction Point 5 are visible
Another interesting event. Arrows pointing to the Interaction Point 5 are NOT visible
Another interesting event. All events visible
It is possible to swap between 3D and 2D views to enlarge any part of 2D detector planes
Example 2 - T1
Let's have a look at T1:
cd soft
./show_example_events.sh
T1
After the loading process you should see a T2 arm, which is by default the main view. To see T1 with its events, simply
click on any of T1 mini screens. It will appear in the 3D, 2DZ and 2DY main views.
The set of views is still
Analysis configuration. You are welcome to try out all the features for T1. Especially, selection of single CSC chambers is possible as well. Below the results are presented:
T1 general overview.
Selection of a single CSC Chamber. Of course it is possible to turn ON/OFF any type of T1 event.
Selection of a single CSC Chamber. Another, more abundant event. Of course it is possible to turn ON/OFF any type of T1 event.
Selection of a single CSC Chamber. Another chamber has been selected. Of course it is possible to turn ON/OFF any type of T1 event.
For the sake of clarity, one can still turn ON/OFF any kind of an event. The results can be seen below:
All the events in one place
Wires visible
Tracks visible
Hits visible
Strips A visible
Strips B visible
Example 3 - Roman Pots
The same can be done for Roman Pots:
cd soft
./show_example_events.sh
RP
Again, by clicking a miniscreen with some events we will switch to Roman Pots. Besides single Pots, it is possible to view also the units. At any point, you can click and enlarge a single plane.
Roman Pots. An event containing many strips. Arrows point to the IP5
A view of a whole Unit. It is still possible to select a single plane and to enlarge it. The arrows have been turned OFF
Roman Pots. An event with a single track.
Roman Pots. An event with a single track.
Other features.
Another convenient and very useful thing is Geometry and Event tree.
Press F2 to open / close it.
- you can open/close each of the tree positions by clicking on + / - marks. Thanks to it you can see sub-elements.
- you can disable / enable any of the elements by clicking on ON / OFF / MIX. It is extremely useful when there is a great number of strips or pads - you can disable uninteresting elements, to enhance speed and visibility,
Transparency is also an interesting feature - it helps with the overview of the events. A few examples are presented below.
T2 partial transparency. Thanks to it, one can more easily notice some negligible events
T1 partial transparency. Thanks to it, one can more easily notice some negligible events
Roman Pots partial transparency.
Roman Pots complete transparency
STEP 3 - Visualisation of your own events.
Now let's try to visualise some of your own events in FROG. I assume that you are still in Visualisation/Frog_Analyzer/soft folder. You have to edit example_cfg.py file to put the name of your reconstructed ROOT file. When you are done:
./frogVisualisation.sh example_cfg.py
And... enjoy watching your eventes.
STEP 4 - FROG locally, without CMSSW
Frog was constructed in such a way it can run locally on any computer, without the CMSSW framework. All you need are the input files for FROG. Below I explain how it all works.
Part 1 - FROG running locally on your computer
mkdir Frog_local
svn co svn+ssh://svn.cern.ch/reps/totem/trunk/offline/cmssw/src/Visualisation/Frog_Analyzer/soft Frog_local
cd Frog_local
make clean
make
./show_example_events.sh
T1
Now FROG is running locally on your computer, with the prepared examples. But how to make FROG display
Your events? Below a simple explanation and an example!
Part 2 - preparing input for FROG
FROG needs three kinds of input files, describing geometry and events. These files must be provided by Frog_Analyzer, which is a part of CMSSW and TOTEM. Thanks to it FROG is totally independent of the CMSSW, and can display events on any kind of machine.
There are three files necessary for FROG:
- TOTEM_Geometry.geom
- TOTEM_Events.vis
- TOTEM_Views_Configuration.txt
How to do it all? Below a short example!
1. At first, we need to generate input files for FROG. I assume that:
- you are in CMSSW_4_2_4/src folder,
- you work on a remore machine (for example pctotem31), where you log in via SSH.
source /afs/cern.ch/cms/cmsset_default.sh
eval `scram runtime -sh`
Then we need a config file. It can be any file, whatever you like, but for this example let's take
Visualisation/Frog_Analyzer/soft/example_cfg.py. You should put in the relevant place the path to
your ROOT file. Then:
cmsRun Visualisation/Frog_Analyzer/soft/example_cfg.py
When it's done, you should see in your directory three new files: TOTEM_Geometry.geom, TOTEM_Events.vis, TOTEM_Views_Configuration.txt
Now you should copy these files to relevant places in FROG directory. For me it's like that:
scp mbesta@pctotem31.cern.ch:/home/mbesta/CMSSW_4_2_4/src/TOTEM_Geometry.geom ./Files
scp mbesta@pctotem31.cern.ch:/home/mbesta/CMSSW_4_2_4/src/TOTEM_Events.vis ./Files
scp mbesta@pctotem31.cern.ch:/home/mbesta/CMSSW_4_2_4/src/TOTEM_Views_Configuration.txt ./Config
./frog
And then... enjoy watching your events!
FROG working remotely via ssh
In general, it's possible to run FROG remotely via ssh -X.
However, it makes the display MUCH slower, so I do recommend to work on FROG locally (which is very simple, and I described how to do it a few lines above).