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 #include "lardata/RecoObjects/Cluster3D.h"
16 
17 // std includes
18 #include <string>
19 #include <functional>
20 #include <iostream>
21 #include <memory>
22 
23 //------------------------------------------------------------------------------------------------------------------------------------------
24 
25 namespace lar_cluster3d
26 {
27 
28 /**
29  * @brief Cluster3D class
30  */
32 {
33 public:
34  /**
35  * @brief Constructor
36  *
37  * @param pset
38  */
39  SkeletonAlg(fhicl::ParameterSet const &pset);
40 
41  /**
42  * @brief Destructor
43  */
44  virtual ~SkeletonAlg();
45 
46  /**
47  * @brief a handler for the case where the algorithm control parameters are to be reset
48  */
49  void reconfigure(fhicl::ParameterSet const &pset);
50 
51  /**
52  * @brief This is intended to find the medial skeleton given a list of input hit pairs
53  *
54  * @param hitPairList - input list of pointers to internal Cluster3D 3D hits
55  */
56  int FindMedialSkeleton(reco::HitPairListPtr& hitPairList) const;
57 
58  /**
59  * @brief Return the skeleton hits from the input list
60  * - note that this presumes the skeleton hits have been found already
61  *
62  * @param inputHitList - input list of pointers to internal Cluster3D 3D hits
63  * @param skeletonHitList - output list of skeleton hits
64  */
65  void GetSkeletonHits(const reco::HitPairListPtr& inputHitList, reco::HitPairListPtr& skeletonHitList) const;
66 
67  /**
68  * @brief Modifies the position of input skeleton hits by averaging along the "best"
69  * wire direction.
70  *
71  * @param skeletonHitList - input list of skeleton hits
72  */
73  void AverageSkeletonPositions(reco::HitPairListPtr& skeletonHitList) const;
74 
75 private:
76 
77  /**
78  * @brief A function to find the bounding wires in a given view
79  *
80  */
81  double FindFirstAndLastWires(std::vector<const reco::ClusterHit3D*>& hitVec,
82  int viewToCheck,
83  int referenceWire,
84  double referenceTicks,
85  int& firstWire,
86  int& lastWire) const;
87 
90 
92 };
93 
94 } // namespace lar_cluster3d
95 #endif
Cluster3D class.
Definition: SkeletonAlg.h:31
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
art framework interface to geometry description
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