Public Member Functions | Private Attributes | Friends | List of all members
novaddt::SliceSelector Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-23/SuperNovaDDT/SliceSelector.h"

Public Member Functions

 SliceSelector (fhicl::ParameterSet const &p)
 a class to check if the slice passes given cut More...
 
bool checkSlice (const novaddt::HitList &slice)
 
bool checkCluster (const clusterInfo &c)
 
size_t countPassing (const std::vector< novaddt::HitList > &slices)
 

Private Attributes

Limits< uint64_t > lim_adc
 
Limits< uint64_t > lim_Nview
 
Limits< uint64_t > lim_Ntot
 
Limits< uint64_t > lim_x
 
Limits< uint64_t > lim_y
 
Limits< uint64_t > lim_z
 

Friends

std::ostream & operator<< (std::ostream &s, const novaddt::SliceSelector &sel)
 

Detailed Description

Definition at line 43 of file SliceSelector.h.

Constructor & Destructor Documentation

novaddt::SliceSelector::SliceSelector ( fhicl::ParameterSet const &  p)
inline

a class to check if the slice passes given cut

Definition at line 46 of file SliceSelector.h.

References fhicl::ParameterSet::get_if_present().

47  {
48  p.get_if_present<Limits<uint64_t>, fhicl::ParameterSet>
49  ("ADC",lim_adc, makeLimits<uint64_t>);
50  p.get_if_present<Limits<uint64_t>, fhicl::ParameterSet>
51  ("nHits.View",lim_Nview, makeLimits<uint64_t>);
52  p.get_if_present<Limits<uint64_t>, fhicl::ParameterSet>
53  ("nHits.Total",lim_Ntot, makeLimits<uint64_t>);
54  p.get_if_present<Limits<uint64_t>, fhicl::ParameterSet>
55  ("FV.x",lim_x, makeLimits<uint64_t>);
56  p.get_if_present<Limits<uint64_t>, fhicl::ParameterSet>
57  ("FV.y",lim_y, makeLimits<uint64_t>);
58  p.get_if_present<Limits<uint64_t>, fhicl::ParameterSet>
59  ("FV.z",lim_z, makeLimits<uint64_t>);
60  }
Limits< uint64_t > lim_z
Definition: SliceSelector.h:95
Limits< uint64_t > lim_x
Definition: SliceSelector.h:95
const char * p
Definition: xmltok.h:285
Limits< uint64_t > lim_y
Definition: SliceSelector.h:95
bool get_if_present(std::string const &key, T &value) const
Definition: ParameterSet.h:208
Limits< uint64_t > lim_Ntot
Definition: SliceSelector.h:94
Limits< uint64_t > lim_adc
Definition: SliceSelector.h:93
Limits< uint64_t > lim_Nview
Definition: SliceSelector.h:94

Member Function Documentation

bool novaddt::SliceSelector::checkCluster ( const clusterInfo c)
inline

Definition at line 68 of file SliceSelector.h.

References clusterInfo::ADC(), clusterInfo::N(), clusterInfo::Nx(), clusterInfo::Ny(), clusterInfo::x(), clusterInfo::y(), and clusterInfo::z().

Referenced by supernova::sliceAna::analyze(), and novaddt::SupernovaTrigger::GetCandidates().

69  {
70  return lim_adc.Contains(c.ADC()) &&
71  lim_Nview.Contains(c.Nx()) &&
72  lim_Nview.Contains(c.Ny()) &&
73  lim_Ntot.Contains(c.N()) &&
74  lim_x.Contains(c.x()) &&
75  lim_y.Contains(c.y()) &&
76  lim_z.Contains(c.z())
77  ;
78  }
uint64_t y() const
Definition: clusterInfo.h:15
uint64_t x() const
Definition: clusterInfo.h:14
Limits< uint64_t > lim_z
Definition: SliceSelector.h:95
Limits< uint64_t > lim_x
Definition: SliceSelector.h:95
Limits< uint64_t > lim_y
Definition: SliceSelector.h:95
uint64_t Nx() const
Definition: clusterInfo.h:8
uint64_t ADC() const
Definition: clusterInfo.h:10
uint64_t N() const
Definition: clusterInfo.h:7
uint64_t z() const
Definition: clusterInfo.h:16
uint64_t Ny() const
Definition: clusterInfo.h:9
bool Contains(const T &v) const
Definition: SliceSelector.h:18
Limits< uint64_t > lim_Ntot
Definition: SliceSelector.h:94
Limits< uint64_t > lim_adc
Definition: SliceSelector.h:93
Limits< uint64_t > lim_Nview
Definition: SliceSelector.h:94
bool novaddt::SliceSelector::checkSlice ( const novaddt::HitList slice)
inline

Definition at line 62 of file SliceSelector.h.

References plot_validation_datamc::c, and CalcCluster().

Referenced by supernova::HighEFinder::filter().

63  {
64  clusterInfo c=CalcCluster(slice);
65  return checkCluster(c);
66  }
clusterInfo CalcCluster(const novaddt::HitList &slice)
Definition: clusterInfo.h:26
bool checkCluster(const clusterInfo &c)
Definition: SliceSelector.h:68
size_t novaddt::SliceSelector::countPassing ( const std::vector< novaddt::HitList > &  slices)
inline

Definition at line 79 of file SliceSelector.h.

Referenced by novaddt::SupernovaTrigger::GetCandidates().

80  {
81  size_t nslices=0;
82  for(const auto& slice: slices)
83  if(checkSlice(slice))++nslices;
84  return nslices;
85  }
bool checkSlice(const novaddt::HitList &slice)
Definition: SliceSelector.h:62

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const novaddt::SliceSelector sel 
)
friend

Definition at line 86 of file SliceSelector.h.

86  {
87  s<<"adc: "<<sel.lim_adc
88  <<"\tNview: "<<sel.lim_Nview
89  <<"\tNtot: "<<sel.lim_Ntot;
90  return s;
91  }
const XML_Char * s
Definition: expat.h:262
Limits< uint64_t > lim_Ntot
Definition: SliceSelector.h:94
Limits< uint64_t > lim_adc
Definition: SliceSelector.h:93
Limits< uint64_t > lim_Nview
Definition: SliceSelector.h:94

Member Data Documentation

Limits<uint64_t> novaddt::SliceSelector::lim_adc
private

Definition at line 93 of file SliceSelector.h.

Limits<uint64_t> novaddt::SliceSelector::lim_Ntot
private

Definition at line 94 of file SliceSelector.h.

Limits<uint64_t> novaddt::SliceSelector::lim_Nview
private

Definition at line 94 of file SliceSelector.h.

Limits<uint64_t> novaddt::SliceSelector::lim_x
private

Definition at line 95 of file SliceSelector.h.

Limits<uint64_t> novaddt::SliceSelector::lim_y
private

Definition at line 95 of file SliceSelector.h.

Limits<uint64_t> novaddt::SliceSelector::lim_z
private

Definition at line 95 of file SliceSelector.h.


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