Sensitivity
In GEMC, a volume becomes sensitive when its digitization field is set. The value is the name
of the digitization routine that will receive Geant4 steps from that volume and turn them into
digitized output.
gvolume.digitization = "flux"
gvolume.set_identifier("sector", 1)
gvolume.set_identifier("layer", 2)
The identifier fields define the detector element address written to output. Use enough identifiers to distinguish the sensitive elements you want to analyze, such as sector, layer, paddle, or channel.
Digitization hooks
A digitization routine is a set of overridable hooks that GEMC calls across the hit lifecycle: it is
configured once, primed when the run number changes, called for every Geant4 step, and harvested at the end
of each event — where digitizeHit builds the measured bank, the optional apply_thresholds /
apply_efficiency hooks reject hits, and collectTrueInformation writes the Monte-Carlo truth. Run-mode
routines add a final normalize.
See the Digitization Workflow for when each hook runs and how
the data flows, and Custom digitization plugins for
implementing them in a .gplugin.
Built-in digitizations
| Digitization | Collection | Main use |
|---|---|---|
flux |
event | Track passage and hit-level observables |
dosimeter |
run | Integrated deposited energy and dose |
particle_counter |
event | Per-pid counting |
gPhotonDetector |
event | Optical-photon detectors |
| Custom plugin | any | User-defined electronics model via .gplugin |
Output behavior
Event-level digitizations write one output file per thread for ASCII and CSV streamers. Run-level digitizations write one integrated output file.
The recordZeroEdep option controls whether ordinary zero-energy steps are recorded. Optical photons
usually deposit zero energy in detector volumes; gPhotonDetector handles this case directly and does
not require recordZeroEdep.
Choosing a sensitivity
Use flux when you want one hit per track in each sensitive element.
Use dosimeter when the detector should accumulate energy deposition and dose across the run.
Use particle_counter when hits in the same sensitive element should be grouped by pid rather than by track id.
Use gPhotonDetector for Cherenkov and other optical examples where only optical photons should be
recorded.
Write a custom plugin when you need a detector-specific electronics model such as time-to-distance conversion, charge sharing, TDC jitter, or calibration corrections loaded from a database.