8 double timeWindow = 10;
9 double gridStartTime = 0;
13 readoutSpecs = std::make_shared<GReadoutSpecs>(timeWindow, gridStartTime, hitBitSet,
log);
36 log->
info(0,
" Constants loaded for run number ", runno,
" for ctof. var1 is ", var1,
37 ", var2 pointer is ", var2,
", variation is ", variation);
43 std::vector<int> element1 = {1, 2, 3, 4, 5};
44 std::vector<int> element2 = {2, 2, 3, 4, 5};
49 translationTable = std::make_shared<GTranslationTable>(
gopts);
61 GHit* ghit, [[maybe_unused]]
size_t hitn) {
63 auto digitizedData = std::make_unique<GDigitizedData>(
gopts, ghit);
70 for (
auto& time : ghit->
getTimes()) {
71 digi_time += time * 10;
74 digitizedData->includeVariable(
"voltage", edep);
75 digitizedData->includeVariable(
"digi_time", digi_time);
std::shared_ptr< GLogger > log
Abstract base class for dynamically loaded digitization plugins.
std::shared_ptr< GOptions > gopts
Options used by the digitization plugin instance.
std::shared_ptr< const GReadoutSpecs > readoutSpecs
Readout specs are created during initialization and treated as immutable.
std::vector< double > getTimes() const
double getTotalEnergyDeposited()
void info(int level, Args &&... args) const
Minimal test plugin for dynamic digitization.
bool loadConstantsImpl(int runno, std::string const &variation) override
Loads example constants used by this plugin.
bool loadTTImpl(int runno, std::string const &variation) override
Builds a minimal in-memory translation table for the example.
std::unique_ptr< GDigitizedData > digitizeHitImpl(GHit *ghit, size_t hitn) override
Digitizes the provided hit into a small example output record.
bool defineReadoutSpecsImpl() override
Defines readout specifications for this example plugin.
void addGElectronicWithIdentity(const std::vector< int > &identity, const GElectronic >ron)
std::bitset< NHITBITS > HitBitSet
GDynamicDigitization * GDynamicDigitizationFactory(const std::shared_ptr< GOptions > &g)
Example dynamic digitization plugin used by the gdynamic digitization examples.