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

Immutable readout timing and storage specification. More...

#include <greadoutSpecs.h>

Public Member Functions

 GReadoutSpecs (const double tw, const double gst, const HitBitSet hbs, const std::shared_ptr< GLogger > &log)
 Constructs a GReadoutSpecs object.
 
HitBitSet getHitBitSet () const
 Returns the configured hit bitset.
 
int timeCellIndex (double time) const
 Computes the 1-based electronics time-cell index for a given time.
 

Detailed Description

Instances of this class are typically constructed by digitization plugins inside defineReadoutSpecs() and then shared as an immutable object for subsequent processing.

Note
The class is designed to be trivially destructible (enforced by a static_assert below).

Definition at line 34 of file greadoutSpecs.h.

Constructor & Destructor Documentation

◆ GReadoutSpecs()

GReadoutSpecs::GReadoutSpecs ( const double tw,
const double gst,
const HitBitSet hbs,
const std::shared_ptr< GLogger > & log )
inline

The constructor logs the parameters at verbosity level 1.

Parameters
twElectronics time window (width of one time cell).
gstGrid start time (time offset for binning).
hbsHit bitset controlling which hit fields are stored/computed.
logLogger used for informational output.

Definition at line 57 of file greadoutSpecs.h.

Member Function Documentation

◆ getHitBitSet()

HitBitSet GReadoutSpecs::getHitBitSet ( ) const
inline
Returns
The HitBitSet that defines what hit information is stored.

Definition at line 70 of file greadoutSpecs.h.

◆ timeCellIndex()

int GReadoutSpecs::timeCellIndex ( double time) const
inline

The current convention returns a 1-based index:

\[
\mathrm{index} = \left\lfloor \frac{t - \mathrm{gridStartTime}}{\mathrm{timeWindow}} \right\rfloor + 1
\]

This is commonly used to:

  • split GTouchables when a hit spans multiple electronics time bins
  • label digitized hits by an electronics "frame" index
Parameters
timeTime value to bin (time unit follows project conventions; commonly ns).
Returns
1-based time-cell index as an integer.

Definition at line 87 of file greadoutSpecs.h.


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