Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
comi::NumiFiltering Class Reference
Inheritance diagram for comi::NumiFiltering:
art::EDFilter art::detail::Filter art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Types

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

Public Member Functions

 NumiFiltering (fhicl::ParameterSet const &pset)
 
 ~NumiFiltering ()
 
bool beginRun (art::Run &run)
 
bool filter (art::Event &evt)
 
std::string workerType () const
 
void doBeginJob ()
 
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)
 
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)
 
template<typename T , BranchType BT>
ViewToken< TconsumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< TmayConsumeView (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< Tconsumes (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< TmayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Protected Attributes

std::string fSlicerLabel
 
std::string fTrackType
 
bool fDoCleanup
 
bool fDoTrackAngleCut
 
bool fDoXYContainment
 
bool fDoTrackContain
 
bool fUseStrongCut
 
bool fDoInTimeCut
 
bool fDoUnContainedHitCut
 
unsigned int fNCellLow
 
unsigned int fMaxUncontainedHits
 
double fMinTCut
 
double fMaxTCut
 
bool fUseWeakSel
 
bool fSelectContained
 
bool fSelectThroughGoing
 
bool fSelectEntering
 
bool fSelectExiting
 
float fMinXFid
 
float fMinYFid
 
float fMinZ
 
float fMaxXFid
 
float fMaxYFid
 
float fMaxZFid
 
float fZCut
 
fhicl::ParameterSet fPSetNDOS
 
fhicl::ParameterSet fPSetND
 
fhicl::ParameterSet fPSetFD
 

Private Attributes

cosrej::CosRejFxsfCosRejFxs
 

Detailed Description

Definition at line 39 of file NumiFiltering_module.cc.

Member Typedef Documentation

Definition at line 19 of file EDFilter.h.

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

Definition at line 29 of file Filter.h.

using art::EDFilter::WorkerType = WorkerT<EDFilter>
inherited

Definition at line 20 of file EDFilter.h.

Constructor & Destructor Documentation

comi::NumiFiltering::NumiFiltering ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 89 of file NumiFiltering_module.cc.

89  :
90  EDFilter(pset),
91  fSlicerLabel (pset.get< std::string >("SlicerLabel")),
92  fTrackType (pset.get< std::string >("TrackType") ),
93  fDoCleanup (0),
94  fDoTrackAngleCut (0),
95  fDoXYContainment (0),
96  fDoTrackContain (0),
97  fUseStrongCut (0),
98  fDoInTimeCut (0),
100  fNCellLow (0),
102  fMinTCut (0),
103  fMaxTCut (0),
104  fUseWeakSel (0),
105  fSelectContained (0),
107  fSelectEntering (0),
108  fSelectExiting (0),
109  fPSetNDOS (pset.get< fhicl::ParameterSet >("ndos")),
110  fPSetND (pset.get< fhicl::ParameterSet >("nd") ),
111  fPSetFD (pset.get< fhicl::ParameterSet >("fd") )
112  {
113  produces< rb::FilterList<rb::Cluster> >();
114  }
fhicl::ParameterSet fPSetND
fhicl::ParameterSet fPSetNDOS
fhicl::ParameterSet fPSetFD
EDFilter(fhicl::ParameterSet const &pset)
Definition: EDFilter.h:22
unsigned int fMaxUncontainedHits
enum BeamMode string
comi::NumiFiltering::~NumiFiltering ( )

Definition at line 117 of file NumiFiltering_module.cc.

118  {
119  }

Member Function Documentation

bool comi::NumiFiltering::beginRun ( art::Run run)
virtual

Reimplemented from art::EDFilter.

Definition at line 122 of file NumiFiltering_module.cc.

References ana::assert(), geo::GeometryBase::DetId(), fDoCleanup, fDoInTimeCut, fDoTrackAngleCut, fDoTrackContain, fDoUnContainedHitCut, fDoXYContainment, fMaxTCut, fMaxUncontainedHits, fMaxXFid, fMaxYFid, fMinTCut, fMinXFid, fMinYFid, fMinZ, fNCellLow, fPSetFD, fPSetND, fPSetNDOS, fSelectContained, fSelectEntering, fSelectExiting, fSelectThroughGoing, fUseStrongCut, fUseWeakSel, fZCut, geom(), fhicl::ParameterSet::get(), novadaq::cnv::kFARDET, novadaq::cnv::kNDOS, and novadaq::cnv::kNEARDET.

123  {
125 
126  fhicl::ParameterSet pset;
127 
128  switch(geom->DetId()){
129  case novadaq::cnv::kNDOS:
130  pset = fPSetNDOS;
131  break;
133  pset = fPSetND;
134  break;
136  pset = fPSetFD;
137  break;
138  default:
139  assert(0 && "Unknown detector");
140  }
141 
142  fDoCleanup = pset.get< bool >("DoCleanup");
143  fDoTrackAngleCut = pset.get< bool >("DoTrackAngleCut");
144  fDoXYContainment = pset.get< bool >("DoXYContainment");
145  fDoTrackContain = pset.get< bool >("DoTrackContain");
146  fUseStrongCut = pset.get< bool >("UseStrongCut");
147  fDoInTimeCut = pset.get< bool >("DoInTimeCut");
148  fDoUnContainedHitCut = pset.get< bool >("DoUnContainedHitCut");
149  fNCellLow = pset.get< unsigned int >("NCellLow");
150  fMaxUncontainedHits = pset.get< unsigned int >("MaxUncontainedHits");
151  fMinTCut = pset.get< double >("MinTCut");
152  fMaxTCut = pset.get< double >("MaxTCut");
153  fUseWeakSel = pset.get< bool >("UseWeakSel");
154  fSelectContained = pset.get< bool >("SelectContained");
155  fSelectThroughGoing = pset.get< bool >("SelectThroughGoing");
156  fSelectEntering = pset.get< bool >("SelectEntering");
157  fSelectExiting = pset.get< bool >("SelectExiting");
158 
159  fMinXFid = pset.get< float >("MinXFid");
160  fMaxXFid = pset.get< float >("MaxXFid");
161  fMinYFid = pset.get< float >("MinYFid");
162  fMaxYFid = pset.get< float >("MaxYFid");
163  fMinZ = pset.get< float >("MinZ");
164  fZCut = pset.get< float >("ZCut");
165 
166  return true;
167  }
fhicl::ParameterSet fPSetND
Far Detector at Ash River, MN.
Prototype Near Detector on the surface at FNAL.
T get(std::string const &key) const
Definition: ParameterSet.h:231
novadaq::cnv::DetId DetId() const
Prefer ds::DetectorService::DetId() instead.
Definition: GeometryBase.h:243
Near Detector in the NuMI cavern.
fhicl::ParameterSet fPSetNDOS
fhicl::ParameterSet fPSetFD
void geom(int which=0)
Definition: geom.C:163
assert(nhit_max >=nhit_nbins)
unsigned int fMaxUncontainedHits
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 55 of file ModuleBase.h.

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

56  {
57  return collector_.consumes<T, BT>(tag);
58  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ProductToken< T > consumes(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ConsumesCollector& art::ModuleBase::consumesCollector ( )
protectedinherited
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 69 of file ModuleBase.h.

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

70  {
71  collector_.consumesMany<T, BT>();
72  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
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 62 of file ModuleBase.h.

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

63  {
64  return collector_.consumesView<T, BT>(tag);
65  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > consumesView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
void art::detail::Filter::doBeginJob ( )
inherited
bool art::detail::Filter::doBeginRun ( RunPrincipal rp,
ModuleContext const &   
)
inherited
bool art::detail::Filter::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
void art::detail::Filter::doEndJob ( )
inherited
bool art::detail::Filter::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Filter::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
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
void art::detail::Filter::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited
void art::detail::Filter::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited
void art::detail::Filter::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited
void art::detail::Filter::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited
bool comi::NumiFiltering::filter ( art::Event evt)
virtual

Implements art::EDFilter.

Definition at line 170 of file NumiFiltering_module.cc.

References rb::Cluster::Add(), angle, rb::CellHit::Cell(), rb::Cluster::Cell(), om::cout, DEFINE_ART_MODULE(), geo::GeometryBase::DetId(), rb::Prong::Dir(), allTimeWatchdog::endl, art::EventID::event(), fCosRejFxs, fDoCleanup, fDoInTimeCut, fDoTrackAngleCut, fDoTrackContain, fDoUnContainedHitCut, fDoXYContainment, fMaxTCut, fMaxUncontainedHits, fMaxXFid, fMaxYFid, fMaxZFid, fMinXFid, fMinYFid, fMinZ, fNCellLow, fSelectContained, fSelectEntering, fSelectExiting, fSelectThroughGoing, fSlicerLabel, fTrackType, fUseStrongCut, fUseWeakSel, fZCut, geom(), art::Ptr< T >::get(), cosrej::CosRejFxs::getAngle(), art::DataViewImpl::getByLabel(), make_syst_table_plots::h, art::Event::id(), geo::LiveGeometry::InstrumentedDetEnds(), rb::Prong::Is3D(), rb::Cluster::IsNoise(), calib::j, novadaq::cnv::kFARDET, geo::kX, geo::kY, rb::Cluster::MaxXYZ(), maxy, rb::Cluster::MeanTNS(), rb::Cluster::MinXYZ(), rb::Cluster::NCell(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), art::DataViewImpl::put(), PandAna.reco_validation.prod5_pid_validation::ratio(), febshutoff_auto::start, rb::Prong::Start(), rb::Track::Stop(), art::DataViewImpl::subRun(), POTSpillRate::view, rb::CellHit::View(), submit_syst::x, submit_syst::y, and test::z.

171  {
172 
173  std::unique_ptr< rb::FilterList<rb::Cluster> > filtcol(new rb::FilterList<rb::Cluster>);
174 
175  bool selected = false;
176  //Grab event's slices
178  evt.getByLabel(fSlicerLabel, slices);
179 
180  // Object holding tracks associated with slice
181  art::FindManyP<rb::Track> fmpTrack(slices, evt, fTrackType);
182 
183  const int sliceMax = slices->size();
184 
185  for(int sliceIdx = 0; sliceIdx < sliceMax; ++sliceIdx){
186  const rb::Cluster& slice = (*slices)[sliceIdx];
187 
188  if(slice.IsNoise())
189  {
190  filtcol->Add(slices, sliceIdx);
191  continue;
192  }
193 
194  double ratio = 1, diry = 0, angle = 1;
195  double minx = -9999, miny = -9999, minz = -9999;
196  double maxx = 9999, maxy = 9999, maxz = 9999;
197 
198  TVector3 start,stop;
199 
200  double meant = 0;
201 
202  unsigned int nXplanes = 0, nYplanes = 0;
203  bool is3d = false;
204 
205  unsigned int stot[6] = {0,0,0,0,0,0};
206 
207  const double nCells = slice.NCell(); //Number of cells in slice
208  unsigned int PXhi = 0;
209  unsigned int PXlo = UINT_MAX;
210  unsigned int PYhi = 0;
211  unsigned int PYlo = UINT_MAX;
212  //loop over all hits
213 
217 
218  double fMinZFid = 0.;
219  double zfront1 = 0.,zback1 = 0.,zfront2 = 0.,zback2 = 0.;
220 
221  if(geom->DetId() == novadaq::cnv::kFARDET){
222  int ndets = livegeom->InstrumentedDetEnds(zfront1,zback1,zfront2,zback2);
223  // take the most downstream zfront and zback
224  if(ndets > 0){
225  fMinZFid = zfront1 + fMinZ;
226  }
227  }
228  else fMinZFid = fMinZ;
229 
230 
231  fMaxZFid = zback1 - fZCut;
232 
233  // std::cout << zback1 << " " << zfront1 << "\n";
234  for(int view = geo::kX; view <= geo::kY; ++view) {
235  const geo::View_t geoview = geo::View_t(view);
236 
237  for(unsigned int j = 0; j < slice.NCell(geoview); ++j) {
238 
239  const rb::CellHit* h = slice.Cell(geoview,j).get();
240 
241  // Get Hit position
242  double xyz[3];
243  geom->Plane(h->Plane())->Cell(h->Cell())->GetCenter(xyz);
244  const double x = xyz[0];
245  const double y = xyz[1];
246  const double z = xyz[2];
247 
248  if(h->View() == geo::kX) {
249  if(h->Plane() > PXhi) PXhi = h->Plane();
250  if(h->Plane() < PXlo) PXlo = h->Plane();
251  }
252  if(h->View() == geo::kY) {
253  if(h->Plane() > PYhi) PYhi = h->Plane();
254  if(h->Plane() < PYlo) PYlo = h->Plane();
255  }
256 
257 
258  // Total up number of cells > Max (X/Y/Z) and < Min (X/Y/Z)
259  //TOP
260  if(y > fMaxYFid) {
261  stot[0]++;
262  // to avoid double-counting, stop counting for subsequent boundaries
263  continue;
264  }
265  //BOTTOM
266  if(y < fMinYFid) {
267  stot[1]++;
268  continue;
269  }
270  //LEFT
271  if(x > fMaxXFid) {
272  stot[2]++;
273  continue;
274  }
275  //RIGHT
276  if(x < fMinXFid) {
277  stot[3]++;
278  continue;
279  }
280  //FRONT
281  if(z < fMinZFid) {
282  stot[4]++;
283  continue;
284  }
285  //BACK
286  if(z > fMaxZFid) {
287  stot[5]++;
288  continue;
289  }
290 
291  }
292  }
293 
294 
295  nXplanes = PXhi - PXlo+1;
296  nYplanes = PYhi - PYlo+1;
297 
298  if(fmpTrack.isValid()){
299  std::vector< art::Ptr<rb::Track> > tracks = fmpTrack.at(sliceIdx);
300  if(tracks.size()>0) {
301  const art::Ptr<rb::Track> track = tracks[0];
302 
303  meant = slice.MeanTNS();
304 
305 
306 
307  minx = slice.MinXYZ().X();
308  miny = slice.MinXYZ().Y();
309  minz = slice.MinXYZ().Z();
310 
311  maxx = slice.MaxXYZ().X();
312  maxy = slice.MaxXYZ().Y();
313  maxz = slice.MaxXYZ().Z();
314 
315  start = track->Start();
316  stop = track->Stop();
317 
318  diry = track->Dir().Y();
319  angle = fCosRejFxs->getAngle(track->Dir());
320  ratio = (track->NCell()*1.0) / (1.0*nCells);
321 
322 
323  is3d = track->Is3D();
324 
325 
326  }
327  }
328 
329  // Selected unless we fail any cuts below
330  bool sel = true;
331 
332  if(fDoInTimeCut){
333  if(meant < fMinTCut || meant > fMaxTCut){
334  sel = false;
335  }
336  }
337  if(sel == true) std::cout<< "True: Timing";
338  //----------------Actually start the cut selections here----------------
339  //Do the NCell cut
340  if(fDoCleanup){
341  if(nCells <= fNCellLow || !is3d) {
342  sel = false;
343  }
344  }
345  if(sel == true) std::cout<< "True: Cleanup";
346  //Do the XY slice.box containment cut + the track start/stop containment
347  //Change this to use the fwddist/bckdist at a later date
348  if(fDoXYContainment){
349  if(minx < fMinXFid || miny < fMinYFid ||
350  maxx > fMaxXFid || maxy > fMaxYFid)
351  sel = false;
352  }
353  if(sel == true) std::cout<< "True: XYContainment";
354 
356  const unsigned int smaxelement = *std::max_element(stot,stot+6);
357  if(smaxelement > fMaxUncontainedHits)
358  sel = false;
359  }
360  if(sel == true) std::cout<< "True: BBC";
361 
362  if(fDoTrackContain){
363  if(start.X() < fMinXFid || start.Y() < fMinYFid ||
364  stop.X() > fMaxXFid || stop.Y() > fMaxYFid ||
365  stop.X() < fMinXFid || stop.Y() < fMinYFid ||
366  start.X() > fMaxXFid || start.Y() > fMaxYFid) {
367  sel = false;
368  }
369  }
370  if(sel == true) std::cout<< "True: Contain";
371 
372  //Do the Track Angle cut:
373  if (fDoTrackAngleCut){
374  if(fmpTrack.isValid()) {
375 
376  double cosmicvar = (angle*angle) - (diry*diry);
377 
378  if(fUseStrongCut == false) { // weak cut
379  if(ratio > 0.88) {
380  if(nCells > 50 && nCells <= 135 &&
381  cosmicvar < ((1.1/85)*nCells-1.65)) {
382  sel = false;
383  }
384 
385  if(nCells > 135 && nCells <= 250 &&
386  cosmicvar < ((.6/115)*nCells-.6)) {
387  sel = false;
388  }
389 
390  if(nCells > 250 && nCells <= 500 &&
391  cosmicvar < ((.1/250)*nCells+0.6)) {
392  sel = false;
393  }
394 
395  if(nCells > 500 && cosmicvar > 0.8) {
396  sel = false;
397  }
398  }
399  }
400 
401  if(fUseStrongCut == true) { // strong cut
402  if(nCells > 30 && nCells <= 135 && ratio > 0.8 &&
403  cosmicvar < ((1/100)*nCells-1.0)) {
404  sel = false;
405  }
406 
407  if(nCells > 135 && nCells <= 250 && ratio > 0.8 &&
408  cosmicvar < ((.45/100)*nCells-.2575)) {
409  sel = false;
410  }
411 
412  if(nCells > 250 && nCells <= 500 && ratio > 0.83 &&
413  cosmicvar < ((.1/200)*nCells+0.6825)) {
414  sel = false;
415  }
416 
417  if(nCells > 500 && ratio > 0.8 &&
418  cosmicvar > 0.9) {
419  sel = false;
420  }
421  }
422  }
423  }
424  if(sel == true) std::cout<< "True: AngVar";
425 
426  bool iscont = false, isexit = false;
427  bool isenter = false, isthrough = false;
428 
429  if(fUseWeakSel == true){
430  if(fSelectContained){
431  if(minz > fMinZFid && maxz < fMaxZFid) iscont = true;
432  }
434  if(minz < fMinZFid && maxz > fMaxZFid) isthrough = true;
435  }
436  if(fSelectEntering){
437  if(minz < fMinZFid && maxz < fMaxZFid) isexit = true;
438  }
439  if(fSelectExiting){
440  if(minz > fMinZFid && maxz > fMaxZFid) isenter = true;
441  }
442 
443  if(!(iscont || isexit || isenter || isthrough)) {
444  sel = false;
445  }
446  }
447  /*
448  std::cout << "MinZ: " << fMinZFid
449  << " MaxZ: " << fMaxZFid
450  << " nXplanes: " << nXplanes
451  << " nYplanes: " << nYplanes
452  << " angle: " << angle
453  << "\n";
454  */
455  if(fUseWeakSel == false){
456  if(fSelectContained){
457  // std::cout << "Contained - start: " << start.Z()
458  // << " stop: " << stop.Z()
459  // << "\n";
460  if(((start.Z() > fMinZFid && stop.Z() < fMaxZFid) ||
461  (stop.Z() > fMinZFid && start.Z() < fMaxZFid)) &&
462  nXplanes > 4 && nYplanes > 4 &&
463  (angle > 0.5 || angle < -0.5)) iscont = true;
464  }
465 
467  if((start.Z() < fMinZFid && stop.Z() > fMaxZFid) ||
468  (stop.Z() < fMinZFid && start.Z() > fMaxZFid))
469  isthrough = true;
470  }
471 
472  if(fSelectEntering){
473  if(((start.Z() < fMinZFid && stop.Z() < fMaxZFid) ||
474  (stop.Z() < fMinZFid && start.Z() < fMaxZFid)) &&
475  nXplanes > 4 && nYplanes > 4 &&
476  (angle > 0.95 || angle < -0.95)) isenter = true;
477  }
478  if(fSelectExiting){
479  if(sel==true)std::cout<< "True: Exiting check";
480  if(((start.Z() > fMinZFid && stop.Z() > start.Z()) ||
481  (stop.Z() > fMinZFid && start.Z() > stop.Z())) &&
482  nXplanes > 4 && nYplanes > 4 &&
483  (angle > 0.75 || angle < -0.75)) {
484  std::cout << "Exiting - start: " << start.Z()
485  << " stop: " << stop.Z()
486  << " angle " << angle << "\n";
487  isexit = true;
488  }
489  }
490  std::cout << " IS EXIT " << isexit << " sel: " << sel << std::endl;
491  if(!isexit) sel = false;
492  /*
493  if(sel ==true){
494  std::cout << "isexit: " << isexit << "\n";
495  if(!(iscont || isexit || isenter || isthrough)) {
496  sel = false;
497  }
498  }
499  */
500  }
501 
502  if(sel == true){
503  std::cout << "Event: " << evt.id().event() << ", subrun: " << evt.subRun() << "\n";
504  selected = sel;
505  }
506 
507  if(sel == false){
508  filtcol->Add(slices, sliceIdx);
509  }
510  } // end for sliceIdx
511 
512  evt.put(std::move(filtcol));
513 
514  return selected;
515  }
cosrej::CosRejFxs * fCosRejFxs
A simple list of products that have been marked "filtered out".
Definition: FilterList.h:74
Double_t angle
Definition: plot.C:86
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
unsigned short Plane() const
Definition: CellHit.h:39
double maxy
geo::View_t View() const
Definition: CellHit.h:41
Vertical planes which measure X.
Definition: PlaneGeo.h:28
Definition: event.h:19
A collection of associated CellHits.
Definition: Cluster.h:47
const PlaneGeo * Plane(unsigned int i) const
def ratio(spec1, spec2, nbins, pot, binrange=(0, 1))
virtual TVector3 Start() const
Definition: Prong.h:73
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
TVector3 MaxXYZ() const
Definition: Cluster.cxx:492
virtual void Add(const art::Ptr< rb::CellHit > &cell, double weight=1)
Definition: Cluster.cxx:84
unsigned short Cell() const
Definition: CellHit.h:40
Far Detector at Ash River, MN.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:446
float getAngle(TVector3 trackdir)
Definition: CosRejFxs.cxx:33
novadaq::cnv::DetId DetId() const
Prefer ds::DetectorService::DetId() instead.
Definition: GeometryBase.h:243
virtual TVector3 Dir() const
Unit vector describing prong direction.
Definition: Prong.h:77
SubRunNumber_t subRun() const
const double j
Definition: BetheBloch.cxx:29
z
Definition: test.py:28
OStream cout
Definition: OStream.cxx:6
EventNumber_t event() const
Definition: EventID.h:116
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
TVector3 MinXYZ() const
Definition: Cluster.cxx:446
double MeanTNS(rb::AveragingScheme scheme=kDefaultScheme) const
Definition: Cluster.cxx:554
void geom(int which=0)
Definition: geom.C:163
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
TVector3 Stop() const
Position of the final trajectory point.
Definition: Track.cxx:186
T const * get() const
Definition: Ptr.h:149
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:730
int InstrumentedDetEnds(double &frontDwnstrm, double &backDwnstrm, double &frontUpstrm, double &backUpstrm)
give all detector ends information; most general
unsigned int fMaxUncontainedHits
EventID id() const
virtual bool Is3D() const
Definition: Prong.h:71
std::array<std::vector<ProductInfo>, NumBranchTypes> const& art::ModuleBase::getConsumables ( ) const
inherited
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 76 of file ModuleBase.h.

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

77  {
78  return collector_.mayConsume<T, BT>(tag);
79  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 90 of file ModuleBase.h.

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

91  {
93  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
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 83 of file ModuleBase.h.

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

84  {
85  return collector_.mayConsumeView<T, BT>(tag);
86  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > mayConsumeView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ModuleDescription const& art::ModuleBase::moduleDescription ( ) const
inherited
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  )
inherited
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited
std::string art::EDFilter::workerType ( ) const
inherited

Referenced by art::EDFilter::EDFilter().

Member Data Documentation

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

Definition at line 26 of file Filter.h.

Referenced by evgen::GENIEFilter::filter().

cosrej::CosRejFxs* comi::NumiFiltering::fCosRejFxs
private

Definition at line 81 of file NumiFiltering_module.cc.

Referenced by filter().

bool comi::NumiFiltering::fDoCleanup
protected

Definition at line 51 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

bool comi::NumiFiltering::fDoInTimeCut
protected

Definition at line 56 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

bool comi::NumiFiltering::fDoTrackAngleCut
protected

Definition at line 52 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

bool comi::NumiFiltering::fDoTrackContain
protected

Definition at line 54 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

bool comi::NumiFiltering::fDoUnContainedHitCut
protected

Definition at line 57 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

bool comi::NumiFiltering::fDoXYContainment
protected

Definition at line 53 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

double comi::NumiFiltering::fMaxTCut
protected

Definition at line 61 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

unsigned int comi::NumiFiltering::fMaxUncontainedHits
protected

Definition at line 59 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

float comi::NumiFiltering::fMaxXFid
protected

Definition at line 72 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

float comi::NumiFiltering::fMaxYFid
protected

Definition at line 73 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

float comi::NumiFiltering::fMaxZFid
protected

Definition at line 74 of file NumiFiltering_module.cc.

Referenced by filter().

double comi::NumiFiltering::fMinTCut
protected

Definition at line 60 of file NumiFiltering_module.cc.

Referenced by beginRun().

float comi::NumiFiltering::fMinXFid
protected

Definition at line 69 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

float comi::NumiFiltering::fMinYFid
protected

Definition at line 70 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

float comi::NumiFiltering::fMinZ
protected

Definition at line 71 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

unsigned int comi::NumiFiltering::fNCellLow
protected

Definition at line 58 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

fhicl::ParameterSet comi::NumiFiltering::fPSetFD
protected

Definition at line 78 of file NumiFiltering_module.cc.

Referenced by beginRun().

fhicl::ParameterSet comi::NumiFiltering::fPSetND
protected

Definition at line 78 of file NumiFiltering_module.cc.

Referenced by beginRun().

fhicl::ParameterSet comi::NumiFiltering::fPSetNDOS
protected

Definition at line 78 of file NumiFiltering_module.cc.

Referenced by beginRun().

bool comi::NumiFiltering::fSelectContained
protected

Definition at line 64 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

bool comi::NumiFiltering::fSelectEntering
protected

Definition at line 66 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

bool comi::NumiFiltering::fSelectExiting
protected

Definition at line 67 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

bool comi::NumiFiltering::fSelectThroughGoing
protected

Definition at line 65 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

std::string comi::NumiFiltering::fSlicerLabel
protected

Definition at line 49 of file NumiFiltering_module.cc.

Referenced by filter().

std::string comi::NumiFiltering::fTrackType
protected

Definition at line 50 of file NumiFiltering_module.cc.

Referenced by filter().

bool comi::NumiFiltering::fUseStrongCut
protected

Definition at line 55 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

bool comi::NumiFiltering::fUseWeakSel
protected

Definition at line 62 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

float comi::NumiFiltering::fZCut
protected

Definition at line 75 of file NumiFiltering_module.cc.

Referenced by beginRun(), and filter().

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

Definition at line 25 of file Filter.h.

Referenced by evgen::GENIEFilter::filter().


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