Writes a set collection of beam gates into each event. More...
Classes | |
struct | Config |
Public Types | |
using | nanoseconds = util::quantities::intervals::nanoseconds |
using | Parameters = art::SharedProducer::Table< Config > |
Public Member Functions | |
BeamGateInfoFromTracks (Parameters const &config, art::ProcessingFrame const &) | |
virtual void | produce (art::Event &event, art::ProcessingFrame const &) override |
Fills the plots. Also extracts the information to fill them with. More... | |
Private Attributes | |
art::InputTag const | fT0selProducer |
Input particles. More... | |
art::InputTag const | fT0Producer |
Input particle/time associations. More... | |
nanoseconds const | fGateStartOffset |
Offset of gate start from particle time. More... | |
nanoseconds const | fGateDuration |
Width of the gate being created. More... | |
sim::BeamType_t const | fBeamGateType |
Type of gate saved. More... | |
std::string const | fLogCategory |
Message facility stream category for output. More... | |
Writes a set collection of beam gates into each event.
This module writes a list of sim::BeamGateInfo
based on the time associated to a selection of reconstructed tracks.
It may be used as input to modules which require to operate on beam gates, to select time(s) around the reconstructed (and selected) tracks.
This module acts on a selection of tracks, which implies that the input is a set of pointers to tracks rather than to an actual track collection. For each track, an associated time is required.
std::vector<art::Ptr<recob::PFParticle>>
(tag from T0selProducer
): list of the selected particles to be consideredart::Assns<anab::T0, recob::PFParticle>
(tag from T0Producer
): association between particles and their time, which must include all pointers to the tracks listed in T0selProducer
: each of those particles must be associated with exactly one anab::T0
. The time convention is described in its own section.std::vector<sim::BeamGateInfo>
: a collection of as many sim::BeamGateInfo
as the BeamGates
configuration parameter entries, with the content from them.art::Assns<sim::BeamGateInfo, recob::PFParticle>
: courtesy association between the selected particle and its gate, in the same order as the gates in their data product.art::Assns<sim::BeamGateInfo, anab::T0>
: courtesy association between the particle time and its gate, in the same order as the gates in their data product.A terse online description of the parameters is printed by running lar --print-description BeamGateInfoFromTracks
.
T0selProducer
(input tag, mandatory): the list of pointers to the particles to be considered.T0Producer
(input tag, mandatory): the association of particles with their times.GateStartOffset
(time string, mandatory): the time of the opening of the gate with respect to the time of the particle; a positive offset means that the gate starts after the time of the particle.GateEndOffset
(time string, mandatory): the time of the closing of the gate with respect to the time of the particle.GateType
(string, default: "unknown"): type of the gates being written; see online description for the configuration keys representing the values of sim::GateType
.LogCategory
(string, default: BeamGateInfoFromTracks
): name of the output stream category for console messages (managed by MessageFacility library)."5.5 us"
or "5500 ns"
.This module was introduced as a mean to determine the proper time intervals when to apply a trigger simulation. It is evident that for this use case a precise result requires the timing of the gates carefully aligned with the timing of the PMT. (the convention is that the PMT waveforms have a timestamp in the electronics time reference).
The time of the gates created by this module is offered as sim::BeamGateInfo
; LArSoft prescribes it to be be specified in nanoseconds and in simulation time reference). Designed for simulation, this time scale refers to the opening of the beam gate (or its surrogate definition in samples with no beam to be gated). Or so is my understanding of it.
The input anab::T0
, on the other end, as produced by the Pandora pattern recognition algorithm, and ultimately relative to the trigger time. In a perfectly aligned setup, this is equivalent to the trigger time in real data.
The output of this module attempts to adhere to that convention, and it defines the gate boundaries with respect to the beam gate time.
Definition at line 138 of file BeamGateInfoFromTracks_module.cc.
using icarus::trigger::BeamGateInfoFromTracks::nanoseconds = util::quantities::intervals::nanoseconds |
Definition at line 142 of file BeamGateInfoFromTracks_module.cc.
using icarus::trigger::BeamGateInfoFromTracks::Parameters = art::SharedProducer::Table<Config> |
Definition at line 216 of file BeamGateInfoFromTracks_module.cc.
|
explicit |
Definition at line 287 of file BeamGateInfoFromTracks_module.cc.
|
overridevirtual |
Fills the plots. Also extracts the information to fill them with.
Definition at line 328 of file BeamGateInfoFromTracks_module.cc.
|
private |
Type of gate saved.
Definition at line 248 of file BeamGateInfoFromTracks_module.cc.
|
private |
Width of the gate being created.
Definition at line 246 of file BeamGateInfoFromTracks_module.cc.
|
private |
Offset of gate start from particle time.
Definition at line 245 of file BeamGateInfoFromTracks_module.cc.
|
private |
Message facility stream category for output.
Definition at line 251 of file BeamGateInfoFromTracks_module.cc.
|
private |
Input particle/time associations.
Definition at line 242 of file BeamGateInfoFromTracks_module.cc.
|
private |
Input particles.
Definition at line 241 of file BeamGateInfoFromTracks_module.cc.