19 static constexpr
double DistanceTol = 0.001;
31 std::string ad1name = (ad1->
TotalVolume())->GetName();
32 std::string ad2name = (ad2->
TotalVolume())->GetName();
35 int ad1Num = atoi( ad1name.substr( 9, ad1name.size()).c_str() );
36 int ad2Num = atoi( ad2name.substr( 9, ad2name.size()).c_str() );
38 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;
63 double xyz1[3] = {0.}, xyz2[3] = {0.};
64 double local[3] = {0.};
68 return xyz1[0] < xyz2[0];
76 double xyz1[3] = {0.};
77 double xyz2[3] = {0.};
78 double local[3] = {0.};
83 if(xyz1[0] < xyz2[0])
return true;
93 double xyz1[3] = {0.};
94 double xyz2[3] = {0.};
95 double local[3] = {0.};
100 if(std::abs(xyz1[0]-xyz2[0]) > DistanceTol)
101 return xyz1[0] > xyz2[0];
104 if(std::abs(xyz1[2]-xyz2[2]) > DistanceTol)
105 return xyz1[2] < xyz2[2];
108 return xyz1[1] < xyz2[1];
114 double xyz1[3] = {0.};
115 double xyz2[3] = {0.};
120 if(std::abs(xyz1[2]-xyz2[2]) > DistanceTol)
121 return xyz1[2] < xyz2[2];
124 if(std::abs(xyz1[1]-xyz2[1]) > DistanceTol)
125 return xyz1[1] < xyz2[1];
128 return xyz1[0] < xyz2[0];
184 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...
Drift direction is unknown.
Encapsulate the construction of a single cyostat.
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
static bool sortTPCStandard(const TPCGeo *t1, const TPCGeo *t2)
Geometry information for a single TPC.
void SortCryostats(std::vector< geo::CryostatGeo * > &cgeo) const
void SortWires(std::vector< geo::WireGeo * > &wgeo) const
Drift towards negative X values.
Geometry information for a single cryostat.
void SortPlanes(std::vector< geo::PlaneGeo * > &pgeo, geo::DriftDirection_t const &driftDir) const
Interface to algorithm class for standard sorting of geo::XXXGeo objects.
static bool sortAuxDetStandard(const AuxDetGeo *ad1, const AuxDetGeo *ad2)
enum geo::driftdir DriftDirection_t
Drift direction: positive or negative.
~GeoObjectSorterStandard()
bool sortWireStandard(WireGeo *w1, WireGeo *w2)
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
const TGeoVolume * TotalVolume() const
void SortTPCs(std::vector< geo::TPCGeo * > &tgeo) const
Encapsulate the geometry of an auxiliary detector.
Encapsulate the geometry of a wire.
void SortAuxDetSensitive(std::vector< geo::AuxDetSensitiveGeo * > &adsgeo) const
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
Returns the distance of point from the center of the detector.
void SortAuxDets(std::vector< geo::AuxDetGeo * > &adgeo) const
static bool sortPlaneStandard(const PlaneGeo *p1, const PlaneGeo *p2)
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
Namespace collecting geometry-related classes utilities.
static bool sortAuxDetSensitiveStandard(const AuxDetSensitiveGeo *ad1, const AuxDetSensitiveGeo *ad2)
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.
cet::coded_exception< error, detail::translate > exception
Encapsulate the construction of a single detector plane.
static bool sortCryoStandard(const CryostatGeo *c1, const CryostatGeo *c2)