The VeloDataMonitor package + a simple analysis example.

As of Vetra v5r1 the noise and pedestal monitoring of VeloFullDataMonitor becomes obsolete and the package VeloDataMonitor should be used instead. Here's a short explanation of the package and an example of how to use it!

How it works

As a user will encounter the algorithms located in $VELODATAMONITORROOT/src. To find the names of all the options I recommend that you have a look in the source files (.cpp). I'll just explain the features here. The algorithms are:

  • PrintODINBank - for printing the information in the ODIN bank. The user can switch extended printing on/off and set how often the bank contents should be printed. No plots.
  • CableTest - algorithm that is customised to work with the special cable test test pulse pattern. Look in source file for documentation.
  • NoiseMon - algorithm that produces the noise plots for different stages in the TELL1 emulation process at every N:th event. The user can set which containers to plot (default is all), which TELL1s to plot (default is all), and how often the histogram should be updated. If you don't see any plots try setting the update frequency to a low number, like 1000. If you are using the algorithm with the online monitoring system this number should be higher.
  • FeedNoise - algorithm provides the noise calculator tools with the ADC values. The user can set which containers and TELL1s to monitor (default is all).
  • ADCMon - algorithm that produces profile+2D histograms of the ADC values at different stages of the emulation for all TELL1s . 2D histograms are memory consuming and are turned off by default. The user can set which containers to monitor and which TELL1s (default is all). There is also an option to split the 2D histograms into even and odd events, which is handy when looking at testpulses.
  • PedMon - algorithm that plots the pedestal bank from the TELL1 emulation, for the chosen TELL1s (all by default).
Behind the scenes there are a few more important classes in action:
  • Velo/VeloTELL1Tools/NoiseEvaluator - the tool that calculates the noise. By default it it a simple running RMS calculation but it can also operate in "noise following" mode which makes sure that the noise values are always updated. To turn on noise following, the Reset option has to set to a value N > 0, where N is the typical number of events in which a variation of noise could be detected. So, if you expect the noise to change on an hourly basis this number should be of the same size as the number of NZS events you collect in an hour. To remove signal strips from the noise evaluation the user can set an S/N cut (option Sigma). These options have to be passed through the FeedNoise algorithm in order to work: FeedNoise.NoiseEvaluator.Sigma = 5;
  • Velo/VetraKernel/TELL1Noise - the container class for the noise values. Each channel of each TELL1 is saved as an StatEntity object (a Gaudi class for counters with statistical information).


If you have worked with the LHCb software you know that things tend to change constantly as bugs are fixed and "improvements" are made. Often there will be bug patches the same day as a new version is released... Our Vetra is no exception. I suggest that before installing Vetra check with Tomasz Szumlak if you need to get any patches.
At the time of writing (Feb 6. 2008) you need to check out the following versions of the packages:

  • Velo/Vetra head
  • Velo/VeloDataMonitor head
  • Velo/VetraKernel head
  • Event/VeloEvent head
To make things more complicated you have to copy VeloTELL1Data.xml to your $User_release_area/Vetra_v5r1/Event/VeloEvent/v16r2/xml directory. The file can be downloaded with this link (you have to right-click and select "Save as").

The job options

Noise and pedestal plots
The options file VetraNZS.opts in $VETRAROOT/options is a template for how to run an analysis with plenty of examples. It calls $VELODATAMONITORROOT/options/VeloDataMonitor.opts which contains the calls to the low level monitoring. Here you find examples of how to turn on/off monitoring of TELL1s and ADC containers. An important thing to mention is that the monitoring won't start until the TELL1 emulator pedestal follower has converged. That means that if you want to study the noise in 5000 events, you need 5000 + N events in your run where N = the convergence limit.
The alias "vetraNZS" will run Vetra with this options file.
To run the cable test, use the options file $VETRAROOT/options/CableTest.opts. The alias "cabletest" will execute Vetra with this options file.
The conditions database
Sometimes we need to override the default conditions in the CondDb/ConfDb. The simplest modification of the conditions database is demonstrated in $VETRAROOT/options/VetraNZS.opts where the default database is called (from DC06.opts) and the TELL1 to sensor mapping is overridden by calling "CommissioningConditions.opts", which contains the TELL1 IDs for all the TELL1s in pit. At the moment of writing (Feb 2008) the mapping to sensors is still arbitrary. The important thing in this case is that all the TELL1s in the data are represented in the database.

To run over ACDC3 test beam HP4 data there is an options filled called "TELL1ToSensorConditions_HP4.opts" which contains the correct mapping for HP4.

Simple example

Now we're ready to analyse some data.
  1. Open $VETRAROOT/options/VetraNZS.opts and specify your input file. There are two default files to choose from, depending on if you are on lxplus or on the online network (does not work on the online gateway).
  2. Go to your preferred job directory (for example $VETRAROOT/job) and run
    Vetra.exe ../options/VetraNZS.opts
  3. If everything goes according to plans, Vetra should now process 10000 events from the uniformity test, with TELL1 201. The first 4000 events are used to calculate the pedestal and the subsequent 6000 events are used for the plots. The default output is located in /tmp/$USER/myRootFile.root
  4. Open the output file in Root and examine it in a TBrowser. Navigate to the directory Vetra. There you will see three directories: Noise, ADCMon and PedestalMon. Click around and you will find histograms of pedestals, ADC values and noise. Note the directory structure!
  5. To display the histograms properly you need to set the DrawOption to "hist". This can be done in two ways:
    1. From the command line: histogram->Draw("hist")
    2. From the TBrowser: Draw the histogram, then right click on the histogram and select "SetDrawOption" in the context menu. Enter "hist" in the box that comes up.
  6. There is a simple script to plot the pedestals and noise before and after CM-suppression. It's located in $VETRAROOT/macros/ To start it:
    > python -i $VETRAROOT/macros/
    [Python starts]
    >>> SensorSnapshot("/tmp/$USER/myRootFile.root",201) <---- first argument is the root file, second is the TELL1 number.

    The macro will now produce two canvases and the macro asks you if you save them. They should look something like this: (two pages).

Good luck!

Error messages you might see...

  • If you see the error message:
    PrepareVeloFull... ERROR PrepareVeloFullRawBuffer:: ==> Data stream corrupted! StatusCode=FAILURE

    don't be too alarmed. This means that no ODIN bank was found in the data. If you don't expect an ODIN bank to be in the data everything is fine.

  • If you are on the online network and can't access data on /data/velo/... make sure that you are NOT running on the gateway computer (gw01) but on plus01 for example.
  • If you see a lot of this at the end of you run:

    RootHistSvc ERROR Error while creating persistent Histogram:/stat
    RootHistSvc ERROR Error while creating persistent Histogram:/stat
    RConverter ERROR Failed to create persistent Object!

    it means that the root file you are writing to cannot be opened. Check your path and permissions.

ArasPapadelis - 6 Feb. 2008

Topic attachments
I Attachment History Action Size Date Who Comment
XMLxml VeloTELL1Data.xml r1 manage 9.4 K 2008-02-06 - 14:50 ArasPapadelis Temporary replacement for VeloTELL1Data.xml
Postscriptps r1 manage 101.2 K 2008-02-06 - 16:18 ArasPapadelis  
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2008-02-25 - 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-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback