10 #ifndef TRAJCLUSTERALGSPTUTILS_H 11 #define TRAJCLUSTERALGSPTUTILS_H 24 #include "TDecompSVD.h" 39 void UpdateTp3s(TCSlice& slc, PFPStruct& pfp,
int oldTj,
int newTj);
41 bool SetStart(TCSlice& slc, PFPStruct& pfp,
bool prt);
42 void FollowTp3s(TCSlice& slc, PFPStruct& pfp,
bool prt);
44 bool FitTp3s(TCSlice& slc,
const std::vector<TrajPoint3>& tp3s,
unsigned short fromPt,
unsigned short toPt,
Point3_t& pos,
Vector3_t&
dir,
float& rCorr);
45 bool FitTp3(TCSlice& slc, TrajPoint3& tp3,
const std::vector<Tj2Pt>& tj2pts);
46 void FindCompleteness(TCSlice& slc, PFPStruct& pfp,
bool doFit,
bool fillTp3s,
bool prt);
47 void FindMissedTjsInTp3s(TCSlice& slc, PFPStruct& pfp, std::vector<int>& missTjs, std::vector<float>& missFrac);
53 bool AddMissedTj(TCSlice& slc, PFPStruct& pfp,
unsigned short itj,
bool looseCuts,
bool prt);
54 void CleanTjs(TCSlice& slc, PFPStruct& pfp,
bool prt);
55 bool MergePFPTjs(TCSlice& slc, PFPStruct& pfp,
bool prt);
56 void FindXMatches(TCSlice& slc,
unsigned short numPlanes,
short maxScore, std::vector<MatchStruct>& matVec,
bool prt);
57 bool MakeTp3(TCSlice& slc,
const TrajPoint& itp,
const TrajPoint& jtp, TrajPoint3& tp3,
bool findDirection);
69 double KinkAngle(
TCSlice& slc,
const std::vector<TrajPoint3>& tp3s,
unsigned short atPt,
double sep);
93 #endif // ifndef TRAJCLUSTERALGSPTUTILS_H void Fit3D(unsigned short mode, Point3_t point, Vector3_t dir, Point3_t &fitPos, Vector3_t &fitDir)
void PrintTp3(std::string someText, TCSlice &slc, const TrajPoint3 &tp3)
void FindCompleteness(TCSlice &slc, PFPStruct &pfp, bool doFit, bool fillTp3s, bool prt)
bool InsideTPC(const Point3_t &pos, geo::TPCID &inTPCID)
bool FitTp3(TCSlice &slc, TrajPoint3 &tp3, const std::vector< Tj2Pt > &tj2pts)
std::array< double, 3 > Point3_t
void FindAlongTrans(Point3_t pos1, Vector3_t dir1, Point3_t pos2, Point2_t &alongTrans)
float PFPDOCA(const PFPStruct &pfp1, const PFPStruct &pfp2, unsigned short &close1, unsigned short &close2)
unsigned short WiresSkippedInCTP(TCSlice &slc, std::vector< int > &tjids, CTP_t inCTP)
bool MakeTp3(TCSlice &slc, const TrajPoint &itp, const TrajPoint &jtp, TrajPoint3 &tp3, bool findDirection)
bool LineLineIntersect(Point3_t p1, Point3_t p2, Point3_t p3, Point3_t p4, Point3_t &intersect, float &doca)
void FindXMatches(TCSlice &slc, unsigned short numPlanes, short maxScore, std::vector< MatchStruct > &matVec, bool prt)
bool MergePFPTjs(TCSlice &slc, PFPStruct &pfp, bool prt)
float LengthInCTP(TCSlice &slc, std::vector< int > &tjids, CTP_t inCTP)
double DeltaAngle(const Vector3_t v1, const Vector3_t v2)
std::vector< unsigned short > FindKinks(TCSlice &slc, PFPStruct &pfp, double sep, bool prt)
bool Split3DKink(TCSlice &slc, PFPStruct &pfp, double sep, bool prt)
void PrintTp3s(std::string someText, TCSlice &slc, const PFPStruct &pfp, short printPts)
void UpdateTp3s(TCSlice &slc, PFPStruct &pfp, int oldTj, int newTj)
void PFPVertexCheck(TCSlice &slc)
std::array< float, 2 > Point2_t
Vector3_t PointDirection(const Point3_t p1, const Point3_t p2)
void CleanTjs(TCSlice &slc, PFPStruct &pfp, bool prt)
bool DefinePFP(std::string inFcnLabel, TCSlice &slc, PFPStruct &pfp, bool prt)
void UpdateMatchStructs(TCSlice &slc, int oldTj, int newTj)
double PosSep2(const Point3_t &pos1, const Point3_t &pos2)
void FollowTp3s(TCSlice &slc, PFPStruct &pfp, bool prt)
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.
void FindMissedTjsInTp3s(TCSlice &slc, PFPStruct &pfp, std::vector< int > &missTjs, std::vector< float > &missFrac)
unsigned short FarEnd(TCSlice &slc, const PFPStruct &pfp, const Point3_t &pos)
bool SetMag(Vector3_t &v1, double mag)
Definition of data types for geometry description.
bool AnalyzePFP(TCSlice &slc, PFPStruct &pfp, bool prt)
void FindPFParticles(TCSlice &slc)
void FilldEdx(TCSlice &slc, PFPStruct &pfp)
bool InsideFV(TCSlice &slc, PFPStruct &pfp, unsigned short end)
double DotProd(const Vector3_t &v1, const Vector3_t &v2)
PFPStruct CreatePFP(TCSlice &slc)
void ReversePFP(TCSlice &slc, PFPStruct &pfp)
bool SetStart(TCSlice &slc, PFPStruct &pfp, bool prt)
double PosSep(const Point3_t &pos1, const Point3_t &pos2)
bool FitTp3s(TCSlice &slc, const std::vector< TrajPoint3 > &tp3s, Point3_t &pos, Vector3_t &dir, float &rCorr)
double KinkAngle(TCSlice &slc, const std::vector< TrajPoint3 > &tp3s, unsigned short atPt, double sep)
void FillmAllTraj(TCSlice &slc)
std::array< double, 3 > Vector3_t
bool SharesHighScoreVx(TCSlice &slc, const PFPStruct &pfp, const Trajectory &tj)
bool PFPVxTjOK(TCSlice &slc, PFPStruct &pfp, bool prt)
bool AddMissedTj(TCSlice &slc, PFPStruct &pfp, unsigned short itj, bool looseCuts, bool prt)
void DefinePFPParents(TCSlice &slc, bool prt)
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
float ChgFracBetween(TCSlice &slc, Point3_t pos1, Point3_t pos2)
float ChgFracNearEnd(TCSlice &slc, PFPStruct &pfp, unsigned short end)
bool StorePFP(TCSlice &slc, PFPStruct &pfp)
float AspectRatio(TCSlice &slc, std::vector< int > &tjids, CTP_t inCTP)
void DefinePFPParentsTestBeam(TCSlice &slc, bool prt)