31 #include "art/Framework/Core/ModuleMacros.h"
32 #include "art/Framework/Core/EDProducer.h"
33 #include "art/Framework/Principal/Event.h"
34 #include "canvas/Utilities/InputTag.h"
35 #include "messagefacility/MessageLogger/MessageLogger.h"
36 #include "fhiclcpp/types/OptionalAtom.h"
37 #include "fhiclcpp/types/Sequence.h"
38 #include "fhiclcpp/types/Atom.h"
49 namespace icarus::trigger {
class ExtractEnergyDepositionSummary; }
134 Name(
"EnergyDepositTags"),
135 Comment(
"label of energy deposition data product(s) in the detector"),
136 std::vector<art::InputTag>{
"largeant:TPCActive" }
140 Name(
"SimChannelTag"),
141 Comment(
"label of source sim::SimChannels data product in the detector"),
145 Name(
"BeamGateDuration"),
146 Comment(
"length of time interval when optical triggers are accepted")
150 Name(
"BeamGateStart"),
151 Comment(
"open the beam gate this long after the nominal beam gate time"),
156 Name(
"PreSpillWindow"),
157 Comment(
"duration of the pre-spill window"),
162 Name(
"PreSpillWindowGap"),
163 Comment(
"gap from the end of pre-spill window to the start of beam gate"),
168 Name(
"OutputCategory"),
169 Comment(
"tag of the module output to console via message facility"),
170 "ExtractEnergyDepositionSummary"
188 virtual void produce(art::Event& event)
override;
260 fhicl::Sequence<art::InputTag>
const& energyDepositTags,
261 fhicl::OptionalAtom<art::InputTag>
const& simChannelTag
275 : art::EDProducer(config)
277 , fBeamGateDuration (config().BeamGateDuration())
278 , fBeamGateStart (config().BeamGateStart())
279 , fPreSpillWindow (config().PreSpillWindow())
281 (fBeamGateStart - config().PreSpillWindowGap() - fPreSpillWindow)
284 ,
fGeom(*(lar::providerFrom<geo::Geometry>()))
286 config().SimChannelTag.hasValue()
287 ? std::make_optional<TimingPack_t>(
288 art::ServiceHandle<detinfo::DetectorClocksService const>()
290 art::ServiceHandle<detinfo::DetectorPropertiesService const>()
296 , fEventInfoExtractorMaker(
301 , (fDetProps? &(fDetProps->detProps):
nullptr)
302 , (fDetProps? &(fDetProps->detTimings):
nullptr)
307 produces<icarus::SimEnergyDepositSummary>();
327 <<
"Beam gate has changed from " << oldGate->asOptTickRange()
328 <<
" to " << beamGate.asOptTickRange() <<
" (optical tick)!";
332 beamGate.asSimulationRange(),
354 (std::make_unique<icarus::SimEnergyDepositSummary>(std::move(summary)));
361 fhicl::Sequence<art::InputTag>
const& energyDepositTags,
362 fhicl::OptionalAtom<art::InputTag>
const& simChannelTag
373 edepTags = energyDepositTags();
float Total
Total deposited energy [GeV].
Utilities related to art service access.
std::optional< typename Optional::value_type > getOptionalValue(Optional const ¶meter)
Returns the value of an optional parameter as std::optional.
An object representing a time gate, with a start and and end.
microseconds_as<> microseconds
Type of time interval stored in microseconds, in double precision.
Object storing a summary of energy depositions in the detector.
constexpr value_t value() const
Returns the value of the quantity.
Helper to check if an object has changed. Thread-safe.
bool hasDepEnergy() const
Returns whether generator information is available.
Interface to detinfo::DetectorClocks.
Access the description of detector geometry.
Data structure containing summary information about deposited energy.
GeV DepositedEnergyInPreSpill() const
TimeRange< simulation_time > const & asSimulationRange() const
Returns the gate as start/stop pair in simulation time scale.
Simple functions to streamline the creation of DetectorClocksData.
detinfo::DetectorTimings makeDetectorTimings(detinfo::DetectorClocksData const &detClocks)
BEGIN_PROLOG vertical distance to the surface Name
Description of geometry of one entire detector.
GeV DepositedEnergyInSpill() const
Returns the total energy deposited in the detector during beam [GeV].
An interval (duration, length, distance) between two quantity points.
Functions dealing with icarus::trigger::details::EventInfo_t.
GeV DepositedEnergyInSpillInActiveVolume() const
Returns the energy deposited in the active volume during the beam [GeV].
Utilities to read interval and point quantity FHiCL configuration.
GeV DepositedEnergyInPreSpillInActiveVolume() const
Classes to detect the change of object values.
Contains all timing reference information for the detector.
Class hosting selected information about the event.
BeamGateStruct makeBeamGateStruct(detinfo::DetectorTimings const &detTimings, util::quantities::intervals::microseconds duration, util::quantities::intervals::microseconds delay=util::quantities::intervals::microseconds{0.0})
Creates a BeamGateStruct object of specified duration and start.
contains information for a single step in the detector simulation
A class exposing an upgraded interface of detinfo::DetectorClocksData.
Class to create an object representing a beam gate.
GeV DepositedEnergy() const
Returns the total energy deposited in the detector during the event [GeV].
object containing MC truth information necessary for making RawDigits and doing back tracking ...
GeV DepositedEnergyInActiveVolume() const
Returns the energy deposited in the active volume during the event [GeV].
Selected information about the event.
Simple helper functions to deal with FHiCL.
art framework interface to geometry description
detinfo::DetectorTimings makeDetTimings(art::Event const *event)
Returns a detinfo::DetectorTimings from DetectorClocksService.