28 double xyz1[3] = {0.};
29 double xyz2[3] = {0.};
30 double local[3] = {0.};
37 if ( strncmp( (ad1.
TotalVolume())->GetName(),
"volAuxDetTrap", 13) == 0 ) VertEps = 13;
38 else if( strncmp( (ad1.
TotalVolume())->GetName(),
"volAuxDetBox", 12) == 0 ) VertEps = 1;
41 if( xyz1[1] < xyz2[1] && xyz2[1]-xyz1[1] >= VertEps )
return true;
44 if(
std::abs(xyz2[1]-xyz1[1]) < VertEps && xyz1[0] < xyz2[0])
return true;
47 if(xyz1[0] == xyz2[0] &&
std::abs(xyz2[1]-xyz1[1]) < VertEps && xyz1[2] < xyz2[2])
return true;
58 double xyz1[3] = {0.};
59 double xyz2[3] = {0.};
60 double local[3] = {0.};
67 if ( strncmp( (ad1.
TotalVolume())->GetName(),
"volAuxDetTrapSensitive", 13) == 0 ) VertEps = 13;
68 else if( strncmp( (ad1.
TotalVolume())->GetName(),
"volAuxDetBoxSensitive", 12) == 0 ) VertEps = 1;
71 if( xyz1[1] < xyz2[1] && xyz2[1]-xyz1[1] >= VertEps )
return true;
74 if(
std::abs(xyz2[1]-xyz1[1]) < VertEps && xyz1[0] < xyz2[0])
return true;
77 if(xyz1[0] == xyz2[0] &&
std::abs(xyz2[1]-xyz1[1]) < VertEps && xyz1[2] < xyz2[2])
return true;
90 double xyz1[3] = {0.}, xyz2[3] = {0.};
91 double local[3] = {0.};
95 return xyz1[0] < xyz2[0];
103 double xyz1[3] = {0.};
104 double xyz2[3] = {0.};
105 double local[3] = {0.};
120 if(xyz1[2] < xyz2[2])
return true;
123 if(xyz1[2] == xyz2[2] && xyz1[1] < xyz2[1])
return true;
126 if(xyz1[2] == xyz2[2] && xyz1[1] == xyz2[1] && xyz1[0] < xyz2[0])
return true;
138 double xyz1[3] = {0.};
139 double xyz2[3] = {0.};
140 double local[3] = {0.};
148 return xyz1[0] > xyz2[0];
172 double xyz1[3] = {0.};
173 double xyz2[3] = {0.};
185 if( xyz1[1]==xyz2[1] && xyz1[2]<xyz2[2] )
return true;
190 bool InVertSplitRegion =
false;
191 if(detVersion==
"dune35t") InVertSplitRegion = xyz1[2] > 76.35;
192 else if(detVersion==
"dune35t4apa") InVertSplitRegion = ((51 < xyz1[2])
194 else if(detVersion==
"dune35t4apa_v2") InVertSplitRegion = ((52.74 < xyz1[2])
195 && (xyz1[2] < 106.23));
196 else if( detVersion==
"dune35t4apa_v3" 197 || detVersion==
"dune35t4apa_v4" 198 || detVersion==
"dune35t4apa_v5" 199 || detVersion==
"dune35t4apa_v6" 200 ) InVertSplitRegion = ((51.41045 < xyz1[2])
201 && (xyz1[2] < 103.33445));
208 if( InVertSplitRegion ){
211 if( xyz1[1]<0 && xyz1[1] < xyz2[1] )
return true;
214 if( xyz1[1]>0 && xyz1[1] > xyz2[1] )
return true;
219 if( xyz1[1] > xyz2[1] )
return true;
229 : fDetVersion(p.
get<
std::
string >(
"DetectorVersion",
"dune35t4apa"))
248 std::sort(cgeo.begin(), cgeo.end(),
sortCryo35);
254 std::sort(tgeo.begin(), tgeo.end(),
sortTPC35);
267 throw cet::exception(
"TPCGeo") <<
"Drift direction is unknown, can't sort the planes\n";
275 std::sort(wgeo.begin(), wgeo.end(), sw35);
void SortCryostats(std::vector< geo::CryostatGeo > &cgeo) const
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
static bool sortTPC35(const TPCGeo &t1, const TPCGeo &t2)
Drift direction is unknown.
sortWire35(std::string detv)
void LocalToWorld(const double *auxdet, double *world) const
Transform point from local auxiliary detector frame to world frame.
Encapsulate the construction of a single cyostat.
bool operator()(WireGeo const &w1, WireGeo const &w2)
Geometry information for a single TPC.
Drift towards negative X values.
Geometry information for a single cryostat.
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
void SortWires(std::vector< geo::WireGeo > &wgeo) const
enum geo::driftdir DriftDirection_t
Drift direction: positive or negative.
static bool sortAuxDet35(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
void SortPlanes(std::vector< geo::PlaneGeo > &pgeo, geo::DriftDirection_t driftDir) const
Interface to algorithm class for standard sorting of geo::XXXGeo objects.
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
const TGeoVolume * TotalVolume() const
Encapsulate the geometry of an auxiliary detector.
Encapsulate the geometry of a wire.
void LocalToWorld(const double *cryo, double *world) const
Transform point from local cryostat frame to world frame.
void SortAuxDets(std::vector< geo::AuxDetGeo > &adgeo) const
static bool sortAuxDetSensitive35(const AuxDetSensitiveGeo &ad1, const AuxDetSensitiveGeo &ad2)
Drift towards positive X values.
Encapsulate the construction of a single detector plane.
const TGeoVolume * TotalVolume() const
std::string fDetVersion
string of the detector version
void SortAuxDetSensitive(std::vector< geo::AuxDetSensitiveGeo > &adgeo) const
static bool sortCryo35(const CryostatGeo &c1, const CryostatGeo &c2)
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
static bool sortPlane35(const PlaneGeo &p1, const PlaneGeo &p2)
void LocalToWorld(const double *auxdet, double *world) const
Transform point from local auxiliary detector frame to world frame.
auto const & get(AssnsNode< L, R, D > const &r)
void SortTPCs(std::vector< geo::TPCGeo > &tgeo) const
LArSoft geometry interface.
void LocalToWorld(const double *tpc, double *world) const
Transform point from local TPC frame to world frame.
GeoObjectSorter35(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.