|
LDMX Software
|
Performs basic ECal reconstruction. More...
#include <EcalRecProducer.h>
Public Member Functions | |
| EcalRecProducer (const std::string &name, framework::Process &process) | |
| Constructor. | |
| virtual | ~EcalRecProducer ()=default |
| Destructor. | |
| void | configure (framework::config::Parameters &) override |
| Grabs configure parameters from the python config file. | |
| void | produce (framework::Event &event) override |
| Produce EcalHits and put them into the event bus using the EcalDigis as input. | |
| void | onNewRun (const ldmx::RunHeader &) override |
| Seed the phase smearing. | |
Public Member Functions inherited from framework::Producer | |
| Producer (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual void | process (Event &event) final |
| Processing an event for a Producer is calling produce. | |
Public Member Functions inherited from framework::EventProcessor | |
| DECLARE_FACTORY (EventProcessor, EventProcessor *, const std::string &, Process &) | |
| declare that we have a factory for this class | |
| EventProcessor (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual | ~EventProcessor ()=default |
| Class destructor. | |
| virtual void | beforeNewRun (ldmx::RunHeader &run_header) |
| Callback for Producers to add parameters to the run header before conditions are initialized. | |
| virtual void | onFileOpen (EventFile &event_file) |
| Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened. | |
| virtual void | onFileClose (EventFile &event_file) |
| 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 | digi_coll_name_ |
| Digi Collection Name to use as input. | |
| std::string | digi_pass_name_ |
| Digi Pass Name to use as input. | |
| std::string | sim_hit_coll_name_ |
| simhit collection name | |
| std::string | sim_hit_pass_name_ |
| simhit pass name | |
| std::string | rec_hit_coll_name_ |
| output hit collection name | |
| double | mip_si_energy_ |
| Energy [MeV] deposited by a MIP in Si 0.5mm thick. | |
| double | clock_cycle_ |
| Length of clock cycle [ns]. | |
| double | charge_per_mip_ |
| Number of electrons generated by average MIP in Si 0.5mm thick. | |
| std::vector< double > | layer_weights_ |
| Layer Weights to use for this reconstruction. | |
| double | second_order_energy_correction_ |
| Second Order Energy Correction to use for this reconstruction. | |
| std::string | amplitude_method_ |
| ADC mode amplitude: soi, max or fit. | |
| int | fit_n_samples_ |
| number of samples in the fit, starting one before the max, <= 0 for all | |
| std::unique_ptr< ldmx::HgcrocShape > | pulse_shape_ |
| HGCROC pulse template, only for amplitude_method fit. | |
| bool | fit_fixed_t0_ |
| fit with t0 = event phase + offset, e.g. phase from HCal TOA | |
| double | fit_t0_offset_ |
| offset [ns] between the event phase and the pulse t0 | |
| double | phase_resolution_ |
| Gaussian smearing [ns] of the event phase. | |
| std::string | phase_name_ |
| event header float parameter holding the event phase [ns] | |
| std::mt19937 | rng_ |
Additional Inherited Members | |
Protected Member Functions inherited from framework::EventProcessor | |
| void | abortEvent () |
| Abort the event immediately. | |
Protected Attributes inherited from framework::EventProcessor | |
| HistogramPool | histograms_ |
| helper object for making and filling histograms | |
| NtupleManager & | ntuple_ {NtupleManager::getInstance()} |
| Manager for any ntuples. | |
| logging::logger | the_log_ |
| The logger for this EventProcessor. | |
Performs basic ECal reconstruction.
Reconstruction is done from the EcalDigi samples. Some hard-coded parameters are used for position and energy calculation.
Definition at line 30 of file EcalRecProducer.h.
| ecal::EcalRecProducer::EcalRecProducer | ( | const std::string & | name, |
| framework::Process & | process ) |
Constructor.
Definition at line 23 of file EcalRecProducer.cxx.
|
overridevirtual |
Grabs configure parameters from the python config file.
Reimplemented from framework::EventProcessor.
Definition at line 27 of file EcalRecProducer.cxx.
References amplitude_method_, charge_per_mip_, clock_cycle_, digi_coll_name_, digi_pass_name_, fit_fixed_t0_, fit_n_samples_, fit_t0_offset_, framework::config::Parameters::get(), layer_weights_, mip_si_energy_, phase_name_, phase_resolution_, pulse_shape_, rec_hit_coll_name_, second_order_energy_correction_, sim_hit_coll_name_, and sim_hit_pass_name_.
|
overridevirtual |
Seed the phase smearing.
Reimplemented from framework::EventProcessor.
Definition at line 63 of file EcalRecProducer.cxx.
References framework::RandomNumberSeedService::CONDITIONS_OBJECT_NAME, fit_fixed_t0_, framework::EventProcessor::getCondition(), and framework::EventProcessor::getName().
|
overridevirtual |
Produce EcalHits and put them into the event bus using the EcalDigis as input.
This function unfolds the digi samples taken by the HGC ROC and reconstructs their energy using knowledge of how the chip operates and the position using EcalGeometry.
Non-positive Electron (charge) count This reconstruction error occurs when the ADC value is at or below the ADC pedestal for that channel. In the normal running mode, this will never happen because our front-end (the digi emulator or the digitizer itself) will suppress any signals that are below the readout threshold. Nevertheless, in some running modes, we don't have this zero suppression, so we need to check that the reconstruction charge (count of electrons) is positive. A channel sitting exactly at its pedestal carries no energy, so it is dropped as well.
Implements framework::Producer.
Definition at line 71 of file EcalRecProducer.cxx.
References ecal::EcalReconConditions::adcGain(), ecal::EcalReconConditions::adcPedestal(), amplitude_method_, charge_per_mip_, clock_cycle_, ecal::EcalReconConditions::CONDITIONS_NAME, ldmx::PulseFitter::FitResult::converged, digi_coll_name_, digi_pass_name_, framework::Event::exists(), ldmx::PulseFitter::fit(), fit_fixed_t0_, fit_n_samples_, fit_t0_offset_, ldmx::PulseFitter::fitFixed(), framework::EventProcessor::getCondition(), ldmx::HgcrocDigiCollection::getSampleOfInterestIndex(), layer_weights_, mip_si_energy_, phase_name_, phase_resolution_, pulse_shape_, rec_hit_coll_name_, second_order_energy_correction_, ldmx::CalorimeterHit::setAmplitude(), ldmx::CalorimeterHit::setEnergy(), ldmx::CalorimeterHit::setID(), ldmx::CalorimeterHit::setTime(), ldmx::CalorimeterHit::setXPos(), ldmx::CalorimeterHit::setYPos(), ldmx::CalorimeterHit::setZPos(), sim_hit_coll_name_, sim_hit_pass_name_, ecal::EcalReconConditions::totGain(), and ecal::EcalReconConditions::totPedestal().
|
private |
ADC mode amplitude: soi, max or fit.
Definition at line 106 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Number of electrons generated by average MIP in Si 0.5mm thick.
Definition at line 83 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Length of clock cycle [ns].
Definition at line 80 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Digi Collection Name to use as input.
Definition at line 62 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Digi Pass Name to use as input.
Definition at line 65 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
fit with t0 = event phase + offset, e.g. phase from HCal TOA
Definition at line 115 of file EcalRecProducer.h.
Referenced by configure(), onNewRun(), and produce().
|
private |
number of samples in the fit, starting one before the max, <= 0 for all
Definition at line 109 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
offset [ns] between the event phase and the pulse t0
Definition at line 118 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Layer Weights to use for this reconstruction.
Layer weights account for the energy lost in the absorber directly in front of the Silicon layer where the measured energy was deposited. These are determined by calculating the average amount of energy lost by a MIP passing through the extra material between sensitive layers.
Definition at line 93 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Energy [MeV] deposited by a MIP in Si 0.5mm thick.
Definition at line 77 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
event header float parameter holding the event phase [ns]
Definition at line 124 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Gaussian smearing [ns] of the event phase.
Definition at line 121 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
HGCROC pulse template, only for amplitude_method fit.
Definition at line 112 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
output hit collection name
Definition at line 74 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Definition at line 126 of file EcalRecProducer.h.
|
private |
Second Order Energy Correction to use for this reconstruction.
This is a shift applied to all of the energies in order to have the mean of the total energy deposited in the ECal be accurate. This is less physically motivated than the layer weights and is more of a calibration number.
Definition at line 103 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
simhit collection name
Definition at line 68 of file EcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
simhit pass name
Definition at line 71 of file EcalRecProducer.h.
Referenced by configure(), and produce().