DaVinci Tutorial 3

This tutorial is optional. It shows you how to change a specialised algorithm in something more generic. When you'll be writing your own algorithms you're encouraged to write something generic from the start.

WARNING: These options work, but are deprecated. One should now use the Selection Framework as in DaVinciTutorial4.

You could actually use the algorithm from DaVinciTutorial2 to make the φ(1020) too. The procedure for selecting the φ is the same, it's just the properties of the mother and the type of the daughters that change.

Adapt TutorialAlgorithm in order to be able to select J/ψ and φ depending on the configuration. The options should look like this:

from Gaudi.Configuration import *
#######################################################################                                             
#                                                                                                                   
# 1) Let's define a sequence                                                                                        
#                                                                                                                   
from Configurables import GaudiSequencer
tutorialseq = GaudiSequencer("TutorialSeq")
#######################################################################                                             
#                                                                                                                   
# 2) Add the J/psi                                                                                                  
#                                                                                                                   
from Configurables import TutorialAlgorithm
jpsi2mumu = TutorialAlgorithm("Jpsi2MuMu")
jpsi2mumu.InputLocations = [ "Phys/StdAllLooseMuons" ]
from GaudiKernel.SystemOfUnits import MeV
jpsi2mumu.MassWindow = 30*MeV
jpsi2mumu.MaxChi2 = 100
jpsi2mumu.Particle = "J/psi(1S)"
tutorialseq.Members += [ jpsi2mumu ]
#######################################################################                                             
#                                                                                                                   
# 2) Add the Phi                                                                                                    
#                                                                                                                   
phi2kk = TutorialAlgorithm("Phi2KK");

phi2kk.InputLocations = [ "Phys/StdAllLooseKaons" ]
phi2kk.MassWindow = 50*MeV
phi2kk.Particle =  "phi(1020)"
phi2kk.MaxChi2 = 20
tutorialseq.Members += [ phi2kk ]
#######################################################################                                             
#                                                                                                                   
# Say True to have all phis. False to be fast.                                                                      
#                                                                                                                   
tutorialseq.IgnoreFilterPassed = True # get all phis                                                                
#######################################################################                                             
#                                                                                                                   
# 3) Configure the application                                                                                      
#                                                                                                                   
from Configurables import DaVinci
DaVinci().HistogramFile = "DVHistos_3.root"    # Histogram file                                                     
DaVinci().EvtMax = 10000                        # Number of events                                                   
DaVinci().DataType = "2012"                    # Default                 
#                                                                                                                   
# Add our own stuff                                                                                                 
#                                                                                                                   
DaVinci().UserAlgorithms = [ tutorialseq ]

The only necessary change in the C++ code is that you need a variable (std::string) that tells the algorithm which Particle to reconstruct. Then in initialize() you should ask the ParticlePropertySvc to find the mass of this Particle.

The solution is given in solutions/DaVinci3.

Next

-- 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: r15 < r14 < r13 < r12 < r11 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r15 - 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