All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SeedFinderAlgBase.h
Go to the documentation of this file.
1 /**
2  * @file SeedFinderAlgBase.h
3  *
4  * @brief This is intended to define an interface to all Seed finder algorithms employed
5  * by the 3D clustering
6  *
7  */
8 #ifndef SeedFinderAlgBase_h
9 #define SeedFinderAlgBase_h
10 
11 // Framework Includes
12 namespace fhicl { class ParameterSet; }
14 
15 // Algorithm includes
17 
18 #include <vector>
19 //------------------------------------------------------------------------------------------------------------------------------------------
20 
21 namespace lar_cluster3d {
22  typedef std::pair<recob::Seed, reco::HitPairListPtr> SeedHitPairListPair;
23  typedef std::vector<SeedHitPairListPair> SeedHitPairListPairVec;
24 
25  /**
26  * @brief SeedFinderAlgBase class
27  */
29  public:
30  /**
31  * @brief Define the interface to take an input list of 3D hits and return seed candidates
32  * so hits are ordered along the axis
33  */
34  virtual bool findTrackSeeds(reco::HitPairListPtr& hitPairListPtr,
35  reco::PrincipalComponents& inputPCA,
36  SeedHitPairListPairVec& seedHitPairVec) const = 0;
37 
38  protected:
39  /**
40  * @brief Define a comparator which will sort hits by arc length along a PCA axis
41  */
43  bool
45  {
46  return left->getArclenToPoca() < right->getArclenToPoca();
47  }
48  };
49 
50  /**
51  * @brief Define a comparator which will sort hits by the absolute value of arc length
52  * so hits are ordered closed to PCA origin to furthest
53  */
55  bool
57  {
58  return fabs(left->getArclenToPoca()) < fabs(right->getArclenToPoca());
59  }
60  };
61 
62  private:
63  };
64 
65 } // namespace lar_cluster3d
66 #endif
Define a comparator which will sort hits by arc length along a PCA axis.
SeedFinderAlgBase class.
walls no right
Definition: selectors.fcl:105
bool operator()(const reco::ClusterHit3D *left, const reco::ClusterHit3D *right)
Define a comparator which will sort hits by the absolute value of arc length so hits are ordered clos...
std::list< const reco::ClusterHit3D * > HitPairListPtr
Definition: Cluster3D.h:334
walls no left
Definition: selectors.fcl:105
std::vector< SeedHitPairListPair > SeedHitPairListPairVec
float getArclenToPoca() const
Definition: Cluster3D.h:169
std::pair< recob::Seed, reco::HitPairListPtr > SeedHitPairListPair
virtual bool findTrackSeeds(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, SeedHitPairListPairVec &seedHitPairVec) const =0
Define the interface to take an input list of 3D hits and return seed candidates so hits are ordered ...
bool operator()(const reco::ClusterHit3D *left, const reco::ClusterHit3D *right)