9 #ifndef UTIL_GEOMETRYUTILITIES_H 10 #define UTIL_GEOMETRYUTILITIES_H 12 #include "RtypesCore.h" 23 class DetectorClocksData;
24 class DetectorPropertiesData;
41 Int_t Get3DaxisN(Int_t iplane0,
46 Double_t&
theta)
const;
48 Double_t CalculatePitch(UInt_t iplane0, Double_t phi, Double_t theta)
const;
50 Double_t CalculatePitchPolar(UInt_t iplane0, Double_t phi, Double_t theta)
const;
52 Double_t Get3DSpecialCaseTheta(Int_t iplane0, Int_t iplane1, Double_t dw0, Double_t dw1)
const;
54 Double_t Get2Dangle(Double_t deltawire, Double_t deltatime)
const;
56 Double_t Get2Dangle(Double_t wireend,
59 Double_t timestart)
const;
63 double Get2DangleFrom3D(
unsigned int plane,
double phi,
double theta)
const;
65 double Get2DangleFrom3D(
unsigned int plane, TVector3 dir_vector)
const;
67 Double_t Get2Dslope(Double_t deltawire, Double_t deltatime)
const;
69 Double_t Get2Dslope(Double_t wireend,
72 Double_t timestart)
const;
76 Double_t Get2DDistance(Double_t wire1, Double_t time1, Double_t wire2, Double_t time2)
const;
80 Double_t Get2DPitchDistance(Double_t angle, Double_t inwire, Double_t wire)
const;
82 Double_t Get2DPitchDistanceWSlope(Double_t slope, Double_t inwire, Double_t wire)
const;
84 Int_t GetPointOnLine(Double_t slope,
89 Double_t& timeout)
const;
91 Int_t GetPointOnLine(Double_t slope,
97 Double_t& timeout)
const;
99 int GetPointOnLine(Double_t slope,
104 int GetPointOnLine(
double slope,
109 Int_t GetPointOnLineWSlopes(Double_t slope,
111 Double_t ort_intercept,
113 Double_t& timeout)
const;
115 Int_t GetPointOnLineWSlopes(
double slope,
117 double ort_intercept,
120 PxPoint Get2DPointProjection(Double_t* xyz, Int_t plane)
const;
122 PxPoint Get2DPointProjectionCM(std::vector<double> xyz,
int plane)
const;
124 PxPoint Get2DPointProjectionCM(
double* xyz,
int plane)
const;
126 PxPoint Get2DPointProjectionCM(TLorentzVector* xyz,
int plane)
const;
128 Double_t GetTimeTicks(Double_t
x, Int_t plane)
const;
132 util::PxHit FindClosestHit(std::vector<util::PxHit>
const& hitlist,
134 double timein)
const;
136 unsigned int FindClosestHitIndex(std::vector<util::PxHit>
const& hitlist,
138 double timein)
const;
140 Int_t GetYZ(
const PxPoint* p0,
const PxPoint* p1, Double_t* yz)
const;
142 Int_t GetXYZ(
const PxPoint* p0,
const PxPoint* p1, Double_t* xyz)
const;
144 Double_t PitchInView(UInt_t plane, Double_t phi, Double_t theta)
const;
146 void GetDirectionCosines(Double_t phi, Double_t theta, Double_t* dirs)
const;
149 void SelectLocalHitlist(
const std::vector<util::PxHit>& hitlist,
150 std::vector<const util::PxHit*>& hitlistlocal,
152 Double_t& linearlimit,
154 Double_t& lineslopetest)
const;
156 void SelectLocalHitlist(
const std::vector<util::PxHit>& hitlist,
157 std::vector<const util::PxHit*>& hitlistlocal,
159 Double_t& linearlimit,
161 Double_t& lineslopetest,
164 void SelectLocalHitlistIndex(
const std::vector<util::PxHit>& hitlist,
165 std::vector<unsigned int>& hitlistlocal_index,
167 Double_t& linearlimit,
169 Double_t& lineslopetest)
const;
171 void SelectPolygonHitList(
const std::vector<util::PxHit>& hitlist,
172 std::vector<const util::PxHit*>& hitlistlocal)
const;
174 std::vector<size_t> PolyOverlap(std::vector<const util::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;
192 return fWireTimetoCmCm;
216 #endif // UTIL_GEOMETRYUTILITIES_H std::vector< Double_t > vertangle
detinfo::DetectorClocksData const & fClocks
Namespace for general, non-LArSoft-specific utilities.
Double_t TimeToCm() const
Double_t WireToCm() const
bool Clockwise(double Ax, double Ay, double Bx, double By, double Cx, double Cy)
detinfo::DetectorPropertiesData const & fDetProp
geo::GeometryCore const & fGeom
General LArSoft Utilities.
static int max(int a, int b)
Description of geometry of one entire detector.
Contains all timing reference information for the detector.
Double_t WireTimeToCmCm() const
constexpr double kINVALID_DOUBLE
LArSoft geometry interface.