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

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

Public Member Functions

 ColdHotChannelsRemover (sn::HitVetoMap &vetoMap, sn::DaqChannelMask &channelMask, float coldRateThreshold, float hotRateThreshold)
 
 ~ColdHotChannelsRemover ()
 
void remove (art::Ptr< rawdata::RawDigit > hit)
 
void remove (std::vector< art::Ptr< rawdata::RawDigit >> hits)
 
void remove (art::Ptr< rb::CellHit > hit)
 
void remove (std::vector< art::Ptr< rb::CellHit >> hits)
 
float NumRemovedCold ()
 
float NumRemovedHot ()
 

Private Attributes

sn::HitVetoMapfVetoMap
 
sn::DaqChannelMaskfChannelMask
 
float fColdRateThreshold
 
float fHotRateThreshold
 
int fNumRemovedCold
 
int fNumRemovedHot
 

Detailed Description

Definition at line 17 of file ColdHotChannelsRemover.h.

Constructor & Destructor Documentation

sn::ColdHotChannelsRemover::ColdHotChannelsRemover ( sn::HitVetoMap vetoMap,
sn::DaqChannelMask channelMask,
float  coldRateThreshold,
float  hotRateThreshold 
)

Definition at line 13 of file ColdHotChannelsRemover.cxx.

13  :
14 fVetoMap(vetoMap),
15 fChannelMask(channelMask),
16 fColdRateThreshold(coldRateThreshold),
17 fHotRateThreshold(hotRateThreshold),
20 {
21 }
sn::DaqChannelMask & fChannelMask
sn::ColdHotChannelsRemover::~ColdHotChannelsRemover ( )

Definition at line 24 of file ColdHotChannelsRemover.cxx.

24 {}

Member Function Documentation

float sn::ColdHotChannelsRemover::NumRemovedCold ( )

Definition at line 86 of file ColdHotChannelsRemover.cxx.

References fNumRemovedCold.

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

87 {
88  return this->fNumRemovedCold;
89 }
float sn::ColdHotChannelsRemover::NumRemovedHot ( )

Definition at line 93 of file ColdHotChannelsRemover.cxx.

References fNumRemovedHot.

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

94 {
95  return this->fNumRemovedHot;
96 }
void sn::ColdHotChannelsRemover::remove ( art::Ptr< rawdata::RawDigit hit)

Definition at line 28 of file ColdHotChannelsRemover.cxx.

References sn::HitVetoMap::AddHit(), sn::DaqChannelMask::ChannelIsMasked(), fChannelMask, fColdRateThreshold, fHotRateThreshold, fNumRemovedCold, fNumRemovedHot, fVetoMap, and sn::DaqChannelMask::Rate().

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

29 {
30  if (this->fChannelMask.ChannelIsMasked(*hit)) {
31  if (this->fChannelMask.Rate(*hit) < fColdRateThreshold) {
32  this->fVetoMap.AddHit(*hit);
33  ++this->fNumRemovedCold;
34  }
35 
36  if (this->fChannelMask.Rate(*hit) > fHotRateThreshold) {
37  this->fVetoMap.AddHit(*hit);
38  ++this->fNumRemovedHot;
39  }
40  }
41 
42  return;
43 }
float Rate(rawdata::RawDigit d)
void AddHit(rawdata::RawDigit h)
Definition: HitVetoMap.cxx:27
bool ChannelIsMasked(rawdata::RawDigit d)
sn::DaqChannelMask & fChannelMask
void sn::ColdHotChannelsRemover::remove ( std::vector< art::Ptr< rawdata::RawDigit >>  hits)

Definition at line 66 of file ColdHotChannelsRemover.cxx.

References hits().

67 {
69  this->remove(hit);
70  }
71  return;
72 }
void hits()
Definition: readHits.C:15
Definition: structs.h:12
Definition: fwd.h:29
void sn::ColdHotChannelsRemover::remove ( art::Ptr< rb::CellHit hit)

Definition at line 47 of file ColdHotChannelsRemover.cxx.

References sn::HitVetoMap::AddHit(), sn::DaqChannelMask::ChannelIsMasked(), fChannelMask, fColdRateThreshold, fHotRateThreshold, fNumRemovedCold, fNumRemovedHot, fVetoMap, and sn::DaqChannelMask::Rate().

48 {
49  if (this->fChannelMask.ChannelIsMasked(*hit)) {
50  if (this->fChannelMask.Rate(*hit) < fColdRateThreshold) {
51  this->fVetoMap.AddHit(*hit);
52  ++this->fNumRemovedCold;
53  }
54 
55  if (this->fChannelMask.Rate(*hit) > fHotRateThreshold) {
56  this->fVetoMap.AddHit(*hit);
57  ++this->fNumRemovedHot;
58  }
59  }
60 
61  return;
62 }
float Rate(rawdata::RawDigit d)
void AddHit(rawdata::RawDigit h)
Definition: HitVetoMap.cxx:27
bool ChannelIsMasked(rawdata::RawDigit d)
sn::DaqChannelMask & fChannelMask
void sn::ColdHotChannelsRemover::remove ( std::vector< art::Ptr< rb::CellHit >>  hits)

Definition at line 76 of file ColdHotChannelsRemover.cxx.

References hits().

77 {
79  this->remove(hit);
80  }
81  return;
82 }
void hits()
Definition: readHits.C:15
Definition: structs.h:12

Member Data Documentation

sn::DaqChannelMask& sn::ColdHotChannelsRemover::fChannelMask
private

Definition at line 32 of file ColdHotChannelsRemover.h.

Referenced by remove().

float sn::ColdHotChannelsRemover::fColdRateThreshold
private

Definition at line 34 of file ColdHotChannelsRemover.h.

Referenced by remove().

float sn::ColdHotChannelsRemover::fHotRateThreshold
private

Definition at line 35 of file ColdHotChannelsRemover.h.

Referenced by remove().

int sn::ColdHotChannelsRemover::fNumRemovedCold
private

Definition at line 37 of file ColdHotChannelsRemover.h.

Referenced by NumRemovedCold(), and remove().

int sn::ColdHotChannelsRemover::fNumRemovedHot
private

Definition at line 38 of file ColdHotChannelsRemover.h.

Referenced by NumRemovedHot(), and remove().

sn::HitVetoMap& sn::ColdHotChannelsRemover::fVetoMap
private

Definition at line 31 of file ColdHotChannelsRemover.h.

Referenced by remove().


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