All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
hit::HitFinder Class Reference
Inheritance diagram for hit::HitFinder:

Public Member Functions

 HitFinder (fhicl::ParameterSet const &pset)
 

Private Member Functions

void produce (art::Event &evt) override
 
void endJob () override
 

Private Attributes

art::InputTag fCalDataModuleLabel
 label of module producing input wires More...
 
CCHitFinderAlg fCCHFAlg
 

Detailed Description

Definition at line 30 of file HitFinder_module.cc.

Constructor & Destructor Documentation

hit::HitFinder::HitFinder ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 67 of file HitFinder_module.cc.

68  : EDProducer{pset}
69  , fCCHFAlg{pset.get<fhicl::ParameterSet>("CCHitFinderAlg")}
70  {
71  fCalDataModuleLabel = pset.get<art::InputTag>("CalDataModuleLabel");
72 
73  // let HitCollectionAssociator declare that we are going to produce
74  // hits and associations with wires and raw digits
75  // (with no particular product label);
76  // TODO this should be marked as transient when art will implement issue #8018
78 
79  } // HitFinder::HitFinder()
art::InputTag fCalDataModuleLabel
label of module producing input wires
static void declare_products(art::ProducesCollector &collector, std::string instance_name="", bool doWireAssns=true, bool doRawDigitAssns=true)
Declares the hit products we are going to fill.
Definition: HitCreator.cxx:248
CCHitFinderAlg fCCHFAlg

Member Function Documentation

void hit::HitFinder::endJob ( )
overrideprivate

Definition at line 114 of file HitFinder_module.cc.

114  {
115  // print the statistics about fits
116  mf::LogInfo log("HitFinder"); // messages are printed on "log" destruction
117  fCCHFAlg.PrintStats(log);
118  } // HitFinder::endJob()
void PrintStats(Stream &out) const
Print the fit statistics.
CCHitFinderAlg fCCHFAlg
void hit::HitFinder::produce ( art::Event &  evt)
overrideprivate

Definition at line 83 of file HitFinder_module.cc.

84  {
85  // fetch the wires needed by HitFinder
86 
87  // make this accessible to ClusterCrawler_module
88  art::ValidHandle< std::vector<recob::Wire>> wireVecHandle
89  = evt.getValidHandle<std::vector<recob::Wire>>(fCalDataModuleLabel);
90 
91  // find hits in all planes
92  fCCHFAlg.RunCCHitFinder(*wireVecHandle);
93 
94  // extract the result of the algorithm (it's moved)
95  std::unique_ptr<std::vector<recob::Hit>> Hits
96  (new std::vector<recob::Hit>(std::move(fCCHFAlg.YieldHits())));
97 
98  mf::LogInfo("HitFinder") << Hits->size() << " hits produced.";
99 
100  // shcol contains the hit collection
101  // and its associations to wires and raw digits;
102  // we get the association to raw digits through wire associations
104 
105  shcol.use_hits(std::move(Hits));
106 
107  // move the hit collection and the associations into the event:
108  shcol.put_into(evt);
109 
110  } // produce()
void RunCCHitFinder(std::vector< recob::Wire > const &Wires)
art::InputTag fCalDataModuleLabel
label of module producing input wires
A class handling a collection of hits and its associations.
Definition: HitCreator.h:692
art::PtrVector< recob::Hit > Hits
CCHitFinderAlg fCCHFAlg
std::vector< recob::Hit > && YieldHits()
Returns (and loses) the collection of reconstructed hits.
TCEvent evt
Definition: DataStructs.cxx:8

Member Data Documentation

art::InputTag hit::HitFinder::fCalDataModuleLabel
private

label of module producing input wires

Definition at line 40 of file HitFinder_module.cc.

CCHitFinderAlg hit::HitFinder::fCCHFAlg
private

Definition at line 41 of file HitFinder_module.cc.


The documentation for this class was generated from the following file: