First big commit of the mchview program and its accompanying library,
[u/mrichter/AliRoot.git] / MUON / READMEmchview.txt
CommitLineData
0145e89a 1// $Id$
2
3/*! \page README_mchview Tracker visualisation program
4
5A visualisation program, mchview, is now available to display, in two dimensions
6 (3D visu being done within the EVE framework), the tracker chambers.
7
8\section mchview_install Installing the program
9
10mchview should be installed together with the rest of AliRoot. Two points should be noted though.
11 mchview is using two external files to run properly. One is a resource file $HOME/.mchviewrc, used
12 to "configure" the program and keep some history of the user interaction with it (e.g. the list of recent
13 data sources used). The other one is a Root file, padstore.root (default name, can be changed with the resource file),
14 which contains lots of precomputed information (like the contours that are being displayed, the geometry transformations,
15 etc...). By default, mchview will look for this file in the current directory. If it's not there, it will
16 ask if it's OK to create it. Be warned that this will take a while (but is only done once).
17 If you install a new version of mchview, it is recommended to delete this file first, before lauching mchview again.
18
19\section mchview_navigation Navigating the display
20
21When starting mchview (and after the padstore.root file has been created for the first time),
22you'll be presented with two tabs. The first one allow to navigate within the detector, and the
23second one to select data sources to be displayed.
24The first tab offers a global view of the 10 tracking chambers. On the right you'll see
25 a color palette (used in the display of data sources, see later). On the top (from left to right) are
26 navigation buttons (backward and forward), and radio buttons to select the kind of view you'd like : you can
27 view things for a given cathode or for a given plane. Note that in some instances those buttons maybe inactive.
28On the bottom are three groups of radio buttons, labelled "responder", "outline" and "plot", followed by data source buttons (see later) :
29 Each group will contain a number of buttons corresponding to different view levels of the detector (e.g. detection element, manu, buspatch, etc...).
30 In mchview jargon, what is displayed on screen is called a "painter". The meaning of responder, outline and plot is as follow :
31
32 - responder (only one selected at a time) is the type of painter that responds to mouse events. When you mouse over responder painters, they'll
33 be highlighted (bold yellow line around them), and some information about them will be displayed in the top right corner.
34 If you click on a responder painter, a new view will open to show only this painter. If you meta-click (button2 on a mouse, or alt-click on a Mac for instance)
35 on a responder painter, a new view will open, showing the clicked painter and its "dual" (the other cathode or other plane, depending on how the first one
36 was defined).
37
38 - outline (multiple selection possible) indicates which painter(s) should be outlined. When starting the program, only manus are outlined, but you
39 can outline the detection elements, the chambers, etc...
40
41 - plot (see later about plotting and data sources) indicates at which level you want to see the data.
42
43On the bottom left is a group button used to select which data source should be displayed (empty until you select a data source, see next section).
44Next to it will be a list of buttons to select exactly what to plot from a data source (once you've selected a data source only).
45
46Note that whenever you click on a painter and get a new view, you get use the navigation buttons (top left) to go forward and backward, as in
47a web browser for instance. Note also that the mchview menu bar contains a "History" menu where you can see (and pick a view) all the views that were opened.
48
49Even before selecting something to plot, at this stage you could use the program to familiarize yourself with the detector structure (aka mapping).
50
51\section mchview_datasource Specifying the data source
52
53The second tab of the mchview allows to select one or several data sources.
54Each data source, in turn, will provide one or more "things" to be plotted.
55The number of "things" actually depends on the data source.
56For instance, a raw data source will allow to plot the mean and the sigma of the pad charges.
57
58Be warned that this part of the program is likely to evolve, as you'll for sure notice that the interface is quite crude for the moment.
59
60From top to bottom, you'll see group of frames used to :
61
62- select from a list of recently used source
63
64- select a raw data source (either by typing in its full pathname, or opening a file dialog). The second text field in this group is to specify the
65location of the OCDB to be used (if any). If that field is not empty (and the corresponding entry is correct, of course), the raw data will be calibrated.
66
67- select an OCDB data source (pedestals, gains, capacitances)
68
69In all the frames, once you've selected or entered the needed information, you'll click on the "Create data source" button,
70and a new data source line will appear in the bottom of that tab (and in also in the first tab, that data source will now
71be selectable for plotting). Each data source line indicates the short name of the data source, the full path, and a list of buttons to run, stop, rewind and
72remove. Run/Stop/Rewind is only selectable for data sources where the notion of event means something (e.g. for pedestals it won't).
73
74Note that all the file paths can be local ones or alien ones, if you have a correctly installed alien, and you use a short wrapped to call the mchview program.
75For instance :
76
77alias mchl $HOME/mchview.alien
78
79where mchview.alien is a little script :
80
81#!/bin/sh
82
83test=`alien-token-info | grep -c expired`
84
85if [ $test -gt 0 ]; then
86 echo "Token expired. Getting a new token"
87 alien-token-destroy
88 alien-token-init
89elif [ ! -e /tmp/gclient_env_$UID ]; then
90 echo "Getting a token"
91 alien-token-init
92fi
93
94if [ ! -e /tmp/gclient_env_$UID ]; then
95 echo "No token. Exiting"
96 exit
97fi
98
99source /tmp/gclient_env_$UID
100
101export alien_API_USER=youralienuserid # only needed if different from your local username
102
103mchview $*
104
105---------
106
107IMPORTANT WARNINGS
108
109The remove button is currently not working...
110
111In principle, you could have several raw data sources running at the same time. This is NOT currently working. You can have several data sources opened
112 at the same time, but not running at the same time. (this has to do with AliRawReader not being thread-safe for the moment).
113
114Once you have one or more data sources added, you can go back to first tab and start looking at the data ;-)
115
116*/