create new tag
, view all tags

Things to do

These are things that need doing with respect to the Velo reconstruction software:

  • What happens if the hit resolution is worse than expected in the current simulation? This could happen if thinks are misaligned or the simulation is overly optimistic or ... To study this we could start by just smearing the space points created in PrPixel
  • What about electrons? Nobody knows anything about these
  • What about converted photons?
  • Other specialised particle reconstruction ideas (Kshort?)
  • Speed up any of the reconstruction algorithms
    • Ongoing
  • Use Kalman filter in track finding?
  • What happens to data rates and physics if the Velo is not closed properly (say 1-2mm)?
    • Thomas Bird has investigated this
  • Implement alignment
  • Apply a shift in xyz to hits to simulate bowing of the sensors
  • Parameterisation of hit errors
    • why are they "wrong"?
  • XML
    • Do we want 2 pixel overlaps between sensors CLI-NSI ? Paula has asked that this be considered (22 July 2016)
    • Also adjust positions to set closest pixel centre to 5115 micron from beam (currently 5110 micron in simulation).
    • check downstream wakefield cone
  • Where do clone tracks come from?
  • Which tracks are lost when going to max missed stations < 3?
  • Which track state do the other subdetectors want to use?
  • Look at which hits are unused after the tracking is done.
    • They tend to be at low abs(z), can we do something special to make use of them?
    • If they are not useful can we not do the clustering there (for the trigger)?
  • Allow the use of known dead pixels in clustering routine
  • Cluster sizes, shapes and other properties. How do they compare to test beam data?

How to do things

Useful tips and tricks for doing things with the reconstruction software.

Faster running of Brunel

When working on the software it is nice to be able to re-run things very quickly. One thing that is very slow is starting Brunel. Use the following snippet in your options file to speed things along significantly:

def quick():
   GaudiSequencer("RecoCALOSeq").Members = []
   GaudiSequencer("RecoMUONSeq").Members = []
   GaudiSequencer("RecoPROTOSeq").Members = []
   GaudiSequencer("RecoRICHSeq").Members = []
   GaudiSequencer("MCLinksUnpackSeq").Members = []
   GaudiSequencer("CaloBanksHandler").Members = []
   GaudiSequencer("MCLinksTrSeq").Members = []
   GaudiSequencer("CheckPatSeq").Members = []
   GaudiSequencer("MCLinksCaloSeq").Members = []
   GaudiSequencer("TrUpSeq").Members = []
   GaudiSequencer("TrMatchSeq").Members = []
   GaudiSequencer("TrDownSeq").Members = []
   GaudiSequencer("RecoVertexSeq").Members = []
   GaudiSequencer("TrForwardSeq").Members = []
   GaudiSequencer("TrSeedingSeq").Members = []
   GaudiSequencer("TrBestSeq").Members = []
   GaudiSequencer("TrFitSeq").Members = []
   GaudiSequencer("CheckMUONSeq").Members = []
   GaudiSequencer("CheckRICHSeq").Members = []
   GaudiSequencer("OutputDSTSeq").Members = []
   GaudiSequencer("RecoSUMMARYSeq").Members = []

This will turn off almost everything except for the Velo cluster decoding and tracking.

Profiling code

There is some advice on the general LHCb twiki but it is extremely basic. A good program to use to profile your code is valgrind and kcachegrind to look at the output. To gather information about your program it will be executed "inside" valgrind, this means things will run a lot slower. In addition valgrind struggles with all the things that go on during the startup of Brunel. To avoid this and speed things up while code that we are not interested in is being executed follow the recipe below. In addition you probably want to use the trick above to turn off everything you do not care about. Add to your options file the following right at the end:

if __name__ == "__main__":
    import GaudiPython
    app_mgr = GaudiPython.AppMgr()
    import os
    import time

    for n in xrange(5):
        if n == 1:
            os.system("callgrind_control -i on")

        print "run(%i)"%n

Together with the following command to start valgrind it means that profiling is disabled until after the first event. In addition only the first 5 events are run over. This should be more than enough to get an idea why your algorithm is slow. To start things use the following command:

valgrind --tool=callgrind --instr-atstart=no --collect-jumps=yes --toggle-collect="PatPixelTracking::execute()" python py-upgrade.py

This will collect profiling information for everything happening inside PatPixelTracking::execute(). py-upgrade.py is the options file with the above modification. Notice that unlike usually we do not use gaudirun.py to execute it, instead just call plain python.

To get the right setup use

SetupProject Brunel v44r8 valgrind

which will setup a new-ish version of valgrind in addition to the Brunel project. If you want to get line-by-line information about the performance of your code then change CMTCONFIG to its -dbg version (from -opt), before doing SetupProject.

$ export CMTCONFIG="x86_64-slc6-gcc46-dbg"

If you have code in your user area that you compiled with a previous CMTCONFIG make sure to recompile it.

To look at the output of the valgrind run start kcachegrind and open the corresponding callgrind.634235.out (the number will change every time you run valgrind) file created in the directory in which you ran valgrind.

Boole cluster output

A simple script to produce is included at the bottom (BooleClusterOutput.py.txt remove the .txt before you run it).

It should be run as:

python BooleClusterOutput.py

Topic attachments
I Attachment Action Size Date Who Comment
Texttxt BooleClusterOutput.py.txt manage 3.9 K 2013-12-11 - 10:35 HellaSnoek Produced text file with cluster information. Run with python (not gaudi).
Topic revision: r22 - 2016-07-22 - MarkRichardJamesWilliams

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback