What Is a Sensitive Detector?
Table of Contents
Detecting particle interactions
In a Geant4 simulation your detector hardware is represented by volumes in the geometry, but by default these volumes do not “notice” any particles that pass through them. A sensitive detector is the Geant4 concept that turns a geometrical volume into something that can react to particle interactions and record information about what happened.
A sensitive detector is a C++ object derived from the class G4VSensitiveDetector. It is attached to one or more logical volumes that represent active detector parts. Whenever a particle step occurs inside such a logical volume, Geant4 calls the sensitive detector so that it can inspect the step and decide whether this interaction is important for your simulation.
You can think of the roles as clearly separated. The geometry system describes where matter is placed and which material it has. The physics processes describe how particles lose energy, scatter, or produce secondaries. The sensitive detector sits on top of these and listens to the steps that occur in specific volumes, then converts those physical interactions into quantities that look like a detector readout.
Typical situations where you want a volume to be sensitive include scintillator crystals in a calorimeter, silicon strips in a tracker, gas cells in a time projection chamber, or photon sensors in an optical setup. Passive objects such as support structures, shielding blocks, or air gaps usually have no sensitive detector, even though particles still interact in them.
It is important to note that a sensitive detector does not change the physics of how particles move or interact. Particle tracking and all physical processes are handled independently. The sensitive detector simply receives a description of each step through its volume and can extract information such as energy deposition and position in order to build a detector response.
Internally, Geant4 groups sensitive detector activity per event. For each event, every sensitive detector can create and fill hits, which are data objects representing individual contributions to the detector signal. These hits are collected into hit collections that belong to that event. Later, in your event or run actions, you can retrieve and analyze these collections.
Because sensitive detectors are attached to logical volumes, you control the granularity of your readout by your geometry design. A single logical volume with one sensitive detector may represent a whole detector module, or you may divide the geometry into many small logical volumes with separate identifiers to get a finely segmented readout. The sensitive detector will receive separate steps for each volume instance, which you can distinguish using volume or copy numbers.
Recording detector responses
The main purpose of a sensitive detector is to transform the low level description of steps into a higher level detector response that resembles what a real measurement device would output. In Geant4, this is done by looking at each step that occurs in a sensitive logical volume and deciding what kind of hit or signal it should produce.
When a step occurs in a sensitive volume, Geant4 calls the ProcessHits method of the attached sensitive detector, passing a G4Step object. This G4Step contains all the detailed information about that small piece of the particle track inside the volume, such as step length, energy deposited in the step, position at the beginning and end of the step, global time, and the ID of the track and its parent.
Inside ProcessHits your code typically performs three tasks. First, it checks whether the step should contribute to the readout at all, for example you can ignore steps with zero energy deposit if they are not relevant. Second, it extracts the quantities that matter for your detector, such as deposited energy, step position, time, and perhaps the particle type. Third, it creates or updates a hit object that stores these quantities in a convenient form.
A hit in Geant4 usually represents the smallest unit of detector information that you want to keep. For a calorimeter, one hit might be the total energy deposited in a single detector cell in one event. For a tracking detector, one hit can correspond to one cluster or strip signal. Hits are collected in hit collections associated with the sensitive detector and with the event. At the end of the event, you can obtain these hit collections in your event action and, for example, fill histograms or ntuples using the analysis system.
The mapping from physical interactions to detector response is under your control. You might sum all step energy deposits in a detector element into a single hit per event. You might record the first time a particle crosses a detector plane to model a trigger counter. You might store multiple hits when a particle enters and leaves a volume, using pre step and post step positions to determine entry and exit. In all cases, the sensitive detector is where you implement the logic that makes simulated data resemble real detector signals.
Sensitive detectors can also assign identifiers to each hit so that you can later reconstruct where in the detector it occurred. Typically this relies on information from the touched volume, such as copy numbers or user defined indices. Combined with the event number and track information, this makes it possible to reconstruct tracks, energy deposits, and timing in your analysis stage.
Finally, while hits capture the response inside sensitive volumes, they do not persist by themselves outside the event. To make use of them, your user actions must access the hit collections and move the relevant quantities into your chosen output format, such as histograms or ntuples. In that sense, sensitive detectors form the connection between the microscopic step by step physics simulation and the macroscopic observables that you analyze as detector data.
A sensitive detector does not alter particle transport or physics. It only observes steps in selected logical volumes and converts them into hits that represent the simulated detector response for each event.
Views: 9
KAHIBARO