SkeletonAlg.h
Go to the documentation of this file.
1 /**
2  * @file SkeletonAlg.h
3  *
4  * @brief Header file to define the interface to the SkeletonAlg
5  *
6  */
7 #ifndef SkeletonAlg_h
8 #define SkeletonAlg_h
9 
10 // Framework Includes
11 #include "fhiclcpp/ParameterSet.h"
12 
13 // LArSoft includes
15 
16 // std includes
17 #include <vector>
18 
19 //------------------------------------------------------------------------------------------------------------------------------------------
20 
21 namespace lar_cluster3d
22 {
23 
24 /**
25  * @brief Cluster3D class
26  */
27 class SkeletonAlg
28 {
29 public:
30  /**
31  * @brief Constructor
32  *
33  * @param pset
34  */
35  SkeletonAlg(fhicl::ParameterSet const &pset);
36 
37  /**
38  * @brief Destructor
39  */
40  ~SkeletonAlg();
41 
42  /**
43  * @brief a handler for the case where the algorithm control parameters are to be reset
44  */
45  void reconfigure(fhicl::ParameterSet const &pset);
46 
47  /**
48  * @brief This is intended to find the medial skeleton given a list of input hit pairs
49  *
50  * @param hitPairList - input list of pointers to internal Cluster3D 3D hits
51  */
52  int FindMedialSkeleton(reco::HitPairListPtr& hitPairList) const;
53 
54  /**
55  * @brief Return the skeleton hits from the input list
56  * - note that this presumes the skeleton hits have been found already
57  *
58  * @param inputHitList - input list of pointers to internal Cluster3D 3D hits
59  * @param skeletonHitList - output list of skeleton hits
60  */
61  void GetSkeletonHits(const reco::HitPairListPtr& inputHitList, reco::HitPairListPtr& skeletonHitList) const;
62 
63  /**
64  * @brief Modifies the position of input skeleton hits by averaging along the "best"
65  * wire direction.
66  *
67  * @param skeletonHitList - input list of skeleton hits
68  */
69  void AverageSkeletonPositions(reco::HitPairListPtr& skeletonHitList) const;
70 
71 private:
72 
73  /**
74  * @brief A function to find the bounding wires in a given view
75  *
76  */
77  double FindFirstAndLastWires(std::vector<const reco::ClusterHit3D*>& hitVec,
78  int planeToCheck,
79  int referenceWire,
80  double referenceTicks,
81  int& firstWire,
82  int& lastWire) const;
83 
84  double m_minimumDeltaTicks;
85  double m_maximumDeltaTicks;
86 
88 };
89 
90 } // namespace lar_cluster3d
91 #endif
void GetSkeletonHits(const reco::HitPairListPtr &inputHitList, reco::HitPairListPtr &skeletonHitList) const
Return the skeleton hits from the input list.
SkeletonAlg(fhicl::ParameterSet const &pset)
Constructor.
Definition: SkeletonAlg.cxx:31
void reconfigure(fhicl::ParameterSet const &pset)
a handler for the case where the algorithm control parameters are to be reset
Definition: SkeletonAlg.cxx:44
int FindMedialSkeleton(reco::HitPairListPtr &hitPairList) const
This is intended to find the medial skeleton given a list of input hit pairs.
fhicl::ParameterSet m_pset
Definition: SkeletonAlg.h:91
void AverageSkeletonPositions(reco::HitPairListPtr &skeletonHitList) const
Modifies the position of input skeleton hits by averaging along the "best" wire direction.
std::list< const reco::ClusterHit3D * > HitPairListPtr
Definition: Cluster3D.h:335
double FindFirstAndLastWires(std::vector< const reco::ClusterHit3D * > &hitVec, int viewToCheck, int referenceWire, double referenceTicks, int &firstWire, int &lastWire) const
A function to find the bounding wires in a given view.
Definition: SkeletonAlg.cxx:50
virtual ~SkeletonAlg()
Destructor.
Definition: SkeletonAlg.cxx:38