LHCb Software Tutorial

Slides:



Advertisements
Similar presentations
25/03/2003Simulation Application for the LHCb Experiment CHEP March 2003 Presented by: W. Pokorski / CERN Authors: I. Belyaev, Ph. Charpentier,
Advertisements

14 User Documents and Examples I SLAC Geant4 Tutorial 3 November 2009 Dennis Wright Geant4 V9.2.p02.
Automated Tests in NICOS Nightly Control System Alexander Undrus Brookhaven National Laboratory, Upton, NY Software testing is a difficult, time-consuming.
LHCb Simulation Tutorial CERN, 21 st -22 nd February B 00 l e How to pass a detector geometry to.
ROOT An object oriented HEP analysis framework.. Computing in Physics Physics = experimental science =>Experiments (e.g. at CERN) Planning phase Physics.
Gaudi Framework Tutorial, April Introduction.
5 November 2001F Harris GridPP Edinburgh 1 WP8 status for validating Testbed1 and middleware F Harris(LHCb/Oxford)
Validation and TestEm series Michel Maire for the Standard EM group LAPP (Annecy) July 2006.
User Documents and Examples I Sébastien Incerti Slides thanks to Dennis Wrigth, SLAC.
Overview of LHCb applications and software environment LHCb software tutorial - March
ATLAS and GridPP GridPP Collaboration Meeting, Edinburgh, 5 th November 2001 RWL Jones, Lancaster University.
Bookkeeping Tutorial. Bookkeeping & Monitoring Tutorial2 Bookkeeping content  Contains records of all “jobs” and all “files” that are created by production.
G.Corti, P.Robbe LHCb Software Week - 19 June 2009 FSR in Gauss: Generator’s statistics - What type of object is going in the FSR ? - How are the objects.
A Short Course on Geant4 Simulation Toolkit How to learn more?
Introduction to Gaudi LHCb software tutorial - September
Gaudi Framework Tutorial, April Algorithm Tools: what they are, how to write them, how to use them.
Detector Simulation Presentation # 3 Nafisa Tasneem CHEP,KNU  How to do HEP experiment  What is detector simulation?
Reconstruction Configuration with Python Chris Jones University of Cambridge.
9-13/9/03 Atlas Overview WeekPeter Sherwood 1 Atlfast, Artemis and Atlantis What, Where and How.
LHCb production experience with Geant4 LCG Applications Area Meeting October F.Ranjard/ CERN.
LHCb-ATLAS GANGA Workshop, 21 April 2004, CERN 1 DIRAC Software distribution A.Tsaregorodtsev, CPPM, Marseille LHCb-ATLAS GANGA Workshop, 21 April 2004.
The CMS Simulation Software Julia Yarba, Fermilab on behalf of CMS Collaboration 22 m long, 15 m in diameter Over a million geometrical volumes Many complex.
Simulation Commissioning, Validation, Data Quality A brain dump to prompt discussion Many points applicable to any of LHCb software but some simulation.
Documentation Gunter Folger / CERN Geant4 School, Annecy 2008.
G.Govi CERN/IT-DB 1 September 26, 2003 POOL Integration, Testing and Release Procedure Integration  Packages structure  External dependencies  Configuration.
Bookkeeping Tutorial. 2 Bookkeeping content  Contains records of all “jobs” and all “files” that are produced by production jobs  Job:  In fact technically.
Bologna Tutorial, April Job Options and Printing.
April 6, 2000 LHCb Event Data Model Pavel Binko, Gloria Corti LHCb / CERN 1 LHCb Software week LHCb Event Data Model Pavel Binko Gloria Corti LHCb / CERN.
CERN Tutorial, February Introduction to Gaudi.
The LHCb simulation application, Gauss: design, evolution and experience M. Clemencic (CERN), G. Corti (CERN), S. Easo (RAL), C. Jones (Cambridge), S.
INFSO-RI Enabling Grids for E-sciencE Using of GANGA interface for Athena applications A. Zalite / PNPI.
CERN Tutorial, September Overview of LHCb applications and software environment.
Marco Cattaneo, 6-Apr Issues identified in sub-detector OO software reviews Calorimeters:18th February Tracking:24th March Rich:31st March.
Gaudi Framework Tutorial, Algorithm Tools: what they are and how to use them.
20 October 2005 LCG Generator Services monthly meeting, CERN Validation of GENSER & News on GENSER Alexander Toropin LCG Generator Services monthly meeting.
Geant4 Training 2003 A Short Course on Geant4 Simulation Toolkit How to learn more? The full set of lecture notes of this Geant4.
MONTE CARLO TRANSPORT SIMULATION Panda Computing Week 2012, Torino.
BES III Software: Beta Release Plan Weidong Li 19 th October 2005.
Monthly video-conference, 18/12/2003 P.Hristov1 Preparation for physics data challenge'04 P.Hristov Alice monthly off-line video-conference December 18,
LHCb Simulation LHCC Computing Manpower Review 3 September 2003 F.Ranjard / CERN.
M. Clemencic (CERN), G. Corti (CERN),
Gunter Folger / CERN MC-PAD, DESY/Hamburg Jan 2010
Simulation Tools for Test Beam
The Generator Phase in Gauss
EvtGen Miniworkshop, Patrick Robbe LAL Orsay, 21 Jan 2005
Patrick Robbe, LAL Orsay, 13 May 2004
The LHCb Software and Computing NSS/IEEE workshop Ph. Charpentier, CERN B00le.
LCG Generator Services project
A Short Course on Geant4 Simulation Toolkit How to learn more?
User Documents and Examples I
LHCb-Italian Software Tutorial
(CMS GEANT4 simulation)
Geant4:User Actions and Analysis
SW Architecture SG meeting 22 July 1999 P. Mato, CERN
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
Detector Description in LHCb
What’s new in version 5 of GAUDI
Use of Geant4 in experiment interactive frameworks AliRoot
GAUSS - GEANT4 based simulation for LHCb
A Short Course on Geant4 Simulation Toolkit How to learn more?
A Short Course on Geant4 Simulation Toolkit How to learn more?
Simulation and Physics
2 Getting Started.
2 Getting Started.
2 Getting Started.
Summary Computing Model SICb Event Model Detector Description
Use of GEANT4 in CMS The OSCAR Project
LHCb Data Quality Check web. cern
Use Of GAUDI framework in Online Environment
Presentation transcript:

LHCb Software Tutorial Updated on 10 October 2007 Gauss in General Gloria Corti CERN Gauss Tutorial

Outline Overview of the LHCb simulation, Gauss Purpose Application based on Gaudi Gauss Project and application Structure and phases Event generation Detector physics simulation Output(s) Data Monitors: Printout and histograms Looking at results Software Tutorial - Gauss - Last update: 10 October 2007

Overall purpose Gauss mimics what will happen in the spectrometer to understand experimental conditions and performance Provides generation of proton-proton collisions decay of particles with special attention to those of b-hadrons tracking of particles in the detector and interactions with the material production of “hits" when particles cross sensitive detectors Data produced can be studied directly or in further processing GenCollisions and HepMCEvents (Generator level information) MCTruth as seen by the (LHCb) experimental setup MCParticles and MCVertices MCHits, MCRichHits and MCCaloHits Output (.sim ) can be processed by Boole Software Tutorial - Gauss - Last update: 10 October 2007

Gauss as a Gaudi application Gauss is built on top of the Gaudi framework and follow its architectural design same principles and terminology Gauss as a Gaudi based application is a collection of “User Code” specialized for physics simulation A sequence of algorithms configured via the properties in job options making use of framework general services JobOptions Service, Message Service, Particle Properties Service, Event Data Service, Histogram Service, Random Number Generator, … LHCb common software LHCb Event model, Detector Description, Magnetic Field Service, … dedicated simulation software based on external libraries Generator algorithms and tools (Pythia, EvtGen, …), GiGa (Geant4 Service) Software Tutorial - Gauss - Last update: 10 October 2007

Gauss project and application Contains packages for the Generator phase based on external libraries available from the Physics community Pythia, EvtGen, HepMC, Herwig … Special interface libraries GENSER (LCG Generator Services): collection of many event Generator libraries Interface Service to Geant4 – GiGa Packages with LHCb detectors simulation code based on GiGa Is based on the LHCb Project and the Gaudi Project Sim/Gauss application Job options configuring the application A special main Gaudi application code necessary for Geant4 In this course we will use Gauss v25r12 [v30r3] Software Tutorial - Gauss - Last update: 10 October 2007

Gauss information Application coordinator – Gloria Corti for maintenance and general development Patrick Robbe, responsible for overall Event Generators and EvtGen detectors responsible for specific simulations (e.g. RICH Cerenkov, Energy deposition in Calorimeters) and validation Gauss documentation Web page (LHCb Home → Computing → Gauss) includes link to Gauss User Guide… but for v18r3 (many things are out of date) mailing list: lhcb-gauss@cern.ch Changes in between versions Refer to release notes and Job Options in specific versions Use latest DC06 released version (or development…) Software Tutorial - Gauss - Last update: 10 October 2007

Structure of Gauss application Two INDEPENDENT phases normally run in sequence as in production Pythia, EvtGen JobOpts Interface … Initialize JobOpts HepMC MCParticle MCVertex MCHits POOL LHCb Event model Exchange model GiGa Geant4 Initialize Initialize HepMC Cnv Cnv Monitor Cnv Monitor Monitor Geometry Event Generation primary event generator specialized decay package pile-up generation Detector Simulation geometry of the detector (LHCb  Geant4) tracking through materials (Geant4) hit creation and MC truth information (Geant4  LHCb) Software Tutorial - Gauss - Last update: 10 October 2007

Job Options – vYYYYMM.opts Geometry dependency for Detector Simulation in vYYYYMM.opts different geometry are supported – loose dependency XmlDDDB can be chosen by production for compatible Gauss versions need to be the same as what used later by Boole and Brunel v200601.opts will be used for this course A complete Gauss job is run with this vYYYYMM.opts files $GAUSSROOT/$CMTCONFIG/Gauss.exe $GAUSSOPTS/v200601.opts //-------------------------------------------------------------------------- // Execute a standard production Gauss job #include "$GAUSSOPTS/Gauss.opts“ // Geometry database dependent options #include "$STDOPTS/DC06Conditions.opts"; [#include “$DDDBROOT/options/DC06.opts” for v30r3] Software Tutorial - Gauss - Last update: 10 October 2007

Job Options – Gauss.opts Configuration of algorithms to run and in which order is in Gauss.opts #include "$GAUSSOPTS/Common.opts" // Necessary for any Gauss executable //--------------------------------------------------------------------------- // Phases to be executed: comment unwanted phases // i.e. Simulation if running generator in stand-alone // in which case comment also Simulation.opts below ApplicationMgr.TopAlg += { "GaudiSequencer/Generator" }; ApplicationMgr.TopAlg += { "GaudiSequencer/Simulation" }; // Initialization Generator.Members = { "GenInit/GaussGen" }; Simulation.Members = { "SimInit/GaussSim" }; . . . // Generator Phase #include "$GAUSSOPTS/Generator.opts" Generator.MeasureTime = true; // Simulation Phase #include "$GAUSSOPTS/Simulation.opts" Simulation.MeasureTime = true; The file users edit more often Comments (C++ style) to help modifying it Software Tutorial - Gauss - Last update: 10 October 2007

Gauss phases The Generator and Simulation phases are instances of the class GaudiSequencer providing sequences of Algorithms Itself an Algorithm Can be configured in OR or AND mode (AND is default) Detailed timing information ORSequence.ModeOR = true; ApplicationMgr.TopAlg += { "GaudiSequencer/Generator" }; ApplicationMgr.TopAlg += { "GaudiSequencer/Simulation" }; ... Generator.MeasureTime = true; Simulation.MeasureTime = true; Simulation.Members = { "SimInit/GaussSim" }; Simulation.Members += { …, "GiGaCheckEventStatus" }; Simulation.Members += { "G4HepMCToMCTruth" }; Executed only if G4 event is checked as OK Software Tutorial - Gauss - Last update: 10 October 2007

Phase structure Generator and Simulation sequence for each event have its own Initialization – each initializing random numbers and filling their own header Event processing – generating pp collision and decay and transporting through detector Monitor – printing information and filling histograms ApplicationMgr.TopAlg += { "GaudiSequencer/Generator" }; ApplicationMgr.TopAlg += { "GaudiSequencer/Simulation" }; ... Generator.Members = { "GenInit/GaussGen" }; #include "$GAUSSOPTS/Generator.opts“ Generator.Members += { "GaudiSequencer/GenMonitor" }; Generator.Members += { "Generation" }; Software Tutorial - Gauss - Last update: 10 October 2007

Output event data file Event data objects written in a file in POOL format by Gaudi OutStream Contents can be found in file $STDOPTS/SimContents.opts included from GaussTape.opts ApplicationMgr.OutStream += { "GaussTape" }; GaussTape.Output = "DATAFILE='PFN:Gauss.sim TYP='POOL_ROOTTREE' OPT='RECREATE'"; PoolDbCacheSvc.Catalog = { "xmlcatalog_file:NewCatalog.xml" }; // General GaussTape.ItemList = { "/Event#1“ }; // Generator output GaussTape.ItemList += { "/Event/Gen#1“ ,"/Event/Gen/Header#1" ,"/Event/Gen/Collisions#1“ ,"/Event/Gen/HepMCEvents#1“ }; // Simulation output GaussTape.ItemList += { "/Event/MC#1“ ,"/Event/MC/Header#1" ,"/Event/MC/Particles#1“ ,"/Event/MC/Vertices#1" ,"/Event/MC/Velo#1“ ,"/Event/MC/Velo/Hits#1“ , ... }; Software Tutorial - Gauss - Last update: 10 October 2007

Monitors Necessary to monitor generator and simulation outputs Verify productions and remote installations Reference quantities to evaluate changes when using a new version of a generator library or of Geant4 Reference quantities to compare different generators Understand what is happening Print out exist for Generator and Simulation The efficiencies of the generator level cuts are computed automatically for each job Algorithm exist to Dump Generator and Simulation event Example in Monitor.opts Some histograms are available in Monitor.opts Some ntuples are available in MonitorInDetail.opts with Generator particles and vertices and MCTruth particles Software Tutorial - Gauss - Last update: 10 October 2007

Visualize histograms and ntuples Histograms and ntuples are saved in ROOT persistency (HBOOK available in Gaudi but not supported) Use ROOT to visualize them Look at web site: http://root.cern.ch HistogramPersistencySvc.OutputFile = "GaussHistos.root"; NTupleSvc.Output={"FILE1 DATAFILE='GaussMonitor.root' TYP='ROOT' OPT='NEW'"}; Gauss.opts Software Tutorial - Gauss - Last update: 10 October 2007

Reading Gauss data You may want to read the .sim files produced to look at data without generating them again A skeleton GaussRead.opts is provided //--------------------------------------------------------------------------- // Phases to be executed: initialization + monitor ApplicationMgr.TopAlg = { "GaudiSequencer/Initialize" }; ApplicationMgr.TopAlg += { "GaudiSequencer/Monitor" }; // Initialize the application Initialize.Members = { "LbAppInit/GaussRead" }; // Monitor phase: as in production + user monitor // two separate phase for Generator and Simulation // can be commented separately Monitor.Members += { "GaudiSequencer/GenMonitor" }; Monitor.Members += { "GaudiSequencer/SimMonitor" }; Monitor.Members += { "GaudiSequencer/UserMonitor" }; Additional user monitor set up Software Tutorial - Gauss - Last update: 10 October 2007

Simple generator/simulation level analysis If available software does not provide necessary info can write a simple analysis to execute when producing or when reading the events Write a Gaudi concrete Algorithm It is called once per physics event Implements three methods in addition to the constructor and destructor initialize(), execute(), finalize() Three Gaudi algorithms can be useful GaudiAlg GaudiHistoAlg inheriting from GaudiAlg GaudiTupleAlg inheriting from GaudiHistoAlg Note: DVAlgorithm inherit from GaudiTupleAlg provide methods for easier printing, retrieving data, histogramming, getting services,… use emacs to start from skeleton Algorithms Algorithms encapsulates the physics contents of the data processing program. It is the “place holder” foreseen by the framework for the end-user code. This is why most of the tutorial will be devoted to development of algorithms. Algorithms are scheduled to be executed explicitly once per physics event. If the complexity requires, the algorithm can be made as a composite of a number of sub-algorithms. The complex algorithm schedules explicitly the execution of the sub-algorithms in the proper order to produce the desired results. If an algorithm requires some data that happens to be produced by another algorithm, then the system has to ensure by explicit coding that the algorithms are executed in the correct sequence. Software Tutorial - Gauss - Last update: 10 October 2007

Exercises You will get familiar with running Gauss and reading a simulation file Guidelines for the exercises on the web from the tutorial agenda Packages used: Sim/Gauss v25r12 – Mandatory Tutorial/Simulation v2r0 – Optional exercises/README.txt + exerciseN.txt solutions/exerciseN/ Software Tutorial - Gauss - Last update: 10 October 2007