9 #ifndef ICARUSALG_GEOMETRY_DETAILS_PMTSORTING_H
10 #define ICARUSALG_GEOMETRY_DETAILS_PMTSORTING_H
20 #include "fhiclcpp/types/Atom.h"
27 namespace icarus {
class PMTsorterStandard; }
80 Comment(
"tolerance when sorting optical detectors on x coordinate [cm]"),
86 Comment(
"tolerance when sorting optical detectors on x coordinate [cm]"),
92 Comment(
"tolerance when sorting optical detectors on x coordinate [cm]"),
122 void sort(std::vector<geo::OpDetGeo>& opDets)
const;
132 template <
double (geo::Po
int_t::*Coord)() const>
170 #endif // ICARUSALG_GEOMETRY_DETAILS_PMTSORTING_H
OpDetGeoCenterCoordComparer<&geo::Point_t::X > const fSmallerCenterX
Sorting criterium according to x coordinate of geo::OpDetGeo center.
OpDetGeoCenterCoordComparer(double tol=0.0)
Constructor: fixes the tolerance for the comparison.
OpDetGeoCenterCoordComparer<&geo::Point_t::Y > const fSmallerCenterY
Sorting criterium according to y coordinate of geo::OpDetGeo center.
An object with a begin and end iterator.
std::vector< geo::OpDetGeo > OpDetList_t
List of optical detector pointers for sorting.
bool operator()(geo::OpDetGeo const &A, geo::OpDetGeo const &B) const
Returns whether A has a center coordinate Coord smaller than B.
void GetCenter(double *xyz, double localz=0.0) const
fhicl::Atom< double > ToleranceZ
PMTsorterStandard(Config const &config)
Constructor: passes the configuration to the base class.
Simple class with a begin and an end.
Class for approximate comparisons.
constexpr bool strictlySmaller(Value_t a, Value_t b) const
Returns whether a is strictly smaller than b.
void sortInPlane(OpDetSpan_t const &opDets) const
Sorts the geo::OpDetGeo assuming they belong to the same plane.
Definitions of geometry vector data types.
Sorter sorting PMT to follow the same order as TPC (standard).
OpDetGeoCenterCoordComparer<&geo::Point_t::Z > const fSmallerCenterZ
Sorting criterium according to z coordinate of geo::OpDetGeo center.
BEGIN_PROLOG vertical distance to the surface Name
void operator()(std::vector< geo::OpDetGeo > &opDets) const
Encapsulate the geometry of an optical detector.
fhicl::Atom< double > ToleranceY
fhicl::Atom< double > ToleranceX
void sort(std::vector< geo::OpDetGeo > &opDets) const
Sorts the specified optical detectors.
lar::util::RealComparisons< double > const fCmp
Object used for comparison; includes a tolerance.