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 inputCollName_;
74
76 std::string inputPassName_;
77
79 std::string digiCollName_;
80
83
85 int nADCs_;
86
88 int iSOI_;
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_;
125 double noiseRMS_;
126
128 std::unique_ptr<ldmx::NoiseGenerator> noiseGenerator_;
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.
int iSOI_
Index for the Sample Of Interest in the list of digi samples.
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.
std::string inputCollName_
input hit collection name
double clockCycle_
Time interval for chip clock in ns.
int nADCs_
Depth of ADC buffer.
double readoutThreshold_
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.
std::unique_ptr< ldmx::NoiseGenerator > noiseGenerator_
Generates noise hits based off of number of cells that are not hit.
EcalDigiProducer(const std::string &name, framework::Process &process)
Constructor.
virtual void configure(framework::config::Parameters &) override
Configure this producer from the python configuration.
double noiseRMS_
Noise RMS.
double ns_
Conversion from time in ns to ticks of the internal clock.
std::string digiCollName_
output hit collection name
double MeV_
Conversion from energy in MeV to voltage in mV.
virtual void onNewRun(const ldmx::RunHeader &runHeader) override
Set up random number / noise generation.
std::string inputPassName_
input pass 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.
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