Rewrites a set collection of beam gates into each event. More...
Classes | |
struct | BeamChangeRecipe |
All directions to change a beam gate. More... | |
struct | Config |
Public Types | |
using | Parameters = art::SharedProducer::Table< Config > |
Public Member Functions | |
FixBeamGateInfo (Parameters const &config, art::ProcessingFrame const &) | |
virtual void | produce (art::Event &event, art::ProcessingFrame const &) override |
Private Types | |
using | simulation_time = detinfo::timescales::simulation_time |
Private Member Functions | |
sim::BeamGateInfo | fixBeamGate (sim::BeamGateInfo const &beamGate) const |
Returns a "fixed" beam gate based on the input beamGate one. More... | |
Static Private Member Functions | |
static bool | acceptGate (sim::BeamGateInfo const &gate, BeamChangeRecipe::GateSelector_t const &selection) |
Returns whether gate passes the specified selection . More... | |
template<typename T , typename P , typename I > | |
static T & | applyRecipe (T &target, std::optional< BeamChangeRecipe::ChangeRecipe_t< P, I >> const &recipe) |
Applies the changes in recipe on the target value. More... | |
Private Attributes | |
art::InputTag const | fBeamGateTag |
Input beam gate data product. More... | |
std::vector< BeamChangeRecipe > const | fChanges |
Changes on beam gate. More... | |
std::string const | fInstanceName |
Instance name for the output product. More... | |
std::string const | fLogCategory |
Message facility stream category for output. More... | |
Friends | |
struct | dumpRecipe |
BeamChangeRecipe | convert (Config::ChangeGate const &config) |
Rewrites a set collection of beam gates into each event.
This module allows to perform fixed transformations to an existing beam gate data product (sim::BeamGateInfo
), producing a new set of gates.
std::vector<sim::BeamGateInfo>
: a collection of as many sim::BeamGateInfo
as in the input.A terse online description of the parameters is printed by running lar --print-description FixBeamGateInfo
.
BeamGateTag
(input tag, mandatory): data product with the beam gates to be "fixed"Changes
(list of tables): a list of beam gate changes to be performed; the changes are performed in the order of this list, all the ones which apply (e.g. not stopping at the first that applies). Each item must specify at least an action to be taken (changing either start or width of the gate). Each element in the list is a table including:Select
(optional table): if specified, the following changes apply only to the gates that match the constraints as follows.Types
(list of gate types): if specified, the changes will be applied only to gates of type specified in the list; the gate type is specified by name (e.g. "BNB"
, "NuMI"
). If not specified, the changes are applied to all types of gates.Width
(optional table): a table with the operations affecting the duration of the gate. The end of the gate is modified accordingly, while the start point is not changed. The following options are exclusive:SetTo
(time): duration is set to this interval;Change
(time): this value is added to the duration (negative decreases it, but never below 0
).Start
(optional table): a table with the operations affecting the start of the gate. The duration of the gate is always preserved. The following options are exclusive:SetTo
(time): start of the beam gate is moved to this time point, set on the electronics time scale;Change
(time): this value is added to the start time (negative anticipates it).KeepInstanceName
(flag, default: false
): if set, the output beam gate data product will have the same instance name as the input one specified in BeamGateTag
.OutputInstanceName
(string, default: empty): the instance name of the output data product (exclusive with KeepInstanceName
).LogCategory
(string, default: FixBeamGateInfo
): name of the output stream category for console messages (managed by MessageFacility library).Times must be specified as strings with their unit, e.g. "0.6 us"
for 0.6 microseconds.
Definition at line 97 of file FixBeamGateInfo_module.cc.
using icarus::trigger::FixBeamGateInfo::Parameters = art::SharedProducer::Table<Config> |
Definition at line 269 of file FixBeamGateInfo_module.cc.
|
private |
Definition at line 99 of file FixBeamGateInfo_module.cc.
|
explicit |
Definition at line 408 of file FixBeamGateInfo_module.cc.
|
staticprivate |
Returns whether gate
passes the specified selection
.
Definition at line 526 of file FixBeamGateInfo_module.cc.
|
staticprivate |
Applies the changes in recipe
on the target
value.
Definition at line 537 of file FixBeamGateInfo_module.cc.
|
private |
Returns a "fixed" beam gate based on the input beamGate
one.
Definition at line 500 of file FixBeamGateInfo_module.cc.
|
overridevirtual |
Definition at line 469 of file FixBeamGateInfo_module.cc.
|
friend |
Definition at line 364 of file FixBeamGateInfo_module.cc.
|
friend |
Definition at line 326 of file FixBeamGateInfo_module.cc.
|
private |
Input beam gate data product.
Definition at line 294 of file FixBeamGateInfo_module.cc.
|
private |
Changes on beam gate.
Definition at line 297 of file FixBeamGateInfo_module.cc.
|
private |
Instance name for the output product.
Definition at line 299 of file FixBeamGateInfo_module.cc.
|
private |
Message facility stream category for output.
Definition at line 302 of file FixBeamGateInfo_module.cc.