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);
61 unsigned short fromPt,
63 unsigned short& nBadPts,
64 unsigned short& firstBadPt);
65 bool CanSection(
const TCSlice& slc,
const PFPStruct& pfp);
68 unsigned short fromPt,
69 unsigned short min2DPts,
72 unsigned short sfIndex,
73 unsigned short& fromPt,
74 unsigned short& npts);
79 unsigned short sfIndex);
82 const std::vector<TP3D>& tp3ds,
83 unsigned short fromPt,
85 unsigned short nPtsFit);
89 unsigned short fromPt,
91 unsigned short sfIndex,
101 const PFPStruct& pfp);
106 unsigned short fromPt,
110 unsigned short& nWires,
111 unsigned short& nAdd,
113 unsigned short InsertTP3D(PFPStruct& pfp, TP3D& tp3d);
114 bool SortSection(PFPStruct& pfp,
unsigned short sectionFitIndex);
117 TCSlice& slc, PFPStruct& pfp,
bool prt);
119 PFPStruct& pfp,
bool prt);
121 TCSlice& slc, PFPStruct& pfp,
bool prt);
122 void Reverse(TCSlice& slc, PFPStruct& pfp);
125 TCSlice& slc,
const TrajPoint& itp,
const TrajPoint& jtp);
130 return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
153 unsigned short tjPt);
190 unsigned short sfIndex,
191 unsigned short& startPt,
192 unsigned short& endPt);
206 #endif // ifndef TRAJCLUSTERALGSPTUTILS_H end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
void Recover(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, PFPStruct &pfp, bool prt)
unsigned short FarEnd(const TCSlice &slc, const PFPStruct &pfp, const Point3_t &pos)
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 SetSection(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp, TP3D &tp3d)
bool InsideTPC(const Point3_t &pos, geo::TPCID &inTPCID)
std::array< double, 3 > Point3_t
bool SortSection(PFPStruct &pfp, unsigned short sfIndex)
void Reverse(TCSlice &slc, PFPStruct &pfp)
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)
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)
bool ReSection(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp, bool prt)
double dEdx(float dqdx, float Efield)
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)
float ChgFracBetween(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, Point3_t pos1, Point3_t pos2)
bool FitSection(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp, unsigned short sfIndex)
void CountBadPoints(const TCSlice &slc, const PFPStruct &pfp, unsigned short fromPt, unsigned short toPt, unsigned short &nBadPts, unsigned short &firstBadPt)
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)
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)
float PointPull(const PFPStruct &pfp, const TP3D &tp3d)
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.
double PosSep(const Point3_t &pos1, const Point3_t &pos2)
std::array< double, 3 > Vector3_t
void DefinePFPParents(TCSlice &slc, bool prt)
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)
LArSoft geometry interface.
TP3D MakeTP3D(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, const TrajPoint &itp, const TrajPoint &jtp)
bool Update(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp, bool prt)
bool SptInTPC(const std::array< unsigned int, 3 > &sptHits, unsigned int tpc)