LDMX Software
EcalDigiProducer.h
Go to the documentation of this file.
1
11#ifndef EVENTPROC_ECALDIGIPRODUCER_H_
12#define EVENTPROC_ECALDIGIPRODUCER_H_
13
14//----------------//
15// C++ StdLib //
16//----------------//
17#include <memory> //for smart pointers
18#include <random> //for random num generators
19
20//----------//
21// LDMX //
22//----------//
24#include "Tools/HgcrocEmulator.h"
26
27namespace ecal {
28
34 public:
38 EcalDigiProducer(const std::string& name, framework::Process& process)
39 : Producer(name, process) {}
40
44 virtual ~EcalDigiProducer() = default;
45
51 virtual void configure(framework::config::Parameters&) override;
52
56 virtual void produce(framework::Event& event) override;
57
61 virtual void onNewRun(const ldmx::RunHeader& runHeader) override;
62
63 private:
65 // Python Configuration Parameters
66
68 std::string input_coll_name_;
69
71 std::string input_pass_name_;
72
74 std::string digi_coll_name_;
75
78
81
83 int i_soi_;
84
86 double mev_;
87
101
103 // Other member variables
104
107 bool noise_{true};
108
110 std::unique_ptr<ldmx::HgcrocEmulator> hgcroc_;
111
113 double ns_;
114
118 double pedestal_;
121
123 std::unique_ptr<ldmx::NoiseGenerator> noise_generator_;
124
126 std::mt19937 rng_;
127};
128} // namespace ecal
129
130#endif
Base classes for all user event processing components to extend.
Utility used to generate noise hits_.
Performs basic ECal digitization.
std::unique_ptr< ldmx::NoiseGenerator > noise_generator_
Generates noise hits based off of number of cells that are not hit.
std::string input_pass_name_
input pass name
double noise_rms_
Noise RMS.
bool noise_
Put noise into empty channels, not configurable, only helpful in development.
std::mt19937 rng_
Generates random numbers for which channels to fill up with noise.
double readout_threshold_
Read out threshold.
virtual void produce(framework::Event &event) override
Simulates measurement of pulse and creates digi collection for input event.
double pedestal_
Read out pedestal.
double mev_
Conversion from energy in MeV to voltage in mV.
EcalDigiProducer(const std::string &name, framework::Process &process)
Constructor.
virtual void configure(framework::config::Parameters &) override
Configure this producer from the python configuration.
int i_soi_
Index for the Sample Of Interest in the list of digi samples.
double clock_cycle_
Time interval for chip clock in ns.
double ns_
Conversion from time in ns to ticks of the internal clock.
std::string digi_coll_name_
output hit collection name
virtual void onNewRun(const ldmx::RunHeader &runHeader) override
Set up random number / noise generation.
int n_adcs_
Depth of ADC buffer.
std::string input_coll_name_
input hit collection name
virtual ~EcalDigiProducer()=default
Destructor.
std::unique_ptr< ldmx::HgcrocEmulator > hgcroc_
Hgcroc Emulator to digitize analog voltage signals.
bool zero_suppression_
When emulating noise in empty channels, do we zero suppress?
Implements an event buffer system for storing event data.
Definition Event.h:40
Class which represents the process under execution.
Definition Process.h:34
Base class for a module which produces a data product.
Producer(const std::string &name, Process &process)
Class constructor.
virtual void process(Event &event) final
Processing an event for a Producer is calling produce.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:68