18 class DetectorPropertiesData;
21 #include "Math/GenVector/Cartesian2D.h" 22 #include "Math/GenVector/DisplacementVector2D.h" 33 typedef ROOT::Math::DisplacementVector2D<ROOT::Math::Cartesian2D<double>>
Vector2D;
36 typedef std::map<size_t, std::vector<double>>
dedx_map;
47 double Dist2(
const TVector2& v1,
const TVector2& v2);
48 double Dist2(
const Vector2D& v1,
const Vector2D& v2);
50 template <
typename T,
typename U>
51 double Dist2(
const T& v1,
const U& v2)
53 double dx = v1.X() - v2.X(), dy = v1.Y() - v2.Y(), dz = v1.Z() - v2.Z();
54 return dx * dx + dy * dy + dz * dz;
57 size_t GetHitsCount(
const std::vector<pma::Hit3D*>&
hits,
unsigned int view);
61 double GetHitsRadius3D(
const std::vector<pma::Hit3D*>& hits,
bool exact =
false);
62 double GetHitsRadius2D(
const std::vector<pma::Hit3D*>& hits,
bool exact =
false);
double SolveLeastSquares3D(const std::vector< std::pair< TVector3, TVector3 >> &lines, TVector3 &result)
double GetSummedAmpl(const std::vector< pma::Hit3D * > &hits, unsigned int view=geo::kUnknown)
double GetHitsRadius2D(const std::vector< pma::Hit3D * > &hits, bool exact=false)
double Dist2(const TVector2 &v1, const TVector2 &v2)
bDistCenterLess3D(const TVector3 &c)
TVector2 WireDriftToCm(detinfo::DetectorPropertiesData const &detProp, unsigned int wire, float drift, unsigned int plane, unsigned int tpc, unsigned int cryo)
double GetSegmentProjVector(const Vector3D &p, const Vector3D &p0, const Vector3D &p1)
double GetHitsRadius3D(const std::vector< pma::Hit3D * > &hits, bool exact=false)
recob::tracking::Vector_t Vector3D
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
double Dist2(const T &v1, const U &v2)
bool operator()(TVector3 *p1, TVector3 *p2) const
size_t GetHitsCount(const std::vector< pma::Hit3D * > &hits, unsigned int view)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space. See recob::tracking::Coord_t for more details on the ...
bDistCenterLess2D(const TVector2 &c)
TVector2 GetVectorProjectionToPlane(const TVector3 &v, unsigned int plane, unsigned int tpc, unsigned int cryo)
General LArSoft Utilities.
Definition of data types for geometry description.
bool operator()(TVector3 p1, TVector3 p2) const
std::map< size_t, std::vector< double > > dedx_map
double GetSegmentProjVector(const TVector2 &p, const TVector2 &p0, const TVector2 &p1)
TVector2 GetProjectionToPlane(const TVector3 &p, unsigned int plane, unsigned int tpc, unsigned int cryo)
ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< double > > Vector2D
TVector3 GetProjectionToSegment(const TVector3 &p, const TVector3 &p0, const TVector3 &p1)
TVector2 CmToWireDrift(detinfo::DetectorPropertiesData const &detProp, float xw, float yd, unsigned int plane, unsigned int tpc, unsigned int cryo)
double GetSummedADC(const std::vector< pma::Hit3D * > &hits, unsigned int view=geo::kUnknown)
bool operator()(TVector2 p1, TVector2 p2) const