40 int ad1Num = atoi( ad1name.substr( 9, ad1name.size()).c_str() );
41 int ad2Num = atoi( ad2name.substr( 9, ad2name.size()).c_str() );
43 return ad1Num < ad2Num;
57 int ad1Num = atoi( ad1name.substr( 9, ad1name.size()).c_str() );
58 int ad2Num = atoi( ad2name.substr( 9, ad2name.size()).c_str() );
60 return ad1Num < ad2Num;
68 double xyz1[3] = {0.}, xyz2[3] = {0.};
69 double local[3] = {0.};
73 return xyz1[0] < xyz2[0];
81 double xyz1[3] = {0.};
82 double xyz2[3] = {0.};
83 double local[3] = {0.};
88 if(xyz1[2]<xyz2[2])
return true;
91 if(xyz1[2] == xyz2[2] && xyz1[1] < xyz2[1])
return true;
101 double xyz1[3] = {0.};
102 double xyz2[3] = {0.};
103 double local[3] = {0.};
108 return xyz1[0] > xyz2[0];
126 auto Delta = end1-start1;
128 double dy1 = Delta.Y();
129 double dz1 = Delta.Z();
134 auto CheckTol = [](
double val,
double tol = 1.E-4){
139 return (center1.Z() < center2.Z());
143 return (center1.Y() < center2.Y());
147 if( CheckTol( center2.Z() - center1.Z() ) ){
148 if( dz1 < 0 ){ dy1 = -dy1; }
149 if( dy1 < 0 ){
return (center1.Y() < center2.Y()); }
150 if( dy1 > 0 ){
return (center1.Y() > center2.Y()); }
154 return ( center1.Z() < center2.Z() );
197 throw cet::exception(
"TPCGeo") <<
"Drift direction is unknown, can't sort the planes\n";
void GetStart(double *xyz) const
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.
Geometry information for a single TPC.
void SortWires(std::vector< geo::WireGeo > &wgeo) const
static bool sortTPC(const TPCGeo &t1, const TPCGeo &t2)
Drift towards negative X values.
Geometry information for a single cryostat.
void SortOpDets(std::vector< geo::OpDetGeo > &opdet) const
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
enum geo::driftdir DriftDirection_t
Drift direction: positive or negative.
void SortPlanes(std::vector< geo::PlaneGeo > &pgeo, geo::DriftDirection_t driftDir) const
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
const TGeoVolume * TotalVolume() const
bool sortorderOpDet(const OpDetGeo &t1, const OpDetGeo &t2)
Encapsulate the geometry of an auxiliary detector.
static bool sortPlane(const PlaneGeo &p1, const PlaneGeo &p2)
static bool sortCryo(const CryostatGeo &c1, const CryostatGeo &c2)
void SortCryostats(std::vector< geo::CryostatGeo > &cgeo) const
Interface to algorithm class for sorting VD CRUs of geo::XXXGeo objects.
void SortAuxDets(std::vector< geo::AuxDetGeo > &adgeo) const
Encapsulate the geometry of a wire.
static bool sortAuxDet(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
GeoObjectSorterCRU(fhicl::ParameterSet const &p)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
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 sortAuxDetSensitive(const AuxDetSensitiveGeo &ad1, const AuxDetSensitiveGeo &ad2)
const TGeoVolume * TotalVolume() const
void GetEnd(double *xyz) const
void SortTPCs(std::vector< geo::TPCGeo > &tgeo) const
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
LArSoft geometry interface.
void SortAuxDetSensitive(std::vector< geo::AuxDetSensitiveGeo > &adsgeo) const
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
QTextStream & endl(QTextStream &s)
Encapsulate the construction of a single detector plane.
bool sortWire(WireGeo const &w1, WireGeo const &w2)