LDMX Software
HcalDigiProducer.h
1#ifndef HCAL_HCALDIGIPRODUCER_H_
2#define HCAL_HCALDIGIPRODUCER_H_
3
4//----------------//
5// C++ StdLib //
6//----------------//
7#include <memory> //for smart pointers
8#include <random> //for random num generators
9#include <set> //for tracking used detector IDs
10
11//----------//
12// LDMX //
13//----------//
14#include "DetDescr/HcalDigiID.h"
16#include "DetDescr/HcalID.h"
21#include "Recon/Event/HgcrocPulseTruth.h"
23#include "Tools/HgcrocEmulator.h"
25
26namespace hcal {
27
33 public:
38 HcalDigiProducer(const std::string& name, framework::Process& process);
39
41 virtual ~HcalDigiProducer() = default;
42
49
53 void produce(framework::Event& event) override;
54
58 virtual void onNewRun(const ldmx::RunHeader& runHeader) override;
59
60 private:
62 // Python Configuration Parameters
63
65 std::string input_coll_name_;
66
68 std::string input_pass_name_;
69
71 std::string digi_coll_name_;
72
75
78
81
83 int i_soi_;
84
86 double me_v_;
87
89 double attlength_;
90
92 // Other member variables
93
96 bool noise_{true};
97
101
105
107 std::unique_ptr<ldmx::HgcrocEmulator> hgcroc_;
108
110 double ns_;
111
115 double pedestal_;
117 double gain_;
120
122 std::unique_ptr<ldmx::NoiseGenerator> noise_generator_;
123
125 std::mt19937 rng_;
126};
127} // namespace hcal
128
129#endif
Class providing string constants for the event model.
Base classes for all user event processing components to extend.
Class that translates HCal ID into positions of strip hits.
Class that defines an HCal sensitive detector.
Class that represents a digitized hit in a calorimeter cell readout by an HGCROC.
Utility used to generate noise hits_.
Conditions object for random number seeds.
Class which stores simulated calorimeter hit information.
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.
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
Performs basic HCal digitization.
bool noise_
Put noise into empty channels, not configurable, only helpful in development.
int n_ad_cs_
Depth of ADC buffer.
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 me_v_
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.
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.
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.
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:57