Application
to VELO
1. VELO Residuals
2. Problem & Strategy
3. Internal Alignment
4. Box Alignment
5. Software Description
6. How To Create Misaligned Events ?
7. How To Use The Software ?
Home
Short
Presentation
Mechanical
Constraints
Misalignment
Studies
Alignment
Techniques
Application
to VELO
C++ code
Latest News
Links

Application to the VELO

2. VELO algorithm (Part V)

F. Using the Geometry Framework to misalign the VELO

This part explains how to use the new CondDB framework in order to produce misaligned VELO events. We will use here the simplest method, by overriding alignment conditions. It means that don't need a private copy of the CondDB. To get your copy of the DataBase with modified alignment conditions, refer to Marco Clemencic's CondDB tutorial.

The 'old school' method, now obsolete, to generate misaligned events, is still available here.

So, we are now dealing with software under the hat of LHCb v22r8 and using slc4.

For each of the steps described below the safest way of avoiding clashes of different environments is to work in a clean shell, i.e. login to a new shell as you move from F1 to F2 and so on.

F1. Create the misalignments sets

This is the biggest change compared to the previous version. You now don't have to bother with xml files and so on. You will introduce your misalignments as a simple joboptions file.

Now we will produce 10 different sets of misalignments. They will be simple job options files, named VeloMisalignment_{i}.opts, where {i} represents a running number for the different sets. To do so, a ROOT macro is used. You could download it here.

Your could edit the macro to adjust the misalignment scales for the different components and to set the number of configurations you want. To run the script you then have to do the following:

___________________

1. root
2. .L CreateAlignmentFiles.C
3. create_options_files(10)
___________________

You should now find 10 VeloMisalignment_*.opts files in the current directory.

F2. Produce and simulate (GAUSS v30r3)

Into your working directory, create a subdirectory called /Generation/. In this directory, create 2 subdirectories: /opts/, and /scripts/. Then, download the perl script create_jobs_gauss_v30r3_newCondDB.pl. It will produce an executable script to be sent to the batch system (in /scripts/), and a job options file (in /opts/). All you have to do is to adapt the parameters at the beginning of the file to your needs. In addition, you have to provide an existing directory on CASTOR as $pathout that has two subdirectories called sim and log.

Once all is set, run the script (./create_jobs_gauss_v30r3_newCondDB.pl, and do chmod 755 create_jobs_gauss_v30r3_newCondDB.pl before if it doesn't want to execute).

Now, you need to compile the Gauss executable before sending all that onto the batch queue (it could be also a smart idea to make a small test before that...). Here is what you need to do (assuming you have cmtuser directory):

___________________

1. setenvGauss v30r3
2. getpack Sim/Gauss v30r3
3. cd Sim/Gauss/v30r3/cmt/
4. cmt config
5. source setup.(c)sh
6. gmake
___________________

All you need then is to copy the misalignment options files you have previously generated in the appropriate directory: $GAUSSOPTS/.

You're nearly there but you need to allow the VELO to be misaligned. To do so, modify the options file (in $GAUSSOPTS/ directory) named SimGeometry.opts as follows:

___________________

// Geometry to be simulated Detector by detector
//------------------------------------------------
//Geo.StreamItems += {"/dd/Structure/LHCb/BeforeMagnetRegion/Velo"};
// Uncomment following line to enable misaligneable VELO
#include "$GAUSSOPTS/SimVeloGeometry.opts"
___________________

Once you've done that all is OK, you could make a test using one of the options files you've just generated. If test is satisfying you could send the jobs to the batch, by doing:

___________________

chmod 755 launch_GAUSS.x
./launch_GAUSS.x
___________________

Now you have your 10 .sim files stored on CASTOR, next step is the digitization, in BOOLE.

F3. Digitize (BOOLE v14r4)

It's quite similar than in the previous case, and in fact even simpler, as you don't have to produce the misalignment options files.

Create a directory called /Digitisation/ into your working directory. In this directory, create two subdirectories: /opts/ and /scripts/. Then, download the perl script create_jobs_boole_v14r4_newConDB.pl.pl, open it, and read the comments.

This scripts will produce for you all the necessary info for running BOOLE jobs on LSF batch. You just have to provide the number of runs you want and the number of events per run (should be equal or smaller than the Gauss number/run). Then you have to choose the batch queue in accordance, and to setup the area for data storage correctly (here it's on CASTOR).

Next step, install BOOLE:

___________________

1. setenvBoole v14r4
2. getpack Digi/Boole v14r4
3. cd Digi/Boole/v14r4/cmt/
4. cmt config
5. source setup.(c)sh
6. gmake
___________________

All you need then is to copy the misalignment options files you have used for the Gauss jobs in the appropriate directory: $BOOLEOPTS/.

Then you run the perl script exaclty as in the GAUSS case, and launch the jobs (after making a small test, of course...):

___________________

chmod 755 launch_BOOLE.x
./launch_BOOLE.x
___________________

That's it, now there is just one last step remaining, which is the reconstruction. For a detailed recipe of how to run the alignment software within Brunel have a look at the following section.
Don't hesitate to send an email to Marco or Sebastien if you have questions about the scripts, or if you find bugs and so on... But ask Juan if your problem or question concerns the geometry framework...