Public Types | Public Member Functions | Static 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::ProducerBase art::Consumer art::EngineCreator art::ProductRegistryHelper

Public Types

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

Public Member Functions

 NumiFiltering (fhicl::ParameterSet const &pset)
 
 ~NumiFiltering ()
 
bool beginRun (art::Run &run)
 
bool filter (art::Event &evt)
 
template<typename PROD , BranchType B = InEvent>
ProductID getProductID (std::string const &instanceName={}) const
 
template<typename PROD , BranchType B>
ProductID getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const
 
bool modifiesEvent () const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Static Public Attributes

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

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

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

using art::EDFilter::ModuleType = EDFilter
inherited

Definition at line 37 of file EDFilter.h.

template<typename UserConfig >
using art::EDFilter::Table = ProducerBase::Table<UserConfig>
inherited

Definition at line 46 of file EDFilter.h.

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

Definition at line 38 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  fSlicerLabel (pset.get< std::string >("SlicerLabel")),
91  fTrackType (pset.get< std::string >("TrackType") ),
92  fDoCleanup (0),
93  fDoTrackAngleCut (0),
94  fDoXYContainment (0),
95  fDoTrackContain (0),
96  fUseStrongCut (0),
97  fDoInTimeCut (0),
99  fNCellLow (0),
101  fMinTCut (0),
102  fMaxTCut (0),
103  fUseWeakSel (0),
104  fSelectContained (0),
106  fSelectEntering (0),
107  fSelectExiting (0),
108  fPSetNDOS (pset.get< fhicl::ParameterSet >("ndos")),
109  fPSetND (pset.get< fhicl::ParameterSet >("nd") ),
110  fPSetFD (pset.get< fhicl::ParameterSet >("fd") )
111  {
112  produces< rb::FilterList<rb::Cluster> >();
113  }
fhicl::ParameterSet fPSetND
fhicl::ParameterSet fPSetNDOS
fhicl::ParameterSet fPSetFD
unsigned int fMaxUncontainedHits
enum BeamMode string
comi::NumiFiltering::~NumiFiltering ( )

Definition at line 116 of file NumiFiltering_module.cc.

117  {
118  }

Member Function Documentation

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

Reimplemented from art::EDFilter.

Definition at line 121 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.

122  {
124 
125  fhicl::ParameterSet pset;
126 
127  switch(geom->DetId()){
128  case novadaq::cnv::kNDOS:
129  pset = fPSetNDOS;
130  break;
132  pset = fPSetND;
133  break;
135  pset = fPSetFD;
136  break;
137  default:
138  assert(0 && "Unknown detector");
139  }
140 
141  fDoCleanup = pset.get< bool >("DoCleanup");
142  fDoTrackAngleCut = pset.get< bool >("DoTrackAngleCut");
143  fDoXYContainment = pset.get< bool >("DoXYContainment");
144  fDoTrackContain = pset.get< bool >("DoTrackContain");
145  fUseStrongCut = pset.get< bool >("UseStrongCut");
146  fDoInTimeCut = pset.get< bool >("DoInTimeCut");
147  fDoUnContainedHitCut = pset.get< bool >("DoUnContainedHitCut");
148  fNCellLow = pset.get< unsigned int >("NCellLow");
149  fMaxUncontainedHits = pset.get< unsigned int >("MaxUncontainedHits");
150  fMinTCut = pset.get< double >("MinTCut");
151  fMaxTCut = pset.get< double >("MaxTCut");
152  fUseWeakSel = pset.get< bool >("UseWeakSel");
153  fSelectContained = pset.get< bool >("SelectContained");
154  fSelectThroughGoing = pset.get< bool >("SelectThroughGoing");
155  fSelectEntering = pset.get< bool >("SelectEntering");
156  fSelectExiting = pset.get< bool >("SelectExiting");
157 
158  fMinXFid = pset.get< float >("MinXFid");
159  fMaxXFid = pset.get< float >("MaxXFid");
160  fMinYFid = pset.get< float >("MinYFid");
161  fMaxYFid = pset.get< float >("MaxYFid");
162  fMinZ = pset.get< float >("MinZ");
163  fZCut = pset.get< float >("ZCut");
164 
165  return true;
166  }
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 = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDFilter::currentContext ( ) const
protectedinherited
bool comi::NumiFiltering::filter ( art::Event evt)
virtual

Implements art::EDFilter.

Definition at line 169 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::Event::put(), ratio(), febshutoff_auto::start, rb::Prong::Start(), rb::Track::Stop(), art::Event::subRun(), POTSpillRate::view, rb::CellHit::View(), submit_syst::x, submit_syst::y, and test::z.

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

Definition at line 131 of file EDFilter.h.

References art::EDFilter::moduleDescription_.

Referenced by novaddt::HoughTrackMaker::create_associations().

132  {
133  return ProducerBase::getProductID<PROD, B>(moduleDescription_,
134  instanceName);
135  }
ModuleDescription moduleDescription_
Definition: EDFilter.h:124
template<typename PROD , BranchType B>
ProductID art::ProducerBase::getProductID ( ModuleDescription const &  moduleDescription,
std::string const &  instanceName 
) const
inherited

Definition at line 56 of file ProducerBase.h.

References art::ModuleDescription::moduleLabel().

Referenced by art::ProducerBase::modifiesEvent().

58  {
59  auto const& pd =
60  get_ProductDescription<PROD>(B, md.moduleLabel(), instanceName);
61  return pd.productID();
62  }
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::ProducerBase::modifiesEvent ( ) const
inlineinherited

Definition at line 40 of file ProducerBase.h.

References art::ProducerBase::getProductID(), and string.

41  {
42  return true;
43  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited

Member Data Documentation

constexpr bool art::EDFilter::Fail {false}
staticinherited

Definition at line 33 of file EDFilter.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::EDFilter::Pass {true}
staticinherited

Definition at line 32 of file EDFilter.h.

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


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