19 static constexpr
double DistanceTol = 0.001;
30 std::string
const& ad1name = ad1.
TotalVolume()->GetName();
31 std::string
const& ad2name = ad2.
TotalVolume()->GetName();
34 int ad1Num = atoi( ad1name.substr( 9, ad1name.size()).c_str() );
35 int ad2Num = atoi( ad2name.substr( 9, ad2name.size()).c_str() );
37 return ad1Num < ad2Num;
46 std::string ad1name = (ad1.
TotalVolume())->GetName();
47 std::string ad2name = (ad2.
TotalVolume())->GetName();
50 int ad1Num = atoi( ad1name.substr( 9, ad1name.size()).c_str() );
51 int ad2Num = atoi( ad2name.substr( 9, ad2name.size()).c_str() );
53 return ad1Num < ad2Num;
60 double xyz1[3] = {0.}, xyz2[3] = {0.};
61 double local[3] = {0.};
65 return xyz1[0] < xyz2[0];
73 double xyz1[3] = {0.};
74 double xyz2[3] = {0.};
75 double local[3] = {0.};
80 return xyz1[0] < xyz2[0];
88 double xyz1[3] = {0.};
89 double xyz2[3] = {0.};
90 double local[3] = {0.};
95 if(
std::abs(xyz1[0]-xyz2[0]) > DistanceTol)
96 return xyz1[0] > xyz2[0];
99 if(
std::abs(xyz1[2]-xyz2[2]) > DistanceTol)
100 return xyz1[2] < xyz2[2];
103 return xyz1[1] < xyz2[1];
110 double xyz1[3] = {0.};
111 double xyz2[3] = {0.};
116 if(
std::abs(xyz1[2]-xyz2[2]) > DistanceTol)
117 return xyz1[2] < xyz2[2];
120 if(
std::abs(xyz1[1]-xyz2[1]) > DistanceTol)
121 return xyz1[1] < xyz2[1];
124 return xyz1[0] < xyz2[0];
165 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...
void SortTPCs(std::vector< geo::TPCGeo > &tgeo) const override
static bool sortAuxDetStandard(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
Drift direction is unknown.
Encapsulate the construction of a single cyostat.
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
void SortAuxDetSensitive(std::vector< geo::AuxDetSensitiveGeo > &adsgeo) const override
void SortCryostats(std::vector< geo::CryostatGeo > &cgeo) const override
void SortAuxDets(std::vector< geo::AuxDetGeo > &adgeo) const override
static bool sortWireStandard(WireGeo const &w1, WireGeo const &w2)
Geometry information for a single TPC.
Drift towards negative X values.
Geometry information for a single cryostat.
Interface to algorithm class for standard sorting of geo::XXXGeo objects.
enum geo::driftdir DriftDirection_t
Drift direction: positive or negative.
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)
Encapsulate the geometry of an auxiliary detector.
Encapsulate the geometry of a wire.
GeoObjectSorterStandard(fhicl::ParameterSet const &p)
void LocalToWorld(const double *cryo, double *world) const
Transform point from local cryostat frame to world frame.
Drift towards positive X values.
Encapsulate the construction of a single detector plane.
const TGeoVolume * TotalVolume() const
static bool sortTPCStandard(const TPCGeo &t1, const TPCGeo &t2)
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
void SortPlanes(std::vector< geo::PlaneGeo > &pgeo, geo::DriftDirection_t driftDir) const override
void LocalToWorld(const double *tpc, double *world) const
Transform point from local TPC frame to world frame.
void LocalToWorld(const double *plane, double *world) const
Transform point from local plane frame to world frame.
physics associatedGroupsWithLeft p1
void SortWires(std::vector< geo::WireGeo > &wgeo) const override
Encapsulate the construction of a single detector plane.