Versions Compared

Key

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

...

  1. Include GblOutputDriver in your steering file and add the following options to GblRefitterDriver:
    1. <driver name="GBLOutputDriver"/>
    2. <driver name="GBLOutputDriver" type="org.hps.recon.tracking.gbl.GBLOutputDriver">
    3. <driver name="GBLRefitterDriver" type="org.hps.recon.tracking.gbl.GBLRefitterDriver">

              <storeTrackStates>true</storeTrackStates>

               <writeMilleBinary>true</writeMilleBinary>

                <milleBinaryFileName>millepedeData.bin</milleBinaryFileName>

       </driver>

    in this way the output binary file to be read by Millepede will be called millepedeData.bin. A further root ouput file, named after -Doutputfile (outputfile.root, the default being GBLplots_ali.root) will be produced, containing residuals and several distributions to be analyzed to judge the alignment quality. See point 3.
  2. Check that at the end of reconstruction the files millepedeData.bin and outputFile.root (GBLplots.root) are produced._aliTo check the quality of the alignment/geometry studying residuals, kinks, pulls and several other useful distributions. A set of useful root macros can be found in github https://github.com/afilippi67/DataQualityMacros: the relevant suite to analyze the new histograms (which have different namings as compared to the "old" procedure) is in branch root6_newReco (the branch root6 is for the "old" procedure) for 2015/2016 geometry configuration, in branch alignment2019 for 2019 setup (one more layer). In the git bundle you can find a README file with some indications about how to run the macros, and what they do. Note that some histograms, if compared to "old" procedure, can be missing (in particular, those related to track momenta corrections or output helix parameters).
    Note on histogram file naming: the macros are set to extract a proper tag label for the output file from the input file name. Therefore should be renamed, before running the macros, as something like myDirectory/filename_whatever.root : the The tag name is taken as all characters between "/" and "_" (so both the characters are mandatory in the filename), they should be renamed properly if the underscore is missing (due to a change in the default name, from in the steering file). 

Running Millepede

  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.
  3. Note on binary input files. 
    1. Millepede can run on multiple input files and they should be processed all together and concatenated properly. This has been tested with the latest available MPII which is present already in this fork of hps-mille:https://github.com/pbutti/hps-mille  (will be harmonized with Alessandra's and Per's repos soon). runMP.py has an option (-l) to give a listfile containing the path to all the millepede binary files in order to run on all of them at the same time. 
    2. An equivalent way to concatenate multiple files is to use cat to concatenate them to get 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
    3. When merging curved and straight track sets together, try to sort them evenly in order to get an homogeneous composition of the final sample.  

...