9 #ifndef UTIL_GEOMETRYUTILITIES_H 10 #define UTIL_GEOMETRYUTILITIES_H 25 class DetectorClocksData;
26 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,
122 PxPoint Get2DPointProjectionCM(std::vector<double>
const& xyz,
unsigned int plane)
const;
124 PxPoint Get2DPointProjectionCM(
double const* xyz,
unsigned int plane)
const;
126 PxPoint Get2DPointProjectionCM(TLorentzVector
const* xyz,
unsigned int plane)
const;
128 double GetTimeTicks(
double x,
unsigned int plane)
const;
132 PxHit FindClosestHit(std::vector<PxHit>
const& hitlist,
134 double timein)
const;
136 unsigned int FindClosestHitIndex(std::vector<PxHit>
const& hitlist,
138 double timein)
const;
140 int GetYZ(
const PxPoint* p0,
const PxPoint* p1,
double* yz)
const;
142 int GetXYZ(
const PxPoint* p0,
const PxPoint* p1,
double* xyz)
const;
144 double PitchInView(
unsigned int plane,
double phi,
double theta)
const;
146 void GetDirectionCosines(
double phi,
double theta,
double* dirs)
const;
149 void SelectLocalHitlist(
const std::vector<PxHit>& hitlist,
150 std::vector<const PxHit*>& hitlistlocal,
154 double& lineslopetest)
const;
156 void SelectLocalHitlist(
const std::vector<PxHit>& hitlist,
157 std::vector<const PxHit*>& hitlistlocal,
161 double& lineslopetest,
162 PxHit& averageHit)
const;
164 void SelectLocalHitlistIndex(
const std::vector<PxHit>& hitlist,
165 std::vector<unsigned int>& hitlistlocal_index,
169 double& lineslopetest)
const;
171 void SelectPolygonHitList(
const std::vector<PxHit>& hitlist,
172 std::vector<const PxHit*>& hitlistlocal)
const;
174 std::vector<size_t> PolyOverlap(std::vector<const PxHit*> ordered_hits,
175 std::vector<size_t> candidate_polygon)
const;
177 bool Clockwise(
double Ax,
double Ay,
double Bx,
double By,
double Cx,
double Cy)
const;
182 unsigned int Nplanes()
const {
return fNPlanes; }
200 #endif // UTIL_GEOMETRYUTILITIES_H
detinfo::DetectorClocksData const & fClocks
Namespace for general, non-LArSoft-specific utilities.
std::vector< double > vertangle
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
double WireTimeToCmCm() const
PxPoint Get2DPointProjection(double const *xyz, unsigned int plane) const
bool Clockwise(double Ax, double Ay, double Bx, double By, double Cx, double Cy)
unsigned int Nplanes() const
detinfo::DetectorPropertiesData const & fDetProp
Definitions of geometry vector data types.
Utilities to extend the interface of geometry vectors.
geo::GeometryCore const & fGeom
General LArSoft Utilities.
Description of geometry of one entire detector.
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
Namespace collecting geometry-related classes utilities.