LArSoft  v09_90_00
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 47 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 353 of file LineMerger_module.cc.

References fClusterModuleLabel, fEndpointWindow, and fSlope.

354  : EDProducer{pset}
355  , fClusterModuleLabel(pset.get<std::string>("ClusterModuleLabel"))
356  , fSlope(pset.get<double>("Slope"))
357  , fEndpointWindow(pset.get<double>("EndpointWindow"))
358  {
359  produces<std::vector<recob::Cluster>>();
360  produces<art::Assns<recob::Cluster, recob::Hit>>();
361  }
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 533 of file LineMerger_module.cc.

References DEFINE_ART_MODULE, and fEndpointWindow.

Referenced by produce().

541  {
542 
544  float distance =
545  std::sqrt((pow(sclendwire - cl2startwire, 2) * 13.5) + pow(sclendtime - cl2starttime, 2));
546 
547  //not sure if this line is necessary--spitz
548  float distance2 =
549  std::sqrt((pow(sclstartwire - cl2endwire, 2) * 13.5) + pow(sclstarttime - cl2endtime, 2));
550 
551  //determine which way the two clusters should be merged. TY
552  int comp = 0;
553  if (distance < fEndpointWindow)
554  comp = 1;
555  else if (distance2 < fEndpointWindow)
556  comp = -1;
557  return comp;
558  }
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 364 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().

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

References util::abs(), and fSlope.

Referenced by produce().

525  {
526  double sl1 = atan(slope1);
527  double sl2 = atan(slope2);
528 
529  //the units of fSlope are radians
530  return std::abs(sl1 - sl2) < fSlope;
531  }
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 54 of file LineMerger_module.cc.

Referenced by LineMerger(), and produce().

double cluster::LineMerger::fEndpointWindow
private

Definition at line 56 of file LineMerger_module.cc.

Referenced by EndpointCompatibility(), and LineMerger().

double cluster::LineMerger::fSlope
private

Definition at line 55 of file LineMerger_module.cc.

Referenced by LineMerger(), and SlopeCompatibility().


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