Extracts PMT baseline settings from PMT readout configuration. More...
Classes | |
struct | Config |
Public Types | |
using | Parameters = art::EDProducer::Table< Config > |
Public Member Functions | |
PMTWaveformBaselinesFromReadoutConfiguration (Parameters const &config) | |
virtual void | beginJob () override |
Prepares the plots to be filled. More... | |
virtual void | beginRun (art::Run &run) override |
Reads the PMT readout configuration. More... | |
virtual void | produce (art::Event &event) override |
Creates the data products. More... | |
Private Types | |
using | Baseline_t = signed short int |
Type for baseline (same as V1730channelConfiguration::baseline) More... | |
Private Member Functions | |
void | setupPlots () |
Creates all the plots to be filled by the module. More... | |
Baseline_t | getBaseline (raw::Channel_t channel) const |
std::pair< unsigned int, std::vector< Baseline_t > > | extractBaselinesFromConfiguration (sbn::PMTconfiguration const &PMTconfig) const |
Returns the number of channels in configuration and a baseline map. More... | |
unsigned int | nChannelsWithBaseline () const |
Returns the number of channels currently configured with a baseline. More... | |
void | printBaselines () const |
Prints the current baselines on maesage facility (INFO level). More... | |
Private Attributes | |
art::InputTag const | fOpDetWaveformTag |
Input optical waveform tag. More... | |
art::InputTag const | fPMTconfigurationTag |
Input PMT readout config tag. More... | |
bool const | fPlotBaselines |
Whether to produce plots. More... | |
bool const | fPrintBaselines |
Whether to print baselines on each run. More... | |
std::string const | fLogCategory |
Category name for the console output stream. More... | |
unsigned int | fConfigured = 0U |
Number of channels in PMT configuration. More... | |
std::vector< short signed int > | fBaselines |
PMT baselines configured in the current run, indexed by channel. More... | |
TH2 * | fHBaselines = nullptr |
All baselines, per channel. More... | |
Static Private Attributes | |
static constexpr Baseline_t | NoBaseline = std::numeric_limits<Baseline_t>::min() |
Mnemonic value for channels without baseline information. More... | |
Extracts PMT baseline settings from PMT readout configuration.
This module produces a baseline data product for each optical detector waveform. The content is the same for all the events in each run, and it is read from the specified PMT configuration data product.
Each waveform is associated with the baseline configured for its channel. If there is no information for a given channel and that channel is requested, an exception is thrown.
This module is interchangeable with PMTWaveformBaselines
, which instead extracts the baseline dynamically from each waveform.
std::vector<icarus::WaveformBaseline>
, with one baseline per input waveform; the baselines are guaranteed to be in the same order as the waveforms in the input collection;art::Assns<icarus::WaveformBaseline, raw::OpDetWaveform>
.Baselines
: baseline distribution, per channel; one entry [ADC] per configured channel per run.std::vector<raw::OpDetWaveform>
: a single waveform for each recorded optical detector activity; the activity belongs to a single channel, but there may be multiple waveforms on the same channel.TFileService
and Geometry
if PlotBaselines
is enabledA terse description of the parameters is printed by running lar --print-description PMTWaveformBaselinesFromReadoutConfiguration
.
OpticalWaveforms
(input tag, mandatory): the data product containing all optical detector waveforms.PMTconfigurationTag
(input tag, mandatory): the run-level data product containing the full PMT readout configuration (including baseline per channel).OutputCategory
(string, default: "PMTWaveformBaselinesFromReadoutConfiguration"
): label for the category of messages in the console output; this is the label that can be used for filtering messages via MessageFacility service configuration.PlotBaselines
(flag, default: true
): whether to produce distributions of the configured baselines (not implemented yet).PrintBaselines
(flag, default: true
): if set to true
, on each run it will print the baseline of all the configured channels with a LArSoft channel ID. Definition at line 132 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Type for baseline (same as V1730channelConfiguration::baseline)
Definition at line 199 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
using icarus::PMTWaveformBaselinesFromReadoutConfiguration::Parameters = art::EDProducer::Table<Config> |
Definition at line 174 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
explicit |
Definition at line 286 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
overridevirtual |
Prepares the plots to be filled.
Definition at line 322 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
overridevirtual |
Reads the PMT readout configuration.
Definition at line 334 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Returns the number of channels in configuration and a baseline map.
Definition at line 459 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Returns the configured baseline.
cet::exception | (category: "PMTWaveformBaselinesFromReadoutConfiguration") if channel is not present in the configuration |
Definition at line 441 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Returns the number of channels currently configured with a baseline.
Definition at line 504 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Prints the current baselines on maesage facility (INFO level).
Definition at line 511 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
overridevirtual |
Creates the data products.
Definition at line 360 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Creates all the plots to be filled by the module.
Definition at line 422 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
PMT baselines configured in the current run, indexed by channel.
Definition at line 224 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Number of channels in PMT configuration.
Definition at line 221 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
All baselines, per channel.
Definition at line 231 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Category name for the console output stream.
Definition at line 213 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Input optical waveform tag.
Definition at line 208 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Whether to produce plots.
Definition at line 210 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Input PMT readout config tag.
Definition at line 209 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
private |
Whether to print baselines on each run.
Definition at line 211 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.
|
staticprivate |
Mnemonic value for channels without baseline information.
Definition at line 203 of file PMTWaveformBaselinesFromReadoutConfiguration_module.cc.