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.

Slides

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

You should see something like that in your log file:

PrintFoundBs.PrintDecay                                        INFO 
<--------------------------------------- Particle --------------------------------------->
                Name         M         P        Px        Py        Pz        Pt      chi2
                           MeV       MeV       MeV       MeV       MeV       MeV          
B_s0                  5351.02  84792.49  -1078.03    806.66  84781.80   1346.43      3.15
+-->phi(1020)         1019.20  40180.02   -446.29  -1077.38  40163.09   1166.16      8.96
|+-->K+                493.68  18956.49   -202.68   -631.37  18944.89    663.10      1.06
|+-->K-                493.68  21224.40   -252.57   -446.01  21218.21    512.56      0.88
+-->J/psi(1S)         3079.47  44663.99   -629.67   1873.95  44620.22   1976.91      1.69
 +-->mu+               105.66  32007.70    694.44   2121.09  31929.79   2231.88      0.85
 +-->mu-               105.66  12759.41  -1323.64   -247.43  12688.16   1346.57      0.94

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 output should look like:

PrintTrueBs                                                    INFO Printing MC tree for particle with ID -531
PrintTrueBs.PrintMCDecayTreeTool                               INFO 
B_s~0                 5366.77  82776.55    654.36    798.35  82770.11   1032.25
+-->J/psi(1S)         3096.93  43814.97   1718.46    887.50  43772.26   1934.10
|+-->mu+               105.66  28838.35   1078.37   2016.86  28747.52   2287.05
|+-->mu-               105.66  14493.28    569.92  -1141.92  14436.98   1276.24
|+-->gamma               0.00    591.63     70.16     12.59    587.32     71.28
|+-->gamma               0.00      0.43      0.01     -0.03      0.43      0.03
|+-->gamma               0.00      0.01      0.00      0.00      0.01      0.00
+-->phi(1020)         1029.89  39012.47  -1064.11    -89.15  38997.85   1067.84
 +-->K+                493.68  17506.04   -437.16     90.51  17500.35    446.43
 +-->K-                493.68  21507.39   -626.95   -179.66  21497.50    652.18

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 -- PatrickSKoppenburg - 16-Oct-2012 -- PatrickSKoppenburg - 30-Sep-2013

Edit | Attach | Watch | Print version | History: r19 < r18 < r17 < r16 < r15 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r19 - 2013-09-30 - 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback