52 #include "art_root_io/TFileService.h"
53 #include "art_root_io/TFileDirectory.h"
54 #include "art/Framework/Services/Registry/ServiceHandle.h"
55 #include "art/Framework/Core/EDProducer.h"
56 #include "art/Framework/Core/ModuleMacros.h"
57 #include "art/Framework/Principal/Event.h"
58 #include "canvas/Utilities/InputTag.h"
59 #include "canvas/Utilities/Exception.h"
60 #include "messagefacility/MessageLogger/MessageLogger.h"
61 #include "fhiclcpp/types/Sequence.h"
62 #include "fhiclcpp/types/OptionalAtom.h"
63 #include "fhiclcpp/types/Atom.h"
66 #include "TEfficiency.h"
87 using namespace util::quantities::time_literals;
91 namespace icarus::trigger {
class TriggerSimulationOnGates; }
288 :
public art::EDProducer
304 fhicl::Atom<std::string> TriggerGatesTag {
305 Name(
"TriggerGatesTag"),
306 Comment(
"label of the input trigger gate data product (no instance name)")
311 Comment(
"tags of the thresholds to consider")
314 fhicl::OptionalAtom<bool> KeepThresholdName {
315 Name(
"KeepThresholdName"),
317 (
"add threshold to output product tag even with only one threshold")
322 Comment(
"trigger requirements as a trigger window pattern")
325 fhicl::Atom<art::InputTag> BeamGates {
327 Comment(
"data product with all beam gates to run simulation into")
330 fhicl::Atom<std::uint32_t> BeamBits {
332 Comment(
"bits to be set in the trigger object as beam identified")
335 fhicl::Atom<nanoseconds> TriggerTimeResolution {
336 Name(
"TriggerTimeResolution"),
337 Comment(
"resolution of trigger in time"),
341 fhicl::Atom<double> EventTimeBinning {
342 Name(
"EventTimeBinning"),
343 Comment(
"binning for the trigger time plot [second]"),
347 fhicl::Atom<std::string> LogCategory {
349 Comment(
"name of the category used for the output"),
350 "TriggerSimulationOnGates"
368 virtual void beginJob()
override;
371 virtual void produce(art::Event& event)
override;
374 virtual void endJob()
override;
450 std::optional<icarus::trigger::SlidingWindowPatternAlg>
fPatternAlg;
463 std::atomic<unsigned int> fTotalGates { 0U };
472 void initializePlots();
475 void finalizePlots();
479 void makeThresholdPlots(
480 std::string
const& threshold,
482 ThresholdPlotInfo_t
const& plotInfo
486 void makeEventPlots();
491 std::vector<icarus::trigger::ApplyBeamGateClass>
const& gates
495 void plotTriggerResponse(
496 std::size_t iThr, std::string
const& thrTag,
497 WindowTriggerInfo_t
const& triggerInfo,
523 std::vector<WindowTriggerInfo_t> produceForThreshold(
526 std::vector<ApplyBeamGateClass>
const& beamGates,
527 std::size_t
const iThr, std::string
const& thrTag,
528 unsigned int firstTriggerNumber
543 unsigned int triggerNumber, WindowTriggerInfo_t
const&
info
548 void printSummary()
const;
551 TH1* makeHistogramFromBinnedContent(
553 std::string
const&
name, std::string
const& title,
554 BinnedContent_t
const& binnedContent
573 std::vector<icarus::trigger::ApplyBeamGateClass> makeMyBeamGates
576 std::vector<icarus::trigger::ApplyBeamGateClass> applyGates;
578 applyGates.push_back(makeMyBeamGate(detTimings, gate));
581 std::vector<icarus::trigger::ApplyBeamGateClass> makeMyBeamGates
584 std::vector<icarus::trigger::ApplyBeamGateClass> makeMyBeamGates
586 {
return makeMyBeamGates(&event, gates); }
592 static double eventTimestampInSeconds(art::Timestamp
const& time);
593 static double eventTimestampInSeconds(art::Event
const& event);
605 : art::EDProducer (config)
607 , fPattern (config().
Pattern())
608 , fBeamGateTag (config().BeamGates())
609 , fBeamBits (config().BeamBits())
610 , fTriggerTimeResolution(config().TriggerTimeResolution())
611 , fEventTimeBinning (config().EventTimeBinning())
614 , fOutputDir (*art::ServiceHandle<art::TFileService>())
617 { *lar::providerFrom<geo::Geometry>(),
fLogCategory +
"_WindowMapManager" }
619 fOutputDir,
"",
"requirement: " + fPattern.description()
624 fTriggerTimeResolution.convertInto
625 <detinfo::timescales::trigger_time::interval_t>().
value()
628 fTriggerTimeResolution.convertInto
629 <detinfo::timescales::trigger_time::interval_t>().
value()
632 fTriggerTimeResolution.convertInto
633 <detinfo::timescales::trigger_time::interval_t>().
value()
641 std::string
const& discrModuleLabel = config().TriggerGatesTag();
642 for (std::string
const& threshold: config().
Thresholds())
643 fADCthresholds[threshold] = art::InputTag{ discrModuleLabel, threshold };
646 fTriggerCount = std::vector<std::atomic<unsigned int>>(fADCthresholds.size());
647 std::fill(fTriggerCount.begin(), fTriggerCount.end(), 0U);
664 bool const keepThresholdName
665 = config().KeepThresholdName().value_or(config().
Thresholds().
size() > 1);
667 throw art::Exception(art::errors::Configuration)
668 << config().KeepThresholdName.name()
669 <<
" can be set to `true` only when a single threshold is specified ("
670 << config().Thresholds.name() <<
" has " << config().Thresholds().size()
675 std::string
const outputInstance
676 = keepThresholdName? inputDataTag.instance():
"";
677 produces<std::vector<raw::Trigger>>(outputInstance);
678 fOutputInstances.push_back(outputInstance);
683 log <<
"\nConfigured " << fADCthresholds.size() <<
" thresholds (ADC):";
684 for (
auto const& [ thresholdTag, dataTag ]: fADCthresholds)
685 log <<
"\n * " << thresholdTag <<
" (from '" << dataTag.encode() <<
"')";
709 art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(event)
712 std::vector<icarus::trigger::ApplyBeamGateClass>
const beamGates {
715 event.getProduct<std::vector<sim::BeamGateInfo>>(fBeamGateTag)
722 log <<
"Trigger simulation for " << beamGates.size() <<
" gates";
723 if (!beamGates.empty()) {
724 log <<
" ('" << fBeamGateTag.encode() <<
"'):";
726 log <<
"\n [" << iGate <<
"] " << gate;
736 log <<
"Event " <<
event.id() <<
":";
739 unsigned int const firstTriggerNumber
740 = fTotalGates.fetch_add(beamGates.size());
742 for (
auto const& [ iThr, thrTag ]
746 std::vector<WindowTriggerInfo_t>
const triggers = produceForThreshold
747 (event, detTimings, beamGates, iThr, thrTag, firstTriggerNumber);
749 log <<
"\n * threshold " << thrTag <<
": ";
752 gateResults.
add(triggerInfo.info.fired());
753 log << gateResults.
passed() <<
"/" << gateResults.
total()
754 <<
" gates triggered";
761 plotEvent(event, detTimings, beamGates);
784 std::vector<std::string> thresholdLabels;
785 thresholdLabels.reserve(
size(fADCthresholds));
786 for (std::string thr: util::get_elements<0U>(fADCthresholds))
787 thresholdLabels.push_back(std::move(thr));
789 auto const beamGate = makeMyBeamGate();
791 <<
"Beam gate for plots: " << beamGate.asSimulationTime()
792 <<
" (simulation time), " << beamGate.tickRange()
793 <<
" (optical ticks)"
799 auto* NTriggers = fPlots.make<TH1F>(
801 "Number of triggering events"
802 ";PMT discrimination threshold [ ADC counts ]"
804 thresholdLabels.size(), 0.0, double(thresholdLabels.size())
808 auto* Eff = fPlots.make<TEfficiency>(
810 "Triggering pass fraction"
811 ";PMT discrimination threshold [ ADC counts ]"
812 ";trigger pass fraction",
813 thresholdLabels.size(), 0.0, double(thresholdLabels.size())
820 (const_cast<TH1*>(Eff->GetTotalHistogram())->GetXaxis(), thresholdLabels);
826 auto const& beamGateTicks = beamGate.tickRange();
827 auto* TrigTime = fPlots.make<TH2F>(
830 ";optical time tick [ /" +
util::to_string(triggerResolutionTicks) +
" ]"
831 ";PMT discrimination threshold [ ADC counts ]"
833 static_cast<int>(std::ceil(beamGate.lengthTicks()/triggerResolutionTicks)),
834 beamGateTicks.start().value(),
836 (beamGateTicks.start() + beamGate.lengthTicks(), triggerResolutionTicks)
838 thresholdLabels.size(), 0.0, double(thresholdLabels.size())
855 (- beamGate.length() - beamPlotPadding).
value(),
856 (beamGate.length() + beamPlotPadding).
value(),
857 fTriggerTimeResolution.convertInto<trigger_time::interval_t>().
value()
862 "TriggerTimeVsHWTrig",
863 "Time of the trigger"
864 ";trigger time (relative to hardware trigger) [ #mus ]"
865 ";PMT discrimination threshold [ ADC counts ]"
868 thresholdLabels.size(), 0.0, double(thresholdLabels.size())
873 (-beamPlotPadding).
value(),
874 (beamGate.length() + beamPlotPadding).
value(),
875 fTriggerTimeResolution.convertInto<trigger_time::interval_t>().
value()
880 "TriggerTimeVsBeamGate",
881 "Time of the trigger"
882 ";trigger time (relative to beam gate opening) [ #mus ]"
883 ";PMT discrimination threshold [ ADC counts ]"
885 beamGateBinning.
nBins(), beamGateBinning.
lower(), beamGateBinning.
upper(),
886 thresholdLabels.size(), 0.0, double(thresholdLabels.size())
892 for (
auto const& [ thr,
info ]
893 :
util::zip(util::get_elements<0U>(fADCthresholds), fThresholdPlots))
896 = fPlots.addSubSandbox(
"Thr" + thr,
"Threshold: " + thr);
899 "TriggerTimeVsHWTrigVsBeam",
900 "Time of the trigger: emulated vs. hardware"
901 ";hardware trigger time (relative to beam gate opening) [ #mus ]"
902 ";emulated trigger time (relative to beam gate opening) [ #mus ]"
907 fThresholdPlots.resize(
908 size(fADCthresholds),
927 for (
auto const& [ thr,
info ]
928 :
util::zip(util::get_elements<0U>(fADCthresholds), fThresholdPlots))
931 makeThresholdPlots(thr, plots,
info);
932 if (plots.
empty()) fPlots.deleteSubSandbox(plots.
name());
944 std::string
const& threshold,
954 makeHistogramFromBinnedContent(plots,
956 "Time of the triggered events"
964 makeHistogramFromBinnedContent(plots,
966 "Time of the hardware trigger"
967 ";trigger time (relative to beam gate) [ #mus ]"
974 makeHistogramFromBinnedContent(plots,
975 "TriggerTimeVsHWTrig",
976 "Time of the trigger"
977 ";trigger time (relative to hardware trigger) [ #mus ]"
984 makeHistogramFromBinnedContent(plots,
985 "TriggerTimeVsBeamGate",
986 "Time of the trigger"
987 ";trigger time (relative to beam gate opening) [ #mus ]"
1006 content = &(fEventPlotInfo.eventTimes);
1007 makeHistogramFromBinnedContent(fPlots,
1009 "Time of the events"
1016 content = &(fEventPlotInfo.HWtrigTimeVsBeam);
1017 makeHistogramFromBinnedContent(fPlots,
1019 "Time of the hardware trigger"
1020 ";trigger time (relative to beam gate) [ #mus ]"
1035 std::vector<ApplyBeamGateClass>
const& beamGates,
1036 std::size_t
const iThr, std::string
const& thrTag,
1037 unsigned int firstTriggerNumber
1038 ) -> std::vector<WindowTriggerInfo_t> {
1045 art::InputTag
const& dataTag = fADCthresholds.at(thrTag);
1050 if (fWindowMapMan(gates))
1051 fPatternAlg.emplace(*fWindowMapMan, fPattern,
fLogCategory);
1052 assert(fPatternAlg);
1057 std::vector<WindowTriggerInfo_t> allTriggerInfo;
1058 auto triggers = std::make_unique<std::vector<raw::Trigger>>();
1059 unsigned int triggerNumber = firstTriggerNumber;
1060 for (
auto const& beamGate: beamGates) {
1062 = fPatternAlg->simulateResponse(beamGate.applyToAll(gates));
1066 ++fTriggerCount[iThr];
1073 plotTriggerResponse(iThr, thrTag, triggerInfo, detTimings);
1078 triggers->push_back(
1079 triggerInfoToTriggerData
1080 (detTimings, beamGate, triggerNumber++, triggerInfo)
1082 allTriggerInfo.push_back(std::move(triggerInfo));
1086 event.put(std::move(triggers), fOutputInstances[iThr]);
1088 return allTriggerInfo;
1096 std::vector<icarus::trigger::ApplyBeamGateClass>
const& gates
1104 fEventPlotInfo.eventTimes.add(eventTimestampInSeconds(event));
1105 fEventPlotInfo.HWtrigTimeVsBeam.add(-beamGateTime.value());
1117 std::size_t iThr, std::string
const& thrTag,
1124 bool const fired = triggerInfo.
info.
fired();
1126 fPlots.demand<TEfficiency>(
"Eff").Fill(fired, iThr);
1129 using namespace detinfo::timescales;
1139 { thisTriggerTimeVsHWtrig - beamGateTime };
1142 <<
"Trigger " << fPattern.tag() <<
" at tick " << thisTriggerTick
1143 <<
" (" << thisTriggerTimeVsHWtrig <<
" vs. HW trigger, "
1144 << thisTriggerTimeVsBeamGate <<
" vs. beam gate)"
1147 fPlots.demand<TH1>(
"NTriggers").Fill(iThr);
1148 fPlots.demand<TH2>(
"TriggerTick").Fill(thisTriggerTick.value(), iThr);
1149 fPlots.demand<TH2>(
"TriggerTimeVsHWTrig").Fill
1150 (thisTriggerTimeVsHWtrig.value(), iThr);
1151 fPlots.demand<TH2>(
"TriggerTimeVsBeamGate").Fill
1152 (thisTriggerTimeVsBeamGate.value(), iThr);
1156 TGraph& graph =
plots.demand<TGraph>(
"TriggerTimeVsHWTrigVsBeam");
1157 graph.SetPoint(graph.GetN(),
1158 -beamGateTime.value(), thisTriggerTimeVsBeamGate.value()
1163 plotInfo.triggerTimesVsHWtrig.add(thisTriggerTimeVsHWtrig.value());
1164 plotInfo.triggerTimesVsBeam.add(thisTriggerTimeVsBeamGate.value());
1181 <<
"Summary of triggers for " << fTriggerCount.size()
1182 <<
" thresholds (ADC) with pattern: " << fPattern.description()
1184 for (
auto const& [
count, thr ]
1185 :
util::zip(fTriggerCount, util::get_elements<0U>(fADCthresholds)))
1187 log <<
"\n threshold " << thr
1189 if (fTotalGates > 0U) {
1190 log <<
"/" << fTotalGates
1191 <<
" (" << (double(count) / fTotalGates * 100.0) <<
"%)";
1193 else log <<
" gates triggered";
1211 : std::numeric_limits<double>::lowest()
1225 std::string
const&
name, std::string
const& title,
1229 if (binnedContent.
empty())
return nullptr;
1231 TH1* hist = plots.
make<TH1F>(
1233 binnedContent.
nBins(), binnedContent.
min(), binnedContent.
max()
1237 unsigned int total = 0U;
1239 hist->SetBinContent(iBin + 1,
count);
1242 hist->SetEntries(static_cast<double>(total));
1249 (art::Timestamp
const& time)
1253 return static_cast<double>(time.timeHigh())
1254 + static_cast<double>(time.timeHigh()) * 1
e-9;
1260 (art::Event
const& event)
1261 {
return eventTimestampInSeconds(event.time()); }
BEGIN_PROLOG BeamGateDuration pmtthr physics producers trigtilewindowORS Thresholds
bool fired() const
Returns whether the trigger fired.
std::map< std::string, art::InputTag > fADCthresholds
Name of ADC thresholds to read, and the input tag connected to their data.
Obj * make(std::string const &name, std::string const &title, Args &&...args)
Creates a new ROOT object with the specified name and title.
art::InputTag const fBeamGateTag
Data product of beam gates to simulate.
electronics_time BeamGateTime() const
An empty class that can't be copied nor moved.
Simulates a sliding window trigger at specified gate times.
BinnedContent_t triggerTimesVsHWtrig
Utilities related to art service access.
Utilities for the conversion of trigger gate data formats.
Assembles the topology of trigger windows.
Class to extract and verify a window topology from trigger gates.
ApplyBeamGateClass makeApplyBeamGate(util::quantities::intervals::microseconds duration, util::quantities::intervals::microseconds delay, detinfo::DetectorClocksData const &clockData, std::string const &logCategory="ApplyBeamGateClass")
Returns a new ApplyBeamGateClass object with the specified gate.
constexpr T roundup(T const value, U const quantum, T const offset=T{})
Returns the value, rounded up.
Definition of util::get_elements() and util::get_const_elements().
raw::Trigger triggerInfoToTriggerData(detinfo::DetectorTimings const &detTimings, ApplyBeamGateClass const &beamGate, unsigned int triggerNumber, WindowTriggerInfo_t const &info) const
Converts the trigger information into a raw::Trigger object.
BinnedContent_t HWtrigTimeVsBeam
void initializePlots()
Initializes the full set of plots (all ADC thresholds).
Definition of util::enumerate().
A wrapper to trigger gate objects tracking the input of operations.
microseconds_as<> microseconds
Type of time interval stored in microseconds, in double precision.
Defines classes that can't be copied nor moved.
Simple utility for human-friendly binning.
double fEventTimeBinning
Trigger time plot binning [s].
void plotEvent(art::Event const &event, detinfo::DetectorTimings const &detTimings, std::vector< icarus::trigger::ApplyBeamGateClass > const &gates)
Fills event-wide plots.
trigger_time toTriggerTime(FromTime time) const
Converts a time point into trigger time scale.
detinfo::DetectorClocksData const & clockData() const
Returns the detector clocks data.
Base class facilitating logging to message facility.
BinIndex_t add(Data_t value)
Increases by a unit the count at the bin including value.
icarus::trigger::SlidingWindowPatternAlg::TriggerGates_t TriggerGates_t
List of trigger gates.
Helper to manage a beam gate.
decltype(auto) const_values(Coll &&coll)
Range-for loop helper iterating across the constant values of the specified collection.
Utilities for numerical rounding.
void makeThresholdPlots(std::string const &threshold, icarus::trigger::PlotSandbox &plots, ThresholdPlotInfo_t const &plotInfo)
BinnedContent_t eventTimes
void applyAxisLabels(TAxis *pAxis, std::vector< std::string > const &labels, int first=1)
Sets all the labels starting with the bin first (1 by default).
void declareConsumes(ConsumesCollector &collector) const
Declares to the collector the data products that are going to be read.
Data_t max() const noexcept
std::optional< icarus::trigger::SlidingWindowPatternAlg > fPatternAlg
Pattern algorithm.
void plotTriggerResponse(std::size_t iThr, std::string const &thrTag, WindowTriggerInfo_t const &triggerInfo, detinfo::DetectorTimings const &detTimings)
Fills the plots for threshold index iThr with trigger information.
std::string const & name() const
Returns the sandbox name.
Helper applying a beam gate to any gate.
art::EDProducer::Table< Config > Parameters
double lower() const
Returns the value of the lower end of the first bin.
All information needed to generate plots for a specific threshold.
Class to keep count of a pass/fail result.
auto tickRange() const
Returns the range of the beam gate as start and stop tick.
std::vector< sim::BeamGateInfo > BeamGates_t
Type of list of gates to simulate trigger into.
Count_t total() const
Returns the total number of registered events.
Data_t min() const noexcept
std::string const fLogCategory
Message facility stream category for output.
Helper data structure to store transient trigger result.
Assembles and returns trigger gates from serialized data.
auto enumerate(Iterables &&...iterables)
Range-for loop helper tracking the number of iteration.
BinningSpecs alignBinningTo(BinningSpecs const &binning, double boundary, bool extendCoverage=true)
Returns a binning shifted to align with the specified boundary.
timescale_traits< OpticalTimeCategory >::tick_interval_t optical_time_ticks
Interface to detinfo::DetectorClocks.
Specification of the requirement of sliding window firing pattern.
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Access the description of detector geometry.
std::vector< ThresholdPlotInfo_t > fThresholdPlots
Proto-histogram information in a not-so-practical array; per threshold.
timescale_traits< TriggerTimeCategory >::time_point_t trigger_time
A point in time on the trigger time scale.
bool empty() const noexcept
Returns whether there is no storage at all.
std::vector< std::string > fOutputInstances
Output data product instance names (same order as fADCthresholds).
TH1 * makeHistogramFromBinnedContent(icarus::trigger::PlotSandbox &plots, std::string const &name, std::string const &title, BinnedContent_t const &binnedContent) const
Creates and returns a 1D histogram filled with binnedContent.
Data structure holding binning information.
double binWidth() const
Returns the width of the bins (all bins have the same width).
electronics_time toElectronicsTime(FromTime time) const
Converts a time point into electronics time scale.
Ticks toOpticalTicks(time_interval time) const
Returns the optical ticks corresponding to a time interval.
void add(bool pass)
Adds a single event, specifying whether it "passes" or not.
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
bool empty() const
Returns if the sandbox is empty (neither it nor subboxes hold objects).
void finalizePlots()
Creates summary plots from proto-histogram data.
Simple functions to streamline the creation of DetectorClocksData.
Defines a (sliding) window trigger pattern.
Simple type definitions for trigger algorithms.
A trigger gate data object for optical detector electronics.
icarus::trigger::ReadoutTriggerGate< TriggerGateTick_t, TriggerGateTicks_t, raw::Channel_t > OpticalTriggerGateData_t
Type of trigger gate data serialized into art data products.
A bunch of diverse utilities and futilities related to ROOT.
virtual void endJob() override
Prints end-of-job summaries.
std::vector< PlotDef > plots
icarus::trigger::WindowTopologyManager fWindowMapMan
Mapping of each sliding window with location and topological information.
std::uint32_t fBeamBits
Bits for the beam gate being simulated.
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
void printSummary() const
Prints the summary of fired triggers on screen.
BEGIN_PROLOG vertical distance to the surface Name
Test of util::counter and support utilities.
An interval (duration, length, distance) between two quantity points.
Definition of data types for geometry description.
Class with extensible fix-sized binning.
WindowPattern const fPattern
Configured sliding window requirement pattern.
FHiCL configuration structure for icarus::trigger::WindowPattern.
std::vector< std::atomic< unsigned int > > fTriggerCount
std::size_t nBins() const noexcept
Returns how many bins currently have storage.
icarus::trigger::PlotSandbox fPlots
All plots in one practical sandbox.
nanoseconds_as<> nanoseconds
Type of time interval stored in nanoseconds, in double precision.
double upper() const
Returns the value of the upper end of the last bin.
::fhicl::TableAs< icarus::trigger::WindowPattern, WindowPatternConfig > WindowPatternTable
Configuration element for a trigger window.
Utilities to read interval and point quantity FHiCL configuration.
TriggerInfo_t info
Standard trigger information.
virtual void produce(art::Event &event) override
Runs the simulation and saves the results into the art event.
timescale_traits< OpticalTimeCategory >::tick_t optical_tick
std::vector< WindowTriggerInfo_t > produceForThreshold(art::Event &event, detinfo::DetectorTimings const &detTimings, std::vector< ApplyBeamGateClass > const &beamGates, std::size_t const iThr, std::string const &thrTag, unsigned int firstTriggerNumber)
Performs the simulation for the specified ADC threshold.
Classes to detect the change of object values.
optical_tick atTick() const
Returns the time of the trigger (undefined if !fired()).
art::TFileDirectory fOutputDir
ROOT directory where all the plots are written.
std::string to_string(WindowPattern const &pattern)
virtual void beginJob() override
Initializes the plots.
Dimensioned variables representing space or time quantities.
Helper class to store transient trigger result.
A class exposing an upgraded interface of detinfo::DetectorClocksData.
Data types for detinfo::DetectorTimings.
Functions pulling in STL customization if available.
Class to create an object representing a beam gate.
std::vector< InputTriggerGate_t > TriggerGates_t
A list of trigger gates from input.
ThresholdPlotInfo_t fEventPlotInfo
Proto-histogram information in a convenient packet; event-wide.
icarus::trigger::TrackedOpticalTriggerGate< sbn::OpDetWaveformMeta > InputTriggerGate_t
Type of trigger gate provided as input.
static double eventTimestampInSeconds(art::Timestamp const &time)
Returns the time of the event in seconds from The Epoch.
auto zip(Iterables &&...iterables)
Range-for loop helper iterating across many collections at the same time.
Definition of util::values() and util::const_values().
BEGIN_PROLOG triggeremu_data_config_icarus settings sequence::triggeremu_data_config_icarus settings PMTADCthresholds sequence::triggeremu_data_config_icarus settings PMTADCthresholds sequence::triggeremu_data_config_icarus settings PMTADCthresholds Pattern
unsigned long nBins() const
Returns the number of bins.
std::size_t count(Cont const &cont)
TriggerSimulationOnGates(Parameters const &config)
Count_t passed() const
Returns the number of events which "passed".
std::vector< icarus::trigger::TrackedOpticalTriggerGate< OpDetInfo > > ReadTriggerGates(Event const &event, art::InputTag const &dataTag)
Assembles and returns trigger gates from serialized data.
nanoseconds fTriggerTimeResolution
Trigger resolution in time.
Complete information from this algorithm, standard + non-standard (extra).
Class counting pass/fail events.
Applies sliding window trigger patterns.
A helper to manage ROOT objects in a art::TFileDirectory.
BinnedContent_t triggerTimesVsBeam
art framework interface to geometry description
detinfo::DetectorTimings makeDetTimings(art::Event const *event)
Returns a detinfo::DetectorTimings from DetectorClocksService.
void makeEventPlots()
Creates in the main sandbox all event-wide plots.
A helper to manage ROOT objects with consistent naming.
Interval_t binWidth() const noexcept
Returns the width of the bins.