Difference: VeloDataMonitor (7 vs. 8)

Revision 82006-07-18 - ArasPapadelis

Line: 1 to 1
 
META TOPICPARENT name="VELOSoftware"
Changed:
<
<

The VeloDataMonitor packages

>
>

The VeloDataMonitor packages

 
Line: 9 to 9
  Material from the Software training day on 27/6-2006 can be found here.
Changed:
<
<
The VeloDataMonitor packages consists of VeloTrackDataMonitor and VeloClusterDataMonitor. They are not real time monitoring algorithms but require input from a data file.
>
>
The VeloDataMonitor packages consists of VeloTrackDataMonitor and VeloClusterDataMonitor. They are not real time monitoring algorithms but require input from a data file.
 
Changed:
<
<
  • VeloClusterDataMonitor produces histograms from the zero-suppressed cluster bank.
>
>
 
Changed:
<
<
  • VeloTrackDataMonitor produces histograms using Tracks from the Velo pattern recognition.
>
>
 
Changed:
<
<
Since the packages use the zero-suppressed buffer they are not suited for studying noise levels, pedestals, common mode correction, FIR corrections etc.
>
>
Since the packages use the zero-suppressed buffer they are not suited for studying noise levels, pedestals, common mode correction, FIR corrections etc. For that kind of monitoring the package VeloDataFullMonitor is needed.
 These packages are primarily intended for use during the VELO testbeam and commissioning phase.
Deleted:
<
<
 

Installation

Changed:
<
<
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 (choose the latest version, 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
    > make
  5. If everything is OK, the program should now compile without complaints. You have installed VeloClusterDataMonitor! Before you can repeat this procedure for VeloTrackDataMonitor you also need to execute this step:
    >RecEnv
>
>
The installation procedure is identical for the two packages. Let's install VeloClustersDataMonitor:
 
Added:
>
>
  1. Go to your cmt directory
    > cd ~/cmtuser
  2. Set the LHCb environment
    > LHCbEnv (choose the latest version, 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
    > make
  5. If everything is OK, the program should now compile without complaints. You have installed VeloClusterDataMonitor! Before you can repeat this procedure for VeloTrackDataMonitor you also need to execute this step:
    >RecEnv
 

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.
Changed:
<
<
  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
>
>
  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)
Changed:
<
<
  1. 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)
    > make
  2. Brunel will now recompile with VeloClusterDataMonitor (and VeloTrackDataMonitor if you added it in step 3)
  3. If everything works you can now put this monitoring options file in your options directory, and include it from your main options file.
>
>
  1. 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)
    > make
  2. Brunel will now recompile with VeloClusterDataMonitor (and VeloTrackDataMonitor if you added it in step 3)
  3. If everything works you can now put this https://uimon.cern.ch/twiki/pub/LHCb/VeloDataMonitor/VeloDataMonitor.opts 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!
Line: 59 to 57
 

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).
Changed:
<
<
  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.
>
>
  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:
Changed:
<
<
>
>
  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.
Line: 72 to 70
 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):

Changed:
<
<
 > root 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:
Changed:
<
<
 > _file0.cd("/VeloClusterDataMonitor")
>
>
 > _file0.cd("/VeloClusterDataMonitor")
 The histogram ClusterSizeVsSensor contains what we need. You can find it with the .ls command:
Changed:
<
<
 > .ls *Size*
You will now see something like:

>
>
 > .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:
Changed:
<
<
 > ClusterSizeVsSensor.Draw()
>
>
 > ClusterSizeVsSensor.Draw()
 
Changed:
<
<
a.gif
>
>
a.gif
  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:

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

Changed:
<
<
> proj.Draw()
>
>
> proj.Draw()
 
Changed:
<
<
clustersize.gif
>
>
clustersize.gif
  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:
Changed:
<
<
 > proj.GetMean()

>
>
 > proj.GetMean()

 

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


Changed:
<
<
> file0.cd("/VeloTrackDataMonitor")
>
>
> file0.cd("/VeloTrackDataMonitor")
 

This concludes this little tutorial.

Line: 128 to 136
 

Adding your own histograms and hacking the code

If you aren't happy with the standard set of histograms it's very easy for you to add your own custom histograms or custom hacks to the monitoring source code. If we use VeloClusterDataMonitor as an example, you need to go to the src directory of Velo/VeloClusterDataMonitor and edit the files VeloClusterDataMonitor.cpp and VeloClusterDataMonitor.h.
Changed:
<
<
The VeloClusterDataMonitor class is derived from the GaudiTupleAlg class, which provides an interface for creating histograms and ntuples. Here's how to fill a histogram:
>
>
The VeloClusterDataMonitor class is derived from the GaudiTupleAlg class, which provides an interface for creating histograms and ntuples. Here's how to fill a histogram:
 
plot1D(value, histogram name, histogram title, xlow, xhigh, xbins, weight)
Changed:
<
<
plot2D(x-value, y-value, histgram name, histogram title, xlow, xhigh, ylow, yhigh, xbins, ybins) and a 3D histogram using the LHCb coordinate system:

>
>
plot2D(x-value, y-value, histgram name, histogram title, xlow, xhigh, ylow, yhigh, xbins, ybins) and a 3D histogram using the LHCb coordinate system:

 plot3D(z-value,x-value,y-value, ...fill in yourself...)
Line: 153 to 160
  -- Aras Papadelis - 29 May 2006

Changed:
<
<

META FILEATTACHMENT attr="" comment="" date="1147968130" name="VeloDataMonitor.opts" path="VeloDataMonitor.opts" size="1101" user="arasp" version="1.1"
META FILEATTACHMENT attr="h" comment="TBrowser example" date="1148918553" name="TBrowser.jpg" path="TBrowser.jpg" size="76919" user="arasp" version="1.2"
META FILEATTACHMENT attr="h" comment="" date="1148920643" name="a.gif" path="a.gif" size="8310" user="arasp" version="1.1"
META FILEATTACHMENT attr="h" comment="Cluster size" date="1148921229" name="clustersize.gif" path="clustersize.gif" size="6439" user="arasp" version="1.1"
>
>
META FILEATTACHMENT attr="h" autoattached="1" comment="Cluster size" date="1148921229" name="clustersize.gif" path="clustersize.gif" size="6439" user="arasp" version="1.1"
META FILEATTACHMENT attr="h" autoattached="1" comment="TBrowser example" date="1148918554" name="TBrowser.jpg" path="TBrowser.jpg" size="76919" user="arasp" version="1.2"
META FILEATTACHMENT attr="h" autoattached="1" comment="" date="1148920644" name="a.gif" path="a.gif" size="8310" user="arasp" version="1.1"
META FILEATTACHMENT attr="" autoattached="1" comment="" date="1147968131" name="VeloDataMonitor.opts" path="VeloDataMonitor.opts" size="1101" user="arasp" version="1.1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback