DaVinci Tutorial 5

We have the sequence to select Bs candidates but no idea if we do it right. We will start with adding some debugging tools.


This tutorial corresponds to the slides last shown here.

Use the PrintDecayTree algorithm to print the reconstructed tree.

from Configurables import PrintDecayTree, PrintDecayTreeTool
tree = PrintDecayTree("PrintFoundBs")
  • You need to give it the location where to find your head Particle. (in our case Inputs = [ SeqBs2JpsiPhi.outputLocation() ].
  • You need to tell the PrintDecayTreeTool what variables to print. For instance
tree.addTool( PrintDecayTreeTool, name = "PrintDecay" )
tree.PrintDecay.Information = "Name M P Px Py Pz Pt chi2" 
You can see a list of variables here
  • Don't forget to declare where you want to run your algorithm. A good idea is the monitoring sequence which is always run after the user algorithm. Do
DaVinci().MoniSequence += [ tree ]      # The monitoring stuff

Use the PrintMCTree algorithm to print the MC true tree.

from Configurables import PrintMCTree, PrintMCDecayTreeTool
mctree = PrintMCTree("PrintTrueBs")
It uses the PrintMCDecayTreeTool internally, which has the same syntax as the PrintDecayTreeTool.
mctree.addTool( PrintMCDecayTreeTool, name = "PrintMC" )
mctree.PrintMC.Information = "Name M P Px Py Pz Pt"
  • In this case you have to tell the algorithms for which particles it has to print the tree.
mctree.ParticleNames = [  "B_s0", "B_s~0" ]
  • It is recommended to give the depth of the tree in order to avoid having all particles from interaction with matter.
mctree.Depth = 2  # down to the K and mu
  • Increase the Depth value to see all the particles created in the detector. Most of them are created in the calorimeters between 11 and 15m.
  • If you add mctree as a member of the sequencer it will display information only about events where there is a selected candidate. If you want to see information about all the events you need to add it to DaVinci().MoniSequence.

The solution to this part is to be found in solutions/DaVinci5/

Go to DaVinciTutorial6

-- PatrickKoppenburg - 01 Oct 2007 -- PatrickKoppenburg - 13 Jun 2008 -- PatrickKoppenburg - 05 Jan 2009

Edit | Attach | Watch | Print version | History: r19 < r18 < r17 < r16 < r15 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r17 - 2011-03-23 - PatrickSKoppenburg
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

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