LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
filter::MuonFilter Class Reference
Inheritance diagram for filter::MuonFilter:
art::EDFilter art::detail::Filter art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Types

using ModuleType = EDFilter
 
template<typename UserConfig >
using Table = Modifier::Table< UserConfig >
 

Public Member Functions

 MuonFilter (fhicl::ParameterSet 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 &)
 
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)
 

Static Public Attributes

static constexpr bool Pass {true}
 
static constexpr bool Fail {false}
 

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

bool filter (art::Event &evt) override
 

Private Attributes

std::string const fClusterModuleLabel
 
std::string const fLineModuleLabel
 
std::vector< double > const fCuts
 
double const fDCenter
 
double const fDelay
 
double const fTolerance
 
double const fMaxIon
 
double const fIonFactor
 
int const fDeltaWire
 allowed differences in wire number between 2 planes More...
 

Detailed Description

Definition at line 41 of file MuonFilter_module.cc.

Member Typedef Documentation

Definition at line 18 of file EDFilter.h.

template<typename UserConfig >
using art::detail::Filter::Table = Modifier::Table<UserConfig>
inherited

Definition at line 32 of file Filter.h.

Constructor & Destructor Documentation

filter::MuonFilter::MuonFilter ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 61 of file MuonFilter_module.cc.

References fClusterModuleLabel, fCuts, fDCenter, fDelay, fDeltaWire, fIonFactor, fLineModuleLabel, fMaxIon, and fTolerance.

62  : EDFilter{pset}
63  , fClusterModuleLabel{pset.get<std::string>("ClusterModuleLabel")}
64  , fLineModuleLabel{pset.get<std::string>("LineModuleLabel")}
65  , fCuts{pset.get<std::vector<double>>("Cuts")}
66  , fDCenter{pset.get<double>("DCenter")}
67  , fDelay{pset.get<double>("Delay")}
68  , fTolerance{pset.get<double>("Tolerance")}
69  , fMaxIon{pset.get<double>("MaxIon")}
70  , fIonFactor{pset.get<double>("IonFactor")}
71  , fDeltaWire{pset.get<int>("DeltaWire")}
72  {}
std::vector< double > const fCuts
int const fDeltaWire
allowed differences in wire number between 2 planes
std::string const fLineModuleLabel
std::string const fClusterModuleLabel
EDFilter(fhicl::ParameterSet const &pset)
Definition: EDFilter.cc:6

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::Filter::doBeginJob ( SharedResources const &  resources)
inherited

Definition at line 29 of file Filter.cc.

30  {
31  setupQueues(resources);
32  ProcessingFrame const frame{ScheduleID{}};
33  beginJobWithFrame(frame);
34  }
virtual void setupQueues(SharedResources const &)=0
virtual void beginJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Filter::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 72 of file Filter.cc.

References art::RunPrincipal::makeRun(), r, art::RunPrincipal::runID(), and art::ModuleContext::scheduleID().

73  {
74  auto r = rp.makeRun(mc, RangeSet::forRun(rp.runID()));
75  ProcessingFrame const frame{mc.scheduleID()};
76  bool const rc = beginRunWithFrame(r, frame);
77  r.commitProducts();
78  return rc;
79  }
TRandom r
Definition: spectrum.C:23
virtual bool beginRunWithFrame(Run &, ProcessingFrame const &)=0
static RangeSet forRun(RunID)
Definition: RangeSet.cc:51
bool art::detail::Filter::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 92 of file Filter.cc.

References art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::SubRunPrincipal::subRunID().

93  {
94  auto sr = srp.makeSubRun(mc, RangeSet::forSubRun(srp.subRunID()));
95  ProcessingFrame const frame{mc.scheduleID()};
96  bool const rc = beginSubRunWithFrame(sr, frame);
97  sr.commitProducts();
98  return rc;
99  }
static RangeSet forSubRun(SubRunID)
Definition: RangeSet.cc:57
virtual bool beginSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
void art::detail::Filter::doEndJob ( )
inherited

Definition at line 37 of file Filter.cc.

38  {
39  ProcessingFrame const frame{ScheduleID{}};
40  endJobWithFrame(frame);
41  }
virtual void endJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Filter::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 82 of file Filter.cc.

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

83  {
84  auto r = rp.makeRun(mc, rp.seenRanges());
85  ProcessingFrame const frame{mc.scheduleID()};
86  bool const rc = endRunWithFrame(r, frame);
87  r.commitProducts();
88  return rc;
89  }
TRandom r
Definition: spectrum.C:23
virtual bool endRunWithFrame(Run &, ProcessingFrame const &)=0
bool art::detail::Filter::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 102 of file Filter.cc.

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

103  {
104  auto sr = srp.makeSubRun(mc, srp.seenRanges());
105  ProcessingFrame const frame{mc.scheduleID()};
106  bool const rc = endSubRunWithFrame(sr, frame);
107  sr.commitProducts();
108  return rc;
109  }
virtual bool endSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
bool art::detail::Filter::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 112 of file Filter.cc.

References e, art::EventPrincipal::makeEvent(), and art::ModuleContext::scheduleID().

117  {
118  auto e = ep.makeEvent(mc);
119  ++counts_run;
120  ProcessingFrame const frame{mc.scheduleID()};
121  bool const rc = filterWithFrame(e, frame);
122  e.commitProducts(checkPutProducts_, &expectedProducts<InEvent>());
123  if (rc) {
124  ++counts_passed;
125  } else {
126  ++counts_failed;
127  }
128  return rc;
129  }
virtual bool filterWithFrame(Event &, ProcessingFrame const &)=0
bool const checkPutProducts_
Definition: Filter.h:75
Float_t e
Definition: plot.C:35
void art::detail::Filter::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited

Definition at line 51 of file Filter.cc.

52  {
53  ProcessingFrame const frame{ScheduleID{}};
55  }
TFile fb("Li6.root")
virtual void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
void art::detail::Filter::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 65 of file Filter.cc.

66  {
67  ProcessingFrame const frame{ScheduleID{}};
69  }
TFile fb("Li6.root")
virtual void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
void art::detail::Filter::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited

Definition at line 44 of file Filter.cc.

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

Definition at line 58 of file Filter.cc.

59  {
60  ProcessingFrame const frame{ScheduleID{}};
62  }
TFile fb("Li6.root")
virtual void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
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
bool filter::MuonFilter::filter ( art::Event evt)
overrideprivatevirtual
Todo:
: the delta wire numbers seem a bit magic,
Todo:
: should also change to using Geometry::ChannelsIntersect method

Implements art::EDFilter.

Definition at line 75 of file MuonFilter_module.cc.

References a1, a2, DEFINE_ART_MODULE, recob::Cluster::EndTick(), recob::Cluster::EndWire(), fClusterModuleLabel, fCuts, fDCenter, fDelay, fDeltaWire, fIonFactor, fLineModuleLabel, fMaxIon, fTolerance, art::ProductRetriever::getByLabel(), hits(), geo::GeometryCore::IntersectionPoint(), geo::GeometryCore::Nplanes(), recob::Cluster::Plane(), geo::GeometryCore::Plane(), art::PtrVector< T >::push_back(), art::PtrVector< T >::reserve(), detinfo::sampling_rate(), art::PtrVector< T >::size(), recob::Cluster::StartTick(), recob::Cluster::StartWire(), x1, x2, y1, and y2.

76  {
78  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(evt);
79  auto const detProp =
81 
82  // Drift Velocity in cm/us Sampling rate in ns
83  double drift = detProp.DriftVelocity(detProp.Efield(), detProp.Temperature()) *
84  sampling_rate(clockData) / 1000.0;
85 
86  // This code only works comparing 2 planes so for now these are the
87  // last induction plane and collection plane
88  geo::TPCID const tpcid{0, 0};
89  unsigned int vPlane = geom->Nplanes(tpcid) - 1;
90  geo::View_t vView = geom->Plane({tpcid, vPlane}).View();
91  unsigned int uPlane = vPlane - 1;
92  geo::View_t uView = geom->Plane({tpcid, uPlane}).View();
94  evt.getByLabel(fClusterModuleLabel, clustHandle);
95 
96  art::FindManyP<recob::Hit> fmh(clustHandle, evt, fClusterModuleLabel);
97 
99  clusters.reserve(clustHandle->size());
100  for (unsigned int i = 0; i < clustHandle->size(); ++i) {
101  clusters.push_back(art::Ptr<recob::Cluster>(clustHandle, i));
102  }
103  double indIon(0), colIon(0);
104  std::map<int, int> indMap;
105  std::map<int, int> colMap;
106  std::vector<std::pair<int, int>> rLook;
107  int matchNum = 1;
108  std::vector<std::vector<double>> tGoing;
109  std::vector<std::vector<double>> matched;
110  std::vector<double> pointTemp(6);
111  std::pair<int, int> pairTemp;
112  double ionSum(0.0);
113  for (size_t cluster = 0; cluster < clusters.size(); ++cluster) {
114  ionSum = 0.0;
115  std::vector<art::Ptr<recob::Hit>> hits = fmh.at(cluster);
116  for (unsigned int hit = 0; hit < hits.size(); hit++) {
117  ionSum += hits[hit]->PeakAmplitude();
118  }
119  if (clusters[cluster]->View() == uView)
120  indIon += ionSum;
121  else if (clusters[cluster]->View() == vView)
122  colIon += ionSum;
123  }
124  mf::LogInfo("MuonFilter") << "Ionizations: " << indIon << " " << colIon;
126  art::PtrVector<recob::Cluster> inductionSegments, collectionSegments;
127  evt.getByLabel(fLineModuleLabel, lines);
129  lineVec.reserve(lines->size());
130  for (unsigned int i = 0; i < lines->size(); ++i) {
131  lineVec.push_back(art::Ptr<recob::Cluster>(lines, i));
132  }
133 
134  for (size_t cl = 0; cl < clusters.size(); cl++) {
135  std::vector<art::Ptr<recob::Hit>> hits = fmh.at(cl);
136  if (hits.size() > 0 && clusters[cl]->View() == uView)
137  inductionSegments.push_back(clusters[cl]);
138  else if (hits.size() > 0 && clusters[cl]->View() == vView)
139  collectionSegments.push_back(clusters[cl]);
140  }
141 
142  art::FindManyP<recob::Hit> fmhi(inductionSegments, evt, fClusterModuleLabel);
143  art::FindManyP<recob::Hit> fmhc(collectionSegments, evt, fClusterModuleLabel);
144 
145  if (inductionSegments.size() == 0 || collectionSegments.size() == 0) {
146  mf::LogInfo("MuonFilter") << "At least one plane with no track";
147  }
148  else {
149 
150  for (unsigned int i = 0; i < inductionSegments.size(); i++) {
151  if (indMap[i]) continue;
152  for (unsigned int j = 0; j < collectionSegments.size(); j++) {
153  if (colMap[j]) continue;
154 
155  art::Ptr<recob::Cluster> indSeg = inductionSegments[i];
156  art::Ptr<recob::Cluster> colSeg = collectionSegments[j];
157 
158  std::vector<art::Ptr<recob::Hit>> indHits = fmhi.at(i);
159 
160  std::vector<art::Ptr<recob::Hit>> colHits = fmhc.at(j);
161 
162  double trk1Start = indSeg->StartTick() + fDelay;
163  double trk1End = indSeg->EndTick() + fDelay;
164  double trk2Start = colSeg->StartTick();
165  double trk2End = colSeg->EndTick();
166 
167  int uPos1 = indSeg->StartWire();
168  int uPos2 = indSeg->EndWire();
169  int const vPos1 = colSeg->StartWire();
170  int const vPos2 = colSeg->EndWire();
171  mf::LogInfo("MuonFilter") << "I J " << i << " " << j;
172  mf::LogInfo("MuonFilter")
173  << "Start/end " << indSeg->StartWire() << " " << colSeg->StartWire() << " "
174  << indSeg->EndWire() << " " << colSeg->EndWire();
175  mf::LogInfo("MuonFilter")
176  << "U's " << uPos1 << " " << uPos2 << "V's " << vPos1 << " " << vPos2 << " times "
177  << trk1End << " " << trk2End << " " << trk1Start << " " << trk2Start;
178  // need to have the corresponding endpoints matched
179  // check if they match in this order else switch
180  // really should use the crossing function and then have limits
181  // on distance outide tpc, or some other way of dealing with
182  // imperfect matches
183  if ((TMath::Abs(uPos1 - vPos1) > fDeltaWire || TMath::Abs(uPos2 - vPos2) > fDeltaWire) &&
184  (TMath::Abs(uPos1 - vPos2) <= fDeltaWire &&
185  TMath::Abs(uPos2 - vPos1) <= fDeltaWire)) {
186  mf::LogInfo("MuonFilter") << "Swapped1";
187  std::swap(uPos1, uPos2);
188  }
189  // check for time tolerance
190  if ((TMath::Abs(trk1Start - trk2Start) > fTolerance &&
191  TMath::Abs(trk1End - trk2End) > fTolerance) &&
192  (TMath::Abs(trk1Start - trk2End) < fTolerance &&
193  TMath::Abs(trk1End - trk2Start) < fTolerance)) {
194  std::swap(trk1Start, trk1End);
195  std::swap(uPos1, uPos2);
196  mf::LogInfo("MuonFilter") << "Swapped2";
197  }
198  mf::LogInfo("MuonFilter")
199  << "Times: " << trk1Start << " " << trk2Start << " " << trk1End << " " << trk2End;
200  // again needs to be fixed
204  if ((TMath::Abs(trk1Start - trk2Start) < fTolerance &&
205  TMath::Abs(trk1End - trk2End) < fTolerance) &&
206  (TMath::Abs(uPos1 - vPos1) <= fDeltaWire + 2 &&
207  TMath::Abs(uPos2 - vPos2) <= fDeltaWire + 2)) {
208  geo::WireID u_wID1(indSeg->Plane(), uPos1);
209  geo::WireID u_wID2(indSeg->Plane(), uPos2);
210  geo::WireID v_wID1(colSeg->Plane(), vPos1);
211  geo::WireID v_wID2(colSeg->Plane(), vPos2);
212 
213  double y1, y2, z1, z2;
214  geom->IntersectionPoint(u_wID1, v_wID1, y1, z1);
215  geom->IntersectionPoint(u_wID2, v_wID2, y2, z2);
216 
217  double const x1 = (trk1Start + trk2Start) / 2.0 * drift - fDCenter;
218  double const x2 = (trk1End + trk2End) / 2.0 * drift - fDCenter;
219  mf::LogInfo("MuonFilter") << "Match " << matchNum << " " << x1 << " " << y1 << " " << z1
220  << " " << x2 << " " << y2 << " " << z2;
221  bool x1edge, x2edge, y1edge, y2edge, z1edge, z2edge;
222  indMap[i] = matchNum;
223  colMap[j] = matchNum;
224  matchNum++;
225  pointTemp[0] = x1;
226  pointTemp[1] = y1;
227  pointTemp[2] = z1;
228  pointTemp[3] = x2;
229  pointTemp[4] = y2;
230  pointTemp[5] = z2;
231  x1edge = (TMath::Abs(x1) - fCuts[0] > 0);
232  x2edge = (TMath::Abs(x2) - fCuts[0] > 0);
233  y1edge = (TMath::Abs(y1) - fCuts[1] > 0);
234  y2edge = (TMath::Abs(y2) - fCuts[1] > 0);
235  z1edge = (TMath::Abs(z1) - fCuts[2] > 0);
236  z2edge = (TMath::Abs(z2) - fCuts[2] > 0);
237  if ((x1edge || y1edge || z1edge) && (x2edge || y2edge || z2edge)) {
238  tGoing.push_back(pointTemp);
239  mf::LogInfo("MuonFilter") << "outside Removed induction ion: ";
240 
241  for (size_t h = 0; h < indHits.size(); h++) {
242  mf::LogInfo("MuonFilter") << indHits[h]->PeakAmplitude() << " ";
243  indIon -= indHits[h]->PeakAmplitude();
244  }
245  mf::LogInfo("MuonFilter") << "Removed collection ion: ";
246 
247  for (size_t h = 0; h < colHits.size(); h++) {
248  mf::LogInfo("MuonFilter") << colHits[h]->PeakAmplitude() << " ";
249  colIon -= colHits[h]->PeakAmplitude();
250  }
251  mf::LogInfo("MuonFilter")
252  << "Ionization outside track I/C: " << indIon << " " << colIon;
253  }
254  else if ((x1edge || y1edge || z1edge) && !(x2edge || y2edge || z2edge) &&
255  (z2 - z1) > 1.2) {
256  tGoing.push_back(pointTemp);
257  mf::LogInfo("MuonFilter") << "stopping Removed induction ion: ";
258  for (size_t h = 0; h < indHits.size(); h++) {
259  mf::LogInfo("MuonFilter") << indHits[h]->PeakAmplitude() << " ";
260  indIon -= indHits[h]->PeakAmplitude();
261  }
262  mf::LogInfo("MuonFilter") << "Removed collection ion: ";
263  for (size_t h = 0; h < colHits.size(); h++) {
264  mf::LogInfo("MuonFilter") << colHits[h]->PeakAmplitude() << " ";
265  colIon -= colHits[h]->PeakAmplitude();
266  }
267  mf::LogInfo("MuonFilter")
268  << "Ionization outside track I/C: " << indIon << " " << colIon;
269  }
270  else {
271  pairTemp = std::make_pair(i, j);
272  mf::LogInfo("MuonFilter") << "rLook matchnum " << matchNum << " " << i << " " << j;
273  rLook.push_back(pairTemp);
274  matched.push_back(pointTemp);
275  }
276  break; // advances i, makes j=0;
277  }
278  }
279  }
280  }
281  // after all matches are made, remove deltas
282  double distance = 0;
283  for (unsigned int i = 0; i < tGoing.size(); i++)
284  for (unsigned int j = 0; j < matched.size(); j++) {
285  mf::LogInfo("MuonFilter") << tGoing.size() << " " << matched.size() << " " << i << " " << j;
286  // test if one is contained within the other in the z-direction
287  if ((tGoing[i][2] <= matched[j][2]) && (tGoing[i][5] >= matched[j][5])) {
288  TVector3 a1(&tGoing[i][0]);
289  TVector3 a2(&tGoing[i][3]);
290  TVector3 b1(&matched[j][0]);
291  distance = TMath::Abs((((a1 - a2).Cross((a1 - a2).Cross(a1 - b1))).Unit()).Dot(a1 - b1));
292  mf::LogInfo("MuonFilter") << "distance " << distance;
293  if (distance < 6) {
294  mf::LogInfo("MuonFilter")
295  << "Removing delta ion " << rLook.size() << " " << rLook[j].first << " " << matchNum;
296  std::vector<art::Ptr<recob::Hit>> temp = fmhi.at(rLook[j].first);
297  for (unsigned int h = 0; h < temp.size(); h++)
298  indIon -= temp[h]->PeakAmplitude();
299  temp = fmhc.at(rLook[j].second);
300  for (unsigned int h = 0; h < temp.size(); h++)
301  colIon -= temp[h]->PeakAmplitude();
302  }
303  }
304  }
305  mf::LogInfo("MuonFilter") << "indIon " << indIon * fIonFactor << " colIon " << colIon;
306  if ((indIon * fIonFactor > fMaxIon) && (colIon > fMaxIon))
307  return true;
308  else
309  return false;
310  }
void reserve(size_type n)
Definition: PtrVector.h:337
Float_t y1[n_points_granero]
Definition: compare.C:5
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
Float_t x1[n_points_granero]
Definition: compare.C:5
float StartWire() const
Returns the wire coordinate of the start of the cluster.
Definition: Cluster.h:276
std::vector< double > const fCuts
float EndTick() const
Returns the tick coordinate of the end of the cluster.
Definition: Cluster.h:331
geo::PlaneID Plane() const
Returns the plane ID this cluster lies on.
Definition: Cluster.h:717
Cluster finding and building.
Float_t y2[n_points_geant4]
Definition: compare.C:26
int const fDeltaWire
allowed differences in wire number between 2 planes
#define a2
PlaneGeo const & Plane(PlaneID const &planeid) const
Returns the specified wire.
std::string const fLineModuleLabel
void hits()
Definition: readHits.C:15
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:435
std::string const fClusterModuleLabel
reference at(size_type n)
Definition: PtrVector.h:359
The data type to uniquely identify a TPC.
Definition: geo_types.h:381
size_type size() const
Definition: PtrVector.h:302
Detector simulation of raw signals on wires.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
void swap(lar::deep_const_fwd_iterator_nested< CITER, INNERCONTEXTRACT > &a, lar::deep_const_fwd_iterator_nested< CITER, INNERCONTEXTRACT > &b)
unsigned int Nplanes(TPCID const &tpcid=tpc_zero) const
Returns the total number of planes in the specified TPC.
Definition: GeometryCore.h:977
bool IntersectionPoint(WireID const &wid1, WireID const &wid2, double &y, double &z) const
Returns the intersection point of two wires.
Float_t x2[n_points_geant4]
Definition: compare.C:26
second_as<> second
Type of time stored in seconds, in double precision.
Definition: spacetime.h:82
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
float StartTick() const
Returns the tick coordinate of the start of the cluster.
Definition: Cluster.h:287
#define a1
float EndWire() const
Returns the wire coordinate of the end of the cluster.
Definition: Cluster.h:318
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 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

constexpr bool art::detail::Filter::Fail {false}
staticinherited

Definition at line 29 of file Filter.h.

std::string const filter::MuonFilter::fClusterModuleLabel
private

Definition at line 48 of file MuonFilter_module.cc.

Referenced by filter(), and MuonFilter().

std::vector<double> const filter::MuonFilter::fCuts
private

Definition at line 50 of file MuonFilter_module.cc.

Referenced by filter(), and MuonFilter().

double const filter::MuonFilter::fDCenter
private

Definition at line 51 of file MuonFilter_module.cc.

Referenced by filter(), and MuonFilter().

double const filter::MuonFilter::fDelay
private

Definition at line 52 of file MuonFilter_module.cc.

Referenced by filter(), and MuonFilter().

int const filter::MuonFilter::fDeltaWire
private

allowed differences in wire number between 2 planes

Definition at line 56 of file MuonFilter_module.cc.

Referenced by filter(), and MuonFilter().

double const filter::MuonFilter::fIonFactor
private

Definition at line 55 of file MuonFilter_module.cc.

Referenced by filter(), and MuonFilter().

std::string const filter::MuonFilter::fLineModuleLabel
private

Definition at line 49 of file MuonFilter_module.cc.

Referenced by filter(), and MuonFilter().

double const filter::MuonFilter::fMaxIon
private

Definition at line 54 of file MuonFilter_module.cc.

Referenced by filter(), and MuonFilter().

double const filter::MuonFilter::fTolerance
private

Definition at line 53 of file MuonFilter_module.cc.

Referenced by filter(), and MuonFilter().

constexpr bool art::detail::Filter::Pass {true}
staticinherited

Definition at line 28 of file Filter.h.


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