7 if(hits.size() == 0)
return -1;
8 int tpc = hits[0]->WireID().TPC;
9 for(
size_t i = 0; i < hits.size(); i++){
10 if((
int)hits[i]->WireID().TPC != tpc)
return -1;
17 if(hits.size() == 0)
return std::make_pair(0, 0);
25 return std::make_pair(tpcGeo.
MinX(), tpcGeo.
MaxX());
30 if(hits.size() == 0)
return 0;
39 if(
std::abs(driftDirection) != 1) driftDirection = 0;
40 return driftDirection;
45 if(point.X() < (tpc.
MinX()-buffer) || point.X() > (tpc.
MaxX()+buffer)
46 || point.Y() < (tpc.
MinY()-buffer) || point.Y() > (tpc.
MaxY()+buffer)
47 || point.Z() < (tpc.
MinZ()-buffer) || point.Z() > (tpc.
MaxZ()+buffer))
return false;
std::pair< double, double > XLimitsFromHits(const geo::GeometryCore *GeometryService, std::vector< art::Ptr< recob::Hit >> hits)
CryostatGeo const & GetElement(geo::CryostatID const &cryoid) const
double MinX() const
Returns the world x coordinate of the start of the box.
Geometry information for a single TPC.
int DetectedInTPC(std::vector< art::Ptr< recob::Hit >> hits)
double MaxX() const
Returns the world x coordinate of the end of the box.
int DriftDirectionFromHits(const geo::GeometryCore *GeometryService, std::vector< art::Ptr< recob::Hit >> hits)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
double MinZ() const
Returns the world z coordinate of the start of the box.
The data type to uniquely identify a TPC.
Description of geometry of one entire detector.
double MaxY() const
Returns the world y coordinate of the end of the box.
constexpr TPCID const & asTPCID() const
Conversion to TPCID (for convenience of notation).
short int DetectDriftDirection() const
Returns the expected drift direction based on geometry.
double MaxZ() const
Returns the world z coordinate of the end of the box.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
double MinY() const
Returns the world y coordinate of the start of the box.
bool InsideTPC(geo::Point_t point, const geo::TPCGeo &tpc, double buffer)