21 constexpr
double DistanceTol = 0.001;
32 std::string
const& ad1name = ad1.
TotalVolume()->GetName();
33 std::string
const& ad2name = ad2.
TotalVolume()->GetName();
36 int ad1Num = atoi(ad1name.substr(9, ad1name.size()).c_str());
37 int ad2Num = atoi(ad2name.substr(9, ad2name.size()).c_str());
39 return ad1Num < ad2Num;
48 std::string ad1name = (ad1.
TotalVolume())->GetName();
49 std::string ad2name = (ad2.
TotalVolume())->GetName();
52 int ad1Num = atoi(ad1name.substr(9, ad1name.size()).c_str());
53 int ad2Num = atoi(ad2name.substr(9, ad2name.size()).c_str());
55 return ad1Num < ad2Num;
65 return xyz1.X() < xyz2.X();
77 return xyz1.X() < xyz2.X();
89 if (
std::abs(xyz1.X() - xyz2.X()) > DistanceTol)
return xyz1.X() > xyz2.X();
92 if (
std::abs(xyz1.Z() - xyz2.Z()) > DistanceTol)
return xyz1.Z() < xyz2.Z();
95 return xyz1.Y() < xyz2.Y();
104 if (
std::abs(xyz1.Z() - xyz2.Z()) > DistanceTol)
return xyz1.Z() < xyz2.Z();
107 if (
std::abs(xyz1.Y() - xyz2.Y()) > DistanceTol)
return xyz1.Y() < xyz2.Y();
110 return xyz1.X() < xyz2.X();
124 std::vector<geo::AuxDetSensitiveGeo>& adsgeo)
const 153 throw cet::exception(
"TPCGeo") <<
"Drift direction is unknown, can't sort the planes\n";
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
static bool sortAuxDetStandard(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
Point_t const & GetCenter() const
Returns the world coordinate of the center of the wire [cm].
Drift direction is unknown.
Encapsulate the construction of a single cyostat.
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
geo::Point3DBase_t< TPCGeoCoordinatesTag > LocalPoint_t
Type of points in the local GDML TPC frame.
static bool sortWireStandard(WireGeo const &w1, WireGeo const &w2)
Geometry information for a single TPC.
constexpr auto abs(T v)
Returns the absolute value of the argument.
void SortWires(std::vector< geo::WireGeo > &wgeo) const override
Drift towards negative X values.
Geometry information for a single cryostat.
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local TPC frame to world frame.
Interface to algorithm class for standard sorting of geo::XXXGeo objects.
void SortTPCs(std::vector< geo::TPCGeo > &tgeo) const override
void SortPlanes(std::vector< geo::PlaneGeo > &pgeo, geo::DriftDirection_t driftDir) const override
enum geo::driftdir DriftDirection_t
Drift direction: positive or negative.
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local plane frame to world frame.
geo::Point3DBase_t< CryostatGeoCoordinatesTag > LocalPoint_t
Type of points in the local GDML cryostat frame.
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
const TGeoVolume * TotalVolume() const
static bool sortAuxDetSensitiveStandard(const AuxDetSensitiveGeo &ad1, const AuxDetSensitiveGeo &ad2)
static bool sortPlaneStandard(const PlaneGeo &p1, const PlaneGeo &p2)
static bool sortCryoStandard(const CryostatGeo &c1, const CryostatGeo &c2)
void SortAuxDetSensitive(std::vector< geo::AuxDetSensitiveGeo > &adsgeo) const override
Encapsulate the geometry of an auxiliary detector.
Encapsulate the geometry of a wire.
GeoObjectSorterStandard(fhicl::ParameterSet const &p)
Drift towards positive X values.
Encapsulate the construction of a single detector plane.
const TGeoVolume * TotalVolume() const
Returns the distance of point from the center of the detector.
void SortCryostats(std::vector< geo::CryostatGeo > &cgeo) const override
static bool sortTPCStandard(const TPCGeo &t1, const TPCGeo &t2)
void SortAuxDets(std::vector< geo::AuxDetGeo > &adgeo) const override
Namespace collecting geometry-related classes utilities.
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local cryostat frame to world frame.
geo::Point3DBase_t< PlaneGeoCoordinatesTag > LocalPoint_t
Type of points in the local GDML wire plane frame.
cet::coded_exception< error, detail::translate > exception
Encapsulate the construction of a single detector plane.