gdynamicDigitization
Loading...
Searching...
No Matches
GDosimeterDigitization Class Reference

Class for dosimeter digitization. Inherits from GDynamicDigitization. More...

#include <ginternalDigitization.h>

Inheritance diagram for GDosimeterDigitization:
Inheritance graph
Collaboration diagram for GDosimeterDigitization:
Collaboration graph

Public Member Functions

bool defineReadoutSpecsImpl () override
 Defines readout specifications for dosimeter digitization.
 
std::unique_ptr< GDigitizedData > digitizeHitImpl (GHit *ghit, size_t hitn) override
 Digitizes a hit for dosimeter detectors.
 
bool loadConstantsImpl (int runno, std::string const &variation) override
 Loads digitization constants for dosimeter digitization.
 
 GDynamicDigitization (const std::shared_ptr< GOptions > &g)
 
- Public Member Functions inherited from GDynamicDigitization
 GDynamicDigitization (const std::shared_ptr< GOptions > &g)
 
virtual ~GDynamicDigitization ()=default
 Virtual destructor.
 
double processStepTime (const std::shared_ptr< GTouchable > &gTouchID, G4Step *thisStep)
 Processes the step time.
 
virtual double processStepTimeImpl (const std::shared_ptr< GTouchable > &gTouchID, G4Step *thisStep)
 Default implementation of processStepTime.
 
std::vector< std::shared_ptr< GTouchable > > processTouchable (std::shared_ptr< GTouchable > gtouchable, G4Step *thisStep)
 Processes a GTouchable based on a G4Step.
 
virtual std::vector< std::shared_ptr< GTouchable > > processTouchableImpl (std::shared_ptr< GTouchable > gtouchable, G4Step *thisStep)
 Processes a GTouchable based on the current G4Step.
 
std::vector< std::shared_ptr< GTouchable > > processGTouchableModifiers (const std::shared_ptr< GTouchable > &gTouchID, const GTouchableModifiers &gmods)
 Processes touchable modifiers.
 
virtual std::vector< std::shared_ptr< GTouchable > > processGTouchableModifiersImpl (const std::shared_ptr< GTouchable > &gTouchID, const GTouchableModifiers &gmods)
 Default implementation for processing touchable modifiers.
 
std::unique_ptr< GTrueInfoData > collectTrueInformation (GHit *ghit, size_t hitn)
 Collects true hit information into a GTrueInfoData object.
 
virtual std::unique_ptr< GTrueInfoData > collectTrueInformationImpl (GHit *ghit, size_t hitn)
 Collects true hit information from a GHit.
 
std::unique_ptr< GDigitizedData > digitizeHit (GHit *ghit, size_t hitn)
 Digitizes hit information into a GDigitizedData object.
 
bool loadConstants (int runno, std::string const &variation)
 Loads digitization constants.
 
bool loadTT (int runno, std::string const &variation)
 Loads the translation table.
 
virtual bool loadTTImpl (int runno, std::string const &variation)
 
void chargeAndTimeAtHardware (int time, int q, const GHit *ghit, GDigitizedData &gdata)
 Sets hardware-level charge and time information in the digitized data.
 
bool defineReadoutSpecs ()
 Pure virtual function to initialize readout specifications.
 
virtual bool decisionToSkipHit (double energy)
 
void set_loggers (const std::shared_ptr< GOptions > &g)
 Sets the loggers for the digitization process.
 

Additional Inherited Members

- Static Public Member Functions inherited from GDynamicDigitization
static GDynamicDigitizationinstantiate (const dlhandle h, std::shared_ptr< GOptions > g)
 Dynamically instantiates a GDynamicDigitization object from a dynamic library.
 
- Data Fields inherited from GDynamicDigitization
std::shared_ptr< const GReadoutSpecsreadoutSpecs
 After init, we never mutate these:
 
std::shared_ptr< const GTranslationTable > translationTable
 
- Protected Member Functions inherited from GDynamicDigitization
void check_if_log_defined () const
 Checks that all required loggers and options are defined.
 
- Protected Attributes inherited from GDynamicDigitization
std::shared_ptr< GOptions > gopts
 Optional pointer to GOptions.
 

Detailed Description

Definition at line 88 of file ginternalDigitization.h.

Member Function Documentation

◆ defineReadoutSpecsImpl()

bool GDosimeterDigitization::defineReadoutSpecsImpl ( )
overridevirtual

Defines the readout specifications for dosimeter digitization.

Initializes readout parameters specific to dosimeter detectors.

Returns
True if readout specifications are successfully defined.

Sets the electronic readout time-window to 10, the grid start time to 0, and uses the hit bitset "000001" to define what information is stored. A new GReadoutSpecs object is created and assigned to readoutSpecs.

Returns
True if the readout specifications are successfully defined.

Implements GDynamicDigitization.

Definition at line 39 of file gDosimeterDigitization.cc.

◆ digitizeHitImpl()

std::unique_ptr< GDigitizedData > GDosimeterDigitization::digitizeHitImpl ( GHit * ghit,
size_t hitn )
overridevirtual

Processes the hit data and returns a pointer to the resulting digitized data.

Parameters
ghitPointer to the hit (GHit) to be digitized.
hitnThe hit index.
Returns
Pointer to a newly created GDigitizedData object.

This function converts a GHit into a GDigitizedData object. It:

  • Checks that required loggers are defined.
  • Extracts the first identifier from the hit's identity vector.
  • Populates the digitized data with basic hit parameters (hit number, total energy, time, etc.).
  • Computes a NIEL weight by iterating over each step of the hit and linearly interpolating the NIEL factor for valid particle IDs.
Parameters
ghitPointer to the GHit to digitize.
hitnThe hit index.
Returns
Pointer to the newly created GDigitizedData object.

Reimplemented from GDynamicDigitization.

Definition at line 64 of file gDosimeterDigitization.cc.

◆ GDynamicDigitization()

GDynamicDigitization::GDynamicDigitization ( const std::shared_ptr< GOptions > & g)
inlineexplicit

Definition at line 106 of file gdynamicdigitization.h.

◆ loadConstantsImpl()

bool GDosimeterDigitization::loadConstantsImpl ( int runno,
std::string const & variation )
overridevirtual

Loads calibration constants (such as NIEL factors) for different particle types.

Parameters
runnoThe run number.
variationA variation string (e.g. configuration identifier).
Returns
True if the constants are successfully loaded.

Loads NIEL calibration data for various particle types from text files. The files are located in the GEMC data directory under "dosimeterData/Niel/". Each file is expected to contain pairs of values (NIEL factor and corresponding energy threshold). Particle masses for calibration are also loaded.

Parameters
runnoRun number (unused).
variationVariation string (unused).
Returns
True if the constants are successfully loaded.

Reimplemented from GDynamicDigitization.

Definition at line 117 of file gDosimeterDigitization.cc.


The documentation for this class was generated from the following files: