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

Classes

struct  Config
 

Public Types

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

Public Member Functions

 ParticleDecayId (Parameters const &p)
 
 ParticleDecayId (ParticleDecayId const &)=delete
 
 ParticleDecayId (ParticleDecayId &&)=delete
 
ParticleDecayIdoperator= (ParticleDecayId const &)=delete
 
ParticleDecayIdoperator= (ParticleDecayId &&)=delete
 
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 &e) override
 
bool DetectDecay (detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const std::vector< recob::Wire > &wires, const std::vector< art::Ptr< recob::Hit >> &hits, std::map< size_t, TVector3 > &spoints, std::vector< std::pair< TVector3, double >> &result)
 

Private Attributes

PointIdAlg fPointIdAlg
 
art::InputTag fWireProducerLabel
 
art::InputTag fTrackModuleLabel
 
double fRoiThreshold
 
double fPointThreshold
 
int fSkipView
 

Detailed Description

Definition at line 47 of file ParticleDecayId_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

nnet::ParticleDecayId::ParticleDecayId ( ParticleDecayId::Parameters const &  config)
explicit

Definition at line 105 of file ParticleDecayId_module.cc.

References fPointIdAlg, fPointThreshold, fRoiThreshold, fSkipView, fTrackModuleLabel, and fWireProducerLabel.

106  : EDProducer{config}
107  , fPointIdAlg(config().PointIdAlg())
108  , fWireProducerLabel(config().WireLabel())
109  , fTrackModuleLabel(config().TrackModuleLabel())
110  , fRoiThreshold(config().RoiThreshold())
111  , fPointThreshold(config().PointThreshold())
112  , fSkipView(config().SkipView())
113  {
114  produces<std::vector<recob::Vertex>>();
115  produces<art::Assns<recob::Vertex, recob::Track>>();
116  }
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.cc:6
nnet::ParticleDecayId::ParticleDecayId ( ParticleDecayId const &  )
delete
nnet::ParticleDecayId::ParticleDecayId ( ParticleDecayId &&  )
delete

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 &)
bool nnet::ParticleDecayId::DetectDecay ( detinfo::DetectorClocksData const &  clockData,
detinfo::DetectorPropertiesData const &  detProp,
const std::vector< recob::Wire > &  wires,
const std::vector< art::Ptr< recob::Hit >> &  hits,
std::map< size_t, TVector3 > &  spoints,
std::vector< std::pair< TVector3, double >> &  result 
)
private

Definition at line 179 of file ParticleDecayId_module.cc.

References c1, d, DEFINE_ART_MODULE, fPointIdAlg, fPointThreshold, fRoiThreshold, hits(), nnet::PointIdAlg::predictIdVector(), img::DataProviderAlg::setWireDriftData(), and util::size().

Referenced by produce().

185  {
186  const size_t nviews = 3;
187 
188  std::vector<art::Ptr<recob::Hit>> wire_drift[nviews];
189  for (size_t i = 0; i < hits.size(); ++i) // split hits between views
190  {
191  wire_drift[hits[i]->View()].push_back(hits[i]);
192  }
193 
194  std::vector<float> outputs[nviews];
195  for (size_t v = 0; v < nviews;
196  ++v) // calculate nn outputs for each view (hopefully not changing cryo/tpc many times)
197  {
198  outputs[v].resize(wire_drift[v].size(), 0);
199  for (size_t i = 0; i < wire_drift[v].size(); ++i) {
200  int tpc = wire_drift[v][i]->WireID().TPC;
201  int cryo = wire_drift[v][i]->WireID().Cryostat;
202 
203  fPointIdAlg.setWireDriftData(clockData, detProp, wires, v, tpc, cryo);
204 
205  outputs[v][i] = fPointIdAlg.predictIdVector(wire_drift[v][i]->WireID().Wire,
206  wire_drift[v][i]->PeakTime())[0]; // p(decay)
207  }
208  }
209 
210  std::vector<std::pair<size_t, float>> candidates2d[nviews];
211  std::vector<std::pair<TVector3, float>> candidates3d[nviews];
212  for (size_t v = 0; v < nviews; ++v) {
213  size_t idx = 0;
214  while (idx < outputs[v].size()) {
215  if (outputs[v][idx] > fRoiThreshold) {
216  size_t ci = idx;
217  float max = outputs[v][idx];
218  ++idx;
219 
220  while ((idx < outputs[v].size()) && (outputs[v][idx] > fRoiThreshold)) {
221  if (outputs[v][idx] > max) {
222  max = outputs[v][idx];
223  ci = idx;
224  }
225  ++idx;
226  }
227  candidates2d[v].emplace_back(ci, max);
228  candidates3d[v].emplace_back(spoints[wire_drift[v][ci].key()], max);
229  }
230  else
231  ++idx;
232  }
233  }
234 
235  double min_dist =
236  2.0; // [cm], threshold for today to distinguish between two different candidates,
237  // if belo threshold, then use 3D point corresponding to higher cnn output
238 
239  // need coincidence of high cnn out in two views, then look if there is another close candidate
240  // and again select by cnn output value, would like to have few strong candidates
241  bool found = false;
242  for (size_t v = 0; v < nviews - 1; ++v) {
243  for (size_t i = 0; i < candidates3d[v].size(); ++i) {
244  TVector3 c0(candidates3d[v][i].first);
245  float p0 = candidates3d[v][i].second;
246 
247  for (size_t u = v + 1; u < nviews; ++u) {
248  for (size_t j = 0; j < candidates3d[v].size(); ++j) {
249  TVector3 c1(candidates3d[v][j].first);
250  float p1 = candidates3d[v][j].second;
251 
252  if ((c0 - c1).Mag() < min_dist) {
253  TVector3 c(c0);
254  if (p1 > p0) { c = c1; }
255  double p = p0 * p1;
256 
257  if (p > fPointThreshold) {
258  double d, dmin = min_dist;
259  size_t kmin = 0;
260  for (size_t k = 0; k < result.size(); ++k) {
261  d = (result[k].first - c).Mag();
262  if (d < dmin) {
263  dmin = d;
264  kmin = k;
265  }
266  }
267  if (dmin < min_dist) {
268  if (result[kmin].second < p) // replace previously found point
269  {
270  result[kmin].first = c;
271  result[kmin].second = p;
272  found = true;
273  }
274  }
275  else // nothing close in the list, add new point
276  {
277  result.emplace_back(c, p);
278  found = true;
279  }
280  } // if (p > fPointThreshold)
281  } // coincidence: points from views u and v are close
282  } // loop over points in view u
283  } // loop over views u
284  } // loop over points in view v
285  } // loop over views v
286  return found;
287  }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:101
std::vector< float > predictIdVector(unsigned int wire, float drift) const
calculate multi-class probabilities for [wire, drift] point
Definition: PointIdAlg.cxx:239
TCanvas * c1
Definition: plotHisto.C:7
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
Float_t d
Definition: plot.C:235
bool setWireDriftData(const detinfo::DetectorClocksData &clock_data, const detinfo::DetectorPropertiesData &det_prop, const std::vector< recob::Wire > &wires, unsigned int plane, unsigned int tpc, unsigned int cryo)
second_as<> second
Type of time stored in seconds, in double precision.
Definition: spacetime.h:82
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")
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
ParticleDecayId& nnet::ParticleDecayId::operator= ( ParticleDecayId const &  )
delete
ParticleDecayId& nnet::ParticleDecayId::operator= ( ParticleDecayId &&  )
delete
void nnet::ParticleDecayId::produce ( art::Event e)
overrideprivatevirtual

Implements art::EDProducer.

Definition at line 119 of file ParticleDecayId_module.cc.

References DetectDecay(), art::EventID::event(), fTrackModuleLabel, fWireProducerLabel, art::ProductRetriever::getValidHandle(), hits(), art::Event::id(), and art::Event::put().

120  {
121  std::cout << std::endl << "event " << evt.id().event() << std::endl;
122 
123  auto vtxs = std::make_unique<std::vector<recob::Vertex>>();
124  auto vtx2trk = std::make_unique<art::Assns<recob::Vertex, recob::Track>>();
125 
126  auto wireHandle = evt.getValidHandle<std::vector<recob::Wire>>(fWireProducerLabel);
127  auto trkListHandle = evt.getValidHandle<std::vector<recob::Track>>(fTrackModuleLabel);
128  auto spListHandle = evt.getValidHandle<std::vector<recob::SpacePoint>>(fTrackModuleLabel);
129 
130  art::FindManyP<recob::Hit> hitsFromTracks(trkListHandle, evt, fTrackModuleLabel);
131  art::FindManyP<recob::SpacePoint> spFromTracks(trkListHandle, evt, fTrackModuleLabel);
132  art::FindManyP<recob::Hit> hitsFromSPoints(spListHandle, evt, fTrackModuleLabel);
133 
134  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(evt);
135  auto const detProp =
137 
138  std::vector<std::pair<TVector3, double>> decays;
139  for (size_t i = 0; i < hitsFromTracks.size(); ++i) {
140  auto hits = hitsFromTracks.at(i);
141  auto spoints = spFromTracks.at(i);
142  if (hits.empty()) continue;
143 
144  std::map<size_t, TVector3> trkSpacePoints;
145  for (const auto& p : spoints) {
146  auto sp_hits = hitsFromSPoints.at(p.key());
147  for (const auto& h : sp_hits) {
148  trkSpacePoints[h.key()] = TVector3(p->XYZ()[0], p->XYZ()[1], p->XYZ()[2]);
149  }
150  }
151 
152  DetectDecay(clockData, detProp, *wireHandle, hits, trkSpacePoints, decays);
153  }
154 
155  double xyz[3];
156  for (const auto& p3d : decays) {
157 
158  xyz[0] = p3d.first.X();
159  xyz[1] = p3d.first.Y();
160  xyz[2] = p3d.first.Z();
161  std::cout << " detected: [" << xyz[0] << ", " << xyz[1] << ", " << xyz[2]
162  << "] p:" << p3d.second << std::endl;
163 
164  size_t vidx = vtxs->size();
165  vtxs->push_back(recob::Vertex(xyz, vidx));
166 
167  // to do: assn to eg. appropriate track
168  // selected among set of connected tracks
169  //art::Ptr<recob::Track> tptr(trkListHandle, i);
170  //art::Ptr<recob::Vertex> vptr(vid, vidx, evt.productGetter(vid));
171  //vtx2trk->addSingle(vptr, tptr);
172  }
173 
174  evt.put(std::move(vtxs));
175  evt.put(std::move(vtx2trk));
176  }
unsigned int event
Definition: DataStructs.h:627
Definition of vertex object for LArSoft.
Definition: Vertex.h:35
void hits()
Definition: readHits.C:15
bool DetectDecay(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const std::vector< recob::Wire > &wires, const std::vector< art::Ptr< recob::Hit >> &hits, std::map< size_t, TVector3 > &spoints, std::vector< std::pair< TVector3, double >> &result)
TCEvent evt
Definition: DataStructs.cxx:8
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
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

PointIdAlg nnet::ParticleDecayId::fPointIdAlg
private

Definition at line 94 of file ParticleDecayId_module.cc.

Referenced by DetectDecay(), and ParticleDecayId().

double nnet::ParticleDecayId::fPointThreshold
private

Definition at line 99 of file ParticleDecayId_module.cc.

Referenced by DetectDecay(), and ParticleDecayId().

double nnet::ParticleDecayId::fRoiThreshold
private

Definition at line 99 of file ParticleDecayId_module.cc.

Referenced by DetectDecay(), and ParticleDecayId().

int nnet::ParticleDecayId::fSkipView
private

Definition at line 101 of file ParticleDecayId_module.cc.

Referenced by ParticleDecayId().

art::InputTag nnet::ParticleDecayId::fTrackModuleLabel
private

Definition at line 97 of file ParticleDecayId_module.cc.

Referenced by ParticleDecayId(), and produce().

art::InputTag nnet::ParticleDecayId::fWireProducerLabel
private

Definition at line 96 of file ParticleDecayId_module.cc.

Referenced by ParticleDecayId(), and produce().


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