C++ code
Latest News

VELO testbeam analysis

A. Running alignment on VETRA

A1. Introduction

This page try to provide an 'up-to-date' tutorial on VELO alignment software utilisation, for ACDC analysis, i.e. under the VETRA environment.

The version presented here is working with Vetra v3r3, i.e. the version containing the emulator.

If you have problems, if you see bugs,... just send me a mail at s.viret@physics.gla.ac.uk.

Good luck...

A2. Get emulated data

This part doesn't require the installation of the alignment software. It will enable you to produce emulated events. This preliminary step is necessary if you want to look at HP1/2/3 events.

The easiest way to get the most up-to-date ACDC software is The easiest way for doing that is to use Malcolm's VeloACDC script:


1. source ~lhcbvelo/scripts/startACDC.csh

This will install you the latest version of the ACDC software (currently v1r4). Then, you only need to get a corrected version of one package (thanks to Tomasz for providing it):


1. cd $CMTPATH
2. getpack Velo/VeloTELL1Algorithms v3r1
3. cp ~virets/public/ACDC/Emulator_Correction/*

The last line requires you to be working on Lxplus. Then you just have to create the Vetra executable and compile the ACDC package:


1. VetraEnv v3r3
2. cd $CMTPATH/Velo/VeloACDC/v1r4/cmt
3. cmt br cmt config
4. source setup.csh
5. cmt br gmake
6. cd $CMTPATH/Velo/Vetra/v3r3/cmt
7. cmt br cmt config
8. source setup.csh
9. cmt br gmake

Logically it should work (if you pray enough...), ie creating the Vetra.exe file. You're now ready to use the emulator...

We will now create the digi file which will contain the data we will use for our analysis (alignment, tracking,...):


1. cd $VELOACDCROOT/job/runVetra.csh ACDC* HP* $FILENAME

where ACDC* is ACDC2 or ACDC3, HP* the Happy Pion configuration you want to look at, and $FILENAME the name of the file you want to reprocess (e.g. 4deg_NominalHV_AfterMoving_NominalBeam_***.mdf). ACDC3 configurations are presented on the following figure:

1. ACDC3 Happy Pion Configurations.

This should create a digi file containing the corresponding emulated ZS data. This is the file you could then use for your analysis. In next section we give the example of alignment.

But before going further, here are some files that contains different datasets (usually you will have to reprocess a lot of files, but it's relatively easy to modify the script in order to take a bunch of files instead of a unique filename):


1. HP3 4deg tracks
2. HP3 8deg tracks
3. HP3 straight tracks
4. HP4 straight tracks
5. HP1 inner target run
6. HP1 interaction trigger (air)
7. HP1 interaction trigger (vacuum)

All these reprocessed events (and few others) are available on my CERN CASTOR area: /castor/cern.ch/user/v/virets/ACDC3_reprocessing.

A3. Alignment on emulated testbeam data

In order to run the Vetra alignment job on Zero-Suppressed emulated data, you first have to install the alignment software:


1. cd $CMTPATH
2. getpack Alignment/AlignmentTools v2r5
2. getpack Alignment/VeloAlignment v2r4
3. cp ~virets/public/ACDC/TrackStore_for_ACDC.cpp

Last line is just due to the fact that the normal package is for DC06, whereas in ACDC we are running on an other geometry. Then, edit the requirements file:


1. cd $CMTPATH/Velo/Vetra/v3r3/cmt
2. edit the requirements file.
3. add the line 'use VeloAlignment v* Alignment' .

Then you could create the executable, using the same commands than in the emulator part. It should create the Vetra.exe file. Then, just download the few following files: ACDC_alignment_opts.zip, runVetra_alignment.csh. Then:


1. unzip ACDC_alignment_opts.zip
2. mv VetraZS*.opts $VELOACDCOPTS

You're now ready to align, you just have to use the script you've just dowloaded:


./runVetra_alignment.csh ACDC* HP* filename

where ACDC* could be ACDC2 or 3, and HP* one of the ACDC3 famous Happy Pion configuration (HP1, 2, 3, or 4, you have to uncomment the corresponding configuration in the file VeloAlign.opts of the alignment package), and filename the digi (for emulated or MC) or mdf (for real data) file name ( in this version you have change the name in VetraZS_alignment.opts yourself, but this is straightforward to improve...). For ACDC2 you don't need to type anything.

It should be enough to run the code. You should then start to understand what you are doing, it means that you should read the previous pages on how work the software.

In particular, as you are using the default version of VeloACDC, the alignment condition file you use is the correct one (ie with alignment constants). To run into perfect geometry (it's more interesting if you are aligning...), use alignment.xml into the conditions file (which is the file corresponding to $CONDITIONS_PATH).

A4. On testbeam MC (assuming you have produced your ACDC digifile)

Just comment the two las lines of the option file VetraZS_alignment_reprocessed.opts, and run normally with the commands described before.

A5. Analyze the results

When your job is finished, you should end up with 2 root files : Align.root and Residuals_ZS_HP*.root.

The second file is the usual one, you could analyze it via the VELOACDC macros, akBeamspot.C for track residuals, and vertexPlots.C for the vertices.

In the first file you will find all the informations relevant to our alignment job. To analyze it, use the ROOT macro named Alignment_analysis.C. This macro contains 3 methods:


root [0] .L Alignment_analysis.C
root [1] spacepoints("Align.root",n)

will provide you the spacepoints residuals plots (see Velo ACDC alignment results for an example). n is the configuration number.


root [0] .L Alignment_analysis.C
root [1] create_XML("Align.root","***")

will create the file alignment_***.xml that you will put in $VELOACDC/xml/DDDB/Conditions/Velo, in order to run with the alignment taken into account (don't forget to point to this alignment file into the conditions***.xml file).


root [0] .L Alignment_analysis.C
root [1] compare_constants("Align.root","Other_align.root")

will make a comparison of the constants for two alignment files (useful to compare results in air and vacuum for example).

Feel free to improve this macro if you want, and forward me the modifications in order for me to update the page.