LHCb-Italian Software Tutorial

Slides:



Advertisements
Similar presentations
USE OF GEANT4 FOR LHCB RICH SIMULATION S. Easo, RAL, LHCB AND ITS RICH DETECTORS. TESTBEAM DATA FOR LHCB-RICH. OVERVIEW OF GEANT4 SIMULATION.
Advertisements

Introduction to Geant4 Part I – General Introduction Makoto Asai (SLAC) Takashi Sasaki (KEK) March 22 nd, NIRS.
25/03/2003Simulation Application for the LHCb Experiment CHEP March 2003 Presented by: W. Pokorski / CERN Authors: I. Belyaev, Ph. Charpentier,
14 User Documents and Examples I SLAC Geant4 Tutorial 3 November 2009 Dennis Wright Geant4 V9.2.p02.
LHCb Simulation Tutorial CERN, 21 st -22 nd February B 00 l e How to pass a detector geometry to.
User Documents and Examples I Sébastien Incerti Slides thanks to Dennis Wrigth, SLAC.
Tracking at LHCb Introduction: Tracking Performance at LHCb Kalman Filter Technique Speed Optimization Status & Plans.
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.
Computing Performance Recommendations #13, #14. Recommendation #13 (1/3) We recommend providing a simple mechanism for users to turn off “irrelevant”
Hadronic Interaction Studies for LHCb Nigel Watson/Birmingham [Thanks to Silvia M., Jeroen v T.]
RICH SIMULATION USING GEANT4 S.EASO, RAL OBJECTIVES OF THE SIMULATION. CURRENT STATUS AND PLANS. INTEGRATION WITH LHCb SOFTWARE. SUMMARY.
Gaudi Framework Tutorial, April Algorithm Tools: what they are, how to write them, how to use them.
1 Status and Plans for Geant4 Physics Linear Collider Simulation Workshop III 2-5 June 2004 Dennis Wright (SLAC)
Detector Simulation Presentation # 3 Nafisa Tasneem CHEP,KNU  How to do HEP experiment  What is detector simulation?
LHCb production experience with Geant4 LCG Applications Area Meeting October F.Ranjard/ CERN.
Geant4 versus External Frameworks Approaches, Requirements and Constraints ATLAS, LHCb, CMS, Alice M. Stavrianakou CERN/CMC Geant4  -review
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.
CBM Software Meeting 1 CBM Simulation & Analysis Framework Geant3 / Gean4 configuration M. Al-Turany, D. Bertini.
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.
1 Background radiation studies in LHCb with GAUSS/Geant4 Giuseppe G. Daquino PH/SFT.
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.
The LHCb simulation application, Gauss: design, evolution and experience M. Clemencic (CERN), G. Corti (CERN), S. Easo (RAL), C. Jones (Cambridge), S.
1 Giuseppe G. Daquino 26 th January 2005 SoFTware Development for Experiments Group Physics Department, CERN Background radiation studies using Geant4.
Marco Cattaneo, 6-Apr Issues identified in sub-detector OO software reviews Calorimeters:18th February Tracking:24th March Rich:31st March.
ST Occupancies (revisited) M. Needham EPFL. Introduction Occupancies matter Date rates/sizes In particular was data size on links from Tell1 to farm estimated.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Prototype GEANT4 Service for ATHENA framework ATLAS Software Workshop Dec 3.
Gaudi Framework Tutorial, Algorithm Tools: what they are and how to use them.
Geant4 Simulation for KM3 Georgios Stavropoulos NESTOR Institute WP2 meeting, Paris December 2008.
A Short Course on Geant4 Simulation Toolkit Introduction
Alex Howard, Imperial College Slide 1 July 2 nd 2001 Underground Project UNDERGROUND PROJECT – Overview and Goals Alex Howard Imperial College, London.
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
Interaction with the Geant4 kernel
The Generator Phase in Gauss
GAUSS GiGa (G4 Interface for Gaudi Geant 4
Migration of reconstruction and analysis software to C++
The LHCb Software and Computing NSS/IEEE workshop Ph. Charpentier, CERN B00le.
A C++ generic model for the GLAST Geometric Description
Status of GEANT4 in LHCb S. Easo, RAL, The LHCb experiment.
Muon stopping target optimization
Interaction with the Geant4 kernel
GAUSS - GEANT4 based simulation for LHCb
LHCb Software Tutorial
User Documents and Examples I
OO Muon Reconstruction in ATLAS
(CMS GEANT4 simulation)
Geant4:User Actions and Analysis
Silicon Tracking with GENFIT
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
Gamma Ray Satellites Simulations with Geant4
Introductory Course PTB, Braunschweig, June 2009
Short Course Siena, 5-6 October 2006
The Hadrontherapy Geant4 advanced example
Use of Geant4 in experiment interactive frameworks AliRoot
A Short Course on Geant4 Simulation Toolkit Introduction
Introductory Course ORNL, May 2008
GAUSS - GEANT4 based simulation for LHCb
Summary of dE/dx studies in silicon and MS in muon system
Simulation and Physics
Geant4 in HARP V.Ivanchenko For the HARP Collaboration
The LHCb Level 1 trigger LHC Symposium, October 27, 2001
Geant4 course - exercices
2 Getting Started.
Marc Verderi GEANT4 collaboration meeting 01/10/2002
2 Getting Started.
2 Getting Started.
The Geant4 Hadrontherapy Advanced Example
Simulation in Experiments searching for rare events
Presentation transcript:

LHCb-Italian Software Tutorial Updated on 13 July 2007 Detector Simulation Gloria Corti CERN Gauss Tutorial

Outline Overview of (Physics) Detector Simulation Purpose: reminder Interaction with (use of) Geant4 Job options Detectors Physics processes Input to and Output from Geant4 Output Data Software Tutorial - Gauss - Last update: 10 October 2007

Purpose: a reminder For Detector Simulation phase of Gauss 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 MCTruth as seen by the (LHCb) experimental setup MCParticles and MCVertices MCHits (Velo, PuVeto, TT, IT, OT, Muon system), MCRichHits and MCCaloHits Output (.sim ) can be processed by Boole for digitization Software Tutorial - Gauss - Last update: 10 October 2007

Simulation phase reading generator event Options are available in Gauss to run the simulation phase reading in the generator event from a file previously produced (although not really necessary from the CPU point of view) ../slc3_ia32_gcc323/Gauss.exe $GAUSSOPTS/v200601-SimPhase.opts //----------------------------------------------------------------- // Phases to be executed: ApplicationMgr.TopAlg += { “GaudiSequencer/Simulation” }; // Generator Phase #include "$GAUSSOPTS/Generator.opts“ Generator.MeasureTime = true; #include "$GAUSSOPTS/GenStandAlone.opts“ // Simulation Phase // #include "$GAUSSOPTS/Simulation.opts" // Simulation.MeasureTime = true; Software Tutorial - Gauss - Last update: 10 October 2007

Simulation phase reading generator event Pythia, EvtGen JobOpts Interface … Initialize JobOpts HepMC MCParticle MCVertex MCHits POOL LHCb Event model Exchange model GiGa Geant4 Init HepMC Monitor Cnv Cnv Cnv POOL 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

Geant4 Gauss uses GEANT4 for transporting particles in the experimental setup and simulating the physics processes that can occur. Navigation in EM fields Physics processes for a variety of particles at different energies GEANT4 is the successor of GEANT3, the world-standard toolkit for HEP detector simulation GEANT4 is a C++ toolkit developed in the Physics community International Collaboration ~ 10 year old used in HEP, nuclear physics, heavy ion physics, cosmic ray physics, astrophysics, space science and medical applications GEANT4 coverage of physics comes from mixture of theory-driven, parameterized, and empirical formulae. Both cross-sections and models (final state generation) can be combined in arbitrary manners as necessary. Standard and Low energy EM processes, Hadronic processes, Optical photon processes, Decay processes, etc. Documentation from web: Gauss → Geant4 → Geant4 6 Software Tutorial - Gauss - Last update: 10 October 2007

GiGa Gauss uses a dedicated Gaudi service to interact and communicate with Geant4 minimizes the couplings to Geant4 GIGA = GEANT4 Interface for Gaudi Applications or Gaudi Interface to GEANT4 Applications GEANT4 callable and controllable from within GAUDI environment common detector geometry source used by other applications (reconstruction, visualisation) use of Gaudi features as algorithms, tools, services use of common services (ex. RandomNumberSvc, MagneticFieldSvc, DetectorDataSvc, etc.) access to internal Geant4 event loop via GiGaRunManager allows loading external physics lists instantiates (using Abstract Factory pattern) different “actions” (makes them to be plugable components) Documentation on the web from Gauss web page 6 Software Tutorial - Gauss - Last update: 10 October 2007

Encapsulation of Geant4 in Gauss via GiGa Single point of connection to Geant4 Convertion of transient objects to/from Geant4 representation Detector geometry converted from same source as other applications Data Files Persistency Service G4 Kine G4 Hits Transient Event Store Kine Conversion (Algorithms) Geant4 Hits Conversion (Algorithms) GiGa Service Gaudi GiGa Transient Detector Store GiGaGeom Conversion Service G4 Geom Event Loop controlled by Gaudi Action Action Embedded Geant4, Geant4 control and Configuration Persistency Service Data Files Software Tutorial - Gauss - Last update: 10 October 2007

Control of simulation phase via JopOptions (1) Simulation.opts is the steering options file configuration of algorithms in Simulation phase // Pass HepMCEvents to Geant4 Simulation.Members += { "GeneratorToG4" }; // Perform the Geant4 simulation Simulation.Members += { "GiGaFlushAlgorithm" }; // Check the G4Event processing status Simulation.Members += { "GiGaCheckEventStatus" }; // Populate the MCParticles/MCVertices in the TES Simulation.Members += { "G4HepMCToMCTruth" }; // Populate sensitive hits in the TES Simulation.Members += { "GaudiSequencer/DetectorsHits" }; DetectorsHits.Members += { "GetTrackerHitsAlg/GetVeloHits" }; DetectorsHits.Members += { "GetTrackerHitsAlg/GetTTHits" }; ... DetectorsHits.Members += { "GetCaloHitsAlg/GetSpdHits" }; DetectorsHits.Members += { "GetCaloHitsAlg/GetEcalHits" }; DetectorsHits.Members += { "GetMCRichHitsAlg" }; #include “$GAUSSTRACKERROOT/options/TrackersHits.opts” Software Tutorial - Gauss - Last update: 10 October 2007

Control of simulation phase via JopOptions (2) configuration of GiGa to control Geant4 actions // Mandatory run action GiGa.RunAction = "GiGaRunActionSequence/RunSeq"; GiGa.RunSeq.Members += { "TrCutsRunAction/TrCuts"}; GiGa.RunSeq.Members += { "GiGaRunActionCommand/RunCommand" }; GiGa.RunSeq.RunCommand.BeginOfRunCommands = { "/tracking/verbose 0", "/tracking/storeTrajectory 1", "/process/eLoss/verbose -1", }; //GiGa.RunSeq.RunCommand.BeginOfRunCommands += { "/process/list" }; // Mandatory event action GiGa.EventAction = "GiGaEventActionSequence/EventSeq"; GiGa.EventSeq.Members += { "GaussEventActionHepMC/HepMCEvent" }; setting cuts MC truth internal in G4 Software Tutorial - Gauss - Last update: 10 October 2007

GetTrackerHits configuration for TT Detector simulation GiGaSensDetTracker creates G4TrackerHits GetTrackerHitsAlg ProcessHit() Geant4 world converts to: invoked when particle passed through the sensitive volume lvVolume as in XmlDDDB MCHits in TES /Event/MC/OT/Hits Gaudi world <logvol material “Silicon” name="lvLadder1" sensdet="GiGaSensDetTracker/TTSDet"> GetTrackerHits configuration for TT GetTTHits.CollectionName = “TTDSet/Hits”; GetTTHits.MCHitsLocation = “/Event/MC/TT/Hits”; GetTTHits.MCHitsLocation = “/dd/Structure/LHCb/BeforeMagnetRegion/TT”; 9 Software Tutorial - Gauss - Last update: 10 October 2007

Control of Detector simulation In SimGeometry.opts included from Simulation.opts uses a special GiGa component list of detectors to simulate Can give different list: switch off some detectors, add some new, Test Beam setup Just need the sensdet Keyword in the XML Detector Description Simulation.Members += { "GiGaInputStream/Geo" }; #include "$GAUSSOPTS/SimGeometry.opts" Geo.ConversionSvcName = "GiGaGeo" ; Geo.DataProviderSvcName = "DetectorDataSvc" ; Geo.StreamItems += {"/dd/Structure/LHCb/BeforeMagnetRegion/Velo"}; Geo.StreamItems += {"/dd/Structure/LHCb/BeforeMagnetRegion/Velo2Rich1"}; Geo.StreamItems += {"/dd/Structure/LHCb/BeforeMagnetRegion/Rich1"}; Geo.StreamItems += {"/dd/Geometry/BeforeMagnetRegion/Rich1/Rich1Surfaces"}; ... // Geo.StreamItems += {"/dd/Structure/LHCb/DownstreamRegion/Hcal"}; // Geo.StreamItems += {"/dd/Structure/LHCb/DownstreamRegion/Muon"}; Software Tutorial - Gauss - Last update: 10 October 2007

Physics processes and lists Geant4 has a big variety of processes that can be combined as necessary in Physics Lists: crucial part of the whole simulation program most of the stuff already implemented in Geant4 some specific processes needed implementation for RICH: photoelectric process (creation of photoelectrons in HPDs), energy loss in the silicon of HPDs GiGa modular physics lists allows dynamic loading (via jobOptions) of particular physics “sublists” expected to increase flexibility and to make changes easier 10 Software Tutorial - Gauss - Last update: 10 October 2007

Configuration of Physics lists to use Defined as list of options that can be changed In MuonLowEnergy.opts for example: GiGa.ModularPL.PhysicsConstructors += { "GiGaExtPhysics<GeneralPhysics>/GeneralPhysics" } ; { "GiGaExtPhysics<EMPhysics>/EMPhysics" } ; { "GiGaExtPhysics<MuonPhysics>/MuonPhysics" } ; { "GiGaExtPhysics<HadronPhysicsLHEP>/LHEPPhysics" } ; { "GiGaExtPhysics<IonPhysics>/IonPhysics" } ; { "GiGaPhysConstructorOp" } ; { "GiGaPhysConstructorHpd" } ; LHCb RICH processes set a different hadronic physics list with neutrons to thermal energy GiGa.ModularPL.PhysicsConstructors -= { "GiGaExtPhysics<HadronPhysicsLHEP>/LHEPPhysics" } ; GiGa.ModularPL.PhysicsConstructors += { "GiGaExtPhysics<HadronPhysicsQGSP_BERT_HP>/QGSP_BERT_HPPhysics" }; Software Tutorial - Gauss - Last update: 10 October 2007

Geant4 production thresholds Geant4 has production thresholds for EM processes Specify range (which is converted to energy for each material) at which continuous loss begins, track primary down to zero range Create secondaries only above specified range, or add to continuous loss of primary for secondaries of less energetic than travelling the required range in the current material Energy cut = 450 KeV Range cut 1.5 mm (450 KeV in liq.Ar, 2 MeV in Pb) liq.Ar Pb liq.Ar Pb Software Tutorial - Gauss - Last update: 10 October 2007

Energy threshold below which the particle is not tracked. LHCb tracking cuts Introduce tracking cuts on Ekin of particles of all type (special Gauss stepping actions) Track particle until cut-off energy is reached, stop it at that point Possible also to set cuts per region For new geometry for example to turn on delta rays in RICH1 Aerogel (set in Simulation.xml) GiGa.RunSeq.Members += { "TrCutsRunAction/TrCuts"}; Effect of cut value for ECAL with 30 GeV electron particle gun Processing time Energy threshold below which the particle is not tracked. Software Tutorial - Gauss - Last update: 10 October 2007

Control of cuts (1) In job options for overall cuts // Default production cuts for whole detector GiGa.ModularPL.CutForElectron = 10000. * mm; GiGa.ModularPL.CutForPositron = 5.0 * mm; GiGa.ModularPL.CutForGamma = 10.0 * mm; // Default tracking cuts for whole detector GiGa.RunSeq.TrCuts.MuonTrCut = 10.0*MeV; GiGa.RunSeq.TrCuts.pKpiCut = 10.0*MeV; GiGa.RunSeq.TrCuts.NeutrinoTrCut = 0.0*MeV; GiGa.RunSeq.TrCuts.NeutronTrCut = 10.0*MeV; GiGa.RunSeq.TrCuts.GammaTrCut = 1.0*MeV; GiGa.RunSeq.TrCuts.ElectronTrCut = 1.0*MeV; GiGa.RunSeq.TrCuts.OtherTrCut = 0.0*MeV; Production cuts Tracking cuts Software Tutorial - Gauss - Last update: 10 October 2007

Control of cuts (2) In Simulation-v200412.xml for detector specific cuts <SimAtt name="SimAttrMuFilt" minEkine=“500.0*MeV"/> <SimAtt name="SimAttrMuon" minEkine="10.0*MeV"/> <Item name="/dd/Geometry/DownstreamRegion/Muon/lvMuFilter1"> <Cut particle="0" attr="SimAttrMuFilt"/> <Cut particle="13" attr="SimAttrMuon"/> <Cut particle="-13" attr="SimAttrMuon"/> </Item> Software Tutorial - Gauss - Last update: 10 October 2007

Understanding the simulation as a whole To understand in depth the simulation, the information about the history of what happened in the detector is very important (trajectories and processes originating them) MC truth filled at the end of an event processing by Geant4 Necessary to decide a priori what to store when a particle is created, when it is being processed, when it stops being “tracked” Set of criteria can be changed in job options GiGa.TrackSeq.PostTrack.StoreAll = false; GiGa.TrackSeq.PostTrack.StorePrimaries = true; GiGa.TrackSeq.PostTrack.StoreForcedDecays = true; GiGa.TrackSeq.PostTrack.StoreMarkedTracks = true; // The following only for z=12280mm (i.e.PRS/SPD) GiGa.TrackSeq.PostTrack.StoreByOwnEnergy = true; GiGa.TrackSeq.PostTrack.OwnEnergyThreshold = 100.0 * MeV; GiGa.TrackSeq.PostTrack.StoreByChildProcess = true; GiGa.TrackSeq.PostTrack.StoredChildProcesses = {"RichG4Cerenkov"}; GiGa.TrackSeq.PostTrack.StoreByOwnProcess = true; GiGa.TrackSeq.PostTrack.StoredOwnProcesses = {“Decay”}; pp collision by detectors with E > threshold producing Cerenkov from decay in detector Software Tutorial - Gauss - Last update: 10 October 2007

History information after simulation History of particles traveling trough detector in dedicated LHCb event data classes: MCParticles and MCVertices Derive from basic LHCb event data class: KeyedObject Container support Transient and Persistent support Link from other classes ( MCHits for example, but also possibility to associate them to reconstructed Tracks, physics Particles) Relationship between them holds the tree structure An MCParticle has a SmartRef<MCVertex> originVertex() and SmartRefVector<MCVertex> endVertices() more than one end vertex (Bremsstrahlung) An MCVertex has a SmartRef<MCParticle> mother and SmartRefVector<MCParticles> products a primary vertex does not have a mother MCParticle Keep originating process identifier in MCVertex These classes are written out by the simulation and accessed in a variety of ways in successive processing Software Tutorial - Gauss - Last update: 10 October 2007

Output Files and extra information List of output data objects in normal production can be found in GaussTape.opts Sometimes necessary to have additional information for special studies: ex. RICH extended info To get the extra information and write it to tape uncomment $GAUSSOPTS/RichExtendedInfo.opts in Simulation.opts DetectorsHits.Members +={ "GetMCRichOpticalPhotonsAlg“, “GetMCRichSegmentsAlg”, “GetMCRichTracksAlg” }; #include "$GAUSSRICHROOT/options/RichExtendedInfo.opts" GaussTape.OptItemList += { “/Event/MC/Rich/OpticalPhotons#1” ,”/Event/MC/Rich/Tracks#1” ,”/Event/MC/Rich/Segments#1” }; Software Tutorial - Gauss - Last update: 10 October 2007

Exercises You will get familiar with some controls of the simulation Don’t forget you can always read a file you produced 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/ Advanced exercises also available Software Tutorial - Gauss - Last update: 10 October 2007