LDMX Software
|
Performs basic ECal digitization. More...
#include <EcalDigiProducer.h>
Public Member Functions | |
EcalDigiProducer (const std::string &name, framework::Process &process) | |
Constructor Makes unique noise generator and injector for this class. | |
virtual | ~EcalDigiProducer () |
Destructor Deletes digi collection if it has been created. | |
virtual void | configure (framework::config::Parameters &) |
Configure this producer from the python configuration. | |
virtual void | produce (framework::Event &event) |
Simulates measurement of pulse and creates digi collection for input event. | |
Public Member Functions inherited from framework::Producer | |
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. | |
Public Member Functions inherited from framework::EventProcessor | |
EventProcessor (const std::string &name, Process &process) | |
Class constructor. | |
virtual | ~EventProcessor () |
Class destructor. | |
virtual void | onNewRun (const ldmx::RunHeader &runHeader) |
Callback for the EventProcessor to take any necessary action when the run being processed changes. | |
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_ |
Total number of channels in the ECal. | |
std::unique_ptr< ldmx::NoiseGenerator > | noiseGenerator_ |
Generates noise hits based off of number of cells that are not hit. | |
std::unique_ptr< TRandom3 > | noiseInjector_ |
Generates Gaussian noise on top of real hits. | |
Additional Inherited Members | |
Static Public Member Functions inherited from framework::EventProcessor | |
static void | declare (const std::string &classname, int classtype, EventProcessorMaker *) |
Internal function which is part of the PluginFactory machinery. | |
Static Public Attributes inherited from framework::Producer | |
static const int | CLASSTYPE {1} |
Constant used to track EventProcessor types by the PluginFactory. | |
Protected Member Functions inherited from framework::EventProcessor | |
void | abortEvent () |
Abort the event immediately. | |
Protected Attributes inherited from framework::EventProcessor | |
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 36 of file EcalDigiProducer.h.
ecal::EcalDigiProducer::EcalDigiProducer | ( | const std::string & | name, |
framework::Process & | process | ||
) |
Constructor Makes unique noise generator and injector for this class.
Definition at line 15 of file EcalDigiProducer.cxx.
References noiseGenerator_.
|
virtual |
Destructor Deletes digi collection if it has been created.
Definition at line 26 of file EcalDigiProducer.cxx.
|
virtual |
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 28 of file EcalDigiProducer.cxx.
References clockCycle_, digiCollName_, framework::config::Parameters::getParameter(), hgcroc_, inputCollName_, inputPassName_, iSOI_, MeV_, nADCs_, noise_, noiseGenerator_, ns_, and zero_suppression_.
|
virtual |
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 65 of file EcalDigiProducer.cxx.
References ldmx::HgcrocDigiCollection::addDigi(), framework::RandomNumberSeedService::CONDITIONS_OBJECT_NAME, ldmx::SimCalorimeterHit::getID(), ldmx::HgcrocDigiCollection::getNumDigis(), hgcroc_, inputCollName_, inputPassName_, iSOI_, MeV_, nADCs_, noise_, noiseGenerator_, noiseInjector_, ldmx::DetectorID::raw(), ldmx::HgcrocDigiCollection::setNumSamplesPerDigi(), ldmx::HgcrocDigiCollection::setSampleOfInterestIndex(), and zero_suppression_.
|
private |
Time interval for chip clock in ns.
Definition at line 76 of file EcalDigiProducer.h.
Referenced by configure().
|
private |
output hit collection name
Definition at line 73 of file EcalDigiProducer.h.
Referenced by configure().
|
private |
Hgcroc Emulator to digitize analog voltage signals.
Definition at line 109 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
input hit collection name
Definition at line 67 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
input pass name
Definition at line 70 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 82 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
Conversion from energy in MeV to voltage in mV.
Definition at line 85 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
Depth of ADC buffer.
Definition at line 79 of file EcalDigiProducer.h.
Referenced by configure(), and produce().
|
private |
Put noise into empty channels, not configurable, only helpful in development.
Definition at line 106 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 119 of file EcalDigiProducer.h.
Referenced by configure(), EcalDigiProducer(), and produce().
|
private |
Generates Gaussian noise on top of real hits.
Definition at line 122 of file EcalDigiProducer.h.
Referenced by produce().
|
private |
Total number of channels in the ECal.
Conversion from time in ns to ticks of the internal clock
Definition at line 116 of file EcalDigiProducer.h.
Referenced by configure().
|
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 99 of file EcalDigiProducer.h.
Referenced by configure(), and produce().