introduction to davinci
play

Introduction to DaVinci Roel Aaij Nikhef, Amsterdam LHCb Week 26 - PowerPoint PPT Presentation

Intro Functors Workflow Exercises Introduction to DaVinci Roel Aaij Nikhef, Amsterdam LHCb Week 26 September 2011 Many thanks to Patrick Koppenburg for letting me cannibalise his slides! Roel Aaij (Nikhef) Introduction to DaVinci 26


  1. Intro Functors Workflow Exercises Introduction to DaVinci Roel Aaij Nikhef, Amsterdam LHCb Week 26 September 2011 Many thanks to Patrick Koppenburg for letting me cannibalise his slides! Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 1 / 19

  2. Intro Functors Workflow Exercises Contents 1 Introduction to DaVinci 2 LoKi-Hybrid Functors 3 Workflow and Data 4 Exercises Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 2 / 19

  3. Intro Functors Workflow Exercises Contents 1 Introduction to DaVinci 2 LoKi-Hybrid Functors 3 Workflow and Data 4 Exercises Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 3 / 19

  4. Intro Functors Workflow Exercises DaVinci Links DaVinci web page:DaVinci project page From there you’ll find : Some documentation. Links to doxygen. The DaVinci wiki and Tutorial page Bugs and feature requests are tracked in the LHCb software Savannah page. If you think you see a bug, go there first. Any DaVinci question can be asked at the DaVinci mailing list: lhcb-davinci@cern.ch . You need to be registered to use it. You can do that online. Distributed analysis question should be asked at lhcb-distributed-analysis@cern.ch . General software questions should go to lhcb-soft-talk@cern.ch Always give all information that is relevant to your question! (no “It stopped working. What has changed?”) Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 4 / 19

  5. Intro Functors Workflow Exercises Input: ProtoParticles ProtoParticles: are the end of the reconstruction stage have all the links about how they have been reconstructed have a list of PID hypothesis with a probability contain the kinematic information Charged ProtoParticles: One per track Add Rich, Calo, Muon info Neutral ProtoParticles: One per Cluster Add Track info (could be an electron) Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 5 / 19

  6. Intro Functors Workflow Exercises Particles Particle = ProtoParticle + one PID choice one defined mass Physics analyses deal with Particles You need to know the 4-vectors to compute the mass of a resonance The PID is your choice The same ProtoParticle can be made into a π + and a µ + . . . This makes sense. Think of a pion from B → ππ decaying in flight. Does it stop being a signal pion because it decayed before the Muon detector? Some ProtoParticles can be ignored All this is done by configuring a ParticleMaker algorithm You don’t need to worry about the configuration. Many standards are pre-defined But you need to choose which to use. Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 6 / 19

  7. Intro Functors Workflow Exercises Standard Particles To ensure that everybody agrees on what is a K + , a π + or a K 0 S , we have a set of standard particles predefined. They are defined in python/CommonParticles/*.py in the Phys/CommonParticles package (svn link). All you need to know are the names of the algorithm that created them: StdLooseKaons, StdTightProtons . . . StdNoPIDsXxxx: All tracks are made to Xxxx (IP χ 2 applied) StdAllXxxxYyyy: Same but without IP χ 2 applied. StdLooseXxxx: Loose PID cuts for hypothesis Xxxx StdTightXxxx: Tight PID cuts for hypothesis Xxxx They are interfaces to the selection framework (see later) from StandardParticles import StdLooseMuons, StdLoosePions print StdLooseMuons.outputLocation() Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 7 / 19

  8. Intro Functors Workflow Exercises Creating and Selecting Particles A Selection is a sequence of algorithms which create or filter Particles. In the stripping: start from final state Particles and produce one or more steps of composite particles: B s → J /ψ ( → µ + µ − ) φ ( → K + K − ) . In user jobs: start from some existing particles and apply extra cuts or use them to create a new decay tree. Big Fat Warning: Don’t try to redo all the combinatorics on a stripped DST. Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 8 / 19

  9. Intro Functors Workflow Exercises Creating and Selecting Particles A Selection is a sequence of algorithms which create or filter Particles. In the stripping: start from final state Particles and produce one or more steps of composite particles: B s → J /ψ ( → µ + µ − ) φ ( → K + K − ) . In user jobs: start from some existing particles and apply extra cuts or use them to create a new decay tree. Big Fat Warning: Don’t try to redo all the combinatorics on a stripped DST. You cannot cut looser than the stripping already did and will not be able to unfold the biases, so: DON’T TRY, EVER!! Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 8 / 19

  10. Intro Functors Workflow Exercises How to work with Particles There are several ways to get a the numbers for your analysis out: Plain C++: DVAlgorithm inherits from GaudiAlgorithm (and GaudiTupleAlg. . . ), some typing saved, bugs prevented. LoKi: “Loops and Kinematics”. Templated C++, more typing saved, more bugs prevented. GaudiPython, Bender: Interactive python, will come to that later. LoKi::Hybrid: Used in Stripping. The common assumption is that physicists always do the same, hence any line of C++ you type is likely to be a duplication of what your office-mate is typing right now. Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 9 / 19

  11. Intro Functors Workflow Exercises Contents 1 Introduction to DaVinci 2 LoKi-Hybrid Functors 3 Workflow and Data 4 Exercises Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 10 / 19

  12. Intro Functors Workflow Exercises LoKi-Hybrid In the end, you are interested either in properties of your particles, or you want to select then. The LHCb software contains a large set of LoKi functors which implement these (and more) operations. They are implemented in C++, but can be used in python too! Commonly used are M, P, PT, TRCHI2, but also BPVLTCHI2, CHILDCUT. Some take arguments, some don’t. Example: ( M > 2 . 5 ∗ GeV )&( M < 4 ∗ GeV ) . The idea is that any reasonable selection requirement can be coded using functors. The list can be viewed here: https://twiki.cern.ch/twiki/bin/view/LHCb/LoKiHybridFilters It’s very sensitive to syntax orthodoxy. The parentheses are not optional. And it’s &, not && or and. Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 11 / 19

  13. Intro Functors Workflow Exercises LoKi-Hybrid Demo As it’s python it can be tested at the python prompt: from math import sqrt from LoKiPhys.decorators import * from LoKiCore.functions import monitor p = LHCb.Particle() p.setParticleID( LHCb.ParticleID(11) ) m = p.momentum() m.SetPx ( 1000 ) m.SetPy ( -1000 ) m.SetPz ( 10000 ) m.SetE ( sqrt( m.P2() + 5000*5000 ) ) p.setMomentum ( m ) fun = PX+PY print PX(p), PY(p) , fun(p) fun2 = PX>750 print fun2(p) fun3 = monitor(fun2) print fun3(p) from LoKiCore.doxygenurl import browse browse(PT) Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 12 / 19

  14. Intro Functors Workflow Exercises Contents 1 Introduction to DaVinci 2 LoKi-Hybrid Functors 3 Workflow and Data 4 Exercises Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 13 / 19

  15. Intro Functors Workflow Exercises What to do? The workflow of you analysis should be: 1 Read your candidates 2 Refine your candidates (more cuts) 3 TisTos your candidate If TIS, you’re lucky, keep it If TOS, keep it only if Tossed by one of “your” lines 4 Store (or fit) it somehow. DecayTreeTuple (not good, but sometimes useful) 1 DST (better, but number of events must be “small”) 2 MicroDST (best) 3 GaudiPython (very useful for testing and reading your own 4 DST/MicroDST) 5 In all cases: Make sure you know what you need before starting (Stripping and Trigger). Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 14 / 19

  16. Intro Functors Workflow Exercises The Data Open the Bookkeeping using: The Dirac web portal the BK GUI (lhcb bkk on lxplus) Ganga Look at LHCb/Collision11. You can take magnet down or up. Real Data. We’re up to Reco 11a - Stripping 16 (17 is the soon to start reprocessing). Select your stream (DIMUON.DST for this tutorial). One or two files is more than enough for our purpose. Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 15 / 19

  17. Intro Functors Workflow Exercises Contents 1 Introduction to DaVinci 2 LoKi-Hybrid Functors 3 Workflow and Data 4 Exercises Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 16 / 19

  18. Intro Functors Workflow Exercises Hands-on Exercises Several exercises available: Have a look at DaVinci Tutorial 0.5 and 8 to: You’ll need the head of Tutorial/Analysis. Create a Ganga JobTemplate for DaVinci. Be introduced to Selections. Write an NTuple using DecayTreeTuple. Follow this up with the GaudiPython excersises to: Directly inspect particles. Fill histograms and NTuples. Use functors to conveniently get particle properties. If you’re still not done, try to make a selection for B + → J /ψ K + starting from the NeuroBayes J /ψ and adding StdLooseKaons. You can also have a look at the wonderful world of Bender. Roel Aaij (Nikhef) Introduction to DaVinci 26 September 2011 Tutorial 17 / 19

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend