9 #ifndef TRAJCLUSTERALGSPTUTILS_H 10 #define TRAJCLUSTERALGSPTUTILS_H 18 class DetectorClocksData;
19 class DetectorPropertiesData;
34 std::vector<MatchStruct> matVec,
35 unsigned short matVec_Iter);
36 bool ReconcileTPs(TCSlice& slc, PFPStruct& pfp,
bool prt);
46 void Match3Planes(TCSlice& slc, std::vector<MatchStruct>& matVec);
47 bool SptInTPC(
const std::array<unsigned int, 3>& sptHits,
unsigned int tpc);
48 void Match2Planes(TCSlice& slc, std::vector<MatchStruct>& matVec);
56 unsigned short fromPt,
58 unsigned short& nBadPts,
59 unsigned short& firstBadPt);
60 bool CanSection(
const TCSlice& slc,
const PFPStruct& pfp);
63 unsigned short fromPt,
64 unsigned short min2DPts,
67 unsigned short sfIndex,
68 unsigned short& fromPt,
69 unsigned short& npts);
73 unsigned short sfIndex);
76 const std::vector<TP3D>& tp3ds,
77 unsigned short fromPt,
79 unsigned short nPtsFit);
83 unsigned short fromPt,
85 unsigned short sfIndex);
94 const PFPStruct& pfp);
99 unsigned short fromPt,
103 unsigned short& nWires,
104 unsigned short& nAdd,
106 unsigned short InsertTP3D(PFPStruct& pfp, TP3D& tp3d);
107 bool SortSection(PFPStruct& pfp,
unsigned short sectionFitIndex);
123 const TrajPoint& itp,
124 const TrajPoint& jtp);
128 return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
151 unsigned short tjPt);
185 unsigned short sfIndex,
186 unsigned short& startPt,
187 unsigned short& endPt);
195 std::string someText,
201 #endif // ifndef TRAJCLUSTERALGSPTUTILS_H float Length(const PFPStruct &pfp)
void Average_dEdX(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp, float &dEdXAve, float &dEdXRms)
void MakePFParticles(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, std::vector< MatchStruct > matVec, unsigned short matVec_Iter)
bool ReconcileTPs(TCSlice &slc, PFPStruct &pfp, bool prt)
bool InsideFV(const TCSlice &slc, const PFPStruct &pfp, unsigned short end)
bool InsideTPC(const Point3_t &pos, geo::TPCID &inTPCID)
std::array< double, 3 > Point3_t
bool SortSection(PFPStruct &pfp, unsigned short sfIndex)
void FindAlongTrans(Point3_t pos1, Vector3_t dir1, Point3_t pos2, Point2_t &alongTrans)
bool LineLineIntersect(Point3_t p1, Point3_t p2, Point3_t p3, Point3_t p4, Point3_t &intersect, float &doca)
PFPStruct CreatePFP(const TCSlice &slc)
Point3_t PosAtEnd(const PFPStruct &pfp, unsigned short end)
double DeltaAngle(const Vector3_t v1, const Vector3_t v2)
void Match2Planes(TCSlice &slc, std::vector< MatchStruct > &matVec)
bool CanSection(const TCSlice &slc, const PFPStruct &pfp)
void FilldEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp)
void ReconcileVertices(TCSlice &slc, PFPStruct &pfp, bool prt)
bool Update(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp)
void MakePFPTjs(TCSlice &slc)
unsigned short Find3DRecoRange(const TCSlice &slc, const PFPStruct &pfp, unsigned short fromPt, unsigned short min2DPts, short dir)
bool MakeSmallAnglePFP(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, PFPStruct &pfp, bool prt)
void AddPointsInRange(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, PFPStruct &pfp, unsigned short fromPt, unsigned short toPt, CTP_t inCTP, float maxPull, unsigned short &nWires, unsigned short &nAdd, bool prt)
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
void PFPVertexCheck(TCSlice &slc)
void FillGaps3D(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, PFPStruct &pfp, bool prt)
std::array< float, 2 > Point2_t
int PDGCodeVote(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp)
Vector3_t PointDirection(const Point3_t p1, const Point3_t p2)
void FillWireIntersections(TCSlice &slc)
bool MakeTP3Ds(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, PFPStruct &pfp, bool prt)
void Match3Planes(TCSlice &slc, std::vector< MatchStruct > &matVec)
bool TCIntersectionPoint(unsigned int wir1, unsigned int wir2, unsigned int pln1, unsigned int pln2, float &y, float &z)
bool FitSection(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp, unsigned short sfIndex)
float ChgFracBetween(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, Point3_t pos1, Point3_t pos2)
void CountBadPoints(const TCSlice &slc, const PFPStruct &pfp, unsigned short fromPt, unsigned short toPt, unsigned short &nBadPts, unsigned short &firstBadPt)
bool ReSection(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp, bool prt)
double PosSep2(const Point3_t &pos1, const Point3_t &pos2)
General LArSoft Utilities.
bool SectionStartEnd(const PFPStruct &pfp, unsigned short sfIndex, unsigned short &startPt, unsigned short &endPt)
bool PointDirIntersect(Point3_t p1, Vector3_t p1Dir, Point3_t p2, Vector3_t p2Dir, Point3_t &intersect, float &doca)
The data type to uniquely identify a TPC.
bool SetMag(Vector3_t &v1, double mag)
unsigned short FarEnd(const PFPStruct &pfp, const Point3_t &pos)
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
void GetRange(const PFPStruct &pfp, unsigned short sfIndex, unsigned short &fromPt, unsigned short &npts)
unsigned short InsertTP3D(PFPStruct &pfp, TP3D &tp3d)
SectionFit FitTP3Ds(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, const std::vector< TP3D > &tp3ds, unsigned short fromPt, short fitDir, unsigned short nPtsFit)
void Recover(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, PFPStruct &pfp, bool prt)
TP3D CreateTP3D(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, int tjID, unsigned short tpIndex)
bool ValidTwoPlaneMatch(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, const PFPStruct &pfp)
double DotProd(const Vector3_t &v1, const Vector3_t &v2)
void FillmAllTraj(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc)
Contains all timing reference information for the detector.
TP3D MakeTP3D(detinfo::DetectorPropertiesData const &detProp, const TrajPoint &itp, const TrajPoint &jtp)
double PosSep(const Point3_t &pos1, const Point3_t &pos2)
float PointPull(const TP3D &tp3d)
std::array< double, 3 > Vector3_t
IDparameter< geo::TPCID > TPCID
Member type of validated geo::TPCID parameter.
void FindPFParticles(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, TCSlice &slc)
bool StorePFP(TCSlice &slc, PFPStruct &pfp)
float ChgFracNearEnd(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, const PFPStruct &pfp, unsigned short end)
void PrintTP3Ds(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::string someText, const TCSlice &slc, const PFPStruct &pfp, short printPts)
Vector3_t DirAtEnd(const PFPStruct &pfp, unsigned short end)
Namespace collecting geometry-related classes utilities.
bool SetSection(detinfo::DetectorPropertiesData const &detProp, PFPStruct &pfp, TP3D &tp3d)
void DefinePFPParents(TCSlice &slc)
bool SptInTPC(const std::array< unsigned int, 3 > &sptHits, unsigned int tpc)
void Reverse(PFPStruct &pfp)