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#include <set> //for tracking used detector IDs
20
21//----------//
22// LDMX //
23//----------//
24#include "DetDescr/EcalID.h"
29#include "Tools/HgcrocEmulator.h"
31
32namespace ecal {
33
39 public:
43 EcalDigiProducer(const std::string& name, framework::Process& process)
44 : Producer(name, process) {}
45
49 virtual ~EcalDigiProducer() = default;
50
56 virtual void configure(framework::config::Parameters&) override;
57
61 virtual void produce(framework::Event& event) override;
62
66 virtual void onNewRun(const ldmx::RunHeader& runHeader) override;
67
68 private:
70 // Python Configuration Parameters
71
73 std::string input_coll_name_;
74
76 std::string input_pass_name_;
77
79 std::string digi_coll_name_;
80
83
86
88 int i_soi_;
89
91 double mev_;
92
106
108 // Other member variables
109
112 bool noise_{true};
113
115 std::unique_ptr<ldmx::HgcrocEmulator> hgcroc_;
116
118 double ns_;
119
123 double pedestal_;
126
128 std::unique_ptr<ldmx::NoiseGenerator> noise_generator_;
129
131 std::mt19937 rng_;
132};
133} // namespace ecal
134
135#endif
Class that defines an ECal detector ID with a cell number.
Class providing string constants for the event model.
Base classes for all user event processing components to extend.
Class that represents a digitized hit in a calorimeter cell readout by an HGCROC.
Utility used to generate noise hits_.
Class which stores simulated calorimeter hit information.
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:42
Class which represents the process under execution.
Definition Process.h:36
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:29
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:57