HitVetoMap.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file: HitVetoMap.cxx
3 // \brief Book-keeping for hits that need to be removed from an event
4 // \author Justin Vasel <justin.vasel@gmail.com>
5 // \date 2019-11-21
6 ////////////////////////////////////////////////////////////////////////
7 
8 // STL includes
9 #include <iostream>
10 #include <iterator>
11 #include <set>
12 
13 // NOvASOFT includes
14 #include "RawData/RawDigit.h"
15 #include "RecoBase/CellHit.h"
18 
19 
20 // ............................................................................
22 
23 // ............................................................................
25 
26 // ............................................................................
28 {
29  this->fVetoHashes.insert(hasher.Generate(h));
30  return;
31 }
32 
33 // ............................................................................
35 {
36  this->fVetoHashes.insert(hasher.Generate(h));
37  return;
38 }
39 
40 // ............................................................................
42 {
43  std::set<long>::iterator loc = this->fVetoHashes.find(hasher.Generate(h));
44  return loc != this->fVetoHashes.end();
45 }
46 
47 // ............................................................................
49 {
50  std::set<long>::iterator loc = this->fVetoHashes.find(hasher.Generate(h));
51  return loc != this->fVetoHashes.end();
52 }
53 
54 // ............................................................................
56 {
57  return this->fVetoHashes.size();
58 }
size_t Size()
Definition: HitVetoMap.cxx:55
bool ContainsHit(rawdata::RawDigit h)
Definition: HitVetoMap.cxx:41
std::set< long > fVetoHashes
Definition: HitVetoMap.h:35
util::HashFunctions hasher
Definition: HitVetoMap.h:34
void AddHit(rawdata::RawDigit h)
Definition: HitVetoMap.cxx:27
uint64_t Generate(rawdata::RawDigit h)
Compute a unique hash value give a rawdata::RawDigit.
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27