LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TCVertex.h
Go to the documentation of this file.
1 //
3 //
4 // TCAlg vertex code
5 //
6 // Bruce Baller
7 //
9 #ifndef TRAJCLUSTERALGVERTEX_H
10 #define TRAJCLUSTERALGVERTEX_H
11 
12 // C/C++ standard libraries
13 #include <string>
14 #include <vector>
15 
16 // LArSoft libraries
18 namespace detinfo {
19  class DetectorPropertiesData;
20 }
21 
22 namespace tca {
23 
24  extern TCEvent evt;
25  extern TCConfig tcc;
26  // vector of hits, tjs, etc in each slice
27  extern std::vector<TCSlice> slices;
28 
29  void MakeJunkVertices(TCSlice& slc, const CTP_t& inCTP);
31  TCSlice& slc,
32  const CTP_t& inCTP,
33  unsigned short pass);
34  void MakeJunkTjVertices(TCSlice& slc, const CTP_t& inCTP);
35  bool MergeWithVertex(TCSlice& slc, VtxStore& vx2, unsigned short existingVxID);
36  void FindHammerVertices(TCSlice& slc, const CTP_t& inCTP);
37  void FindHammerVertices2(TCSlice& slc, const CTP_t& inCTP);
38  void SplitTrajCrossingVertices(TCSlice& slc, CTP_t inCTP);
39  void Reconcile2Vs(TCSlice& slc);
40  bool Reconcile2VTs(TCSlice& slc, std::vector<int>& vx2cls, bool prt);
41  void Find3DVertices(detinfo::DetectorPropertiesData const& detProp, TCSlice& slc);
42  void CompleteIncomplete3DVertices(detinfo::DetectorPropertiesData const& detProp, TCSlice& slc);
44  TCSlice& slc);
45  bool RefineVtxPosition(const Trajectory& tj, unsigned short& nearPt, short nPtsToChk, bool prt);
46  unsigned short TPNearVertex(const TCSlice& slc, const TrajPoint& tp);
47  bool AttachToAnyVertex(TCSlice& slc, PFPStruct& pfp, float maxSep, bool prt);
48  bool AttachAnyVertexToTraj(TCSlice& slc, int tjID, bool prt);
49  bool AttachAnyTrajToVertex(TCSlice& slc, unsigned short iv, bool prt);
50  bool AttachTrajToVertex(TCSlice& slc, Trajectory& tj, VtxStore& vx, bool prt);
51  float TrajPointVertexPull(const TrajPoint& tp, const VtxStore& vx);
52  float VertexVertexPull(const Vtx3Store& vx1, const Vtx3Store& vx2);
53  float VertexVertexPull(const VtxStore& vx1, const VtxStore& vx2);
54  bool FitVertex(TCSlice& slc, VtxStore& vx, bool prt);
55  bool FitVertex(TCSlice& slc, VtxStore& vx, std::vector<TrajPoint>& vxTp, bool prt);
56  bool StoreVertex(TCSlice& slc, VtxStore& vx);
57  bool ChkVtxAssociations(TCSlice& slc, const CTP_t& inCTP);
58  void ScoreVertices(TCSlice& slc);
59  void KillPoorVertices(TCSlice& slc);
60  void SetVx2Score(TCSlice& slc);
61  void SetVx2Score(TCSlice& slc, VtxStore& vx2);
62  void SetVx3Score(TCSlice& slc, Vtx3Store& vx3);
63  void SetHighScoreBits(TCSlice& slc, Vtx3Store& vx3);
64  bool MakeVertexObsolete(std::string fcnLabel, TCSlice& slc, VtxStore& vx2, bool forceKill);
65  bool MakeVertexObsolete(TCSlice& slc, Vtx3Store& vx3);
66  std::vector<int> GetVtxTjIDs(const TCSlice& slc, const VtxStore& vx2);
67  std::vector<int> GetVtxTjIDs(const TCSlice& slc, const Vtx3Store& vx3, float& score);
68  void PosInPlane(detinfo::DetectorPropertiesData const& detProp,
69  const Vtx3Store& vx3,
70  unsigned short plane,
71  Point2_t& pos);
72  unsigned short IsCloseToVertex(const TCSlice& slc, const VtxStore& vx);
73  unsigned short IsCloseToVertex(const TCSlice& slc, const Vtx3Store& vx3);
74 } // namespace
75 
76 #endif // ifndef TRAJCLUSTERALGVERTEX_H
bool MergeWithVertex(TCSlice &slc, VtxStore &vx, unsigned short oVxID)
Definition: TCVertex.cxx:432
bool MakeVertexObsolete(std::string fcnLabel, TCSlice &slc, VtxStore &vx2, bool forceKill)
Definition: TCVertex.cxx:2690
bool AttachAnyVertexToTraj(TCSlice &slc, int tjID, bool prt)
Definition: TCVertex.cxx:1629
void CompleteIncomplete3DVerticesInGaps(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc)
Definition: TCVertex.cxx:2368
bool FitVertex(TCSlice &slc, VtxStore &vx, bool prt)
Definition: TCVertex.cxx:1935
void Find3DVertices(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc)
Definition: TCVertex.cxx:1257
TCConfig tcc
Definition: DataStructs.cxx:9
void SplitTrajCrossingVertices(TCSlice &slc, CTP_t inCTP)
Definition: TCVertex.cxx:915
void Reconcile2Vs(TCSlice &slc)
Definition: TCVertex.cxx:1058
float VertexVertexPull(const Vtx3Store &vx1, const Vtx3Store &vx2)
Definition: TCVertex.cxx:1871
bool AttachAnyTrajToVertex(TCSlice &slc, unsigned short ivx, bool prt)
Definition: TCVertex.cxx:1670
unsigned short TPNearVertex(const TCSlice &slc, const TrajPoint &tp)
Definition: TCVertex.cxx:1558
void SetVx3Score(TCSlice &slc, Vtx3Store &vx3)
Definition: TCVertex.cxx:2217
void CompleteIncomplete3DVertices(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc)
Definition: TCVertex.cxx:2462
bool StoreVertex(TCSlice &slc, VtxStore &vx)
Definition: TCVertex.cxx:1900
std::array< float, 2 > Point2_t
Definition: DataStructs.h:43
bool ChkVtxAssociations(TCSlice &slc, const CTP_t &inCTP)
Definition: TCVertex.cxx:2050
bool Reconcile2VTs(TCSlice &slc, std::vector< int > &vx2cls, bool prt)
Definition: TCVertex.cxx:1153
void ScoreVertices(TCSlice &slc)
Definition: TCVertex.cxx:2124
General LArSoft Utilities.
std::vector< TCSlice > slices
Definition: DataStructs.cxx:13
unsigned short IsCloseToVertex(const TCSlice &slc, const VtxStore &inVx2)
Definition: TCVertex.cxx:2852
unsigned int CTP_t
Definition: DataStructs.h:47
void SetHighScoreBits(TCSlice &slc, Vtx3Store &vx3)
Definition: TCVertex.cxx:2169
bool AttachTrajToVertex(TCSlice &slc, Trajectory &tj, VtxStore &vx, bool prt)
Definition: TCVertex.cxx:1714
void MakeJunkTjVertices(TCSlice &slc, const CTP_t &inCTP)
std::vector< int > GetVtxTjIDs(const TCSlice &slc, const VtxStore &vx2)
Definition: TCVertex.cxx:2799
void KillPoorVertices(TCSlice &slc)
Definition: TCVertex.cxx:2151
void SetVx2Score(TCSlice &slc)
Definition: TCVertex.cxx:2238
void FindHammerVertices(TCSlice &slc, const CTP_t &inCTP)
Definition: TCVertex.cxx:790
float TrajPointVertexPull(const TrajPoint &tp, const VtxStore &vx)
Definition: TCVertex.cxx:1836
void MakeJunkVertices(TCSlice &slc, const CTP_t &inCTP)
Definition: TCVertex.cxx:30
TCEvent evt
Definition: DataStructs.cxx:8
void Find2DVertices(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, const CTP_t &inCTP, unsigned short pass)
Definition: TCVertex.cxx:130
void FindHammerVertices2(TCSlice &slc, const CTP_t &inCTP)
Definition: TCVertex.cxx:600
bool AttachToAnyVertex(TCSlice &slc, PFPStruct &pfp, float maxSep, bool prt)
Definition: TCVertex.cxx:1572
void PosInPlane(detinfo::DetectorPropertiesData const &detProp, const Vtx3Store &vx3, unsigned short plane, Point2_t &pos)
Definition: TCVertex.cxx:2839
bool RefineVtxPosition(const Trajectory &tj, unsigned short &nearPt, short nPtsToChk, bool prt)
Definition: TCVertex.cxx:2660