8 double timeWindow = 10;
9 double gridStartTime = 0;
10 double maxStep = 1 * CLHEP::mm;
12 readoutSpecs = std::make_shared<GReadoutSpecs>(timeWindow, gridStartTime, maxStep,
log);
35 log->
info(0,
" Constants loaded for run number ", runno,
" for ctof. var1 is ", var1,
36 ", var2 pointer is ", var2,
", variation is ", variation);
42 std::vector<int> element1 = {1, 2, 3, 4, 5};
43 std::vector<int> element2 = {2, 2, 3, 4, 5};
48 translationTable = std::make_shared<GTranslationTable>(
gopts);
60 GHit* ghit, [[maybe_unused]]
size_t hitn) {
62 auto digitizedData = std::make_unique<GDigitizedData>(
gopts, ghit);
69 for (
auto& time : ghit->
getTimes()) {
70 digi_time += time * 10;
73 digitizedData->includeVariable(
"voltage", edep);
74 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)
GDynamicDigitization * GDynamicDigitizationFactory(const std::shared_ptr< GOptions > &g)
Example dynamic digitization plugin used by the gdynamic digitization examples.