TWiki> LHCb Web>LHCbVELO>VELOSoftware>VeloDataMonitor (revision 2)EditAttachPDF

The VeloDataMonitor packages

The VeloDataMonitor packages consists of VeloTrackDataMonitor and VeloClusterDataMonitor. They are not real time monitoring algorithms but require input from a data file.

  • VeloClusterDataMonitor produces histograms from the zero-suppressed cluster bank.

  • VeloTrackDataMonitor produces histograms using Tracks from the Velo pattern recognition.

Since the packages use the zero-suppressed buffer they are not suited for studying noise levels, pedestals, common mode correction, FIR corrections etc.
These packages are primarily intended for use during the VELO testbeam and commissioning phase.


The installation procedure is identical for the two packages. Let's install VeloClustersDataMonitor:

  1. Go to your cmt directory
    cd ~/cmtuser
  2. Set the LHCb environment
    LHCbEnv v20r0 (or whatever version you prefer)
  3. Get the latest version from CVS:
    getpack Velo/VeloClusterDataMonitor (select the head version for the latest)
  4. Compile your new package:
    cd Velo/VeloClusterDataMonitor/v*/cmt
    cmt config
    source setup.csh
    5. If everything is OK, the program should now compile without complaints. You have installed VeloClusterDataMonitor! Do the same for VeloTrackDataMonitor.

Running from Brunel

OK, now we want to run the algorithm from somewhere, for example Brunel or Vetra. I will use Brunel in this example. I assume that you have Brunel installed.
  1. Make sure that the Brunel environment is set using BrunelEnv.
  2. Edit the Brunel requirements file:
    cd $BRUNELROOT/cmt
    emacs requirements
  3. Add the line
    use VeloClusterDataMonitor v* Velo -no_auto_imports (add a second line with VeloTrackDataMonitor if you want to install that too)
  4. Save the file, exit the editor and type
    source setup.csh (if you don't get any error messages here that means you're doing just fine)
  5. Brunel will now recompile with VeloClusterDataMonitor (and VeloTrackDataMonitor if you added it in step 3)
  6. If everything works you can now put this monitoring options file in your options directory, and include it from your main options file.

You should now be able to run VeloDataMonitor from Brunel!

Using the packages

The VeloDataMonitor packages will produce a lot of histograms. If you are running with a full VELO detector, expect at least a couple of hundred of them. If you are interested in studying the data on an event by event basis the cluster information can be written to a ntuple by simply setting an option in the VeloClusterDataMonitor options file (No ntuple output is implemented for the track information at this point but if anyone wants it I can add it easily /Aras P).

  1. Let's start by simply running Brunel with the monitoring package and the default settings. At the end of the run, Brunel will produce a root file. Open it.
  2. Open a TBrowser (with TBrowser a for example) and open the file. If everything worked properly you should see the directories VeloClusterDataMonitor and VeloTrackDataMonitor in the file. If you don't have VeloTrackDataMonitor in the file it is probably because no tracks where found in the run.

If you turn on the "Detailed" view you will see a description to each histogram. The histogram descriptions are hopefully self explanatory. Here's an example:

There are many, many histograms here... too many to cover here. One that can be handy to know about is nEvents, which contains as many entries as the number of events that were processed.

A brief root example

It is not the intention of this article to explain root, but here's a very short beginners example of how to find out what the cluster size distribution looks like for a certain sensor, without using the browser.

Start root with the file (in this example Beam.root):
root Beam.root When root starts there will be a pointer created for you that points to the open file. It's default name is _file0.
Now we have to go to the VeloClusterDataMonitor directory:"/VeloClusterDataMonitor")
The histogram ClusterSizeVsSensor contains what we need. You can find it with the .ls command:
.ls *Size*
You will now see something like:
TDirectory*     VeloClusterDataMonitor  VeloClusterDataMonitor
 KEY: TH1D      ClusterSize;1   Number of Strips per Cluster
 KEY: TH2D      ClusterSizeVsSensor;1   Number of Strips per Cluster vs Sensor
Try to draw ClusterSizeVsSensor:


As you see, this is a 2D histogram where the cluster size is plotted verses the sensor number. To see the cluster size distribution for sensor 7 we need to project the contents of bin 8 (sensor number + 1 since root counts the bins starting from 1) on y-axis:

will do the trick. You now have a new 1D histogram called proj that contains the Y-projection of ClusterSizeVsSensor, bin 8. Draw it:


From this we learn that a majority of the clusters in sensor 7 consist of 1 strip. Actually, the average cluster size can be obtained with:


If you want to have a look in the histograms created by the track monitor you can change directory again with:"/VeloTrackDataMonitor")

This concludes this little tutorial.

The options files

By changing the options files you can control the output of VeloDataMonitor. By turning off the output of some histograms and the ntuple you can gain speed. In VeloClusterDataMonitor.opts you can change the following:

VeloClusterDataMonitor.OutputNtuple Turns on/off the output of a ntuple
VeloClusterDataMonitor.OccupancyHistos Turns on/off the average clusters occupancy histos (one histogram per sensor)
VeloClusterDataMonitor.MultiplicityHistos Turns on/off the average cluster multiplicity histos (one histogram per sensor)
VeloClusterDataMonitor.UserHistos Turns on/off any histograms added by the user to to the UserHistos area in the VeloClusterDataMonitor.cpp source code

In VeloTrackDataMonitor.opts you can change the following

VeloTrackDataMonitor.EventDisplay Turns on/off the 3D "event display" histos and the XY hitmap histos.
VeloTrackDataMonitor.SelectedEvent 1= Selects which event will be plotted in the "selected" 3D event display histogram.
VeloTrackDataMonitor.ExtrapResidHistos Turns on/off a lot of histograms dealing with residuals between track sensor intercept points and clusters locations.
VeloTrackDataMonitor.UserHistos Same as for VeloClusterDataMonitor.opts
VeloTrackDataMonitor.TrackLocation ="Rec/Track/Velo" Sets the location of the track container, in case you want to use different tracks for any reason.

More documentation on how to use the monitoring will come soon.

-- Main.arasp - 18 May 2006

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatopts VeloDataMonitor.opts r1 manage 1.1 K 2006-05-18 - 18:02 ArasPapadelis  
Edit | Attach | Watch | Print version | History: r11 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2006-05-29 - ArasPapadelis
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback