|
LDMX Software
|
Fit a pulse shape to each SiStripWaveform and produce FittedSiStripHits. More...
#include <SiStripWaveformFitProcessor.h>
Public Member Functions | |
| SiStripWaveformFitProcessor (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 | onProcessStart () override |
| Callback for the EventProcessor to take any necessary action when the processing of events starts, such as creating histograms. | |
| 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. | |
| 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_ {"TrackerWaveforms"} |
| std::string | input_pass_name_ {""} |
| std::string | output_collection_ {"FittedSiStripHits"} |
| std::string | daq_map_file_ {""} |
| double | t_scan_min_ns_ {-50.0} |
| double | t_scan_max_ns_ {-1.0} |
| double | t_scan_step_ns_ {1.0} |
| double | max_chi2_ndf_ {-1.0} |
| TrackerDaqMap | daq_map_ |
| std::unique_ptr< tracking::digitization::PulseShape > | pulse_shape_ |
| Pulse shape shared by every per-channel fitter (built in onProcessStart). | |
| long | n_waveforms_ {0} |
| waveforms seen | |
| long | n_unmapped_ {0} |
| skipped: (feb, hybrid) absent from the DAQ map | |
| long | n_out_of_range_ {0} |
| skipped: strip_id outside the sensor | |
| long | n_fit_attempted_ {0} |
| waveforms passed to the fitter | |
| long | n_unconverged_ {0} |
| skipped because the pulse fit did not converge | |
| long | n_bad_chi2_ {0} |
| skipped by the chi2/ndf cut | |
| long | n_hits_ {0} |
| emitted FittedSiStripHits | |
| std::map< uint16_t, long > | unmapped_sensors_ |
| (feb, hybrid) pairs already warned about, so each is reported only once. | |
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. | |
Fit a pulse shape to each SiStripWaveform and produce FittedSiStripHits.
This is the real-data counterpart of StripFitProcessor, and the bridge into the geometry-aware reconstruction.
Input : collection of ldmx::SiStripWaveform (pedestal-subtracted samples) Output : collection of ldmx::FittedSiStripHit
input_collection SiStripWaveform input collection. input_pass_name Pass name for the input collection. output_collection FittedSiStripHit output collection. daq_map_file Path to the DAQ map JSON (required). t_scan_min_ns Lower bound of the hit-time scan [ns] (default -50). t_scan_max_ns Upper bound of the hit-time scan [ns]; <= 0 means auto, i.e. n_samples * sampling interval (default -1). t_scan_step_ns Step size of the coarse scan [ns] (default 1). max_chi2_ndf If > 0, discard fits with chi2/ndf above this value (default -1 = off).
Definition at line 35 of file SiStripWaveformFitProcessor.h.
|
inline |
Definition at line 37 of file SiStripWaveformFitProcessor.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 13 of file SiStripWaveformFitProcessor.cxx.
References framework::config::Parameters::get().
|
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 157 of file SiStripWaveformFitProcessor.cxx.
References n_bad_chi2_, n_fit_attempted_, n_hits_, n_out_of_range_, n_unconverged_, n_unmapped_, n_waveforms_, and unmapped_sensors_.
|
overridevirtual |
Callback for the EventProcessor to take any necessary action when the processing of events starts, such as creating histograms.
Reimplemented from framework::EventProcessor.
Definition at line 27 of file SiStripWaveformFitProcessor.cxx.
References tracking::reco::TrackerDaqMap::fromJsonFile(), pulse_shape_, and tracking::reco::TrackerDaqMap::size().
|
overridevirtual |
Process the event and put new data products into it.
| event | The Event to process. |
Implements framework::Producer.
Definition at line 51 of file SiStripWaveformFitProcessor.cxx.
References tracking::reco::channelmap::apvChannelFromPchannel(), tracking::reco::TrackerDaqMap::at(), tracking::reco::TrackerPedestals::CONDITIONS_NAME, tracking::digitization::StripPulseFitter::fit(), framework::EventProcessor::getCondition(), tracking::reco::TrackerDaqMap::has(), n_bad_chi2_, n_fit_attempted_, n_hits_, n_out_of_range_, n_unconverged_, n_unmapped_, n_waveforms_, pulse_shape_, tracking::reco::channelmap::stripId(), and unmapped_sensors_.
|
private |
Definition at line 62 of file SiStripWaveformFitProcessor.h.
|
private |
Definition at line 50 of file SiStripWaveformFitProcessor.h.
|
private |
Definition at line 47 of file SiStripWaveformFitProcessor.h.
|
private |
Definition at line 48 of file SiStripWaveformFitProcessor.h.
|
private |
Definition at line 60 of file SiStripWaveformFitProcessor.h.
|
private |
skipped by the chi2/ndf cut
Definition at line 73 of file SiStripWaveformFitProcessor.h.
Referenced by onProcessEnd(), and produce().
|
private |
waveforms passed to the fitter
Definition at line 71 of file SiStripWaveformFitProcessor.h.
Referenced by onProcessEnd(), and produce().
|
private |
emitted FittedSiStripHits
Definition at line 74 of file SiStripWaveformFitProcessor.h.
Referenced by onProcessEnd(), and produce().
|
private |
skipped: strip_id outside the sensor
Definition at line 70 of file SiStripWaveformFitProcessor.h.
Referenced by onProcessEnd(), and produce().
|
private |
skipped because the pulse fit did not converge
Definition at line 72 of file SiStripWaveformFitProcessor.h.
Referenced by onProcessEnd(), and produce().
|
private |
skipped: (feb, hybrid) absent from the DAQ map
Definition at line 69 of file SiStripWaveformFitProcessor.h.
Referenced by onProcessEnd(), and produce().
|
private |
waveforms seen
Definition at line 68 of file SiStripWaveformFitProcessor.h.
Referenced by onProcessEnd(), and produce().
|
private |
Definition at line 49 of file SiStripWaveformFitProcessor.h.
|
private |
Pulse shape shared by every per-channel fitter (built in onProcessStart).
Definition at line 65 of file SiStripWaveformFitProcessor.h.
Referenced by onProcessStart(), and produce().
|
private |
Definition at line 56 of file SiStripWaveformFitProcessor.h.
|
private |
Definition at line 55 of file SiStripWaveformFitProcessor.h.
|
private |
Definition at line 57 of file SiStripWaveformFitProcessor.h.
|
private |
(feb, hybrid) pairs already warned about, so each is reported only once.
Definition at line 76 of file SiStripWaveformFitProcessor.h.
Referenced by onProcessEnd(), and produce().