22 #ifndef GEOMETRYHELPER_H
23 #define GEOMETRYHELPER_H
25 #include "HelperBase.h"
27 #include "larcore/Geometry/Geometry.h"
28 #include "lardataobj/RecoBase/PFParticle.h"
29 #include "lardataobj/RecoBase/SpacePoint.h"
30 #include "lardataobj/RecoBase/Vertex.h"
31 #include "lardataobj/RecoBase/Shower.h"
33 #include "canvas/Persistency/Common/FindManyP.h"
34 #include "canvas/Persistency/Common/FindOneP.h"
53 bool isInside( std::vector<double> P, std::vector< std::vector<double> > V);
61 bool isFiducial(
const std::vector<double> &x)
const;
86 bool isActive(
const std::vector<double> &x)
const;
95 bool isActive(
const double x[3])
const;
104 double distance(
const std::vector<double> &a,
105 const std::vector<double> &b)
const;
114 double distance(
const TVector3 &a,
const TVector3 &b)
const;
124 double getPitch(
const TVector3 &direction,
const int &pl)
const;
137 float m_fidvolYstart,
float m_fidvolYend,
138 float m_fidvolZstart,
float m_fidvolZend);
160 void buildRectangle(
double length,
double width, std::vector<double> &start,
161 std::vector<double> &axis,
162 std::vector<std::vector<double>> &points);
166 float m_fidvolXstart;
168 float m_fidvolYstart;
170 float m_fidvolZstart;
double distance(const std::vector< double > &a, const std::vector< double > &b) const
Compute the 3D distance between two points.
Definition: GeometryHelper.cxx:79
void buildRectangle(double length, double width, std::vector< double > &start, std::vector< double > &axis, std::vector< std::vector< double >> &points)
Builds a rectangle.
Definition: GeometryHelper.cxx:178
void setFiducialVolumeCuts(float m_fidvolXstart, float m_fidvolXend, float m_fidvolYstart, float m_fidvolYend, float m_fidvolZstart, float m_fidvolZend)
Sets the fiducial volume cuts.
Definition: GeometryHelper.cxx:98
double getPitch(const TVector3 &direction, const int &pl) const
Returns the 3D effective pitch give a direction and a plane.
Definition: GeometryHelper.cxx:148
bool isActive(const std::vector< double > &x) const
Determine if the specified point is in the active volume.
Definition: GeometryHelper.cxx:52
TVector3 getAveragePosition(std::vector< art::Ptr< recob::SpacePoint >> &spcpnts)
Return the average position of a set of space points.
Definition: GeometryHelper.cxx:115
bool isFiducial(const std::vector< double > &x) const
Determine if the specified point is in the fiducial volume.
Definition: GeometryHelper.cxx:8
bool isInside(std::vector< double > P, std::vector< std::vector< double > > V)
Determine if a point is within a rectangle (in 2D)
Definition: GeometryHelper.cxx:133
Definition: HelperBase.h:17
Definition: GeometryHelper.h:40