DaqChannelMask.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file: DaqChannelMask.h
3 // \brief Book-keeping for channels that need to be masked from an event
4 // \author Justin Vasel <justin.vasel@gmail.com>
5 // \date 2019-12-05
6 ////////////////////////////////////////////////////////////////////////
7 
8 #ifndef DAQCHANNELMASK_H
9 #define DAQCHANNELMASK_H
10 
11 #include <cstdint>
12 
13 #include "RawData/RawDigit.h"
14 #include "RecoBase/CellHit.h"
15 
16 namespace sn {
18  public:
19  DaqChannelMask(float coldThreshold, float hotThreshold);
21 
23  void AddHit(rb::CellHit h);
24 
25  void IncrementDuration(float i);
26  float CurrentDuration();
27 
28  void CalculateRates();
29  bool RatesCalculated();
30 
31  float Rate(rawdata::RawDigit d);
32  float Rate(rb::CellHit h);
33 
36 
37  size_t MaskSize();
38  size_t RatesSize();
39 
40  std::map<unsigned int, float> GetRates();
41 
42  void Print();
43 
44  private:
45  std::set<unsigned int> fChannelMask;
46  std::map<unsigned int, float> fChannelRates;
47 
48  bool fRatesCalculated = false;
50 
52  int fNumHotChannels = 0;
53 
56 
57  float fHitsAdded = 0;
58  };
59 }
60 
61 #endif
std::map< unsigned int, float > fChannelRates
void IncrementDuration(float i)
float Rate(rawdata::RawDigit d)
std::map< unsigned int, float > GetRates()
Float_t d
Definition: plot.C:236
Remove hits from hot and cold channels.
std::set< unsigned int > fChannelMask
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
bool ChannelIsMasked(rawdata::RawDigit d)
void AddHit(rawdata::RawDigit d)
DaqChannelMask(float coldThreshold, float hotThreshold)