PCASeedFinderAlg.h
Go to the documentation of this file.
1 /**
2  * @file PCASeedFinderAlg.h
3  *
4  * @brief This is an algorithm for finding recob::Seed objects in 3D clusters
5  *
6  */
7 #ifndef PCASeedFinderAlg_h
8 #define PCASeedFinderAlg_h
9 
10 // Framework Includes
11 #include "fhiclcpp/ParameterSet.h"
12 
15 
16 // LArSoft includes
19 #include "lardata/RecoObjects/Cluster3D.h"
20 
21 // ROOT includes
22 #include "TCanvas.h"
23 #include "TFrame.h"
24 #include "TH2D.h"
25 
26 //------------------------------------------------------------------------------------------------------------------------------------------
27 
28 namespace lar_cluster3d
29 {
30 
31 /**
32  * @brief PCASeedFinderAlg class
33  */
34 class PCASeedFinderAlg : virtual public SeedFinderAlgBase
35 {
36 public:
37  /**
38  * @brief Constructor
39  *
40  * @param pset
41  */
43 
44  /**
45  * @brief Destructor
46  */
47  virtual ~PCASeedFinderAlg();
48 
49  /**
50  * @brief a handler for the case where the algorithm control parameters are to be reset
51  */
52  virtual void reconfigure(fhicl::ParameterSet const &pset);
53 
54  /**
55  * @brief Given the list of hits this will search for candidate Seed objects and return them
56  */
57  virtual bool findTrackSeeds(reco::HitPairListPtr& hitPairListPtr,
58  reco::PrincipalComponents& inputPCA,
59  SeedHitPairListPairVec& seedHitMap) const;
60 
61 private:
62 
63  /**
64  * @brief Separate function to find hits at the ends of the input hits
65  */
66  bool getHitsAtEnd(reco::HitPairListPtr& hit3DList, reco::PrincipalComponents& seedPca) const;
67 
68  void LineFit2DHits(const reco::HitPairListPtr& hitList, double XOrigin, TVector3& Pos, TVector3& Dir, double& ChiDOF) const;
69 
70  geo::Geometry* m_geometry; // pointer to the Geometry service
71  // const detinfo::DetectorProperties* m_detector; // Pointer to the detector properties
72 
73  double m_gapDistance; ///<
74  size_t m_numSeed2DHits; ///<
75  double m_minAllowedCosAng; ///< The minimum cos(ang) between input and seed axes
76 
77  PrincipalComponentsAlg m_pcaAlg; // For running Principal Components Analysis
78 };
79 
80 } // namespace lar_cluster3d
81 #endif
bool getHitsAtEnd(reco::HitPairListPtr &hit3DList, reco::PrincipalComponents &seedPca) const
Separate function to find hits at the ends of the input hits.
SeedFinderAlgBase class.
virtual bool findTrackSeeds(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, SeedHitPairListPairVec &seedHitMap) const
Given the list of hits this will search for candidate Seed objects and return them.
PrincipalComponentsAlg m_pcaAlg
art framework interface to geometry description
virtual void reconfigure(fhicl::ParameterSet const &pset)
a handler for the case where the algorithm control parameters are to be reset
std::list< const reco::ClusterHit3D * > HitPairListPtr
Definition: Cluster3D.h:335
The geometry of one entire detector, as served by art.
Definition: Geometry.h:196
double m_minAllowedCosAng
The minimum cos(ang) between input and seed axes.
virtual ~PCASeedFinderAlg()
Destructor.
PCASeedFinderAlg(fhicl::ParameterSet const &pset)
Constructor.
std::vector< SeedHitPairListPair > SeedHitPairListPairVec
PCASeedFinderAlg class.
void LineFit2DHits(const reco::HitPairListPtr &hitList, double XOrigin, TVector3 &Pos, TVector3 &Dir, double &ChiDOF) const