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;
51 int ad1Num = atoi( ad1name.substr( 9, ad1name.size()).c_str() );
52 int ad2Num = atoi( ad2name.substr( 9, ad2name.size()).c_str() );
54 return ad1Num < ad2Num;
62 double xyz1[3] = {0.}, xyz2[3] = {0.};
63 double local[3] = {0.};
67 return xyz1[0] < xyz2[0];
75 double xyz1[3] = {0.};
76 double xyz2[3] = {0.};
77 double local[3] = {0.};
82 if(xyz1[2]<xyz2[2])
return true;
85 if(xyz1[2] == xyz2[2] && xyz1[1] < xyz2[1])
return true;
95 double xyz1[3] = {0.};
96 double xyz2[3] = {0.};
97 double local[3] = {0.};
102 return xyz1[0] > xyz2[0];
109 std::array<double, 3> xyz1, xyz2;
115 if (
std::abs(xyz1[0] - xyz2[0]) < 1.0E-4 &&
std::abs(xyz1[1] - xyz2[1]) < 1.0E-4 )
116 return xyz1[2] < xyz2[2];
117 else if (
std::abs(xyz1[0] - xyz2[0]) < 1.0E-4 &&
std::abs(xyz1[2] - xyz2[2]) < 1.0E-4 )
118 return xyz1[1] < xyz2[1];
119 else if (
std::abs(xyz1[1] - xyz2[1]) < 1.0E-4 &&
std::abs(xyz1[2] - xyz2[2]) < 1.0E-4 )
120 return xyz1[0] < xyz2[0];
123 <<
"Uknown sorting situation for the wires in a plane\n";
153 std::sort(tgeo.begin(), tgeo.end(),
sortTPCCRM);
166 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.
void SortCryostats(std::vector< geo::CryostatGeo > &cgeo) const
Geometry information for a single TPC.
void SortPlanes(std::vector< geo::PlaneGeo > &pgeo, geo::DriftDirection_t driftDir) const
static bool sortAuxDetCRM(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
Drift towards negative X values.
Geometry information for a single cryostat.
bool sortWireCRM(WireGeo const &w1, WireGeo const &w2)
void SortAuxDetSensitive(std::vector< geo::AuxDetSensitiveGeo > &adsgeo) const
static bool sortCryoCRM(const CryostatGeo &c1, const CryostatGeo &c2)
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
enum geo::driftdir DriftDirection_t
Drift direction: positive or negative.
void SortAuxDets(std::vector< geo::AuxDetGeo > &adgeo) const
void SortOpDets(std::vector< geo::OpDetGeo > &opdet) const
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
const TGeoVolume * TotalVolume() const
static bool sortTPCCRM(const TPCGeo &t1, const TPCGeo &t2)
bool sortorderOpDet(const OpDetGeo &t1, const OpDetGeo &t2)
Encapsulate the geometry of an auxiliary detector.
static bool sortPlaneCRM(const PlaneGeo &p1, const PlaneGeo &p2)
Interface to algorithm class for sorting dual-phase CRM of geo::XXXGeo objects.
void SortTPCs(std::vector< geo::TPCGeo > &tgeo) const
Encapsulate the geometry of a wire.
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.
static bool sortAuxDetSensitiveCRM(const AuxDetSensitiveGeo &ad1, const AuxDetSensitiveGeo &ad2)
const TGeoVolume * TotalVolume() const
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
LArSoft geometry interface.
void LocalToWorld(const double *tpc, double *world) const
Transform point from local TPC frame to world frame.
GeoObjectSorterCRM(fhicl::ParameterSet const &p)
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.
void SortWires(std::vector< geo::WireGeo > &wgeo) const