41 std::vector<FEBHit> febhit(
d.size());
42 for (i=0; i<
d.size(); ++
i) {
43 febhit[
i].fFEB =
d[
i]->DaqChannel() & 0xFFFFFF00;
44 febhit[
i].fTDC =
d[
i]->TDC();
45 febhit[
i].fADC =
d[
i]->ADC();
46 febhit[
i].fDAQ =
d[
i]->DaqChannel();
53 for (i=0; i<febhit.size(); ++
i) {
54 unsigned int sumADC = 0;
55 for (j=i+1; j<febhit.size(); ++
j) {
56 bool kInSameFEB = (febhit[
j].fFEB == febhit[
i].fFEB);
59 if (!kInSameFEB || !kInTime)
break;
60 sumADC += febhit[
j].fADC;
82 unsigned int TDC = d->
TDC();
100 unsigned int TDC = ch->
TDC();
114 if ((
unsigned int)d->
ADC() >
fVetoQ)
return false;
120 unsigned int tdc = d->
TDC();
126 if (kInSameFEB && kInTime)
return true;
136 if ((
unsigned int)ch->
ADC() >
fVetoQ)
return false;
142 unsigned int tdc = ch->
TDC();
148 if (kInSameFEB && kInTime)
return true;
158 std::vector<art::Ptr<rawdata::RawDigit>> filtered;
160 unsigned int nfilt = 0;
162 for (i=0; i<
d.size(); ++
i) {
163 if (this->
Veto(
d[i])) {
167 filtered.push_back(
d[i]);
179 std::vector<art::Ptr<rawdata::RawDigit>> filtered;
180 for (
unsigned int i=0;
i<
d.size(); ++
i) {
182 filtered.push_back(
d[i]);
194 unsigned int nhit = 0;
197 for (i=0; i<slicehits.
size(); ++
i) {
198 if (this->
Veto(slicehits[i])) ++nhit;
int32_t TDC() const
The time of the last baseline sample.
unsigned int Nflash(const art::Ptr< rb::Cluster > &c) const
unsigned int fVetoQ
Only veto below this charge [ADC].
static bool gsFEBTimeSort(const FEBHit &h1, const FEBHit &h2)
bool IsInstigator(const art::Ptr< rawdata::RawDigit > &d) const
std::vector< FEBHit > fInstigators
The list of instigators.
unsigned int fInstigatorQ
Charge threshold for instigators [ADC].
unsigned int fVetoT
Time to veto FEB after instigator [TDC].
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Flag FEB flashes and flag/filter hits they produce.
unsigned int FindInstigators(std::vector< art::Ptr< rawdata::RawDigit > > &d)
const Cut kInTime([](const caf::SRProxy *sr){return(sr->slc.meantime >=208000 && sr->slc.meantime<=236000);})
Cut events that are not in time 208us - 236us.
uint32_t DaqChannel() const
bool Veto(const art::Ptr< rawdata::RawDigit > &d) const
unsigned int Filter(std::vector< art::Ptr< rawdata::RawDigit > > &d)
int16_t ADC(uint32_t i) const
unsigned int fInstigatorT
Time window for instigator hits [TDC].
assert(nhit_max >=nhit_nbins)
std::vector< art::Ptr< rawdata::RawDigit > > FEBFlashHits(std::vector< art::Ptr< rawdata::RawDigit >> &d)
bool fInstigatorsOK
Is the instigator list ready for use?