LowHighADCRemover.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file: LowHighADCRemover.cxx
3 // \brief Remove hits associated that are too high or low in ADC to be
4 // viable SN candidates.
5 // \author Justin Vasel <justin.vasel@gmail.com>
6 // \date 2019-11-21
7 ////////////////////////////////////////////////////////////////////////
8 
9 // NOvASoft includes
10 #include "RawData/RawDigit.h"
13 
14 
15 // ............................................................................
16 sn::LowHighADCRemover::LowHighADCRemover(sn::HitVetoMap& vetoMap, int lowADCThresh, int highADCThresh):
17 fVetoMap(vetoMap),
18 fLowADCThresh(lowADCThresh),
19 fHighADCThresh(highADCThresh),
20 fNumRemovedLow(0),
21 fNumRemovedHigh(0)
22 {
23 }
24 
25 // ............................................................................
27 
28 
29 // ............................................................................
31 {
32  if (hit->ADC() < this->fLowADCThresh) {
33  ++this->fNumRemovedLow;
34  this->fVetoMap.AddHit(*hit);
35  }
36 
37  if (hit->ADC() > this->fHighADCThresh) {
38  ++this->fNumRemovedHigh;
39  this->fVetoMap.AddHit(*hit);
40  }
41 
42  return;
43 }
44 
45 
46 // ............................................................................
48 {
50  this->remove(hit);
51  }
52 
53  return;
54 }
sn::HitVetoMap & fVetoMap
int fHighADCThresh
Max. acceptable hit charge [ADC].
int fNumRemovedHigh
Number of high-ADC hits removed.
void hits()
Definition: readHits.C:15
void AddHit(rawdata::RawDigit h)
Definition: HitVetoMap.cxx:27
void remove(art::Ptr< rawdata::RawDigit > hit)
LowHighADCRemover(sn::HitVetoMap &vetoMap, int lowADCThresh, int highADCThresh)
int16_t ADC(uint32_t i) const
Definition: RawDigit.cxx:58
Definition: structs.h:12
int fLowADCThresh
Min. acceptable hit charge [ADC].
Definition: fwd.h:29
int fNumRemovedLow
Number of low-ADC hits removed.