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
Some of the packages which you might miss are: subversion, build-essential, g++, freeglut3-dev, libpng12-dev, libcurl3-dev, curl-devel. Install then using commands (for SLC):
yum install _name_of_the_package_
or (for Ubuntu):
sudo apt-get install _name_of_the_package_
If you miss a package, you might get during the compilation/linking very strange error messages.
In case of any difficulties with the installation and compilation, do not hesistate to contact
maciej.besta@gmailNOSPAMPLEASE.com
STEP 1 - 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 Visualisation/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. We'll use a short script asking you two questions:
- which set of events do you want to see (T1, T2 or RP),
- which configuration of subviews do you choose
For the time being we will use the first configuration (with all detectors). In this configuration you will be able to select detector planes and enlarge them to study the events in more detail. Later on in the tutorial I will describe other configurations.
Example 1 - T2
Let's have a look at T2:
cd soft
./show_example_events.sh
T2
1
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,
- You can select (by clicking on a detector in the main 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.
- 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.
One last important remark (!!!):
- Remember that you can rotate, zoom in/out ONLY the main 3D view. The main 3D view is the one in the left-bottom part of the display.
- Remember that by clicking on any other view with left mouse button, you'll swap between this view and the main view. To swap again, click again in the same place.
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
1
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
1
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
The Analyer - Visualisation of your own events.
Now let's try to visualise some of your own events in FROG. In the first place you have to provide a configuration file. Below a few suggestions for that:
The example configuration file
You can use a prepared example configuration file called
prepare_frog_files.py in Visualisation/Frog_Analyzer/test (the best idea is to modify a copy of this file). You need also your ROOT file with reconstructed events:
cd Visualisation/Frog_Analyzer/test
cp prepare_frog_files.py my_file.py
cd ../scripts
cp your_root_file .
and then you should modify
my_file.py in two ways:
- change the name of ROOT input file (so that they match yours),
- change the specification for alignment geometry (the prepared specification does not need to be compatible with your events).
Of course you can leave the aligment like it is, but you risk that the events will not match the detector planes. However, for the purpose of playing with event display or if you plan to watch only T1 or T2 events, you can proceed with the example alignment.
After that (assuming you are in Visualisation/Frog_Analyzer/scripts directory):
./frogVisualisation.sh ../test/my_file.py
After a short processing, you should be able to see your events and geometry.
Your own configuration file
You can use your own configuration file (or take advantage from these suggested by Leszek Grzanka,
leszek.grzanka@cernNOSPAMPLEASE.ch), however you have to load the
FrogA module:
process.load("Visualisation.Frog_Analyzer.Frog_Analyzer_cfi")
You have to add this line before the definition of config path. Do not forget about adding Frog to the
end of the config path:
process.p = cms.Path(
...
* process.FrogA)
after that:
cd Visualisation/Frog_Analyzer/scripts
cp your_root_file .
./frogVisualisation.sh path_to_your_file.py
After a short processing, you should be able to see your events and geometry.
Online visualisation
Frog has been installed in TOTEM Control Room in the IP5 on a dedicated machine and can perform automatic online visualisation during DAQ. A detailed description on that will be soon available here.
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).