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 - 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. 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 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.
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. Try to do it for any of T2 arms to see the results.
You can TURN ON/OFF any kids of events. For T2: *F5 (strips),
F6 (Pads),
F7 (Tracks).
*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:
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,
Below a few nice screenshots:
Example 2 - T2
Let's have a look at T2:
./show_example_events.sh
T2
As T2 is a default view, you don't have to click on minis-screens. Of course, any of above-mentioned shortcuts is relevant in this case.
Example 3 - Roman Pots
Let's have a look at Roman Pots:
./show_example_events.sh
RP
Again, choose any of the miniscreens with Roman Pots, and click it to enlarge.
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).
- T2 files:
- T2 files: