LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
hit::GausHitFinder Class Reference
Inheritance diagram for hit::GausHitFinder:
art::SharedProducer art::detail::Producer art::detail::SharedModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Types

using ModuleType = SharedProducer
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

 GausHitFinder (fhicl::ParameterSet const &pset, art::ProcessingFrame const &)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
void fillProductDescriptions ()
 
void registerProducts (ProductDescriptions &productsToRegister)
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
std::unique_ptr< Worker > makeWorker (WorkerParams const &wp)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain () const
 
std::set< std::string > const & sharedResources () const
 
void createQueues (SharedResources const &resources)
 
template<BranchType , typename... T>
void serialize (T const &...resources)
 
template<BranchType , typename... T>
void serializeExternal (T const &...resources)
 

Protected Member Functions

ConsumesCollector & consumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<BranchType BT = InEvent, typename... T>
void serialize (T const &...)
 
template<BranchType BT = InEvent, typename... T>
void serializeExternal (T const &...)
 
template<BranchType BT = InEvent>
void async ()
 

Private Member Functions

void produce (art::Event &evt, art::ProcessingFrame const &) override
 
void beginJob (art::ProcessingFrame const &) override
 
std::vector< double > FillOutHitParameterVector (const std::vector< double > &input)
 

Private Attributes

const bool fFilterHits
 
const bool fFillHists
 
const std::string fCalDataModuleLabel
 
const std::string fAllHitsInstanceName
 
const std::vector< int > fLongMaxHitsVec
 Maximum number hits on a really long pulse train. More...
 
const std::vector< int > fLongPulseWidthVec
 Sets width of hits used to describe long pulses. More...
 
const size_t fMaxMultiHit
 maximum hits for multi fit More...
 
const int fAreaMethod
 Type of area calculation. More...
 
const std::vector< double > fAreaNormsVec
 factors for converting area to same units as peak height More...
 
const double fChi2NDF
 
const std::vector< float > fPulseHeightCuts
 maximum Chisquared / NDF allowed for a hit to be saved More...
 
const std::vector< float > fPulseWidthCuts
 
const std::vector< float > fPulseRatioCuts
 
std::atomic< size_t > fEventCount {0}
 
std::vector< std::unique_ptr< reco_tool::ICandidateHitFinder > > fHitFinderToolVec
 For finding candidate hits. More...
 
std::unique_ptr< reco_tool::IPeakFitterfPeakFitterTool
 Perform fit to candidate peaks. More...
 
std::unique_ptr< HitFilterAlgfHitFilterAlg
 algorithm used to filter out noise hits More...
 
TH1F * fFirstChi2
 
TH1F * fChi2
 

Detailed Description

Definition at line 62 of file GausHitFinder_module.cc.

Member Typedef Documentation

Definition at line 20 of file SharedProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::detail::Producer::Table = Modifier::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 26 of file Producer.h.

Constructor & Destructor Documentation

hit::GausHitFinder::GausHitFinder ( fhicl::ParameterSet const &  pset,
art::ProcessingFrame const &   
)
explicit

Definition at line 109 of file GausHitFinder_module.cc.

References art::errors::Configuration, recob::HitAndAssociationsWriterBase::declare_products(), fAllHitsInstanceName, fAreaMethod, fAreaNormsVec, fCalDataModuleLabel, fChi2NDF, fFillHists, fFilterHits, fHitFilterAlg, fHitFinderToolVec, FillOutHitParameterVector(), fLongMaxHitsVec, fLongPulseWidthVec, fMaxMultiHit, fPeakFitterTool, fPulseHeightCuts, fPulseRatioCuts, fPulseWidthCuts, fhicl::ParameterSet::get(), fhicl::ParameterSet::get_pset_names(), art::Globals::instance(), and art::ProductRegistryHelper::producesCollector().

110  : SharedProducer{pset}
111  , fFilterHits(pset.get<bool>("FilterHits", false))
112  , fFillHists(pset.get<bool>("FillHists", false))
113  , fCalDataModuleLabel(pset.get<std::string>("CalDataModuleLabel"))
114  , fAllHitsInstanceName(pset.get<std::string>("AllHitsInstanceName", ""))
115  , fLongMaxHitsVec(pset.get<std::vector<int>>("LongMaxHits", std::vector<int>() = {25, 25, 25}))
117  pset.get<std::vector<int>>("LongPulseWidth", std::vector<int>() = {16, 16, 16}))
118  , fMaxMultiHit(pset.get<int>("MaxMultiHit"))
119  , fAreaMethod(pset.get<int>("AreaMethod"))
120  , fAreaNormsVec(FillOutHitParameterVector(pset.get<std::vector<double>>("AreaNorms")))
121  , fChi2NDF(pset.get<double>("Chi2NDF"))
123  pset.get<std::vector<float>>("PulseHeightCuts", std::vector<float>() = {3.0, 3.0, 3.0}))
124  , fPulseWidthCuts(
125  pset.get<std::vector<float>>("PulseWidthCuts", std::vector<float>() = {2.0, 1.5, 1.0}))
126  , fPulseRatioCuts(
127  pset.get<std::vector<float>>("PulseRatioCuts", std::vector<float>() = {0.35, 0.40, 0.20}))
128  {
129  if (fFillHists && art::Globals::instance()->nthreads() > 1u) {
131  << "Cannot fill histograms when multiple threads configured, please set fFillHists to "
132  "false or change number of threads to 1\n";
133  }
134  async<art::InEvent>();
135  if (fFilterHits) {
136  fHitFilterAlg = std::make_unique<HitFilterAlg>(pset.get<fhicl::ParameterSet>("HitFilterAlg"));
137  }
138 
139  // recover the tool to do the candidate hit finding
140  // Recover the vector of fhicl parameters for the ROI tools
141  const fhicl::ParameterSet& hitFinderTools = pset.get<fhicl::ParameterSet>("HitFinderToolVec");
142 
143  fHitFinderToolVec.resize(hitFinderTools.get_pset_names().size());
144 
145  for (const std::string& hitFinderTool : hitFinderTools.get_pset_names()) {
146  const fhicl::ParameterSet& hitFinderToolParamSet =
147  hitFinderTools.get<fhicl::ParameterSet>(hitFinderTool);
148  size_t planeIdx = hitFinderToolParamSet.get<size_t>("Plane");
149 
150  fHitFinderToolVec.at(planeIdx) =
151  art::make_tool<reco_tool::ICandidateHitFinder>(hitFinderToolParamSet);
152  }
153 
154  // Recover the peak fitting tool
156  art::make_tool<reco_tool::IPeakFitter>(pset.get<fhicl::ParameterSet>("PeakFitter"));
157 
158  // let HitCollectionCreator declare that we are going to produce
159  // hits and associations with wires and raw digits
160  // We want the option to output two hit collections, one filtered
161  // and one with all hits. The key to doing this will be a non-null
162  // instance name for the second collection
163  // (with no particular product label)
165  producesCollector(), fAllHitsInstanceName, true, false); //fMakeRawDigitAssns);
166 
167  // and now the filtered hits...
168  if (fAllHitsInstanceName != "")
170  producesCollector(), "", true, false); //fMakeRawDigitAssns);
171 
172  return;
173  } // GausHitFinder::GausHitFinder()
std::unique_ptr< HitFilterAlg > fHitFilterAlg
algorithm used to filter out noise hits
const std::vector< int > fLongPulseWidthVec
Sets width of hits used to describe long pulses.
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
std::unique_ptr< reco_tool::IPeakFitter > fPeakFitterTool
Perform fit to candidate peaks.
const int fAreaMethod
Type of area calculation.
const std::string fCalDataModuleLabel
const std::vector< float > fPulseWidthCuts
std::vector< std::string > get_pset_names() const
SharedProducer(fhicl::ParameterSet const &pset)
std::vector< double > FillOutHitParameterVector(const std::vector< double > &input)
T get(std::string const &key) const
Definition: ParameterSet.h:314
const size_t fMaxMultiHit
maximum hits for multi fit
const std::vector< int > fLongMaxHitsVec
Maximum number hits on a really long pulse train.
ProducesCollector & producesCollector() noexcept
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
const std::vector< float > fPulseRatioCuts
const std::vector< float > fPulseHeightCuts
maximum Chisquared / NDF allowed for a hit to be saved
const std::string fAllHitsInstanceName
const std::vector< double > fAreaNormsVec
factors for converting area to same units as peak height
static Globals * instance()
Definition: Globals.cc:17
std::vector< std::unique_ptr< reco_tool::ICandidateHitFinder > > fHitFinderToolVec
For finding candidate hits.

Member Function Documentation

template<BranchType BT = InEvent>
void art::detail::SharedModule::async ( )
inlineprotectedinherited

Definition at line 38 of file SharedModule.h.

References art::detail::SharedModule::asyncDeclared_, art::detail::SharedModule::implicit_serialize(), art::InEvent, and art::detail::SharedModule::serialize_for().

39  {
40  static_assert(
41  BT == InEvent,
42  "async is currently supported only for the 'InEvent' level.");
43  asyncDeclared_ = true;
44  }
void hit::GausHitFinder::beginJob ( art::ProcessingFrame const &  )
overrideprivatevirtual

Reimplemented from art::SharedProducer.

Definition at line 199 of file GausHitFinder_module.cc.

References fChi2, fFillHists, and fFirstChi2.

200  {
201  // get access to the TFile service
203 
204  // ======================================
205  // === Hit Information for Histograms ===
206  if (fFillHists) {
207  fFirstChi2 = tfs->make<TH1F>("fFirstChi2", "#chi^{2}", 10000, 0, 5000);
208  fChi2 = tfs->make<TH1F>("fChi2", "#chi^{2}", 10000, 0, 5000);
209  }
210  }
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 61 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumes().

62  {
63  return collector_.consumes<T, BT>(tag);
64  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ProductToken< T > consumes(InputTag const &)
ConsumesCollector & art::ModuleBase::consumesCollector ( )
protectedinherited

Definition at line 57 of file ModuleBase.cc.

References art::ModuleBase::collector_.

58  {
59  return collector_;
60  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 75 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesMany().

76  {
77  collector_.consumesMany<T, BT>();
78  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 68 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesView().

69  {
70  return collector_.consumesView<T, BT>(tag);
71  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > consumesView(InputTag const &)
void art::detail::SharedModule::createQueues ( SharedResources const &  resources)
inherited

Definition at line 34 of file SharedModule.cc.

References art::detail::SharedModule::asyncDeclared_, util::cbegin(), util::cend(), art::detail::SharedModule::chain_, art::detail::SharedResources::createQueues(), e, util::empty(), art::errors::LogicError, and art::detail::SharedModule::resourceNames_.

Referenced by art::OutputModule::doBeginJob(), art::SharedFilter::setupQueues(), art::SharedProducer::setupQueues(), art::SharedAnalyzer::setupQueues(), art::EDFilter::setupQueues(), art::EDProducer::setupQueues(), and art::EDAnalyzer::setupQueues().

35  {
37  "An error occurred while processing scheduling options for a "
38  "module.\n"};
39  if (asyncDeclared_) {
40  if (empty(resourceNames_)) {
41  return;
42  }
43  throw e
44  << "async<art::InEvent>() cannot be called in combination with any "
45  "serialize<art::InEvent>(...) calls.\n";
46  }
47 
48  if (empty(resourceNames_)) {
49  throw e << "Either 'async<art::InEvent>()' or "
50  "'serialize<art::InEvent>(...)'\n"
51  "must be called in a shared module's constructor.\n";
52  }
53  std::vector<std::string> const names(cbegin(resourceNames_),
55  auto queues = resources.createQueues(names);
56  chain_ = std::make_unique<SerialTaskQueueChain>(queues);
57  }
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:93
std::set< std::string > resourceNames_
Definition: SharedModule.h:76
std::unique_ptr< hep::concurrency::SerialTaskQueueChain > chain_
Definition: SharedModule.h:78
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:85
Float_t e
Definition: plot.C:35
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:109
void art::detail::Producer::doBeginJob ( SharedResources const &  resources)
inherited

Definition at line 22 of file Producer.cc.

References art::detail::Producer::beginJobWithFrame(), and art::detail::Producer::setupQueues().

23  {
24  setupQueues(resources);
25  ProcessingFrame const frame{ScheduleID{}};
26  beginJobWithFrame(frame);
27  }
virtual void setupQueues(SharedResources const &)=0
virtual void beginJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Producer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 65 of file Producer.cc.

References art::detail::Producer::beginRunWithFrame(), art::RangeSet::forRun(), art::RunPrincipal::makeRun(), r, art::RunPrincipal::runID(), and art::ModuleContext::scheduleID().

66  {
67  auto r = rp.makeRun(mc, RangeSet::forRun(rp.runID()));
68  ProcessingFrame const frame{mc.scheduleID()};
69  beginRunWithFrame(r, frame);
70  r.commitProducts();
71  return true;
72  }
TRandom r
Definition: spectrum.C:23
virtual void beginRunWithFrame(Run &, ProcessingFrame const &)=0
static RangeSet forRun(RunID)
Definition: RangeSet.cc:51
bool art::detail::Producer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 85 of file Producer.cc.

References art::detail::Producer::beginSubRunWithFrame(), art::RangeSet::forSubRun(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::SubRunPrincipal::subRunID().

86  {
87  auto sr = srp.makeSubRun(mc, RangeSet::forSubRun(srp.subRunID()));
88  ProcessingFrame const frame{mc.scheduleID()};
89  beginSubRunWithFrame(sr, frame);
90  sr.commitProducts();
91  return true;
92  }
virtual void beginSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
static RangeSet forSubRun(SubRunID)
Definition: RangeSet.cc:57
void art::detail::Producer::doEndJob ( )
inherited

Definition at line 30 of file Producer.cc.

References art::detail::Producer::endJobWithFrame().

31  {
32  ProcessingFrame const frame{ScheduleID{}};
33  endJobWithFrame(frame);
34  }
virtual void endJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Producer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 75 of file Producer.cc.

References art::detail::Producer::endRunWithFrame(), art::RunPrincipal::makeRun(), r, art::ModuleContext::scheduleID(), and art::Principal::seenRanges().

76  {
77  auto r = rp.makeRun(mc, rp.seenRanges());
78  ProcessingFrame const frame{mc.scheduleID()};
79  endRunWithFrame(r, frame);
80  r.commitProducts();
81  return true;
82  }
TRandom r
Definition: spectrum.C:23
virtual void endRunWithFrame(Run &, ProcessingFrame const &)=0
bool art::detail::Producer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 95 of file Producer.cc.

References art::detail::Producer::endSubRunWithFrame(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::Principal::seenRanges().

96  {
97  auto sr = srp.makeSubRun(mc, srp.seenRanges());
98  ProcessingFrame const frame{mc.scheduleID()};
99  endSubRunWithFrame(sr, frame);
100  sr.commitProducts();
101  return true;
102  }
virtual void endSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
bool art::detail::Producer::doEvent ( EventPrincipal ep,
ModuleContext const &  mc,
std::atomic< std::size_t > &  counts_run,
std::atomic< std::size_t > &  counts_passed,
std::atomic< std::size_t > &  counts_failed 
)
inherited

Definition at line 105 of file Producer.cc.

References art::detail::Producer::checkPutProducts_, e, art::EventPrincipal::makeEvent(), art::detail::Producer::produceWithFrame(), and art::ModuleContext::scheduleID().

110  {
111  auto e = ep.makeEvent(mc);
112  ++counts_run;
113  ProcessingFrame const frame{mc.scheduleID()};
114  produceWithFrame(e, frame);
115  e.commitProducts(checkPutProducts_, &expectedProducts<InEvent>());
116  ++counts_passed;
117  return true;
118  }
bool const checkPutProducts_
Definition: Producer.h:70
Float_t e
Definition: plot.C:35
virtual void produceWithFrame(Event &, ProcessingFrame const &)=0
void art::detail::Producer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited

Definition at line 44 of file Producer.cc.

References art::detail::Producer::respondToCloseInputFileWithFrame().

45  {
46  ProcessingFrame const frame{ScheduleID{}};
48  }
virtual void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 58 of file Producer.cc.

References art::detail::Producer::respondToCloseOutputFilesWithFrame().

59  {
60  ProcessingFrame const frame{ScheduleID{}};
62  }
virtual void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited

Definition at line 37 of file Producer.cc.

References art::detail::Producer::respondToOpenInputFileWithFrame().

38  {
39  ProcessingFrame const frame{ScheduleID{}};
41  }
virtual void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 51 of file Producer.cc.

References art::detail::Producer::respondToOpenOutputFilesWithFrame().

52  {
53  ProcessingFrame const frame{ScheduleID{}};
55  }
virtual void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
std::vector< double > hit::GausHitFinder::FillOutHitParameterVector ( const std::vector< double > &  input)
private

Definition at line 177 of file GausHitFinder_module.cc.

References geo::GeometryCore::Nplanes().

Referenced by GausHitFinder().

178  {
179  if (input.size() == 0)
180  throw std::runtime_error(
181  "GausHitFinder::FillOutHitParameterVector ERROR! Input config vector has zero size.");
182 
183  std::vector<double> output;
185  const unsigned int N_PLANES = geom->Nplanes();
186 
187  if (input.size() == 1)
188  output.resize(N_PLANES, input[0]);
189  else if (input.size() == N_PLANES)
190  output = input;
191  else
192  throw std::runtime_error("GausHitFinder::FillOutHitParameterVector ERROR! Input config "
193  "vector size !=1 and !=N_PLANES.");
194  return output;
195  }
unsigned int Nplanes(TPCID const &tpcid=tpc_zero) const
Returns the total number of planes in the specified TPC.
Definition: GeometryCore.h:977
void art::Modifier::fillProductDescriptions ( )
inherited

Definition at line 10 of file Modifier.cc.

References art::ProductRegistryHelper::fillDescriptions(), and art::ModuleBase::moduleDescription().

11  {
13  }
void fillDescriptions(ModuleDescription const &md)
ModuleDescription const & moduleDescription() const
Definition: ModuleBase.cc:13
std::array< std::vector< ProductInfo >, NumBranchTypes > const & art::ModuleBase::getConsumables ( ) const
inherited

Definition at line 43 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::getConsumables().

44  {
45  return collector_.getConsumables();
46  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables() const
std::unique_ptr< Worker > art::ModuleBase::makeWorker ( WorkerParams const &  wp)
inherited

Definition at line 37 of file ModuleBase.cc.

References art::ModuleBase::doMakeWorker(), and art::NumBranchTypes.

38  {
39  return doMakeWorker(wp);
40  }
virtual std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp)=0
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 82 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsume().

83  {
84  return collector_.mayConsume<T, BT>(tag);
85  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 96 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeMany().

97  {
98  collector_.mayConsumeMany<T, BT>();
99  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 89 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeView().

90  {
91  return collector_.mayConsumeView<T, BT>(tag);
92  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > mayConsumeView(InputTag const &)
ModuleDescription const & art::ModuleBase::moduleDescription ( ) const
inherited

Definition at line 13 of file ModuleBase.cc.

References art::errors::LogicError.

Referenced by art::OutputModule::doRespondToOpenInputFile(), art::OutputModule::doWriteEvent(), art::Modifier::fillProductDescriptions(), art::OutputModule::makePlugins_(), art::OutputWorker::OutputWorker(), reco::shower::LArPandoraModularShowerCreation::produce(), art::Modifier::registerProducts(), and art::OutputModule::registerProducts().

14  {
15  if (md_.has_value()) {
16  return *md_;
17  }
18 
20  "There was an error while calling moduleDescription().\n"}
21  << "The moduleDescription() base-class member function cannot be called\n"
22  "during module construction. To determine which module is "
23  "responsible\n"
24  "for calling it, find the '<module type>:<module "
25  "label>@Construction'\n"
26  "tag in the message prefix above. Please contact artists@fnal.gov\n"
27  "for guidance.\n";
28  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
void hit::GausHitFinder::produce ( art::Event evt,
art::ProcessingFrame const &   
)
overrideprivatevirtual

Implements art::SharedProducer.

Definition at line 216 of file GausHitFinder_module.cc.

References recob::Wire::Channel(), geo::GeometryCore::ChannelToWire(), recob::HitCreator::copy(), DEFINE_ART_MODULE, recob::HitCollectionCreator::emplace_back(), fAllHitsInstanceName, fAreaMethod, fAreaNormsVec, fCalDataModuleLabel, fChi2, fChi2NDF, fEventCount, fFillHists, fFilterHits, fFirstChi2, fHitFilterAlg, fHitFinderToolVec, fLongMaxHitsVec, fLongPulseWidthVec, fMaxMultiHit, fPeakFitterTool, fPulseHeightCuts, fPulseRatioCuts, fPulseWidthCuts, art::ProductRetriever::getByLabel(), art::left(), recob::HitCreator::move(), lar::sparse_vector< T >::n_ranges(), reco_tool::IPeakFitter::PeakFitParams_t::peakAmplitude, reco_tool::IPeakFitter::PeakFitParams_t::peakAmplitudeError, reco_tool::IPeakFitter::PeakFitParams_t::peakCenter, reco_tool::IPeakFitter::PeakFitParams_t::peakCenterError, reco_tool::IPeakFitter::PeakFitParams_t::peakSigma, reco_tool::IPeakFitter::PeakFitParams_t::peakSigmaError, geo::PlaneID::Plane, recob::HitCollectionCreator::put_into(), lar::sparse_vector< T >::range(), art::right(), recob::Wire::SignalROI(), and tmp.

217  {
218  unsigned int count = fEventCount.fetch_add(1);
219  //==================================================================================================
220 
221  TH1::AddDirectory(kFALSE);
222 
223  // Instantiate and Reset a stop watch
224  //TStopwatch StopWatch;
225  //StopWatch.Reset();
226 
227  // ################################
228  // ### Calling Geometry service ###
229  // ################################
231 
232  // ###############################################
233  // ### Making a ptr vector to put on the event ###
234  // ###############################################
235  // this contains the hit collection
236  // and its associations to wires and raw digits
237  recob::HitCollectionCreator allHitCol(evt, fAllHitsInstanceName, true, false);
238 
239  // Handle the filtered hits collection...
240  recob::HitCollectionCreator hcol(evt, "", true, false);
241  recob::HitCollectionCreator* filteredHitCol = 0;
242 
243  if (fFilterHits) filteredHitCol = &hcol;
244 
245  //store in a thread safe way
246  struct hitstruct {
247  recob::Hit hit_tbb;
248  art::Ptr<recob::Wire> wire_tbb;
249  };
250 
251  tbb::concurrent_vector<hitstruct> hitstruct_vec;
252  tbb::concurrent_vector<hitstruct> filthitstruct_vec;
253 
254  // if (fAllHitsInstanceName != "") filteredHitCol = &hcol;
255 
256  // ##########################################
257  // ### Reading in the Wire List object(s) ###
258  // ##########################################
260  evt.getByLabel(fCalDataModuleLabel, wireVecHandle);
261 
262  //#################################################
263  //### Set the charge determination method ###
264  //### Default is to compute the normalized area ###
265  //#################################################
266  std::function<double(double, double, double, double, int, int)> chargeFunc =
267  [](double /* peakMean */,
268  double peakAmp,
269  double peakWidth,
270  double areaNorm,
271  int /* low */,
272  int /* hi */) { return std::sqrt(2 * TMath::Pi()) * peakAmp * peakWidth / areaNorm; };
273 
274  //##############################################
275  //### Alternative is to integrate over pulse ###
276  //##############################################
277  if (fAreaMethod == 0)
278  chargeFunc = [](double peakMean,
279  double peakAmp,
280  double peakWidth,
281  double /* areaNorm */,
282  int low,
283  int hi) {
284  double charge(0);
285  for (int sigPos = low; sigPos < hi; sigPos++)
286  charge += peakAmp * TMath::Gaus(sigPos, peakMean, peakWidth);
287  return charge;
288  };
289 
290  //##############################
291  //### Looping over the wires ###
292  //##############################
293  //for(size_t wireIter = 0; wireIter < wireVecHandle->size(); wireIter++)
294  //{
295  tbb::parallel_for(
296  static_cast<std::size_t>(0),
297  wireVecHandle->size(),
298  [&](size_t& wireIter) {
299  // ####################################
300  // ### Getting this particular wire ###
301  // ####################################
302  art::Ptr<recob::Wire> wire(wireVecHandle, wireIter);
303 
304  // --- Setting Channel Number and Signal type ---
305 
306  raw::ChannelID_t channel = wire->Channel();
307 
308  // get the WireID for this hit
309  std::vector<geo::WireID> wids = geom->ChannelToWire(channel);
310  // for now, just take the first option returned from ChannelToWire
311  geo::WireID wid = wids[0];
312  // We need to know the plane to look up parameters
313  geo::PlaneID::PlaneID_t plane = wid.Plane;
314 
315  // ----------------------------------------------------------
316  // -- Setting the appropriate signal widths and thresholds --
317  // -- for the right plane. --
318  // ----------------------------------------------------------
319 
320  // #################################################
321  // ### Set up to loop over ROI's for this wire ###
322  // #################################################
323  const recob::Wire::RegionsOfInterest_t& signalROI = wire->SignalROI();
324 
325  // for (const auto& range : signalROI.get_ranges()) {
326  tbb::parallel_for(
327  static_cast<std::size_t>(0),
328  signalROI.n_ranges(),
329  [&](size_t& rangeIter) {
330  const auto& range = signalROI.range(rangeIter);
331  // ROI start time
332  raw::TDCtick_t roiFirstBinTick = range.begin_index();
333 
334  // ###########################################################
335  // ### Scan the waveform and find candidate peaks + merge ###
336  // ###########################################################
337 
340 
341  fHitFinderToolVec.at(plane)->findHitCandidates(
342  range, 0, channel, count, hitCandidateVec);
343  fHitFinderToolVec.at(plane)->MergeHitCandidates(
344  range, hitCandidateVec, mergedCandidateHitVec);
345 
346  // #######################################################
347  // ### Lets loop over the pulses we found on this wire ###
348  // #######################################################
349 
350  for (auto& mergedCands : mergedCandidateHitVec) {
351  int startT = mergedCands.front().startTick;
352  int endT = mergedCands.back().stopTick;
353 
354  // ### Putting in a protection in case things went wrong ###
355  // ### In the end, this primarily catches the case where ###
356  // ### a fake pulse is at the start of the ROI ###
357  if (endT - startT < 5) continue;
358 
359  // #######################################################
360  // ### Clearing the parameter vector for the new pulse ###
361  // #######################################################
362 
363  // === Setting the number of Gaussians to try ===
364  int nGausForFit = mergedCands.size();
365 
366  // ##################################################
367  // ### Calling the function for fitting Gaussians ###
368  // ##################################################
369  double chi2PerNDF(0.);
370  int NDF(1);
371  /*stand alone
372  reco_tool::IPeakFitter::PeakParamsVec peakParamsVec(nGausForFit);
373  */
375 
376  // #######################################################
377  // ### If # requested Gaussians is too large then punt ###
378  // #######################################################
379  if (mergedCands.size() <= fMaxMultiHit) {
380  fPeakFitterTool->findPeakParameters(
381  range.data(), mergedCands, peakParamsVec, chi2PerNDF, NDF);
382 
383  // If the chi2 is infinite then there is a real problem so we bail
384  if (!(chi2PerNDF < std::numeric_limits<double>::infinity())) {
385  chi2PerNDF = 2. * fChi2NDF;
386  NDF = 2;
387  }
388 
389  if (fFillHists) fFirstChi2->Fill(chi2PerNDF);
390  }
391 
392  // #######################################################
393  // ### If too large then force alternate solution ###
394  // ### - Make n hits from pulse train where n will ###
395  // ### depend on the fhicl parameter fLongPulseWidth ###
396  // ### Also do this if chi^2 is too large ###
397  // #######################################################
398  if (mergedCands.size() > fMaxMultiHit || nGausForFit * chi2PerNDF > fChi2NDF) {
399  int longPulseWidth = fLongPulseWidthVec.at(plane);
400  int nHitsThisPulse = (endT - startT) / longPulseWidth;
401 
402  if (nHitsThisPulse > fLongMaxHitsVec.at(plane)) {
403  nHitsThisPulse = fLongMaxHitsVec.at(plane);
404  longPulseWidth = (endT - startT) / nHitsThisPulse;
405  }
406 
407  if (nHitsThisPulse * longPulseWidth < endT - startT) nHitsThisPulse++;
408 
409  int firstTick = startT;
410  int lastTick = std::min(firstTick + longPulseWidth, endT);
411 
412  peakParamsVec.clear();
413  nGausForFit = nHitsThisPulse;
414  NDF = 1.;
415  chi2PerNDF = chi2PerNDF > fChi2NDF ? chi2PerNDF : -1.;
416 
417  for (int hitIdx = 0; hitIdx < nHitsThisPulse; hitIdx++) {
418  // This hit parameters
419  double sumADC =
420  std::accumulate(range.begin() + firstTick, range.begin() + lastTick, 0.);
421  double peakSigma = (lastTick - firstTick) / 3.; // Set the width...
422  double peakAmp = 0.3989 * sumADC / peakSigma; // Use gaussian formulation
423  double peakMean = (firstTick + lastTick) / 2.;
424 
425  // Store hit params
427 
428  peakParams.peakCenter = peakMean;
429  peakParams.peakCenterError = 0.1 * peakMean;
430  peakParams.peakSigma = peakSigma;
431  peakParams.peakSigmaError = 0.1 * peakSigma;
432  peakParams.peakAmplitude = peakAmp;
433  peakParams.peakAmplitudeError = 0.1 * peakAmp;
434 
435  peakParamsVec.push_back(peakParams);
436 
437  // set for next loop
438  firstTick = lastTick;
439  lastTick = std::min(lastTick + longPulseWidth, endT);
440  }
441  }
442 
443  // #######################################################
444  // ### Loop through returned peaks and make recob hits ###
445  // #######################################################
446 
447  int numHits(0);
448 
449  // Make a container for what will be the filtered collection
450  std::vector<recob::Hit> filteredHitVec;
451 
452  for (const auto& peakParams : peakParamsVec) {
453  // Extract values for this hit
454  float peakAmp = peakParams.peakAmplitude;
455  float peakMean = peakParams.peakCenter;
456  float peakWidth = peakParams.peakSigma;
457 
458  // Place one bit of protection here
459  if (std::isnan(peakAmp)) {
460  std::cout << "**** hit peak amplitude is a nan! Channel: " << channel
461  << ", start tick: " << startT << std::endl;
462  continue;
463  }
464 
465  // Extract errors
466  float peakAmpErr = peakParams.peakAmplitudeError;
467  float peakMeanErr = peakParams.peakCenterError;
468  float peakWidthErr = peakParams.peakSigmaError;
469 
470  // ### Charge ###
471  float charge =
472  chargeFunc(peakMean, peakAmp, peakWidth, fAreaNormsVec[plane], startT, endT);
473  ;
474  float chargeErr =
475  std::sqrt(TMath::Pi()) * (peakAmpErr * peakWidthErr + peakWidthErr * peakAmpErr);
476 
477  // ### limits for getting sums
478  std::vector<float>::const_iterator sumStartItr = range.begin() + startT;
479  std::vector<float>::const_iterator sumEndItr = range.begin() + endT;
480 
481  // ### Sum of ADC counts
482  double sumADC = std::accumulate(sumStartItr, sumEndItr, 0.);
483 
484  // ok, now create the hit
485  recob::HitCreator hitcreator(
486  *wire, // wire reference
487  wid, // wire ID
488  startT + roiFirstBinTick, // start_tick TODO check
489  endT + roiFirstBinTick, // end_tick TODO check
490  peakWidth, // rms
491  peakMean + roiFirstBinTick, // peak_time
492  peakMeanErr, // sigma_peak_time
493  peakAmp, // peak_amplitude
494  peakAmpErr, // sigma_peak_amplitude
495  charge, // hit_integral
496  chargeErr, // hit_sigma_integral
497  sumADC, // summedADC FIXME
498  nGausForFit, // multiplicity
499  numHits, // local_index TODO check that the order is correct
500  chi2PerNDF, // goodness_of_fit
501  NDF // dof
502  );
503 
504  if (filteredHitCol) filteredHitVec.push_back(hitcreator.copy());
505 
506  const recob::Hit hit(hitcreator.move());
507 
508  // This loop will store ALL hits
509  hitstruct tmp{std::move(hit), wire};
510  hitstruct_vec.push_back(std::move(tmp));
511 
512  numHits++;
513  } // <---End loop over gaussians
514 
515  // Should we filter hits?
516  if (filteredHitCol && !filteredHitVec.empty()) {
517  // #######################################################################
518  // Is all this sorting really necessary? Would it be faster to just loop
519  // through the hits and perform simple cuts on amplitude and width on a
520  // hit-by-hit basis, either here in the module (using fPulseHeightCuts and
521  // fPulseWidthCuts) or in HitFilterAlg?
522  // #######################################################################
523 
524  // Sort in ascending peak height
525  std::sort(filteredHitVec.begin(),
526  filteredHitVec.end(),
527  [](const auto& left, const auto& right) {
528  return left.PeakAmplitude() > right.PeakAmplitude();
529  });
530 
531  // Reject if the first hit fails the PH/wid cuts
532  if (filteredHitVec.front().PeakAmplitude() < fPulseHeightCuts.at(plane) ||
533  filteredHitVec.front().RMS() < fPulseWidthCuts.at(plane))
534  filteredHitVec.clear();
535 
536  // Now check other hits in the snippet
537  if (filteredHitVec.size() > 1) {
538  // The largest pulse height will now be at the front...
539  float largestPH = filteredHitVec.front().PeakAmplitude();
540 
541  // Find where the pulse heights drop below threshold
542  float threshold(fPulseRatioCuts.at(plane));
543 
545  std::find_if(filteredHitVec.begin(),
546  filteredHitVec.end(),
547  [largestPH, threshold](const auto& hit) {
548  return hit.PeakAmplitude() < 8. &&
549  hit.PeakAmplitude() / largestPH < threshold;
550  });
551 
552  // Shrink to fit
553  if (smallHitItr != filteredHitVec.end())
554  filteredHitVec.resize(std::distance(filteredHitVec.begin(), smallHitItr));
555 
556  // Resort in time order
557  std::sort(filteredHitVec.begin(),
558  filteredHitVec.end(),
559  [](const auto& left, const auto& right) {
560  return left.PeakTime() < right.PeakTime();
561  });
562  }
563 
564  // Copy the hits we want to keep to the filtered hit collection
565  for (const auto& filteredHit : filteredHitVec)
566  if (!fHitFilterAlg || fHitFilterAlg->IsGoodHit(filteredHit)) {
567  hitstruct tmp{std::move(filteredHit), wire};
568  filthitstruct_vec.push_back(std::move(tmp));
569  }
570 
571  if (fFillHists) fChi2->Fill(chi2PerNDF);
572  }
573  } //<---End loop over merged candidate hits
574  } //<---End looping over ROI's
575  ); //end tbb parallel for
576  } //<---End looping over all the wires
577  ); //end tbb parallel for
578 
579  for (size_t i = 0; i < hitstruct_vec.size(); i++) {
580  allHitCol.emplace_back(hitstruct_vec[i].hit_tbb, hitstruct_vec[i].wire_tbb);
581  }
582 
583  for (size_t j = 0; j < filthitstruct_vec.size(); j++) {
584  filteredHitCol->emplace_back(filthitstruct_vec[j].hit_tbb, filthitstruct_vec[j].wire_tbb);
585  }
586 
587  //==================================================================================================
588  // End of the event -- move the hit collection and the associations into the event
589 
590  if (filteredHitCol) {
591 
592  // If we filtered hits but no instance name was
593  // specified for the "all hits" collection, then
594  // only save the filtered hits to the event
595  if (fAllHitsInstanceName == "") {
596  filteredHitCol->put_into(evt);
597 
598  // otherwise, save both
599  }
600  else {
601  filteredHitCol->put_into(evt);
602  allHitCol.put_into(evt);
603  }
604  }
605  else {
606  allHitCol.put_into(evt);
607  }
608 
609  // Keep track of events processed
610  //fEventCount++;
611 
612  } // End of produce()
intermediate_table::iterator iterator
const datarange_t & range(size_t i) const
Returns the i-th non-void range (zero-based)
size_type n_ranges() const
Returns the internal list of non-void ranges.
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:102
std::vector< WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
std::unique_ptr< HitFilterAlg > fHitFilterAlg
algorithm used to filter out noise hits
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:464
intermediate_table::const_iterator const_iterator
Float_t tmp
Definition: plot.C:35
const std::vector< int > fLongPulseWidthVec
Sets width of hits used to describe long pulses.
std::unique_ptr< reco_tool::IPeakFitter > fPeakFitterTool
Perform fit to candidate peaks.
const int fAreaMethod
Type of area calculation.
const std::string fCalDataModuleLabel
const std::vector< float > fPulseWidthCuts
int TDCtick_t
Type representing a TDC tick.
Definition: RawTypes.h:25
Class managing the creation of a new recob::Hit object.
Definition: HitCreator.h:87
A class handling a collection of hits and its associations.
Definition: HitCreator.h:481
std::atomic< size_t > fEventCount
const size_t fMaxMultiHit
maximum hits for multi fit
const std::vector< int > fLongMaxHitsVec
Maximum number hits on a really long pulse train.
void emplace_back(recob::Hit &&hit, art::Ptr< recob::Wire > const &wire=art::Ptr< recob::Wire >(), art::Ptr< raw::RawDigit > const &digits=art::Ptr< raw::RawDigit >())
Adds the specified hit to the data collection.
Definition: HitCreator.cxx:286
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:481
void put_into(art::Event &)
Moves the data into an event.
Definition: HitCreator.h:614
Detector simulation of raw signals on wires.
std::vector< PeakFitParams_t > PeakParamsVec
Definition: IPeakFitter.h:34
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:94
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
const std::vector< float > fPulseRatioCuts
const std::vector< float > fPulseHeightCuts
maximum Chisquared / NDF allowed for a hit to be saved
const std::string fAllHitsInstanceName
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:46
const std::vector< double > fAreaNormsVec
factors for converting area to same units as peak height
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
std::vector< HitCandidateVec > MergeHitCandidateVec
Definition: fwd.h:26
std::vector< std::unique_ptr< reco_tool::ICandidateHitFinder > > fHitFinderToolVec
For finding candidate hits.
std::vector< HitCandidate > HitCandidateVec
void art::Modifier::registerProducts ( ProductDescriptions productsToRegister)
inherited

Definition at line 16 of file Modifier.cc.

References art::ModuleBase::moduleDescription(), and art::ProductRegistryHelper::registerProducts().

17  {
18  ProductRegistryHelper::registerProducts(productsToRegister,
20  }
void registerProducts(ProductDescriptions &productsToRegister, ModuleDescription const &md)
ModuleDescription const & moduleDescription() const
Definition: ModuleBase.cc:13
template<BranchType BT = InEvent, typename... T>
void art::detail::SharedModule::serialize ( T const &  ...)
protectedinherited
template<BranchType , typename... T>
void art::detail::SharedModule::serialize ( T const &...  resources)
inherited

Definition at line 83 of file SharedModule.h.

References art::detail::SharedModule::serialize_for_resource().

84  {
85  serialize_for_resource(resources...);
86  }
void serialize_for_resource(T const &...t)
Definition: SharedModule.h:52
template<BranchType BT = InEvent, typename... T>
void art::detail::SharedModule::serializeExternal ( T const &  ...)
protectedinherited
template<BranchType , typename... T>
void art::detail::SharedModule::serializeExternal ( T const &...  resources)
inherited

Definition at line 90 of file SharedModule.h.

References art::detail::SharedModule::serialize_for_external_resource().

91  {
92  serialize_for_external_resource(resources...);
93  }
void serialize_for_external_resource(T const &...t)
Definition: SharedModule.h:65
SerialTaskQueueChain * art::detail::SharedModule::serialTaskQueueChain ( ) const
inherited

Definition at line 22 of file SharedModule.cc.

References art::detail::SharedModule::chain_.

23  {
24  return chain_.get();
25  }
std::unique_ptr< hep::concurrency::SerialTaskQueueChain > chain_
Definition: SharedModule.h:78
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  md)
inherited

Definition at line 31 of file ModuleBase.cc.

References art::ModuleBase::md_.

32  {
33  md_ = md;
34  }
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
std::set< std::string > const & art::detail::SharedModule::sharedResources ( ) const
inherited

Definition at line 28 of file SharedModule.cc.

References art::detail::SharedModule::resourceNames_.

29  {
30  return resourceNames_;
31  }
std::set< std::string > resourceNames_
Definition: SharedModule.h:76
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited

Definition at line 49 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::sortConsumables().

50  {
51  // Now that we know we have seen all the consumes declarations,
52  // sort the results for fast lookup later.
53  collector_.sortConsumables(current_process_name);
54  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
void sortConsumables(std::string const &current_process_name)

Member Data Documentation

const std::string hit::GausHitFinder::fAllHitsInstanceName
private

Definition at line 76 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

const int hit::GausHitFinder::fAreaMethod
private

Type of area calculation.

Definition at line 82 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

const std::vector<double> hit::GausHitFinder::fAreaNormsVec
private

factors for converting area to same units as peak height

Definition at line 84 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

const std::string hit::GausHitFinder::fCalDataModuleLabel
private

Definition at line 75 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

TH1F* hit::GausHitFinder::fChi2
private

Definition at line 103 of file GausHitFinder_module.cc.

Referenced by beginJob(), and produce().

const double hit::GausHitFinder::fChi2NDF
private

Definition at line 85 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

std::atomic<size_t> hit::GausHitFinder::fEventCount {0}
private

Definition at line 91 of file GausHitFinder_module.cc.

Referenced by produce().

const bool hit::GausHitFinder::fFillHists
private

Definition at line 73 of file GausHitFinder_module.cc.

Referenced by beginJob(), GausHitFinder(), and produce().

const bool hit::GausHitFinder::fFilterHits
private

Definition at line 72 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

TH1F* hit::GausHitFinder::fFirstChi2
private

Definition at line 102 of file GausHitFinder_module.cc.

Referenced by beginJob(), and produce().

std::unique_ptr<HitFilterAlg> hit::GausHitFinder::fHitFilterAlg
private

algorithm used to filter out noise hits

Definition at line 99 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

std::vector<std::unique_ptr<reco_tool::ICandidateHitFinder> > hit::GausHitFinder::fHitFinderToolVec
private

For finding candidate hits.

Definition at line 95 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

const std::vector<int> hit::GausHitFinder::fLongMaxHitsVec
private

Maximum number hits on a really long pulse train.

Definition at line 78 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

const std::vector<int> hit::GausHitFinder::fLongPulseWidthVec
private

Sets width of hits used to describe long pulses.

Definition at line 79 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

const size_t hit::GausHitFinder::fMaxMultiHit
private

maximum hits for multi fit

Definition at line 81 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

std::unique_ptr<reco_tool::IPeakFitter> hit::GausHitFinder::fPeakFitterTool
private

Perform fit to candidate peaks.

Definition at line 97 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

const std::vector<float> hit::GausHitFinder::fPulseHeightCuts
private

maximum Chisquared / NDF allowed for a hit to be saved

Definition at line 87 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

const std::vector<float> hit::GausHitFinder::fPulseRatioCuts
private

Definition at line 89 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().

const std::vector<float> hit::GausHitFinder::fPulseWidthCuts
private

Definition at line 88 of file GausHitFinder_module.cc.

Referenced by GausHitFinder(), and produce().


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