1#ifndef HCAL_HCALDIGIPRODUCER_H_
2#define HCAL_HCALDIGIPRODUCER_H_
16#include "Tools/HgcrocEmulator.h"
53 enum class TimeSpreadType {
66 std::vector<double>& parameters)
const;
115 std::unique_ptr<ldmx::HgcrocEmulator>
hgcroc_;
120 std::unique_ptr<TRandom2> random_time_;
121 bool do_time_spread_per_spill_{
false};
122 TimeSpreadType time_spread_per_spill_type_{TimeSpreadType::UNIFORM};
123 std::vector<double> time_spread_per_spill_parameters_{};
125 bool do_time_spread_per_hit_{
false};
126 TimeSpreadType time_spread_per_hit_type_{TimeSpreadType::GAUSSIAN};
127 std::vector<double> time_spread_per_hit_parameters_{};
129 double flat_time_shift_{0.};
Base classes for all user event processing components to extend.
Utility used to generate noise hits_.
Implements an event buffer system for storing event data.
Class which represents the process under execution.
Base class for a module which produces a data product.
virtual void process(Event &event) final
Processing an event for a Producer is calling produce.
Class encapsulating parameters for configuring a processor.
Performs basic HCal digitization.
bool noise_
Put noise into empty channels, not configurable, only helpful in development.
double gain_
Read out gain.
HcalDigiProducer(const std::string &name, framework::Process &process)
Constructor Makes unique noise generator and injector for this class.
double attlength_
Strip attenuation length [m].
void produce(framework::Event &event) override
Simulates measurement of pulse and creates digi collection for input event.
bool zero_suppression_
If false, save digis from all channels, even pure noise in empty bars Helpful when comparing with tes...
std::string pulse_truth_coll_name_
output pulse truth collection name
std::string digi_coll_name_
output hit collection name
double mev_
Conversion from energy in MeV to voltage in mV.
double ns_
Conversion from time in ns to ticks of the internal clock.
std::mt19937 rng_
Generates Gaussian noise on top of real hits_.
double noise_rms_
Noise RMS.
int n_adcs_
Depth of ADC buffer.
std::unique_ptr< ldmx::HgcrocEmulator > hgcroc_
Hgcroc Emulator to digitize analog voltage signals.
std::string input_coll_name_
input hit collection name
double readout_threshold_
Read out threshold.
void configure(framework::config::Parameters &) override
Configure this producer from the python configuration.
double clock_cycle_
Time interval for chip clock in ns.
std::string input_pass_name_
input pass name
virtual void onNewRun(const ldmx::RunHeader &runHeader) override
Random number generation.
double makeTimeDelta(TimeSpreadType kind, std::vector< double > ¶meters) const
Create a randomized time delta based on the configured time spread type.
bool save_pulse_truth_info_
If true, save the "analog" composite pulse shape in the HGCROC emulator before it gets digitized.
int i_soi_
Index for the Sample Of Interest in the list of digi samples.
double pedestal_
Read out pedestal.
std::unique_ptr< ldmx::NoiseGenerator > noise_generator_
Generates noise hits based off of number of cells that are not hit.
virtual ~HcalDigiProducer()=default
Default destructor.