Algorithm to create trigger window topology information. More...
#include <WindowTopologyAlg.h>
Public Types | |
using | InputTriggerGate_t = icarus::trigger::TrackedOpticalTriggerGate< sbn::OpDetWaveformMeta > |
Type of trigger gate extracted from the input event. More... | |
using | TriggerGates_t = std::vector< InputTriggerGate_t > |
A list of trigger gates from input. More... | |
using | TriggerGatesPerCryostat_t = std::vector< TriggerGates_t > |
Type of lists of gates, one list per cryostat (outer index: cryostat no). More... | |
Public Member Functions | |
WindowTopologyAlg (geo::GeometryCore const &geom, std::string const &logCategory="WindowTopologyAlg") | |
Constructor. More... | |
WindowChannelMap | createFromGates (TriggerGatesPerCryostat_t const &gates) const |
Returns the topology of the windows described by the gates. More... | |
WindowChannelMap | createFromGates (TriggerGates_t const &gates) const |
Returns the topology of the windows described by the gates. More... | |
WindowChannelMap | createFromCryostatGates (TriggerGates_t const &windowChannels, geo::CryostatGeo const &cryo) const |
Returns the topology of the windows described by the gates. More... | |
WindowChannelMap | createFromCryostatGates (TriggerGates_t const &windowChannels, geo::CryostatID cryoID) const |
Returns the topology of the windows described by the gates. More... | |
template<typename... Args> | |
auto | emplaceAndDumpMap (Args &&...args) const -> WindowChannelMap |
Private Types | |
using | WindowChannels_t = std::vector< raw::Channel_t > |
All channels in a gate. More... | |
using | WindowChannelColl_t = std::vector< WindowChannels_t > |
All channels in many gates (one list per gate). More... | |
Private Member Functions | |
template<typename... Args> | |
WindowChannelMap | emplaceAndDumpMap (Args &&...args) const |
Static Private Member Functions | |
static std::vector < WindowChannelMap::WindowInfo_t > | createWindowsFromCryostat (WindowChannelColl_t const &windowChannels, geo::CryostatGeo const &cryo, geo::GeometryCore const &geom, std::size_t firstWindowIndex=0U) |
Extracts topology information from a set of windows. More... | |
static WindowChannelColl_t | extractGateChannels (TriggerGates_t const &gates) |
Extracts the channel ID from a collection of gates. More... | |
static WindowChannelMap::WindowInfo_t const * | findClosestWindow (std::vector< WindowChannelMap::WindowInfo_t * > const &windowList, WindowChannelMap::WindowInfo_t const *targetWindow) |
Returns the window in windowList closest to the targetWindow . More... | |
Private Attributes | |
geo::GeometryCore const *const | fGeom |
Geometry service provider. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from icarus::ns::util::mfLoggingClass | |
mfLoggingClass (std::string const &logCategory) | |
Constructor: initializes with the specified log category. More... | |
std::string | logCategory () const |
Returns the logging category string for this object. More... | |
mfLoggingClass const & | loggingClass () const |
Returns this object (as a logging class object). More... | |
mf::LogError | mfLogError (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogError() stream for logging. More... | |
mf::LogWarning | mfLogWarning (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogWarning() stream for logging. More... | |
mf::LogProblem | mfLogProblem (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogProblem() stream for logging. More... | |
mf::LogInfo | mfLogInfo (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogInfo() stream for logging. More... | |
mf::LogVerbatim | mfLogVerbatim (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogVerbatim() stream for logging. More... | |
mf::LogDebug | mfLogDebug (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogDebug() stream for logging. More... | |
mf::LogTrace | mfLogTrace (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogTrace() stream for logging. More... | |
Algorithm to create trigger window topology information.
The algorithm defines the windows based on trigger gates and their channels, and establishes their topology cryostat by cryostat.
Definition at line 50 of file WindowTopologyAlg.h.
using icarus::trigger::WindowTopologyAlg::InputTriggerGate_t = icarus::trigger::TrackedOpticalTriggerGate<sbn::OpDetWaveformMeta> |
Type of trigger gate extracted from the input event.
Definition at line 58 of file WindowTopologyAlg.h.
using icarus::trigger::WindowTopologyAlg::TriggerGates_t = std::vector<InputTriggerGate_t> |
A list of trigger gates from input.
Definition at line 61 of file WindowTopologyAlg.h.
using icarus::trigger::WindowTopologyAlg::TriggerGatesPerCryostat_t = std::vector<TriggerGates_t> |
Type of lists of gates, one list per cryostat (outer index: cryostat no).
Definition at line 64 of file WindowTopologyAlg.h.
|
private |
All channels in many gates (one list per gate).
Definition at line 148 of file WindowTopologyAlg.h.
|
private |
All channels in a gate.
Definition at line 145 of file WindowTopologyAlg.h.
icarus::trigger::WindowTopologyAlg::WindowTopologyAlg | ( | geo::GeometryCore const & | geom, |
std::string const & | logCategory = "WindowTopologyAlg" |
||
) |
Constructor.
geom | geometry service provider |
logCategory | category tag for messages from this algorithm |
Definition at line 54 of file WindowTopologyAlg.cxx.
auto icarus::trigger::WindowTopologyAlg::createFromCryostatGates | ( | TriggerGates_t const & | windowChannels, |
geo::CryostatGeo const & | cryo | ||
) | const |
Returns the topology of the windows described by the gates.
gates | a set of gates within a single cryostat |
cryo | the cryostat the gates (and their channels) belong to |
The input gates
is a collection with all the gates from the specified cryostat cryo
.
Each gate covers one or more channels: each window is made out of all the channels in a gate. The opening content of the gates is not considered.
Definition at line 121 of file WindowTopologyAlg.cxx.
auto icarus::trigger::WindowTopologyAlg::createFromCryostatGates | ( | TriggerGates_t const & | windowChannels, |
geo::CryostatID | cryoID | ||
) | const |
Returns the topology of the windows described by the gates.
gates | a set of gates within a single cryostat |
cryoID | ID of the cryostat the gates (and their channels) belong to |
createFromCryostatGates(TriggerGates_t const&, geo::CryostatGeo const&)
The input gates
is a collection with all the gates from the specified cryostat with ID cryoID
.
See createFromCryostatGates(WindowChannelsPerCryostat_t const&, geo::CryostatGeo const&)
for more information.
Definition at line 132 of file WindowTopologyAlg.cxx.
auto icarus::trigger::WindowTopologyAlg::createFromGates | ( | TriggerGatesPerCryostat_t const & | gates | ) | const |
Returns the topology of the windows described by the gates.
gates | a set of gates, grouped by cryostat |
The input gates
is a collection with as many entries as there are cryostats in the detector, the first entry collecting all gates from the first cryostat (C:0
), the next all the gates from the second one (C:2
), and so on.
Each gate covers one or more channels: each window is made out of all the channels in a gate. The opening content of the gates is not considered.
Definition at line 65 of file WindowTopologyAlg.cxx.
auto icarus::trigger::WindowTopologyAlg::createFromGates | ( | TriggerGates_t const & | gates | ) | const |
Returns the topology of the windows described by the gates.
gates | a set of gates |
The input gates
is a collection with all relevant gates in the detector.
Each gate covers one or more channels: each window is made out of all the channels in a gate. The opening content of the gates is not considered.
Gates are first split by the cryostat they belong to (cross-cryostat gates are forbidden), and then the window topology is extracted.
Definition at line 90 of file WindowTopologyAlg.cxx.
|
staticprivate |
Extracts topology information from a set of windows.
windowChannels | the windows, specified by composition in channel ID |
cryo | the cryostat the windows belong to |
geom | geometry service provider |
firstWindowIndex | (default: 0 ) the index assigned to the first window |
Definition at line 151 of file WindowTopologyAlg.cxx.
auto icarus::trigger::WindowTopologyAlg::emplaceAndDumpMap | ( | Args &&... | args | ) | const -> WindowChannelMap |
Definition at line 141 of file WindowTopologyAlg.cxx.
|
private |
Convenience function: creates and returns a WindowChannelMap
from the arguments (args
); in the meanwhile, it also dumps it into debug stream.
|
staticprivate |
Extracts the channel ID from a collection of gates.
gates | a collection of gates |
The returned collection has one entry per input gate in gates
: each entry is the list of channels that the corresponding gate covers.
Definition at line 270 of file WindowTopologyAlg.cxx.
|
staticprivate |
Returns the window in windowList
closest to the targetWindow
.
windowList | list of (pointers to) the candidate windows |
targetWindow | the reference window |
windowList
, nullptr
if noneA pointer to the window with the smallest distance from targetWindow
is returned. The distance is computed between the centers of the windows as reported by the windows themselves.
The only case where no window (nullptr
) is returned is when the window candidate list windowList
is empty.
Definition at line 287 of file WindowTopologyAlg.cxx.
|
private |
Geometry service provider.
Definition at line 151 of file WindowTopologyAlg.h.