Maria Grazia Pia Detector Response Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.

Slides:



Advertisements
Similar presentations
Geant4 v9.2p02 Speed up Makoto Asai (SLAC) Geant4 Tutorial Course.
Advertisements

Geant4 v9.2p02 Scoring II Makoto Asai (SLAC) Geant4 Tutorial Course.
Scoring I Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Improvements of sampling and scoring ( User Requirements: Scoring for event biasing options) Tsukasa Aso, Toyama National College of Maritime Technology,
Makoto Asai (SLAC) Geant4 Users CERN Nov. 12 th, 2002 Detector Sensitivity.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Detector Sensitivity.
Alex Howard - Event Biasing Mini-Workshop - SLAC Geometrical Event biasing and Variance Reduction – Talk 2 Alex Howard, CERN Event Biasing Mini-Workshop,
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Scoring II Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 20th, 2002 Stack management, Digitization and Pile-up.
S. Guatelli, M.G Pia, INFN Genova S. Guatelli ( CERN, INFN Genova ) CERN, 13 November 2002 Users Workshop Where to put analysis in Geant4 Applications.
Makoto Asai (SLAC) Geant4 Tutorial Course
Geant4 v9.3 Scoring II Makoto Asai (SLAC) Geant4 Tutorial Course.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 13th, 2002 Stack management, Digitization and Pile-up.
Abstraction: Polymorphism, pt. 1 Abstracting Objects.
Tabular Editors for Geant4 Geant4 Geometry Editor and Geant4 Physics Editor CHEP 2000 at Padova Hajime Yoshida Naruto University of Education.
parameterisation The aim of the exercise is again to build a lead-scintillator calorimeter, this time though the calorimeter will be a trapezoid.
SDC PUBLICATIONS © 2012 Chapter 8 Constructive Solid Geometry Concepts Learning Objectives:  Understand Constructive Solid Geometry Concepts  Create.
Other GEANT4 capabilities Event biasing Parameterisation (fast simulation) Scoring Persistency Parallelisation and integration in a distributed computing.
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Collaboration.
山下智弘 JST CREST/ 神戸大学 Borrowing especially from presentations of M. Asai(SLAC) Geant4 Japan Oct, RCNS, based on Geant4 9.0.p01.
Thread-safety and shared geometry data J. Apostolakis.
User Application Luciano Pandola INFN-LNGS Partially based on a presentation by Maria Grazia Pia (INFN-Ge)
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Collaboration.
Alex Howard - Event Biasing Geant4 Users - Lisbon Event biasing and Variance Reduction - Geometrical Alex Howard, CERN Geant4 Users Workshop, Lisbon.
Geant zemi 2007/1/11. Sensitive detector In a simulation, we want to know –Position and time of the particle at the detector –Momentum and energy of the.
Maria Grazia Pia INFN Genova Salamanca, July 2002
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.
A proposal for a Proposal for a Simulation Framework in BTeV G. Cerati, E. Di Maio, S. Magni, D. Menasce.
VMC workshop1 Ideas for G4 navigation interface using ROOT geometry A.Gheata ALICE offline week, 30 May 05.
Run and Event G4Run and G4RunManager In Geant4, the Run is the largest unit of simulation and it consist of a series of events Within a Run, the detector.
May 20, 2005Wah-kai Ngai1 Basic Visualization Tutorial Using Geant4.
Maria Grazia Pia Hands-on exercises Unit 2 Modelling the experimental set-up.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Alex Howard, CERN - Event Biasing Overview – Hebden Bridge 13 th September Event biasing and Variance Reduction Alex Howard, CERN Event Biasing.
Geant4 release 5.1 summary Gabriele Cosmo EP/SFT.
LAV Simulation Emanuele Leonardi INFN Roma Photon Veto meeting 08/02/2011.
Read-out and detector response
Physics II : processes Paris Geant4 Tutorial 5 June 2007 Marc Verderi Ecole Polytechnique - LLR.
Geometry 3 I.Hrivnacova IPN, Orsay Most slides thanks to M. Asai, SLAC Cours Paris June 2007.
1 Exercises 0 Go inside the “hadrontherapy” directory: cd hadrontherapy Copy the Hadrontherapy example to your home folder: cp –r $G4INSTALL/examples/advanced/hadrontherapy.
MONTE CARLO TRANSPORT SIMULATION Panda Computing Week 2012, Torino.
Maria Grazia Pia Retrieving information from kernel Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
Unit 4 Retrieving information from the simulation
Interaction with the Geant4 kernel
Biasing and scoring
J. Apostolakis, M. Asai, G. Cosmo, A. Howard
A C++ generic model for the GLAST Geometric Description
Interaction with the Geant4 kernel
Chapter 3: Using Methods, Classes, and Objects
HEP detector description supporting the full experiment life cycle
Ideas for G4 navigation interface using ROOT geometry
Biasing and scoring
Basics of a user application
C++ for Geant4 users A collection of most useful and/or common features used in and to use Geant4 Marc Verderi LLR – Ecole polytechnique 14/11/2018 Marc.
Makoto Asai (SLAC) Geant4 Tutorial Course
Geant4 introduction 2008/03/18 Nobu Katayama KEK
Read-out and detector response
Makoto Asai (SLAC) Geant4 Tutorial Course
Detector sensitivity Makoto Asai (SLAC Computing Services)
A shortcut to the tracking
Read-out and detector response
Makoto Asai (SLAC) Geant4 Tutorial Course
The n-3He Simulation Using Geant4
Makoto Asai (SLAC) Geant4 Tutorial Course
Kernel Author: Makoto Asai.
Geant4: Detector description module
Simulation in Experiments searching for rare events
Presentation transcript:

Maria Grazia Pia Detector Response Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard

Maria Grazia Pia Overview Concepts Readout geometry Sensitive detector Hits Digis Details Hit class Sensitive detector class Hits Collection class and its use Basic features Digitizer module and digit Touchable

Maria Grazia Pia Basic concepts

Maria Grazia Pia Extracting information from the simulation Once the mandatory classes (DetectorConstruction, PhysicsList, PrimaryGeneration) are implemented, the Geant4 application does not yet include functionality to extract information produced in the simulation A user must provide his/her own code To extract information relevant to the simulation application To describe the detector response Geant4 concepts for such functionality are  Sensitive Detector (optionally with Readout Geometry )  Hits and Hits Collections  Digis and Digis Collections

Maria Grazia Pia Built by G4VUserDetectorConstructionBuilt by G4VReadoutGeometry Readout geometry Readout geometry is a virtual and artificial geometry which can be defined in parallel to the real detector geometry Tracks will be tracked in the “real” geometry, but the sensitive detector can have its own geometry for readout purposes e.g. to find the cell the current hit belongs to The readout geometry is optional; on may have more than one Each one should be associated to a sensitive detector But a sensitive detector is not required to have a readout geometry A step is not limited by the boundary of the readout geometry During tracking, the G4TouchableHistory of the RO geometry according to the PreStepPoint position will be provided to the sensitive detector

Maria Grazia Pia How to create a ReadOut Geometry Derive your own concrete class from the G4VReadoutGeometry abstract base class The geometry setup is done in the same way as for the “real” tracking geometry: Create solids, logical and physical volumes However, the materials used in the RO geometry are dummy materials i.e. they are not used A sensitive detector for the RO geometry must be defined but is not used This means that you need to declare the sensitive parts of the RO geometry by setting a non-NULL sensitive detector pointer to the logical volume

Maria Grazia Pia Hit Hit is a user-defined class, which derives from the G4VHit base class You can store various kind of information by implementing your own concrete Hit class Typically one records quantities like: Position and time of the step Momentum and energy of the track Energy deposit in the step Geometrical information etc.

Maria Grazia Pia Example of a Hit class // header file: MyHit.hh #include “G4VHit.hh” class MyHit : public G4VHit { public: MyHit(); virtual ~MyHit();... inline void SetEnergyDeposit(double energy) { energyDeposit = energy; } inline double GetEnergyDeposit() { return energyDeposit;}... // more member functions private: G4double energyDeposit;... // more data members };

Maria Grazia Pia Sensitive Detector A logical volume becomes sensitive if it has a pointer to a SensitiveDetector (SD) A SensitiveDetector can be instantiated several times, where the instances are assigned to different logical volumes SD objects must have unique detector names A logical volume can only have one SD object attached But you can implement your detector to have multiple functionality Two possibilities to make use of the SD functionality  Create your own sensitive detector  Highly customizable  Use Geant4 built-in tools  Primitive Scorers

Maria Grazia Pia Creating your own sensitive detector A powerful way of extracting information from the physics simulation is to define your own SD The ingredients of the scoring setup are: Derive your own concrete classes from the base classes and customize them according to your needs Base class Concrete class Sensitive Detector Readout Geometry Hit G4VSensitiveDetector G4VReadoutGeometry G4VHit MySensitiveDetector MyReadoutGeometry MyHit Template class Hits CollectionG4THitsCollection

Maria Grazia Pia Basic strategy to retrieve information - 1 Assume that you have already created the detector geometry Shape and size (Solid) of your detector, Material Logical volumes Physical volumes Implement a sensitive detector and assign an instance of it to the logical volume of your detector geometry setup Then this volume becomes sensitive The sensitive detector will become “active” for each particle step, if the step starts inside this logical volume Optionally: implement a readout geometry and attach it to the sensitive detector

Maria Grazia Pia Adding sensitivity to a logical volume Create an instance of a sensitive detector Register the sensitive detector to the SD manager Assign the pointer of your SD to the logical volume of your detector geometry G4VSolid* boxSolid = new G4Box( “aBoxSolid“, 1.* cm, 1.* cm, 1.* cm); G4LogicalVolume* boxLog = new G4LogicalVolume( boxSolid, materialSilicon, “aBoxLog“, 0, 0, 0); G4VSensitiveDetector* sensitiveBox = new MySensitiveDetector(“MyDetector”); G4SDManager* SDManager = G4SDManager::GetSDMPointer(); SDManager ->AddNewDetector(sensitiveBox); boxLog ->SetSensitiveDetector(sensitiveBox);

Maria Grazia Pia Basic strategy to retrieve information - 2 Hit Then, create Hit objects in your sensitive detector using information from particle steps Hit Hit is a snapshot of the physical interaction of a track or an accumulation of interactions of tracks in the sensitive or interesting region of your detector You should create hit class(es) according to your needs Use Touchable of the Readout Geometry to retrieve geometrical information associated with hits Store your hits in Hit Collections hit collections are automatically associated to the G4Event object Finally, process the information associated with hits in User Action classes (G4UserEventAction,G4UserRunAction etc.) to obtain a summary of the relevant event/run features

Maria Grazia Pia Using built-in scorers Alternatively, you can use a predefined sensitive detector G4MultiFunctionalDetector and primitive scorers : Each primitive scorer stores one physics quantity for each physical volume (accumulated over an event) Many scorers are provided by Geant4 energy deposit, flux,... Concrete class Sensitive Detector Primitive Scorers G4MultiFunctionalDetector G4PSEnergyDeposit, G4PSTracklength,... Template class Hits Collection G4THitsMap

Maria Grazia Pia Basic strategy to retrieve information Assume that you have already created the detector geometry Shape and size (Solid) of your detector, Material Logical volumes Physical volumes Assign an instance of the Geant4 multifunctional detector (G4MultiFunctionalDetector) to the logical volume of your detector geometry set-up Register instances of the required primitive scorers to your multifunctional detector Finally, process the content of hit maps