|
LDMX Software
|
Assemble per-trigger pedestal-subtracted hits into full per-channel waveforms. More...
#include <SiStripWaveformBuilder.h>
Public Member Functions | |
| SiStripWaveformBuilder (const std::string &name, framework::Process &process) | |
| void | configure (framework::config::Parameters &ps) override |
| Callback for the EventProcessor to configure itself from the given set of parameters. | |
| void | produce (framework::Event &event) override |
| Process the event and put new data products into it. | |
| void | onProcessEnd () override |
| Callback for the EventProcessor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities. | |
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 | onNewRun (const ldmx::RunHeader &run_header) |
| Callback for the EventProcessor to take any necessary action when the run being processed changes. | |
| 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. | |
| 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 | input_collection_ {"TrackerHits"} |
| std::string | input_pass_name_ {""} |
| std::string | output_collection_ {"TrackerWaveforms"} |
| double | high_threshold_ |
| per-sample significance for high-threshold cut | |
| int | min_high_samples_ {4} |
| min samples exceeding high_threshold | |
| double | low_threshold_ |
| per-sample significance for consecutive-streak cut | |
| int | min_consecutive_low_ |
| min consecutive samples exceeding low_threshold | |
| int | n_triggers_ {10} |
| expected APV triggers per RoR | |
| std::unique_ptr< tracking::digitization::PulseShape > | pulse_shape_ |
| Pulse shape used for the per-waveform fit test (built lazily in produce). | |
| long | n_fit_attempted_ {0} |
| waveforms passed to the fitter | |
| long | n_fit_failed_ {0} |
| fits that did not converge | |
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. | |
Assemble per-trigger pedestal-subtracted hits into full per-channel waveforms.
Each RoR issues n_triggers APV triggers, each producing a 3-sample (pedestal-subtracted) RawSiStripHit per channel. This producer groups all trigger hits for the same (feb, hybrid, pchannel), sorts by apv_trigger, and concatenates their samples into a SiStripWaveform with n_triggers*3 samples ordered as [s0_t0, s1_t0, s2_t0, s0_t1, ...].
The per-channel noise used for the significance cuts is obtained from the TrackerPedestals conditions object (a service); the physical strip number (pchannel) is derived from the hit's apv_id/channel via channelmap.
Two-stage threshold applied before writing:
Definition at line 36 of file SiStripWaveformBuilder.h.
|
inline |
Definition at line 38 of file SiStripWaveformBuilder.h.
|
overridevirtual |
Callback for the EventProcessor to configure itself from the given set of parameters.
The parameters a processor has access to are the member variables of the python class in the sequence that has class_name equal to the EventProcessor class name.
For an example, look at MyProcessor.
| parameters | Parameters for configuration. |
Reimplemented from framework::EventProcessor.
Definition at line 14 of file SiStripWaveformBuilder.cxx.
References framework::config::Parameters::get(), high_threshold_, low_threshold_, min_consecutive_low_, min_high_samples_, and n_triggers_.
|
overridevirtual |
Callback for the EventProcessor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities.
Reimplemented from framework::EventProcessor.
Definition at line 164 of file SiStripWaveformBuilder.cxx.
References n_fit_attempted_, and n_fit_failed_.
|
overridevirtual |
Process the event and put new data products into it.
| event | The Event to process. |
Implements framework::Producer.
Definition at line 28 of file SiStripWaveformBuilder.cxx.
References tracking::reco::TrackerPedestals::CONDITIONS_NAME, tracking::digitization::StripPulseFitter::fit(), framework::EventProcessor::getCondition(), tracking::reco::channelmap::groupKey(), high_threshold_, tracking::reco::channelmap::K_SAMPLES_PER_APV_TRIGGER, low_threshold_, tracking::digitization::PulseShape::make(), min_consecutive_low_, min_high_samples_, n_fit_attempted_, n_fit_failed_, tracking::reco::channelmap::pchannel(), tracking::reco::channelmap::pchannelFromGroupKey(), and pulse_shape_.
|
private |
per-sample significance for high-threshold cut
Definition at line 49 of file SiStripWaveformBuilder.h.
Referenced by configure(), and produce().
|
private |
Definition at line 46 of file SiStripWaveformBuilder.h.
|
private |
Definition at line 47 of file SiStripWaveformBuilder.h.
|
private |
per-sample significance for consecutive-streak cut
Definition at line 52 of file SiStripWaveformBuilder.h.
Referenced by configure(), and produce().
|
private |
min consecutive samples exceeding low_threshold
Definition at line 54 of file SiStripWaveformBuilder.h.
Referenced by configure(), and produce().
|
private |
min samples exceeding high_threshold
Definition at line 51 of file SiStripWaveformBuilder.h.
Referenced by configure(), and produce().
|
private |
waveforms passed to the fitter
Definition at line 63 of file SiStripWaveformBuilder.h.
Referenced by onProcessEnd(), and produce().
|
private |
fits that did not converge
Definition at line 64 of file SiStripWaveformBuilder.h.
Referenced by onProcessEnd(), and produce().
|
private |
expected APV triggers per RoR
Definition at line 56 of file SiStripWaveformBuilder.h.
Referenced by configure().
|
private |
Definition at line 48 of file SiStripWaveformBuilder.h.
|
private |
Pulse shape used for the per-waveform fit test (built lazily in produce).
Definition at line 59 of file SiStripWaveformBuilder.h.
Referenced by produce().