FEBFlasherRemover.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file: FEBFlasherRemover.cxx
3 // \brief Remove hits associated with FEB Flashers
4 // \author Justin Vasel <justin.vasel@gmail.com>
5 // \date 2019-12-02
6 ////////////////////////////////////////////////////////////////////////
7 
10 #include "fhiclcpp/ParameterSet.h"
11 
13 #include "Geometry/Geometry.h"
14 #include "NovaDAQConventions/DAQConventions.h"
15 #include "RawData/RawDigit.h"
18 
19 
20 // ............................................................................
21 sn::FEBFlasherRemover::FEBFlasherRemover(sn::HitVetoMap& vetoMap, unsigned int fInstigatorQ, unsigned int fInstigatorT, unsigned int fVetoQ, unsigned int fVetoT):
22 fVetoMap(vetoMap)
23 {
24  this->fInstigatorQ = fInstigatorQ;
25  this->fInstigatorT = fInstigatorT;
26  this->fVetoQ = fVetoQ;
27  this->fVetoT = fVetoT;
28 }
29 
30 // ............................................................................
32 
33 
34 // ............................................................................
36 {
37  return this->fNumInstigators;
38 }
39 
40 
41 // ............................................................................
43 {
44  return this->fNumFlasherHits;
45 }
46 
47 
48 // ............................................................................
50 {
51  dq::FlasherFinder* flasherFinder = new dq::FlasherFinder();
52  flasherFinder->SetIntesgatorQ(fInstigatorQ);
53  flasherFinder->SetInstigatorT(fInstigatorT);
54  flasherFinder->SetVetoQ(fVetoQ);
55  flasherFinder->SetVetoT(fVetoT);
56 
57  this->fNumInstigators = flasherFinder->FindInstigators(hits);
58  std::vector<art::Ptr<rawdata::RawDigit>> flasher_hits = flasherFinder->FEBFlashHits(hits);
59  this->fNumFlasherHits = flasher_hits.size();
60 
61  for (art::Ptr<rawdata::RawDigit> hit : flasher_hits) {
62  this->fVetoMap.AddHit(*hit);
63  }
64 
65  return;
66 }
void SetInstigatorT(unsigned int T)
Definition: FlasherFinder.h:98
unsigned int fInstigatorT
Time window for instigator hits [TDC].
void SetVetoT(unsigned int VetoT)
Flag FEB flashes and flag/filter hits they produce.
FEBFlasherRemover(sn::HitVetoMap &vetoMap, unsigned int fInstigatorQ, unsigned int fInstigatorT, unsigned int fVetoQ, unsigned int fVetoT)
unsigned int FindInstigators(std::vector< art::Ptr< rawdata::RawDigit > > &d)
void hits()
Definition: readHits.C:15
sn::HitVetoMap & fVetoMap
void AddHit(rawdata::RawDigit h)
Definition: HitVetoMap.cxx:27
void SetIntesgatorQ(unsigned int Q)
Definition: FlasherFinder.h:97
unsigned int fVetoQ
Only veto below this charge [ADC].
void remove(std::vector< art::Ptr< rawdata::RawDigit >> hits)
Definition: structs.h:12
unsigned int fInstigatorQ
Charge threshold for instigators [ADC].
unsigned int fVetoT
Time to veto FEB after instigator [TDC].
std::vector< art::Ptr< rawdata::RawDigit > > FEBFlashHits(std::vector< art::Ptr< rawdata::RawDigit >> &d)
Definition: fwd.h:29
Encapsulate the geometry of one entire detector (near, far, ndos)
void SetVetoQ(unsigned int VetoQ)
Definition: FlasherFinder.h:99