Read-out and detector response

Slides:



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

Contents o Introduction o Characteristics of Constructor. o Types of constructor. - Default Constructor - Parameterized Constructor - Copy Constructor.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Geant4 v9.2p02 Scoring II Makoto Asai (SLAC) Geant4 Tutorial Course.
J. P. Cohoon and J. W. Davidson © 1999 McGraw-Hill, Inc. Templates and Polymorphism Generic functions and classes.
Scoring I Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
2006/11/10 Pasadena GEANT4-SPENVIS, Tsukasa Aso, TNCMT 1 Scorer and Sensitive Detector Filter Tsukasa Aso Toyama National College of Maritime Technology,
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 20th, 2002 Stack management, Digitization and Pile-up.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 12 th, 2002 Detector Sensitivity.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Detector Sensitivity.
Nested Parameterization
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.
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.
Some tips for geometries of medical applications Makoto Asai (SLAC)
Geometry 5 I.Hrivnacova¹, J.Apostolakis² ¹IPN, Orsay; ²CERN Cours Paris June 2007.
parameterisation The aim of the exercise is again to build a lead-scintillator calorimeter, this time though the calorimeter will be a trapezoid.
ALICE Offline week, CERN 21 February 2005 I. Hrivnacova 1 New geometry framework in MUON I.Hrivnacova IPN, Orsay ALICE Offline week, CERN 21 February 2005.
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.
Maria Grazia Pia Detector Response Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
ALICE Simulation Framework Ivana Hrivnacova 1 and Andreas Morsch 2 1 NPI ASCR, Rez, Czech Republic 2 CERN, Geneva, Switzerland For the ALICE Collaboration.
LAV Software Status Emanuele Leonardi – Tommaso Spadaro Photon Veto WG meeting – 2015/03/24.
Geant4 internal Classes and Objects Gunter Folger / CERN Geant4 course, Annecy 2008 User Action & Information Classes.
山下智弘 JST CREST/ 神戸大学 Borrowing especially from presentations of M. Asai(SLAC) Geant4 Japan Oct, RCNS, based on Geant4 9.0.p01.
CSCI-383 Object-Oriented Programming & Design Lecture 18.
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.
Geant4 internal Classes and Objects Geant4 Users’ Tutorial February 2010 Gunter Folger / CERN User Action & Information Classes.
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.
The GeoModel Toolkit for Detector Description Joe Boudreau Vakho Tsulaia University of Pittsburgh CHEP’04 Interlaken.
Maria Grazia Pia INFN Genova Salamanca, July 2002
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.
A Thread-Parallel Geant4 with Shared Geometry Gene Cooperman and Xin Dong College of Computer and Information Science Northeastern University 360 Huntington.
Claudio Grandi INFN-Bologna CHEP 2000Abstract B 029 Object Oriented simulation of the Level 1 Trigger system of a CMS muon chamber Claudio Grandi INFN-Bologna.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Makoto Asai (SLAC) Getting Started MGP: added class diagram of basic user application.
Geant4 internal Classes and Objects Gunter Folger / CERN MC-PAD, DESY/Hamburg January 2010 User Action & Information Classes.
Geant4 release 5.1 summary Gabriele Cosmo EP/SFT.
Update G4builder issues Talk written almost entirely by Stan Bentvelsen with a few updates from Christopher Lester ATLAS G4 Workshop December 2000 CAMBRIDGE.
Physics II : processes Paris Geant4 Tutorial 5 June 2007 Marc Verderi Ecole Polytechnique - LLR.
Chapter 16 Templates Copyright © 2008 Pearson Addison-Wesley. All rights reserved.
Geometry 3 I.Hrivnacova IPN, Orsay Most slides thanks to M. Asai, SLAC Cours Paris June 2007.
Maria Grazia Pia Retrieving information from kernel Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
Abstract classes only used as base class from which other classes can be inherit cannot be used to instantiate any objects are incomplete Classes that.
simpleSpectrometer and some Geant4 insights :s
Interaction with the Geant4 kernel
J. Apostolakis, M. Asai, G. Cosmo, A. Howard
Interaction with the Geant4 kernel
Ideas for G4 navigation interface using ROOT geometry
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.
Geant4:User Actions and Analysis
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
Makoto Asai (SLAC) Geant4 Tutorial Course
Reference Counted Touchables Design
Kernel Author: Makoto Asai.
Geant4: Detector description module
Simulation in Experiments searching for rare events
Presentation transcript:

Read-out and detector response

Contents Sensitive detector and hit Digitizer module and digit Hit class Sensitive detector class Touchable Readout geometry G4HCofThisEvent class and its use

Sensitive detector and Hit Each Logical Volume can have a pointer to a sensitive detector. –Then this volume becomes sensitive Hit is a snapshot of the physical interaction of a track or an accumulation of interactions of tracks in the sensitive region of your detector A sensitive detector creates hit(s) using the information given in G4Step object. The user has to provide his/her own implementation of the detector response. –UserSteppingAction class should NOT do this Hit objects, which are still the user’s class objects, are collected in a G4Event object at the end of an event

Detector sensitivity A sensitive detector either –constructs one or more hit objects or –accumulates values to existing hits using information given in a G4Step object. Note that you must get the volume information from the “ PreStepPoint ”. Begin of step point End of step point Step Boundary

Digitizer module and digit Digit represents a detector output (e.g. ADC/TDC count, trigger signal, etc.) Digit is created with one or more hits and/or other digits by a user's concrete implementation derived from G4VDigitizerModule. In contradiction to the sensitive detector which is accessed at tracking time automatically, the digitize() method of each G4VDigitizerModule must be explicitly invoked by the user’s code (e.g. at EventAction)

Hit class Hit is a user-defined class derived from G4VHit You can store various types information by implementing your own concrete Hit class. For example: –Position and time of the step –Momentum and energy of the track –Energy deposition of the step –Geometrical information –or any combination of above Hit objects of a concrete hit class must be stored in a dedicated collection which is instantiated from G4THitsCollection template class The collection will be associated to a G4Event object via G4HCofThisEvent Hits collections are accessible –through G4Event at the end of event  to be used for analyzing an event –through G4SDManager during processing an event  to be used for event filtering

Implementation of Hit class #include "G4VHit.hh" class MyDriftChamberHit : public G4VHit { public: MyDriftChamberHit(); virtual ~MyDriftChamberHit(); virtual void Draw(); virtual void Print(); private: // some data members public: // some set/get methods }; #include “G4THitsCollection.hh” typedef G4THitsCollection MyDriftChamberHitsCollection;

Sensitive Detector class Sensitive detector is a user-defined class derived from G4VSensitiveDetector. #include "G4VSensitiveDetector.hh" #include "MyDriftChamberHit.hh" class G4Step; class G4HCofThisEvent; class MyDriftChamber : public G4VSensitiveDetector { public: MyDriftChamber(G4String name); virtual ~MyDriftChamber(); virtual void Initialize(G4HCofThisEvent*HCE); virtual G4bool ProcessHits(G4Step*aStep, G4TouchableHistory*ROhist); virtual void EndOfEvent(G4HCofThisEvent*HCE); private: MyDriftChamberHitsCollection * hitsCollection; G4int collectionID; };

Implementation of Sensitive Detector MyDriftChamber::MyDriftChamber(G4String name) :G4VSensitiveDetector(name) { collectionName.insert("driftChamberCollection"); collectionID = -1;} void MyDriftChamber::Initialize(G4HCofThisEvent*HCE) { hitsCollection = new MyDriftChamberHitsCollection (SensitiveDetectorName,collectionName[0]); if(collectionID<0) { collectionID = G4SDManager::GetSDMpointer() ->GetCollectionID(hitsCollection); } HCE->AddHitsCollection(collectionID,hitsCollection); } G4bool MyDriftChamber::ProcessHits (G4Step*aStep,G4TouchableHistory*ROhist) { MyDriftChamberHit* aHit = new MyDriftChamberHit(); // some set methods... hitsCollection->insert(aHit); return true; } void MyDriftChamber::EndOfEvent(G4HCofThisEvent*HCE) {;}

Touchable As mentioned already, G4Step has two G4StepPoint objects as its starting and ending points. All the geometrical information of the particular step should be taken from “PreStepPoint” –Geometrical information associated with G4Track is basically same as “PostStepPoint”. Each G4StepPoint object has –Position in world coordinate system –Global and local time –Material –G4TouchableHistory for geometrical information G4TouchableHistory object is a vector of information for each geometrical hierarchy –copy number –transformation / rotation to its mother

Readout geometry In some cases of most complicated geometries, it is not easy to define volume boundaries corresponding to the readout segmentation Readout geometry is a virtual and artificial geometry which can be defined in parallel to the real detector geometry Readout geometry is optional. May have more than one –Each one should be associated to a sensitive detector Note that a step is not limited by the boundary of readout geometry

Defining a sensitive detector Basic strategy G4LogicalVolume* myLogCalor = ……; G4VSensitiveDetector* pSensitivePart = new MyCalorimeter(“/mydet/calorimeter1”); G4SDManager* SDMan = G4SDManager::GetSDMpointer(); SDMan->AddNewDetector(pSensitivePart); myLogCalor->SetSensitiveDetector(pSensitivePart); Each detector object must have a unique name. –Some logical volumes can share one detector object –More than one detector objects can be made from one detector class with different detector name –One logical volume cannot have more than one detector objects. But, one detector object can generate more than one kinds of hits  e.g. a drift chamber class may generate anode and cathode hits separately

G4HCofThisEvent A G4Event object has a G4HCofThisEvent object at the end of (successful) event processing. G4HCofThisEvent object stores all hits collections made within the event –Pointer(s) may be NULL if collection(s) are not created in the particular event –Hits collections are stored by pointers of G4VHitsCollection base class. Thus, you have to cast them to types of individual concrete classes

Usage of G4HCofThisEvent int CHCID = G4SDManager::GetSDMpointer() ->GetCollectionID("myDet/calorimeter1/collection1"); G4HCofThisEvent* HCE = evt->GetHCofThisEvent(); MyCalorimeterHitsCollection* CHC = 0; if(HCE) {CHC = (MyCalorimeterHitsCollection*)(HCE->GetHC(CHCID));} if(CHC) { int n_hit = CHC->entries(); G4cout<<"Calorimeter has ”<<n_hit<<" hits."<<G4endl; for(int i1=0;i1<n_hit;i1++) { MyCalorimeterHit* aHit = (*CHC)[i1]; aHit->Print(); } } This scheme can be utilized also for Digitization.