IHit3DBuilder.h
Go to the documentation of this file.
1 /**
2  * @file IHit3DBuilder.h
3  *
4  * @brief This provides an art tool interface definition for tools which construct 3D hits used in 3D clustering
5  * and outputs a new hit collection based on those 3D hits
6  *
7  * @author usher@slac.stanford.edu
8  *
9  */
10 #ifndef IHit3DBuilder_h
11 #define IHit3DBuilder_h
12 
13 // Framework Includes
14 #include "fhiclcpp/ParameterSet.h"
16 
17 // Algorithm includes
19 
20 //------------------------------------------------------------------------------------------------------------------------------------------
21 
22 namespace art
23 {
24  class ProducesCollector;
25 }
26 
27 namespace lar_cluster3d
28 {
29 /**
30  * @brief IHit3DBuilder interface class definiton
31  */
33 {
34 public:
35  /**
36  * @brief Virtual Destructor
37  */
38  virtual ~IHit3DBuilder() noexcept = default;
39 
40  /**
41  * @brief The space point building should output the hit collection
42  * for those hits which combine to form space points - a nice noise filter!
43  */
44  virtual void produces(art::ProducesCollector&) = 0;
45 
46  /**
47  * @brief Interface for configuring the particular algorithm tool
48  *
49  * @param ParameterSet The input set of parameters for configuration
50  */
51  virtual void configure(const fhicl::ParameterSet&) = 0;
52 
53  /**
54  * @brief Defines a structure mapping art representation to internal
55  */
56  using RecobHitToPtrMap = std::unordered_map<const recob::Hit*, art::Ptr<recob::Hit>>;
57 
58  /**
59  * @brief Given a set of recob hits, run DBscan to form 3D clusters
60  *
61  * @param hitPairList The input list of 3D hits to run clustering on
62  * @param clusterParametersList A list of cluster objects (parameters from associated hits)
63  */
64  virtual void Hit3DBuilder(art::Event&, reco::HitPairList&, RecobHitToPtrMap&) = 0;
65 
66  /**
67  * @brief enumerate the possible values for time checking if monitoring timing
68  */
69  enum TimeValues {COLLECTARTHITS = 0,
70  BUILDTHREEDHITS = 1,
71  BUILDNEWHITS = 2,
72  NUMTIMEVALUES
73  };
74 
75  /**
76  * @brief If monitoring, recover the time to execute a particular function
77  */
78  virtual float getTimeToExecute(TimeValues index) const = 0;
79 
80 };
81 
82 } // namespace lar_cluster3d
83 #endif
std::list< reco::ClusterHit3D > HitPairList
Definition: Cluster3D.h:339
TimeValues
enumerate the possible values for time checking if monitoring timing
Definition: IHit3DBuilder.h:69
IHit3DBuilder interface class definiton.
Definition: IHit3DBuilder.h:32
std::unordered_map< const recob::Hit *, art::Ptr< recob::Hit >> RecobHitToPtrMap
Defines a structure mapping art representation to internal.
Definition: IHit3DBuilder.h:56