9 #ifndef UTIL_GEOMETRYUTILITIES_H 10 #define UTIL_GEOMETRYUTILITIES_H 27 class DetectorClocksData;
28 class DetectorPropertiesData;
43 int Get3DaxisN(
int iplane0,
50 double CalculatePitch(
unsigned int iplane0,
double phi,
double theta)
const;
52 double CalculatePitchPolar(
unsigned int iplane0,
double phi,
double theta)
const;
54 double Get3DSpecialCaseTheta(
int iplane0,
int iplane1,
double dw0,
double dw1)
const;
56 double Get2Dangle(
double deltawire,
double deltatime)
const;
58 double Get2Dangle(
double wireend,
double wirestart,
double timeend,
double timestart)
const;
60 double Get2Dangle(
const PxPoint* endpoint,
const PxPoint* startpoint)
const;
62 double Get2DangleFrom3D(
unsigned int plane,
double phi,
double theta)
const;
64 double Get2DangleFrom3D(
unsigned int plane, TVector3 dir_vector)
const;
66 double Get2Dslope(
double deltawire,
double deltatime)
const;
68 double Get2Dslope(
double wireend,
double wirestart,
double timeend,
double timestart)
const;
70 double Get2Dslope(
const PxPoint* endpoint,
const PxPoint* startpoint)
const;
72 double Get2DDistance(
double wire1,
double time1,
double wire2,
double time2)
const;
74 double Get2DDistance(
const PxPoint* point1,
const PxPoint* point2)
const;
76 double Get2DPitchDistance(
double angle,
double inwire,
double wire)
const;
78 double Get2DPitchDistanceWSlope(
double slope,
double inwire,
double wire)
const;
80 int GetPointOnLine(
double slope,
85 double& timeout)
const;
87 int GetPointOnLine(
double slope,
93 double& timeout)
const;
95 int GetPointOnLine(
double slope,
100 int GetPointOnLine(
double slope,
105 int GetPointOnLineWSlopes(
double slope,
107 double ort_intercept,
109 double& timeout)
const;
111 int GetPointOnLineWSlopes(
double slope,
113 double ort_intercept,
119 double GetTimeTicks(
double x,
unsigned int plane)
const;
123 PxHit FindClosestHit(std::vector<PxHit>
const& hitlist,
125 double timein)
const;
127 unsigned int FindClosestHitIndex(std::vector<PxHit>
const& hitlist,
129 double timein)
const;
131 int GetYZ(
const PxPoint* p0,
const PxPoint* p1,
double* yz)
const;
133 int GetXYZ(
const PxPoint* p0,
const PxPoint* p1,
double* xyz)
const;
135 double PitchInView(
unsigned int plane,
double phi,
double theta)
const;
137 void GetDirectionCosines(
double phi,
double theta,
double* dirs)
const;
140 void SelectLocalHitlist(
const std::vector<PxHit>& hitlist,
141 std::vector<const PxHit*>& hitlistlocal,
145 double& lineslopetest)
const;
147 void SelectLocalHitlist(
const std::vector<PxHit>& hitlist,
148 std::vector<const PxHit*>& hitlistlocal,
152 double& lineslopetest,
153 PxHit& averageHit)
const;
155 void SelectLocalHitlistIndex(
const std::vector<PxHit>& hitlist,
156 std::vector<unsigned int>& hitlistlocal_index,
160 double& lineslopetest)
const;
162 void SelectPolygonHitList(
const std::vector<PxHit>& hitlist,
163 std::vector<const PxHit*>& hitlistlocal)
const;
165 std::vector<size_t> PolyOverlap(std::vector<const PxHit*> ordered_hits,
166 std::vector<size_t> candidate_polygon)
const;
168 bool Clockwise(
double Ax,
double Ay,
double Bx,
double By,
double Cx,
double Cy)
const;
173 unsigned int Nplanes()
const {
return fNPlanes; }
192 #endif // UTIL_GEOMETRYUTILITIES_H
detinfo::DetectorClocksData const & fClocks
Namespace for general, non-LArSoft-specific utilities.
std::vector< double > vertangle
The data type to uniquely identify a Plane.
double WireTimeToCmCm() const
bool Clockwise(double Ax, double Ay, double Bx, double By, double Cx, double Cy)
unsigned int Nplanes() const
detinfo::DetectorPropertiesData const & fDetProp
geo::WireReadoutGeom const & fWireReadoutGeom
Definitions of geometry vector data types.
Interface for a class providing readout channel mapping to geometry.
Utilities to extend the interface of geometry vectors.This library provides facilities that can be us...
geo::GeometryCore const & fGeom
General LArSoft Utilities.
Description of the physical geometry of one entire detector.
Definition of data types for geometry description.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Contains all timing reference information for the detector.
constexpr double kINVALID_DOUBLE