LDMX Software
SiStripWaveformFitProcessor.h
1#ifndef TRACKING_RECO_SISTRIPWAVEFORMFITPROCESSOR_H_
2#define TRACKING_RECO_SISTRIPWAVEFORMFITPROCESSOR_H_
3
4#include <map>
5#include <memory>
6#include <string>
7
9#include "Tracking/Digitization/PulseShape.h"
10#include "Tracking/Reco/TrackerDaqMap.h"
11
12namespace tracking::reco {
13
36 public:
37 SiStripWaveformFitProcessor(const std::string& name,
40
42 void onProcessStart() override;
43 void produce(framework::Event& event) override;
44 void onProcessEnd() override;
45
46 private:
47 std::string input_collection_{"TrackerWaveforms"};
48 std::string input_pass_name_{""};
49 std::string output_collection_{"FittedSiStripHits"};
50 std::string daq_map_file_{""};
51
52 // Scan range for the hit-time search. A non-positive t_scan_max_ns_ sizes
53 // the scan to each waveform, since T may peak anywhere from before sample 0
54 // to the last sample and waveforms differ in length.
55 double t_scan_min_ns_{-50.0};
56 double t_scan_max_ns_{-1.0};
57 double t_scan_step_ns_{1.0};
58
59 // Quality cut (<= 0 means disabled)
60 double max_chi2_ndf_{-1.0};
61
62 TrackerDaqMap daq_map_;
63
65 std::unique_ptr<tracking::digitization::PulseShape> pulse_shape_;
66
67 // Diagnostics accumulated over the job.
68 long n_waveforms_{0};
69 long n_unmapped_{0};
73 long n_bad_chi2_{0};
74 long n_hits_{0};
76 std::map<uint16_t, long> unmapped_sensors_;
77};
78
79} // namespace tracking::reco
80
81#endif // TRACKING_RECO_SISTRIPWAVEFORMFITPROCESSOR_H_
Base classes for all user event processing components to extend.
Implements an event buffer system for storing event data.
Definition Event.h:42
Class which represents the process under execution.
Definition Process.h:37
Base class for a module which produces a data product.
virtual void process(Event &event) final
Processing an event for a Producer is calling produce.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
Fit a pulse shape to each SiStripWaveform and produce FittedSiStripHits.
void produce(framework::Event &event) override
Process the event and put new data products into it.
std::map< uint16_t, long > unmapped_sensors_
(feb, hybrid) pairs already warned about, so each is reported only once.
std::unique_ptr< tracking::digitization::PulseShape > pulse_shape_
Pulse shape shared by every per-channel fitter (built in onProcessStart).
long n_unmapped_
skipped: (feb, hybrid) absent from the DAQ map
long n_fit_attempted_
waveforms passed to the fitter
void onProcessEnd() override
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
void onProcessStart() override
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
void configure(framework::config::Parameters &ps) override
Callback for the EventProcessor to configure itself from the given set of parameters.
long n_out_of_range_
skipped: strip_id outside the sensor
long n_unconverged_
skipped because the pulse fit did not converge
Tracker DAQ map: the correspondence between an electronics sensor address (feb, hybrid) and the detec...