LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
cluster::LineMerger Class Reference
Inheritance diagram for cluster::LineMerger:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Types

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

Public Member Functions

 LineMerger (fhicl::ParameterSet const &pset)
 
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)
 

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 ()
 

Private Member Functions

void produce (art::Event &evt) override
 
bool SlopeCompatibility (double slope1, double slope2)
 
int EndpointCompatibility (float sclstartwire, float sclstarttime, float sclendwire, float sclendtime, float cl2startwire, float cl2starttime, float cl2endwire, float cl2endtime)
 

Private Attributes

std::string fClusterModuleLabel
 
double fSlope
 
double fEndpointWindow
 

Detailed Description

Definition at line 48 of file LineMerger_module.cc.

Member Typedef Documentation

Definition at line 17 of file EDProducer.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

cluster::LineMerger::LineMerger ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 338 of file LineMerger_module.cc.

References fClusterModuleLabel, fEndpointWindow, and fSlope.

339  : EDProducer{pset}
340  , fClusterModuleLabel(pset.get<std::string>("ClusterModuleLabel"))
341  , fSlope(pset.get<double>("Slope"))
342  , fEndpointWindow(pset.get<double>("EndpointWindow"))
343  {
344  produces<std::vector<recob::Cluster>>();
345  produces<art::Assns<recob::Cluster, recob::Hit>>();
346  }
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.cc:6
std::string fClusterModuleLabel

Member Function Documentation

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::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")
int cluster::LineMerger::EndpointCompatibility ( float  sclstartwire,
float  sclstarttime,
float  sclendwire,
float  sclendtime,
float  cl2startwire,
float  cl2starttime,
float  cl2endwire,
float  cl2endtime 
)
private
Todo:
13.5 ticks/wire. need to make this detector agnostic–spitz

Definition at line 521 of file LineMerger_module.cc.

References DEFINE_ART_MODULE, and fEndpointWindow.

Referenced by produce().

529  {
530 
532  float distance =
533  std::sqrt((pow(sclendwire - cl2startwire, 2) * 13.5) + pow(sclendtime - cl2starttime, 2));
534 
535  //not sure if this line is necessary--spitz
536  float distance2 =
537  std::sqrt((pow(sclstartwire - cl2endwire, 2) * 13.5) + pow(sclstarttime - cl2endtime, 2));
538 
539  //determine which way the two clusters should be merged. TY
540  int comp = 0;
541  if (distance < fEndpointWindow)
542  comp = 1;
543  else if (distance2 < fEndpointWindow)
544  comp = -1;
545  return comp;
546  }
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 cluster::LineMerger::produce ( art::Event evt)
overrideprivatevirtual

Implements art::EDProducer.

Definition at line 349 of file LineMerger_module.cc.

References c2, util::CreateAssn(), EndpointCompatibility(), fClusterModuleLabel, art::ProductRetriever::getByLabel(), recob::Cluster::ID(), geo::kU, geo::kV, geo::kZ, art::Event::put(), recob::Cluster::Sentry, SlopeCompatibility(), and recob::Cluster::View().

350  {
351  // Get a Handle for the input Cluster object(s).
352  art::Handle<std::vector<recob::Cluster>> clusterVecHandle;
353  evt.getByLabel(fClusterModuleLabel, clusterVecHandle);
354 
355  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(evt);
356  auto const detProp =
358  util::GeometryUtilities const gser{*lar::providerFrom<geo::Geometry>(),
360  clockData,
361  detProp};
362 
363  constexpr size_t nViews = 3; // number of views we map
364 
365  //one vector for each view in the geometry (holds the index of the cluster)
366  std::array<std::vector<size_t>, nViews> ClsIndices;
367 
368  //vector with indicators for whether a cluster has been merged already
369  std::array<std::vector<int>, nViews> Cls_matches;
370 
371  // loop over the input Clusters
372  for (size_t i = 0; i < clusterVecHandle->size(); ++i) {
373 
374  //get a art::Ptr to each Cluster
375  art::Ptr<recob::Cluster> cl(clusterVecHandle, i);
376 
377  size_t view = 0;
378  switch (cl->View()) {
379  case geo::kU: view = 0; break;
380  case geo::kV: view = 1; break;
381  case geo::kZ: view = 2; break;
382  default: continue; // ignore this cluster and process the next one
383  } // end switch on view
384 
385  Cls_matches[view].push_back(0);
386  ClsIndices[view].push_back(i);
387  } // end loop over input clusters
388 
389  auto SuperClusters = std::make_unique<std::vector<recob::Cluster>>();
390  auto assn = std::make_unique<art::Assns<recob::Cluster, recob::Hit>>();
391 
392  // prepare the algorithm to compute the cluster characteristics;
393  // we use the "standard" one here; configuration would happen here,
394  // but we are using the default configuration for that algorithm
395  ClusterParamsImportWrapper<StandardClusterParamsAlg> ClusterParamAlgo;
396 
397  art::FindManyP<recob::Hit> fmh(clusterVecHandle, evt, fClusterModuleLabel);
398 
399  for (size_t i = 0; i < nViews; ++i) {
400 
401  int clustersfound = 0; // how many merged clusters found in each plane
402  int clsnum1 = 0;
403 
404  for (size_t c = 0; c < ClsIndices[i].size(); ++c) {
405  if (Cls_matches[i][clsnum1] == 1) {
406  ++clsnum1;
407  continue;
408  }
409 
410  // make a new cluster to put into the SuperClusters collection
411  // because we want to be able to adjust it later;
412  // use the hits associated with the current cluster
413  recob::Cluster const& StartingCluster = clusterVecHandle->at(ClsIndices[i][c]);
414  ClusterAndHitMerger cl1(StartingCluster, fmh.at(ClsIndices[i][c]));
415  const recob::Cluster::ID_t clusterID = StartingCluster.ID();
416 
417  Cls_matches[i][clsnum1] = 1;
418  ++clustersfound;
419 
420  int clsnum2 = 0;
421  for (size_t c2 = 0; c2 < ClsIndices[i].size(); ++c2) {
422 
423  if (Cls_matches[i][clsnum2] == 1) {
424  ++clsnum2;
425  continue;
426  }
427 
428  const recob::Cluster& cl2(clusterVecHandle->at(ClsIndices[i][c2]));
429 
430  // check that the slopes are the same
431  // added 13.5 ticks/wirelength in ArgoNeuT.
432  // \todo need to make this detector agnostic
433  // would be nice to have a LArProperties function that returns ticks/wire.
434  bool sameSlope = SlopeCompatibility(cl1.StartAngle(), cl2.EndAngle()) ||
435  SlopeCompatibility(cl1.EndAngle(), cl2.StartAngle());
436 
437  // check that the endpoints fall within a circular window of each other
438  // done in place of intercept matching
439  int sameEndpoint = EndpointCompatibility(cl1.StartWire(),
440  cl1.StartTick(),
441  cl1.EndWire(),
442  cl1.EndTick(),
443  cl2.StartWire(),
444  cl2.StartTick(),
445  cl2.EndWire(),
446  cl2.EndTick());
447 
448  // if the slopes and end points are the same, combine the clusters
449  // note that after 1 combination cl1 is no longer what we started
450  // with
451  if (sameSlope && (sameEndpoint != 0)) {
452  // combine the hit collections too
453  // (find the hits associated with this second cluster);
454  // take into account order when merging hits from two clusters: doc-1776
455  // if sameEndpoint is 1, the new hits come first
456  cl1.Add(cl2, fmh.at(ClsIndices[i][c2]), sameEndpoint == 1);
457  Cls_matches[i][clsnum2] = 1;
458  }
459 
460  ++clsnum2;
461  } // end loop over second cluster iterator
462 
463  // now add the final version of cl1 to the collection of SuperClusters
464  // and create the association between the super cluster and the hits
465  ClusterParamAlgo.ImportHits(gser, cl1.Hits());
466 
467  // create the recob::Cluster directly in the vector
468  SuperClusters->emplace_back(cl1.StartWire(), // start_wire
469  cl1.SigmaStartWire(), // sigma_start_wire
470  cl1.StartTick(), // start_tick
471  cl1.SigmaStartTick(), // sigma_start_tick
472  cl1.StartCharge(), // start_charge
473  cl1.StartAngle(), // start_angle
474  cl1.StartOpeningAngle(), // start_opening
475  cl1.EndWire(), // end_wire
476  cl1.SigmaEndWire(), // sigma_end_wire
477  cl1.EndTick(), // end_time
478  cl1.SigmaEndTick(), // sigma_end_tick
479  cl1.EndCharge(), // end_charge
480  cl1.EndAngle(), // end_angle
481  cl1.EndOpeningAngle(), // end_opening
482  ClusterParamAlgo.Integral().value(), // integral
483  ClusterParamAlgo.IntegralStdDev().value(), // integral_stddev
484  ClusterParamAlgo.SummedADC().value(), // summedADC
485  ClusterParamAlgo.SummedADCStdDev().value(), // summedADC_stddev
486  ClusterParamAlgo.NHits(), // n_hits
487  ClusterParamAlgo.MultipleHitDensity(), // multiple_hit_density
488  cl1.Width(), // width
489  clusterID, // ID
490  cl1.View(), // view
491  cl1.Plane(), // planeID
492  recob::Cluster::Sentry // sentry
493  );
494 
495  util::CreateAssn(evt, *SuperClusters, cl1.Hits(), *assn);
496  ++clsnum1;
497 
498  } // end loop over first cluster iterator
499  } // end loop over planes
500 
501  mf::LogVerbatim("Summary") << std::setfill('-') << std::setw(175) << "-" << std::setfill(' ');
502  mf::LogVerbatim("Summary") << "LineMerger Summary:";
503  for (size_t i = 0; i < SuperClusters->size(); ++i)
504  mf::LogVerbatim("Summary") << SuperClusters->at(i);
505 
506  evt.put(std::move(SuperClusters));
507  evt.put(std::move(assn));
508  }
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
int EndpointCompatibility(float sclstartwire, float sclstarttime, float sclendwire, float sclendtime, float cl2startwire, float cl2starttime, float cl2endwire, float cl2endtime)
Planes which measure V.
Definition: geo_types.h:132
Planes which measure Z direction.
Definition: geo_types.h:134
Set of hits with a 2D structure.
Definition: Cluster.h:69
static const SentryArgument_t Sentry
An instance of the sentry object.
Definition: Cluster.h:174
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: Event.h:77
Planes which measure U.
Definition: geo_types.h:131
TCanvas * c2
Definition: plot_hist.C:75
std::string fClusterModuleLabel
bool CreateAssn(art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t index=UINT_MAX)
Creates a single one-to-one association.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
ID_t ID() const
Identifier of this cluster.
Definition: Cluster.h:711
bool SlopeCompatibility(double slope1, double slope2)
int ID_t
Type of cluster ID.
Definition: Cluster.h:72
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
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
bool cluster::LineMerger::SlopeCompatibility ( double  slope1,
double  slope2 
)
private

Definition at line 512 of file LineMerger_module.cc.

References util::abs(), and fSlope.

Referenced by produce().

513  {
514  double sl1 = atan(slope1);
515  double sl2 = atan(slope2);
516 
517  //the units of fSlope are radians
518  return std::abs(sl1 - sl2) < fSlope;
519  }
constexpr auto abs(T v)
Returns the absolute value of the argument.
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

std::string cluster::LineMerger::fClusterModuleLabel
private

Definition at line 55 of file LineMerger_module.cc.

Referenced by LineMerger(), and produce().

double cluster::LineMerger::fEndpointWindow
private

Definition at line 57 of file LineMerger_module.cc.

Referenced by EndpointCompatibility(), and LineMerger().

double cluster::LineMerger::fSlope
private

Definition at line 56 of file LineMerger_module.cc.

Referenced by LineMerger(), and SlopeCompatibility().


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