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