LDMX Software
|
Performs basic ECal digitization. More...
#include <EcalDigiProducer.h>
Public Member Functions | |
EcalDigiProducer (const std::string &name, framework::Process &process) | |
Constructor. | |
virtual | ~EcalDigiProducer ()=default |
Destructor. | |
virtual void | configure (framework::config::Parameters &) override |
Configure this producer from the python configuration. | |
virtual void | produce (framework::Event &event) override |
Simulates measurement of pulse and creates digi collection for input event. | |
virtual void | onNewRun (const ldmx::RunHeader &runHeader) override |
Set up random number / noise generation. | |
![]() | |
Producer (const std::string &name, Process &process) | |
Class constructor. | |
virtual void | beforeNewRun (ldmx::RunHeader &header) |
Handle allowing producers to modify run headers before the run begins. | |
![]() | |
EventProcessor (const std::string &name, Process &process) | |
Class constructor. | |
virtual | ~EventProcessor () |
Class destructor. | |
virtual void | onFileOpen (EventFile &eventFile) |
Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened. | |
virtual void | onFileClose (EventFile &eventFile) |
Callback for the EventProcessor to take any necessary action when a event input ROOT file is closed. | |
virtual void | onProcessStart () |
Callback for the EventProcessor to take any necessary action when the processing of events starts, such as creating histograms. | |
virtual void | onProcessEnd () |
Callback for the EventProcessor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities. | |
template<class T > | |
const T & | getCondition (const std::string &condition_name) |
Access a conditions object for the current event. | |
TDirectory * | getHistoDirectory () |
Access/create a directory in the histogram file for this event processor to create histograms and analysis tuples. | |
void | setStorageHint (framework::StorageControl::Hint hint) |
Mark the current event as having the given storage control hint from this module. | |
void | setStorageHint (framework::StorageControl::Hint hint, const std::string &purposeString) |
Mark the current event as having the given storage control hint from this module and the given purpose string. | |
int | getLogFrequency () const |
Get the current logging frequency from the process. | |
int | getRunNumber () const |
Get the run number from the process. | |
std::string | getName () const |
Get the processor name. | |
void | createHistograms (const std::vector< framework::config::Parameters > &histos) |
Internal function which is used to create histograms passed from the python configuration @parma histos vector of Parameters that configure histograms to create. | |
Private Attributes | |
std::string | inputCollName_ |
input hit collection name | |
std::string | inputPassName_ |
input pass name | |
std::string | digiCollName_ |
output hit collection name | |
double | clockCycle_ |
Time interval for chip clock in ns. | |
int | nADCs_ |
Depth of ADC buffer. | |
int | iSOI_ |
Index for the Sample Of Interest in the list of digi samples. | |
double | MeV_ |
Conversion from energy in MeV to voltage in mV. | |
bool | zero_suppression_ |
When emulating noise in empty channels, do we zero suppress? | |
bool | noise_ {true} |
Put noise into empty channels, not configurable, only helpful in development. | |
std::unique_ptr< ldmx::HgcrocEmulator > | hgcroc_ |
Hgcroc Emulator to digitize analog voltage signals. | |
double | ns_ |
Conversion from time in ns to ticks of the internal clock. | |
double | readoutThreshold_ |
Read out threshold. | |
double | pedestal_ |
Read out pedestal. | |
double | noiseRMS_ |
Noise RMS. | |
std::unique_ptr< ldmx::NoiseGenerator > | noiseGenerator_ |
Generates noise hits based off of number of cells that are not hit. | |
std::mt19937 | rng_ |
Generates random numbers for which channels to fill up with noise. | |
Additional Inherited Members | |
![]() | |
static void | declare (const std::string &classname, int classtype, EventProcessorMaker *) |
Internal function which is part of the PluginFactory machinery. | |
![]() | |
static const int | CLASSTYPE {1} |
Constant used to track EventProcessor types by the PluginFactory. | |
![]() | |
void | abortEvent () |
Abort the event immediately. | |
![]() | |
HistogramHelper | histograms_ |
Interface class for making and filling histograms. | |
NtupleManager & | ntuple_ {NtupleManager::getInstance()} |
Manager for any ntuples. | |
logging::logger | theLog_ |
The logger for this EventProcessor. | |
Performs basic ECal digitization.
Definition at line 38 of file EcalDigiProducer.h.
|
inline |
Constructor.
Definition at line 43 of file EcalDigiProducer.h.
|
overridevirtual |
Configure this producer from the python configuration.
Sets event constants and configures the noise generator, noise injector, and pulse function. Creates digi collection
Reimplemented from framework::EventProcessor.
Definition at line 16 of file EcalDigiProducer.cxx.
References clockCycle_, digiCollName_, hgcroc_, inputCollName_, inputPassName_, iSOI_, MeV_, nADCs_, noise_, noiseRMS_, ns_, pedestal_, readoutThreshold_, and zero_suppression_.
|
overridevirtual |
Set up random number / noise generation.
Reimplemented from framework::EventProcessor.
Definition at line 46 of file EcalDigiProducer.cxx.
References framework::RandomNumberSeedService::CONDITIONS_OBJECT_NAME, framework::EventProcessor::getCondition(), hgcroc_, noiseGenerator_, noiseRMS_, pedestal_, readoutThreshold_, and rng_.
|
overridevirtual |
Simulates measurement of pulse and creates digi collection for input event.
HACK ALERT The shifting of the time should not be done this sloppily. In reality, each chip has a set time phase that it samples at (relative to target), so the time shifting should be at the emulator level.
Implements framework::Producer.
Definition at line 73 of file EcalDigiProducer.cxx.
References ldmx::HgcrocDigiCollection::addDigi(), framework::EventProcessor::getCondition(), ldmx::HgcrocDigiCollection::getNumDigis(), hgcroc_, inputCollName_, inputPassName_, iSOI_, MeV_, nADCs_, noise_, noiseGenerator_, ldmx::DetectorID::raw(), rng_, ldmx::HgcrocDigiCollection::setNumSamplesPerDigi(), ldmx::HgcrocDigiCollection::setSampleOfInterestIndex(), and zero_suppression_.
|
private |
Time interval for chip clock in ns.
Definition at line 82 of file EcalDigiProducer.h.
Referenced by configure().
|
private |
output hit collection name
Definition at line 79 of file EcalDigiProducer.h.
Referenced by configure().
|
private |
Hgcroc Emulator to digitize analog voltage signals.
Definition at line 115 of file EcalDigiProducer.h.
Referenced by configure(), onNewRun(), and produce().
|
private |
input hit collection name
Definition at line 73 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
input pass name
Definition at line 76 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
Index for the Sample Of Interest in the list of digi samples.
Definition at line 88 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
Conversion from energy in MeV to voltage in mV.
Definition at line 91 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
Depth of ADC buffer.
Definition at line 85 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
Put noise into empty channels, not configurable, only helpful in development.
Definition at line 112 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
Generates noise hits based off of number of cells that are not hit.
Definition at line 128 of file EcalDigiProducer.h.
Referenced by onNewRun(), and produce().
|
private |
Noise RMS.
Definition at line 125 of file EcalDigiProducer.h.
Referenced by configure(), and onNewRun().
|
private |
Conversion from time in ns to ticks of the internal clock.
Definition at line 118 of file EcalDigiProducer.h.
Referenced by configure().
|
private |
Read out pedestal.
Definition at line 123 of file EcalDigiProducer.h.
Referenced by configure(), and onNewRun().
|
private |
Read out threshold.
Definition at line 121 of file EcalDigiProducer.h.
Referenced by configure(), and onNewRun().
|
private |
Generates random numbers for which channels to fill up with noise.
Definition at line 131 of file EcalDigiProducer.h.
Referenced by onNewRun(), and produce().
|
private |
When emulating noise in empty channels, do we zero suppress?
There are two ways to emulate the noise in the chip: 1) (with zero suppression) Use the NoiseGenerator to get a list of amplitudes (about 3-5 on avg) and put those noise hits which are above the readout threshold in random empty channels. 2) (without zero suppresion) Go through all channels and put noise in each channel that doesn't have a real hit in it. This will mean many channels with have a DIGI below readout threshold.
Definition at line 105 of file EcalDigiProducer.h.
Referenced by configure(), and produce().