TCVertex.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 //
4 // TCAlg vertex code
5 //
6 // Bruce Baller
7 //
8 ///////////////////////////////////////////////////////////////////////
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(TCSlice& slc,
46  const Trajectory& tj,
47  unsigned short& nearPt,
48  short nPtsToChk,
49  bool prt);
50  unsigned short TPNearVertex(const TCSlice& slc, const TrajPoint& tp);
51  bool AttachToAnyVertex(TCSlice& slc, PFPStruct& pfp, float maxSep, bool prt);
52  bool AttachAnyVertexToTraj(TCSlice& slc, int tjID, bool prt);
53  bool AttachAnyTrajToVertex(TCSlice& slc, unsigned short iv, bool prt);
54  bool AttachTrajToVertex(TCSlice& slc, Trajectory& tj, VtxStore& vx, bool prt);
55  float TrajPointVertexPull(const TCSlice& slc, const TrajPoint& tp, const VtxStore& vx);
56  float VertexVertexPull(const TCSlice& slc, const Vtx3Store& vx1, const Vtx3Store& vx2);
57  float VertexVertexPull(const TCSlice& slc, const VtxStore& vx1, const VtxStore& vx2);
58  bool FitVertex(TCSlice& slc, VtxStore& vx, bool prt);
59  bool FitVertex(TCSlice& slc, VtxStore& vx, std::vector<TrajPoint>& vxTp, bool prt);
60  bool StoreVertex(TCSlice& slc, VtxStore& vx);
61  bool ChkVtxAssociations(TCSlice& slc, const CTP_t& inCTP);
62  void ScoreVertices(TCSlice& slc);
63  void KillPoorVertices(TCSlice& slc);
64  void SetVx2Score(TCSlice& slc);
65  void SetVx2Score(TCSlice& slc, VtxStore& vx2);
66  void SetVx3Score(TCSlice& slc, Vtx3Store& vx3);
67  void SetHighScoreBits(TCSlice& slc, Vtx3Store& vx3);
68  bool MakeVertexObsolete(std::string fcnLabel, TCSlice& slc, VtxStore& vx2, bool forceKill);
69  bool MakeVertexObsolete(TCSlice& slc, Vtx3Store& vx3);
70  std::vector<int> GetVtxTjIDs(const TCSlice& slc, const VtxStore& vx2);
71  std::vector<int> GetVtxTjIDs(const TCSlice& slc, const Vtx3Store& vx3, float& score);
72  void PosInPlane(detinfo::DetectorPropertiesData const& detProp,
73  const TCSlice& slc,
74  const Vtx3Store& vx3,
75  unsigned short plane,
76  Point2_t& pos);
77  unsigned short IsCloseToVertex(const TCSlice& slc, const VtxStore& vx);
78  unsigned short IsCloseToVertex(const TCSlice& slc, const Vtx3Store& vx3);
79 } // namespace
80 
81 #endif // ifndef TRAJCLUSTERALGVERTEX_H
bool MergeWithVertex(TCSlice &slc, VtxStore &vx, unsigned short oVxID)
Definition: TCVertex.cxx:449
bool MakeVertexObsolete(std::string fcnLabel, TCSlice &slc, VtxStore &vx2, bool forceKill)
Definition: TCVertex.cxx:2740
float TrajPointVertexPull(const TCSlice &slc, const TrajPoint &tp, const VtxStore &vx)
Definition: TCVertex.cxx:1865
bool AttachAnyVertexToTraj(TCSlice &slc, int tjID, bool prt)
Definition: TCVertex.cxx:1655
void CompleteIncomplete3DVerticesInGaps(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc)
Definition: TCVertex.cxx:2410
bool FitVertex(TCSlice &slc, VtxStore &vx, bool prt)
Definition: TCVertex.cxx:1968
void Find3DVertices(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc)
Definition: TCVertex.cxx:1282
std::string string
Definition: nybbler.cc:12
TCConfig tcc
Definition: DataStructs.cxx:8
void SplitTrajCrossingVertices(TCSlice &slc, CTP_t inCTP)
Definition: TCVertex.cxx:937
void Reconcile2Vs(TCSlice &slc)
Definition: TCVertex.cxx:1081
bool RefineVtxPosition(TCSlice &slc, const Trajectory &tj, unsigned short &nearPt, short nPtsToChk, bool prt)
Definition: TCVertex.cxx:2704
void PosInPlane(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, const Vtx3Store &vx3, unsigned short plane, Point2_t &pos)
Definition: TCVertex.cxx:2893
bool AttachAnyTrajToVertex(TCSlice &slc, unsigned short ivx, bool prt)
Definition: TCVertex.cxx:1697
unsigned short TPNearVertex(const TCSlice &slc, const TrajPoint &tp)
Definition: TCVertex.cxx:1582
void SetVx3Score(TCSlice &slc, Vtx3Store &vx3)
Definition: TCVertex.cxx:2256
void CompleteIncomplete3DVertices(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc)
Definition: TCVertex.cxx:2504
bool StoreVertex(TCSlice &slc, VtxStore &vx)
Definition: TCVertex.cxx:1932
std::array< float, 2 > Point2_t
Definition: DataStructs.h:45
HLTPathStatus const pass
bool ChkVtxAssociations(TCSlice &slc, const CTP_t &inCTP)
Definition: TCVertex.cxx:2085
bool Reconcile2VTs(TCSlice &slc, std::vector< int > &vx2cls, bool prt)
Definition: TCVertex.cxx:1177
void ScoreVertices(TCSlice &slc)
Definition: TCVertex.cxx:2160
General LArSoft Utilities.
std::vector< TCSlice > slices
Definition: DataStructs.cxx:12
unsigned short IsCloseToVertex(const TCSlice &slc, const VtxStore &inVx2)
Definition: TCVertex.cxx:2908
float VertexVertexPull(const TCSlice &slc, const Vtx3Store &vx1, const Vtx3Store &vx2)
Definition: TCVertex.cxx:1901
unsigned int CTP_t
Definition: DataStructs.h:49
void SetHighScoreBits(TCSlice &slc, Vtx3Store &vx3)
Definition: TCVertex.cxx:2207
bool AttachTrajToVertex(TCSlice &slc, Trajectory &tj, VtxStore &vx, bool prt)
Definition: TCVertex.cxx:1742
void MakeJunkTjVertices(TCSlice &slc, const CTP_t &inCTP)
std::vector< int > GetVtxTjIDs(const TCSlice &slc, const VtxStore &vx2)
Definition: TCVertex.cxx:2851
void KillPoorVertices(TCSlice &slc)
Definition: TCVertex.cxx:2188
void SetVx2Score(TCSlice &slc)
Definition: TCVertex.cxx:2278
void FindHammerVertices(TCSlice &slc, const CTP_t &inCTP)
Definition: TCVertex.cxx:811
void MakeJunkVertices(TCSlice &slc, const CTP_t &inCTP)
Definition: TCVertex.cxx:45
TCEvent evt
Definition: DataStructs.cxx:7
void Find2DVertices(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, const CTP_t &inCTP, unsigned short pass)
Definition: TCVertex.cxx:146
void FindHammerVertices2(TCSlice &slc, const CTP_t &inCTP)
Definition: TCVertex.cxx:618
bool AttachToAnyVertex(TCSlice &slc, PFPStruct &pfp, float maxSep, bool prt)
Definition: TCVertex.cxx:1597