Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Once you have the binary file, millepede is ready run from the hps-mille directory. This directory is setup downloading the Millepede software by github using the following commandRemember to compile the fortran sources of the MillepedeII software. It comes with the git bundle (or you can download it from https://www.wiki.terascale.de/index.php/Millepede_II) but you have to compile it in your system beforehand (note: with gfortran you might have to slightly modify the Makefile by hand, because the code version is frozen and not aligned anymore to more modern gfortran versions/libraries).
  2. To run millepede use the following commands:
    • cd hps-mille
    • ./runMP.py -i../hps-gbl/milleBinaryISN.dat -M NAMES
    where NAMES is a list of parameters coded via the following regexp: L(1-6)[AS]?[hs]?[tb]_([tr])([uvw]) having the following meaning:
    1. 1-6: layer number
    2. A: axial, S: stereo
    3. h: hole, s: slot
    4. t: top, b:bottom
    5. _t: translation, _r: rotation
    6. u, v, w: coordinates on the sensor reference system
    if some of the parameters preceded by "?" are omitted, both the choices are selected
    Millepede produces as output, among several files, the millepede.res file which contains the corrections found by Millepede for the floated parameters.
    To keep track of the subsequent iterations, it is wiser to store them file that can be read automatically by the runMP.py procedure. The file is called floatoptions.py and it contains a series of "options", each of them containing a list of sensors to be floated in the same or multiple iterations, coded following the regexp pattern described above. The user can add as many options as needed, ordering them by consecutive numbers which are then used to label a "switch number" used to select the needed option upon running the procedure. The corresponding command to be issued is:
    • ./runMP_batch.py --run --files milleBinaryISN.dat -s switchNumber -b
    The output file will be labeled with the title string provided in the option definition and the sequence of desired floating operations (keep it simple because when its gets too long -usually for several iterations in one go or multiple sensor floatings- the procedure breaks). Usually a run with Millepede takes some minutes on about 1M tracks, with a reasonable amount of floated parameters, so it is not a time consuming step.
    Note on binary input files. Millepede can run on multiple input files, but they will be processed one at a time (and the result will be provided separately for each one), which in general is not what you want when you intend to feed it with cumulated statistics (keep in mind that it can only process 1.5M tracks in total, so keep under control the size of your samples). What you need to do, for instance when you want to provide a mixed sample of curved+straight tracks, is to use a single input file which merges several other partial binary files. To produce it you just need to concatenate the single files, like:
    • cat mille_straight1.dat mille_curved1.dat mille_straight2.dat ... > mille_mixed.dat
    When merging curved and straight track sets together, try to sort them evenly in order to get an homogeneous composition of the final sample.  

...

That's it! If you got to this point, either you already find a perfect alignment or you are ready to restart the full procedure from point 1 of the list at the beginning of this section, for an uncountable number of iterations.

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Note on beam spot integration in Millepede

BEWARE: not recommended for beginners: at your risk! note that the procedure for the moment being does not provide satisfactory results, so this paragraph is kept for reference purpose mainly)

If you want to integrate the beam spot information in Millepede, which means to include two fictitious sensors whose center coordinates have to be adjusted to make tracks from the top and bottom halves converge to the same point, you have to provide the (provisional) target coordinates and their geometry frame since the beginning of the procedure. Therefore you need to:

  • include in the steering lcsim file the information for the beam spot (which you will modify in the following iterations by hand) providing the following parameters in GblOutputDriver<beamspotScatAngle>0.005</beamspotScatAngle>
    <beamspotWidthZ>0.05</beamspotWidthZ>
    <beamspotWidthY>0.2</beamspotWidthY>
    <beamspotTiltZOverY>0.26</beamspotTiltZOverY>
    <beamspotPosition>0.0 -0.11 -0.05</beamspotPosition>
    where you will need to modify the coordinates of the beam spot position (and widths)in subsequent iterations. These are the default values introduced for alignment version 4.4 optimized   on 2015 curved tracks. Moreover, you need to activate the inclusion of the beamspot adding the line 
    <addBeamspot>true</addBeamspot>
    By default, the beam spot coordinates are not added and the reconstruction assumes it to be located in (0,0,0). With this add-on the beam spot coordinates and track parameters at the additional 0-layers are added in the out.gbl ascii file, for further processing by gbltst-hps.py.
  • include the --beamspot flag upon running the gbltst-hps.py script to extract the "layer 0" information from the gbl ascii file
  • activate the implementation of the beam spot when running Millepede: this is done using the flag --BSC (which imposes constraints in pairs between the top and bottom degrees of freedom for the additional zero layers). You can also introduce the --SC flag to constrain parameters within a 50 microns precision (this can be done even without introducing the beam spot). In the floatoptions.py file, or in the list of parameters to be floated you can provide by hand, you can introduce L0t and L0b layers (axial and stereo), with the desired directions to be floated. The Millepede id's for each of the 0-layers are the following:
    • top:
      • u translations: 11198: L0t stereo, 11199: L0t axial
      • v translations: 11298: L0t stereo, 11299: L0t axial
      • w translations: 11398: L0t stereo, 11399: L0t axial
    • bottom:
      • u translations: 21198: L0b axial, 21199: L0b stereo
      • v translations: 21298: L0b axial, 21299: L0b stereo
      • w translations: 21398: L0b axial, 21399: L0b stereo
    Rotations for 0-layers can be dropped as not meaningful.
  • Millepede writes in the .res file the offsets found for these new layers, but you cannot produce a new geometry out of them: that is, they cannot be read by the buildCompact.py procedure that produces the new geometry including the MP offsets, which can include information about the physical layers only. Therefore you need to translate the obtained information, which is in the 0-sensor reference system, to the tracking reference system, in which the beam spot coordinates introduced in the .lcsim file are defined. To do this, you should beforehand perform the proper reference system transformation from 0-layers reference system to the tracking one. As an approximation, however, the information from the impact parameters can be exploited. To do this:
    • prepare a new geometry with the modified parameters (all floated layers BUT layer-0)
    • re-run reconstruction with previous beamspot, get the mean value and sigmas of the d0 and z0 distributions produced after running the gbltst-hps.py script, and use the mean value between top and bottom (half sum with signs) as new input beam spot coordinates in the lcsim steering file. Remember that in the tracking system <d0> corresponds approximately to beamspotPosition_y, and <z0> to beamspotPosition_z (while beamspotPosition_x=0).
    • introduce the new beam spot coordinates in the .lcsim file and repeat the procedure until a reasonable convergence is found (it may take very long).