Sorter sorting PMT to follow the same order as TPC (standard). More...
#include <PMTsorting.h>
Classes | |
struct | Config |
struct | OpDetGeoCenterCoordComparer |
Public Member Functions | |
PMTsorterStandard (Config const &config) | |
Constructor: passes the configuration to the base class. More... | |
void | sort (std::vector< geo::OpDetGeo > &opDets) const |
Sorts the specified optical detectors. More... | |
void | operator() (std::vector< geo::OpDetGeo > &opDets) const |
Private Types | |
using | OpDetList_t = std::vector< geo::OpDetGeo > |
List of optical detector pointers for sorting. More... | |
using | OpDetSpan_t = util::span< OpDetList_t::iterator > |
Part of list of optical detector pointers for sorting. More... | |
Private Member Functions | |
void | sortInPlane (OpDetSpan_t const &opDets) const |
Sorts the geo::OpDetGeo assuming they belong to the same plane. More... | |
Private Attributes | |
OpDetGeoCenterCoordComparer <&geo::Point_t::X > const | fSmallerCenterX |
Sorting criterium according to x coordinate of geo::OpDetGeo center. More... | |
OpDetGeoCenterCoordComparer <&geo::Point_t::Y > const | fSmallerCenterY |
Sorting criterium according to y coordinate of geo::OpDetGeo center. More... | |
OpDetGeoCenterCoordComparer <&geo::Point_t::Z > const | fSmallerCenterZ |
Sorting criterium according to z coordinate of geo::OpDetGeo center. More... | |
Sorter sorting PMT to follow the same order as TPC (standard).
This class sorts the elements of the LArSoft detector description. The "standard" algorithm (geo::GeoObjectSorterStandard
) arranges TPC elements with x, then z, then y. The PMT are arranged so that their channels mimic the order of the TPC channels.
The algorithm for assigning channels to the PMT follows the criteria:
PMT channels are assigned by a fixed LArSoft algorithm, cryostat by cryostat with increasing cryostat number (first C:0
, then C:1
, ...).
This sorter supports the following parameters:
ToleranceX
, ToleranceY
, ToleranceZ
(double, default: 1.0
): rounding used for sorting optical detector position, in centimeters; if the coordinate of two optical detectors are closer than the tolerance for that coordinate (absolute), they two detectors are considered to be at the same position in that coordinate (note that the default value is very generous). Definition at line 63 of file PMTsorting.h.
|
private |
List of optical detector pointers for sorting.
Definition at line 66 of file PMTsorting.h.
|
private |
Part of list of optical detector pointers for sorting.
Definition at line 69 of file PMTsorting.h.
|
inline |
Constructor: passes the configuration to the base class.
Definition at line 100 of file PMTsorting.h.
|
inline |
Definition at line 124 of file PMTsorting.h.
void icarus::PMTsorterStandard::sort | ( | std::vector< geo::OpDetGeo > & | opDets | ) | const |
Sorts the specified optical detectors.
opDets | collection of pointers to all optical detectors in a cryostat |
The collection opDets
of optical detectors is sorted in place. Sorting criteria are documented in icarus::GeoObjectSorterPMTasTPC
class documentation.
This algorithm requires all optical detectors to have their center defined (geo::OpDetGeo::GetCenter()
). No other information is used.
Definition at line 24 of file PMTsorting.cxx.
|
private |
Sorts the geo::OpDetGeo
assuming they belong to the same plane.
Definition at line 64 of file PMTsorting.cxx.
|
private |
Sorting criterium according to x coordinate of geo::OpDetGeo
center.
Definition at line 152 of file PMTsorting.h.
|
private |
Sorting criterium according to y coordinate of geo::OpDetGeo
center.
Definition at line 155 of file PMTsorting.h.
|
private |
Sorting criterium according to z coordinate of geo::OpDetGeo
center.
Definition at line 158 of file PMTsorting.h.