Groups optical detector channels into windows based on position. More...
#include <SlidingWindowDefinitionAlg.h>
Public Types | |
using | WindowChannels_t = icarus::trigger::TriggerWindowChannels_t |
Type of optical detector channel list in a window. More... | |
using | WindowDefs_t = icarus::trigger::TriggerWindowDefs_t |
Definition of all windows. More... | |
Public Member Functions | |
SlidingWindowDefinitionAlg (geo::GeometryCore const &geom, std::string logCategory="SlidingWindowDefinitionAlg") | |
Constructor: complete algorithm setup. More... | |
WindowDefs_t | makeWindows (unsigned int windowSize, unsigned int windowStride) const |
Performs the calculation and returns the sliding window composition. More... | |
WindowDefs_t | operator() (unsigned int windowSize, unsigned int windowStride) const |
WindowDefs_t | makeWindows (unsigned int windowSize) const |
Performs the calculation and returns the sliding window composition. More... | |
WindowDefs_t | operator() (unsigned int windowSize) const |
Private Attributes | |
std::string const | fLogCategory |
Message facility stream category for output. More... | |
geo::GeometryCore const & | fGeom |
Geometry service provider. More... | |
Groups optical detector channels into windows based on position.
This algorithm groups all the optical detectors in the specified detector geometry description into "sliding windows".
Each optical detector "wall" (detectors at the same drift coordinate, that is on the same plane) is sliced in windows of a given size (windowSize
, the number of optical detector channels within) starting one after the other at fixed intervals (windowStride
).
For example, a partition with window size 30 channels and stride also 30 channels on a wall of 90 optical detector channels will create 3 windows with 30 channels each. A splitting with size 30 channels but stride only 15 channels will create 5 windows of 30 channels each, which overlap (like in 0-29, 15-44, 30-59, 45-74 and 60-89).
The windows are returned in the formats defined in icaruscode/PMT/Trigger/Algorithms/SlidingWindowDefs.h
, that is a list of windows, each being a list of optical detector channels.
Optical detectors are split into "walls" and within each wall into "towers" (a wall being a set of optical detectors at the same drift coordinate, i.e. on a plane, and a tower being a set of detector in a wall which share the horizontal position but are piled in the vertical one, y). The task of separating the detectors in walls and towers is delegated to the algorithm icarus::trigger::PMTverticalSlicingAlg
.
Each wall is processed separately. The towers in the wall are sorted in the non-vertical direction (in ICARUS they will have a pattern of 2 channels, 3 channels, 3 channels, 2 channels, repeated 9 times), and the windows are created starting from one end. Towers are progressively added to the window until the window reaches the desided size (if it overshoots it, the window size is not compatible with the geometry and an exception is thrown). The process is repeated for each window, starting with the first tower, then the tower starting after windowStride
optical detectors, then the tower starting after twice windowStride
detectors, and so on, until a a window is reached that can't be completed because we ran out of towers. If there is no tower starting at the exact multiple of windowStride
, the stride parameter is not compatible with the detector geometry, and an exception is thrown.
Definition at line 83 of file SlidingWindowDefinitionAlg.h.
using icarus::trigger::SlidingWindowDefinitionAlg::WindowChannels_t = icarus::trigger::TriggerWindowChannels_t |
Type of optical detector channel list in a window.
Definition at line 102 of file SlidingWindowDefinitionAlg.h.
using icarus::trigger::SlidingWindowDefinitionAlg::WindowDefs_t = icarus::trigger::TriggerWindowDefs_t |
Definition of all windows.
Definition at line 105 of file SlidingWindowDefinitionAlg.h.
|
inline |
Constructor: complete algorithm setup.
geom | LArSoft geometry service provider |
logCategory | tag to use for messages to message facility service |
Definition at line 156 of file SlidingWindowDefinitionAlg.h.
auto icarus::trigger::SlidingWindowDefinitionAlg::makeWindows | ( | unsigned int | windowSize, |
unsigned int | windowStride | ||
) | const |
Performs the calculation and returns the sliding window composition.
windowSize | number of optical detectors in each window |
windowStride | new window every windowStride optical detectors |
Definition at line 37 of file SlidingWindowDefinitionAlg.cxx.
|
inline |
Performs the calculation and returns the sliding window composition.
windowSize | number of optical detectors in each window |
Windows are contiguous and not overlapping.
Definition at line 141 of file SlidingWindowDefinitionAlg.h.
|
inline |
Definition at line 129 of file SlidingWindowDefinitionAlg.h.
|
inline |
Definition at line 144 of file SlidingWindowDefinitionAlg.h.
|
private |
Geometry service provider.
Definition at line 95 of file SlidingWindowDefinitionAlg.h.
|
private |
Message facility stream category for output.
Definition at line 88 of file SlidingWindowDefinitionAlg.h.