Public Member Functions | Private Attributes | List of all members
sn::SliceRemover Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-05-06/Supernova/BackgroundRejection/SliceRemover.h"

Public Member Functions

 SliceRemover (sn::HitVetoMap &vetoMap)
 
 ~SliceRemover ()
 
int NumRemoved ()
 
void remove (std::vector< art::Ptr< rb::CellHit >> &hits, std::vector< art::Ptr< rb::Cluster >> &clusters)
 

Private Attributes

sn::HitVetoMapfVetoMap
 
int fNumRemoved
 

Detailed Description

Definition at line 23 of file SliceRemover.h.

Constructor & Destructor Documentation

sn::SliceRemover::SliceRemover ( sn::HitVetoMap vetoMap)

Definition at line 25 of file SliceRemover.cxx.

25  :
26 fVetoMap(vetoMap),
27 fNumRemoved(0)
28 {
29 }
sn::HitVetoMap & fVetoMap
Definition: SliceRemover.h:33
sn::SliceRemover::~SliceRemover ( )

Definition at line 32 of file SliceRemover.cxx.

32 {}

Member Function Documentation

int sn::SliceRemover::NumRemoved ( )
inline

Definition at line 28 of file SliceRemover.h.

References fNumRemoved, and hits().

Referenced by sn::SNBackgroundRejection::produce().

28 {return fNumRemoved;};
void sn::SliceRemover::remove ( std::vector< art::Ptr< rb::CellHit >> &  hits,
std::vector< art::Ptr< rb::Cluster >> &  clusters 
)

Definition at line 35 of file SliceRemover.cxx.

References sn::HitVetoMap::AddHit(), rb::Cluster::AllCells(), fNumRemoved, fVetoMap, and rb::Cluster::IsNoise().

Referenced by sn::SNBackgroundRejection::produce().

36 {
37  for (size_t clusterId=0; clusterId<clusters.size(); ++clusterId) {
38  art::Ptr<rb::Cluster> cluster = clusters.at(clusterId);
39 
40  if (cluster->IsNoise()) continue;
41 
42  art::PtrVector<rb::CellHit> clusterHits = cluster->AllCells();
43  for (art::Ptr<rb::CellHit> clusterHit : clusterHits) {
44  this->fVetoMap.AddHit(*clusterHit);
45  ++this->fNumRemoved;
46  }
47  }
48 
49  return;
50 }
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Definition: Cluster.cxx:180
void AddHit(rawdata::RawDigit h)
Definition: HitVetoMap.cxx:27
sn::HitVetoMap & fVetoMap
Definition: SliceRemover.h:33
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163

Member Data Documentation

int sn::SliceRemover::fNumRemoved
private

Definition at line 35 of file SliceRemover.h.

Referenced by NumRemoved(), and remove().

sn::HitVetoMap& sn::SliceRemover::fVetoMap
private

Definition at line 33 of file SliceRemover.h.

Referenced by remove().


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