Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
comi::FEBFlash Class Reference

Analysis module to hunt for neutrino candidates. More...

Inheritance diagram for comi::FEBFlash:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

unsigned int FilterFEBFlash (std::vector< art::Ptr< rawdata::RawDigit > > &rd)
 
 FEBFlash (fhicl::ParameterSet const &p)
 
virtual ~FEBFlash ()
 
void reconfigure (const fhicl::ParameterSet &p)
 
void beginJob ()
 
void FEBTimeSlice (std::vector< art::Ptr< rawdata::RawDigit > > &d, std::vector< util::RawSlice > &s)
 
void SliceStatistics (std::vector< art::Ptr< rawdata::RawDigit > > &d, std::vector< util::RawSlice > &s, std::vector< unsigned int > &nhit, std::vector< unsigned int > &nsat, std::vector< unsigned int > &adc, std::vector< double > &avet, std::vector< unsigned int > &nafter, std::vector< bool > &iscandidate)
 
void analyze (art::Event const &evt)
 
std::string workerType () const
 
void doBeginJob ()
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
Handle< TriggerResults > getTriggerResults (Event const &e) const
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< TconsumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< TmayConsumeView (InputTag const &tag)
 

Public Attributes

const int kTDC_PER_USEC = 64
 
const double kUSEC_PER_TDC = 1.0/kTDC_PER_USEC
 
unsigned int fNhitFEBSlice = 2
 
unsigned int fdTFEBSlice = kTDC_PER_USEC/2
 
unsigned int fNhit0 = 5
 
unsigned int fNsat0 = 1
 
unsigned int fNafter = 0
 
unsigned int fADC0 = 0
 
int fADCSat = 3400
 
TH1F * fFilterFrac
 Fraction of hits filtered as FEB flash. More...
 
TH1F * fADC
 ADC distribution of hits. More...
 
TH1F * fNcand
 Number of candidates found per event. More...
 
TH1F * fNFEBSlice
 Time slices found per FEB per event. More...
 
TH1F * fNhit
 Number of hits per FEB slice. More...
 
TH1F * fNsat
 Number of hits near saturation. More...
 
TH1F * fSumADC
 Total ADC in a slice. More...
 
TH1F * fNafterCand
 Number of slices following a flash candidate. More...
 
TH1F * fNafterNoCand
 Number of slices following a non-candidate. More...
 
TH1F * fADC1
 Summed ADC for after slices. More...
 
TH1F * fDeltaT
 Time differences between flash and after slices. More...
 
TH2F * fADC0ADC1
 ADC for slice pairs. More...
 
TH2F * fDeltaTADC0
 Time / ADC for slice pairs. More...
 
TH2F * fDeltaTADC1
 Time / ADC for slice pairs. More...
 

Protected Member Functions

detail::ProcessAndEventSelectors & processAndEventSelectors ()
 
ConsumesCollector & consumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Analysis module to hunt for neutrino candidates.

Definition at line 29 of file FEBFlash_module.cc.

Member Typedef Documentation

Definition at line 25 of file EDAnalyzer.h.

using art::EDAnalyzer::WorkerType = WorkerT<EDAnalyzer>
inherited

Definition at line 24 of file EDAnalyzer.h.

Constructor & Destructor Documentation

comi::FEBFlash::FEBFlash ( fhicl::ParameterSet const &  p)
inlineexplicit

Definition at line 124 of file FEBFlash_module.cc.

References reconfigure().

124  : EDAnalyzer(p)
125  {
126  this->reconfigure(p);
127  }
const char * p
Definition: xmltok.h:285
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:27
void reconfigure(const fhicl::ParameterSet &p)
virtual comi::FEBFlash::~FEBFlash ( )
inlinevirtual

Definition at line 131 of file FEBFlash_module.cc.

131 { }

Member Function Documentation

void comi::FEBFlash::analyze ( art::Event const &  evt)
inlinevirtual

Implements art::EDAnalyzer.

Definition at line 265 of file FEBFlash_module.cc.

References om::cerr, om::cout, d, febshutoff_auto::dcm, DEFINE_ART_MODULE(), geo2elec::diblock, allTimeWatchdog::endl, art::EventID::event(), APDHVSetting::feb, FEBTimeSlice(), Fill(), FilterFEBFlash(), art::DataViewImpl::getByLabel(), MECModelEnuComparisons::i, art::Event::id(), makeTrainCVSamples::int, calib::j, make_training::n1, demo1::nhit, art::DataViewImpl::run(), SliceStatistics(), and art::DataViewImpl::subRun().

266  {
267  unsigned int i, j;
268  //
269  // Pull out the raw digits from the event and shuffle into ART
270  // pointers
271  //
273  evt.getByLabel("daq", digidummy);
274  std::vector< art::Ptr<rawdata::RawDigit> > d(digidummy->size());
275  for (i=0; i<digidummy->size(); ++i) {
276  d[i] = art::Ptr<rawdata::RawDigit>(digidummy,i);
277  }
278 
279  //
280  // If requested, filter out flash hits
281  //
282  bool fFilterFEBFlash = true;
283  unsigned int n1 = 0; // Number of hits before filter
284  unsigned int n2 = 0; // Number of hits after filter
285  n1 = d.size();
286  if (fFilterFEBFlash) {
287  std::cerr << "Filtering FEB flash hits...";
288  n2 = this->FilterFEBFlash(d);
289  std::cerr << "done." << std::endl;
290  }
291  fFilterFrac->Fill((float)(n1-n2)/(float)n1);
292 
293  //
294  // Shuffle the hits around so that we can examine the time
295  // structure of the hits one FEB at a time
296  //
297  typedef std::map<
298  unsigned int,
299  std::vector< art::Ptr<rawdata::RawDigit> >
300  > HitsByFEB_t;
301 
302  HitsByFEB_t digi;
303  for (i=0; i<d.size(); ++i) {
304  unsigned int ch = d[i]->DaqChannel();
305  unsigned int diblock = (ch&0x0FC00000)>>22;
306  unsigned int dcm = (ch&0x003F0000)>>16;
307  unsigned int feb = (ch&0x0000FF00)>>8;
308  unsigned int FEBID = feb+100*(dcm+100*diblock);
309 
310  fADC->Fill(d[i]->ADC());
311 
312  digi[FEBID].push_back(d[i]);
313  }
314 
315  unsigned int ncand = 0;
316  HitsByFEB_t::iterator itr (digi.begin());
317  HitsByFEB_t::iterator itrEnd(digi.end());
318  for (; itr!=itrEnd; ++itr) {
319  //
320  // Give myself easy access to the hits for just one FEB
321  //
322  std::vector<art::Ptr<rawdata::RawDigit>>& d(itr->second);
323 
324  //
325  // Get list of time slices with significant activity
326  //
327  std::vector<util::RawSlice> slice;
328  this->FEBTimeSlice(d, slice);
329  fNFEBSlice->Fill(slice.size());
330 
331  //
332  // Compile some statistics on each slice; nhit, ADC, time, ...
333  //
334  std::vector<unsigned int> nhit; // # of hits in slice
335  std::vector<unsigned int> nsat; // # of hits near saturation
336  std::vector<unsigned int> adc; // Summed ADC for slice
337  std::vector<double> avet; // Slice time
338  std::vector<bool> iscandidate; // "pow!" candidate?
339  std::vector<unsigned int> nafter;
340  this->SliceStatistics(d,
341  slice,
342  nhit,
343  nsat,
344  adc,
345  avet,
346  nafter,
347  iscandidate);
348  //
349  // Log statistics to histograms for analysis
350  //
351  for (i=0; i<slice.size(); ++i) {
352  fNhit->Fill(nhit[i]);
353  fNsat->Fill(nsat[i]);
354  fSumADC->Fill(adc[i]);
355  if (iscandidate[i]) fNafterCand-> Fill(nafter[i]);
356  else fNafterNoCand->Fill(nafter[i]);
357  if (iscandidate[i]) {
358  ++ncand;
359  for (j=i+1; j<slice.size(); ++j) {
360  fADC1->Fill(adc[j]);
361  fDeltaT->Fill(avet[j]-avet[i]);
362  fADC0ADC1->Fill(adc[i], adc[j]);
363  fDeltaTADC0->Fill(avet[j]-avet[i],adc[i]);
364  fDeltaTADC1->Fill(avet[j]-avet[i],adc[j]);
365  std::cout << "FLASH-CANDIDATE:\t"
366  << evt.run() << "\t"
367  << evt.subRun() << "\t"
368  << evt.id().event() << "\t"
369  << itr->first << "\t"
370  << nhit[i] << "\t"
371  << nsat[i] << "\t"
372  << adc[i] << "\t"
373  << avet[i] << "\t"
374  << nafter[i] << "\t"
375  << nhit[j] << "\t"
376  << nsat[j] << "\t"
377  << adc[j] << "\t"
378  << avet[j] << "\t"
379  << nafter[j] << std::endl;
380  } // loop on slice j
381  } // if is candidate
382  } // loop on slice i
383  } // loop over FEBs
384  fNcand->Fill(ncand);
385 
386  //
387  // Make sure log file has at least one entry per event
388  //
389  if (ncand==0) {
390  std::cout << "FLASH-CANDIDATE:\t"
391  << evt.run() << "\t"
392  << evt.subRun() << "\t"
393  << evt.id().event() << "\t"
394  << "-" << "\t"
395  << "-" << "\t"
396  << "-" << "\t"
397  << "-" << "\t"
398  << "-" << "\t"
399  << "-" << "\t"
400  << "-" << "\t"
401  << "-" << "\t"
402  << "-" << "\t"
403  << "-" << "\t"
404  << "-" << std::endl;
405  }
406  } // end analyze function
TH1F * fDeltaT
Time differences between flash and after slices.
diblock
print "ROW IS " print row
Definition: geo2elec.py:31
TH2F * fADC0ADC1
ADC for slice pairs.
TH2F * fDeltaTADC0
Time / ADC for slice pairs.
nhit
Definition: demo1.py:25
OStream cerr
Definition: OStream.cxx:7
void SliceStatistics(std::vector< art::Ptr< rawdata::RawDigit > > &d, std::vector< util::RawSlice > &s, std::vector< unsigned int > &nhit, std::vector< unsigned int > &nsat, std::vector< unsigned int > &adc, std::vector< double > &avet, std::vector< unsigned int > &nafter, std::vector< bool > &iscandidate)
TH1F * fNafterNoCand
Number of slices following a non-candidate.
TH1F * fFilterFrac
Fraction of hits filtered as FEB flash.
TH2F * fDeltaTADC1
Time / ADC for slice pairs.
TH1F * fNFEBSlice
Time slices found per FEB per event.
correl_yv Fill(-(dy[iP-1][iC-1]), hyv->GetBinContent(iP, iC))
unsigned int FilterFEBFlash(std::vector< art::Ptr< rawdata::RawDigit > > &rd)
TH1F * fNsat
Number of hits near saturation.
int evt
Float_t d
Definition: plot.C:236
const double j
Definition: BetheBloch.cxx:29
OStream cout
Definition: OStream.cxx:6
TH1F * fSumADC
Total ADC in a slice.
TH1F * fADC1
Summed ADC for after slices.
TH1F * fADC
ADC distribution of hits.
TH1F * fNcand
Number of candidates found per event.
TH1F * fNhit
Number of hits per FEB slice.
Definition: fwd.h:29
void FEBTimeSlice(std::vector< art::Ptr< rawdata::RawDigit > > &d, std::vector< util::RawSlice > &s)
TH1F * fNafterCand
Number of slices following a flash candidate.
void comi::FEBFlash::beginJob ( )
inlinevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 139 of file FEBFlash_module.cc.

References MakeMiniprodValidationCuts::f.

140  {
142 
143  fFilterFrac = f->make<TH1F>("fFilterFrac",
144  ";fraction of hits filtered;events",
145  1001, -0.0005, 1.0005);
146 
147  fADC = f->make<TH1F>("fADC",
148  ";ADC counts;number of hits",
149  4096, -0.5, 4095.5);
150 
151  fNcand = f->make<TH1F>("fNcand",
152  ";number of candidates;events",
153  101, -0.5, 100.5);
154 
155  fNFEBSlice = f->make<TH1F>("fNFEBSlice",
156  ";number of slices;counts/FEB/events",
157  101, -0.5, 100.5);
158 
159  fNhit = f->make<TH1F>("fNhit",
160  ";hits per slice;slices/FEB/event",
161  51, -0.5, 50.5);
162 
163  fNsat = f->make<TH1F>("fNsat",
164  ";saturated hits per slice;slices/FEB/event",
165  33, -0.5, 32.5);
166 
167  fSumADC = f->make<TH1F>("fSumADC",
168  ";summed ADC;slices/FEB/event",
169  120, 0, 60000);
170 
171  fNafterCand = f->make<TH1F>("fNafterCand",
172  ";N after slices : candidate; counts",
173  101, -0.5, 100.5);
174 
175  fNafterNoCand = f->make<TH1F>("fNafterNoCand",
176  ";N after slices : non-candidate; counts",
177  101, -0.5, 100.5);
178 
179  fADC1 = f->make<TH1F>("fADC1",
180  ";summed ADC for after slices;counts/FEB/event",
181  120, 0, 60000);
182 
183  fDeltaT = f->make<TH1F>("fDeltaT",
184  "; time difference (usec); counts/FEB/event",
185  500, 0, 500);
186 
187  fADC0ADC1 = f->make<TH2F>("fADC0ADC1",
188  ";summed ADC 0;summed ADC1",
189  120, 0, 60000,
190  120, 0, 60000);
191 
192  fDeltaTADC0 = f->make<TH2F>("fDeltaTADC0",
193  ";deltaT (usec);ADC0",
194  500, 0, 500,
195  120, 0, 60000);
196 
197  fDeltaTADC1 = f->make<TH2F>("fDeltaTADC1",
198  ";deltaT (usec);ADC1",
199  500, 0, 500,
200  120, 0, 60000);
201  }
TH1F * fDeltaT
Time differences between flash and after slices.
TH2F * fADC0ADC1
ADC for slice pairs.
TH2F * fDeltaTADC0
Time / ADC for slice pairs.
TH1F * fNafterNoCand
Number of slices following a non-candidate.
TH1F * fFilterFrac
Fraction of hits filtered as FEB flash.
TH2F * fDeltaTADC1
Time / ADC for slice pairs.
TH1F * fNFEBSlice
Time slices found per FEB per event.
TH1F * fNsat
Number of hits near saturation.
TH1F * fSumADC
Total ADC in a slice.
TH1F * fADC1
Summed ADC for after slices.
TH1F * fADC
ADC distribution of hits.
TH1F * fNcand
Number of candidates found per event.
TH1F * fNhit
Number of hits per FEB slice.
TH1F * fNafterCand
Number of slices following a flash candidate.
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 55 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumes(), T, and getGoodRuns4SAM::tag.

56  {
57  return collector_.consumes<T, BT>(tag);
58  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ProductToken< T > consumes(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ConsumesCollector& art::ModuleBase::consumesCollector ( )
protectedinherited
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 69 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumesMany(), and T.

70  {
71  collector_.consumesMany<T, BT>();
72  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 62 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumesView(), T, and getGoodRuns4SAM::tag.

63  {
64  return collector_.consumesView<T, BT>(tag);
65  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > consumesView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
void art::detail::Analyzer::doBeginJob ( )
inherited
bool art::detail::Analyzer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Analyzer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
void art::detail::Analyzer::doEndJob ( )
inherited
bool art::detail::Analyzer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Analyzer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Analyzer::doEvent ( EventPrincipal ep,
ModuleContext const &  mc,
std::atomic< std::size_t > &  counts_run,
std::atomic< std::size_t > &  counts_passed,
std::atomic< std::size_t > &  counts_failed 
)
inherited
void art::detail::Analyzer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited
void art::detail::Analyzer::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited
void art::detail::Analyzer::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited
void art::detail::Analyzer::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited
void comi::FEBFlash::FEBTimeSlice ( std::vector< art::Ptr< rawdata::RawDigit > > &  d,
std::vector< util::RawSlice > &  s 
)
inline

Produce a list of time slices for hits from a single FEB

d - Input list of hits selected by FEB. Time sorted on return. s - slices, index pairs into d where significant activity occurs

Definition at line 210 of file FEBFlash_module.cc.

References d, util::TimeSlice(), and util::TimeSort().

Referenced by analyze().

212  {
213  util::TimeSort(d);
215  }
unsigned int fdTFEBSlice
const XML_Char * s
Definition: expat.h:262
unsigned int fNhitFEBSlice
void TimeSlice(const std::vector< art::Ptr< rawdata::RawDigit > > &d, unsigned int dt_tdc, unsigned int nhit, unsigned int nhitx, unsigned int nhity, std::vector< RawSlice > &slice)
Find windows in time that have significant activity in the detector.
Definition: RawUtil.cxx:111
Float_t d
Definition: plot.C:236
void TimeSort(std::vector< art::Ptr< rawdata::RawDigit > > &d)
Arrange the list of raw hits in time order (early to late)
Definition: RawUtil.cxx:31
void art::Observer::fillDescriptions ( ModuleDescription const &  )
inherited
unsigned int comi::FEBFlash::FilterFEBFlash ( std::vector< art::Ptr< rawdata::RawDigit > > &  rd)
inline

Definition at line 62 of file FEBFlash_module.cc.

References deltaTDC(), update_sam_good_runs_metadata::good, MECModelEnuComparisons::i, calib::j, kTDC_PER_USEC, and util::TimeSort().

Referenced by analyze().

63  {
64  unsigned int i, j;
65  int deltaTDC = 30*kTDC_PER_USEC;
66  int ADCSaturation = 3400;
67 
68  //
69  // For efficiency, time sort the hits in advance
70  //
71  util::TimeSort(rd);
72 
73  //
74  // Flag all hits as good, look for ones that might be bad
75  //
76  std::vector<bool> isgood(rd.size());
77  for (i=0; i<rd.size(); ++i) isgood[i] = true;
78  for (i=0; (i+1)<rd.size(); ++i) {
79  //
80  // If the hit i is not in saturation, we can skip to the next
81  // hit
82  //
83  if (rd[i]->ADC()<ADCSaturation) continue;
84  //
85  // Get ID number for the FEB ID that has the hit in saturation
86  //
87  unsigned int chi = rd[i]->DaqChannel();
88  unsigned int diblocki = (chi&0x0FC00000)>>22;
89  unsigned int dcmi = (chi&0x003F0000)>>16;
90  unsigned int febi = (chi&0x0000FF00)>>8;
91  for (j=i+1; j<rd.size(); ++j) {
92  //
93  // Don't need to look beyond the time limit
94  //
95  if ((rd[j]->TDC()-rd[i]->TDC())>deltaTDC) break;
96  //
97  // Hit j is in time range of another hit which is in
98  // saturation. Check if hit j comes from the same FEB as hit
99  // i
100  //
101  unsigned int chj = rd[j]->DaqChannel();
102  unsigned int diblockj = (chj&0x0FC00000)>>22;
103  unsigned int dcmj = (chj&0x003F0000)>>16;
104  unsigned int febj = (chj&0x0000FF00)>>8;
105  bool sameFEB =
106  (diblocki==diblockj) && (dcmi==dcmj) && (febi==febj);
107  if (sameFEB) isgood[j] = false;
108  }
109  }
110  //
111  // Push all the good hits into the final list
112  //
113  std::vector< art::Ptr<rawdata::RawDigit> > good;
114  good.reserve(rd.size());
115  for (i=0; i<rd.size(); ++i) {
116  if (isgood[i]) good.push_back(rd[i]);
117  }
118  rd.swap(good);
119  return rd.size();
120  }
const double j
Definition: BetheBloch.cxx:29
double deltaTDC(const novaddt::TDC &h1, const novaddt::TDC &h2)
const int kTDC_PER_USEC
void TimeSort(std::vector< art::Ptr< rawdata::RawDigit > > &d)
Arrange the list of raw hits in time order (early to late)
Definition: RawUtil.cxx:31
std::array<std::vector<ProductInfo>, NumBranchTypes> const& art::ModuleBase::getConsumables ( ) const
inherited
Handle<TriggerResults> art::Observer::getTriggerResults ( Event const &  e) const
inherited
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 76 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsume(), T, and getGoodRuns4SAM::tag.

77  {
78  return collector_.mayConsume<T, BT>(tag);
79  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 90 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeMany(), and T.

91  {
93  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 83 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeView(), T, and getGoodRuns4SAM::tag.

84  {
85  return collector_.mayConsumeView<T, BT>(tag);
86  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > mayConsumeView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ModuleDescription const& art::ModuleBase::moduleDescription ( ) const
inherited
detail::ProcessAndEventSelectors& art::Observer::processAndEventSelectors ( )
protectedinherited
std::string const& art::Observer::processName ( ) const
inherited
void comi::FEBFlash::reconfigure ( const fhicl::ParameterSet p)
inline

Definition at line 135 of file FEBFlash_module.cc.

Referenced by FEBFlash().

135 { }
void art::Observer::registerProducts ( ProductDescriptions ,
ModuleDescription const &   
)
inherited
fhicl::ParameterSetID art::Observer::selectorConfig ( ) const
inherited
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  )
inherited
void comi::FEBFlash::SliceStatistics ( std::vector< art::Ptr< rawdata::RawDigit > > &  d,
std::vector< util::RawSlice > &  s,
std::vector< unsigned int > &  nhit,
std::vector< unsigned int > &  nsat,
std::vector< unsigned int > &  adc,
std::vector< double > &  avet,
std::vector< unsigned int > &  nafter,
std::vector< bool > &  iscandidate 
)
inline

Compile some statistics on each of the slices

Definition at line 221 of file FEBFlash_module.cc.

References d, fNafter, MECModelEnuComparisons::i, calib::j, and ns.

Referenced by analyze().

229  {
230  unsigned int i, j;
231  for (i=0; i<s.size(); ++i) {
232  unsigned int n = s[i].second-s[i].first+1;
233  nhit.push_back(n);
234 
235  unsigned int ns = 0;
236  unsigned int na = 0;
237  unsigned int sumadc = 0;
238  unsigned int sumtdc = 0;
239  for (j=s[i].first; j<=s[i].second; ++j) {
240  if (d[j]->ADC()>=fADCSat) ++ns;
241  sumadc += d[j]->ADC();
242  sumtdc += d[j]->TDC();
243  }
244  nsat.push_back(ns);
245  adc. push_back(sumadc);
246  avet.push_back(kUSEC_PER_TDC*sumtdc/(float)n);
247 
248  na = s.size()-(i+1);
249  nafter.push_back(na);
250 
251  //
252  // Check if this slice is a candidate for an initial "pow"
253  // that triggers afterflashes
254  //
255  bool isc = (n >= fNhit0 &&
256  ns >= fNsat0 &&
257  sumadc >= fADC0 &&
258  na >= fNafter);
259  iscandidate.push_back(isc);
260  }
261  }
const double kUSEC_PER_TDC
nhit
Definition: demo1.py:25
const XML_Char * s
Definition: expat.h:262
std::void_t< T > n
unsigned int fNafter
Float_t d
Definition: plot.C:236
const double j
Definition: BetheBloch.cxx:29
static const double ns
Module that plots metrics from reconstructed cosmic ray data.
unsigned int fNsat0
unsigned int fADC0
unsigned int fNhit0
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited
bool art::Observer::wantAllEvents ( ) const
inherited
bool art::Observer::wantEvent ( Event const &  e)
inherited
std::string art::EDAnalyzer::workerType ( ) const
inherited

Member Data Documentation

TH1F* comi::FEBFlash::fADC

ADC distribution of hits.

Definition at line 45 of file FEBFlash_module.cc.

unsigned int comi::FEBFlash::fADC0 = 0

Definition at line 41 of file FEBFlash_module.cc.

TH2F* comi::FEBFlash::fADC0ADC1

ADC for slice pairs.

Definition at line 55 of file FEBFlash_module.cc.

TH1F* comi::FEBFlash::fADC1

Summed ADC for after slices.

Definition at line 53 of file FEBFlash_module.cc.

int comi::FEBFlash::fADCSat = 3400

Definition at line 42 of file FEBFlash_module.cc.

TH1F* comi::FEBFlash::fDeltaT

Time differences between flash and after slices.

Definition at line 54 of file FEBFlash_module.cc.

TH2F* comi::FEBFlash::fDeltaTADC0

Time / ADC for slice pairs.

Definition at line 56 of file FEBFlash_module.cc.

TH2F* comi::FEBFlash::fDeltaTADC1

Time / ADC for slice pairs.

Definition at line 57 of file FEBFlash_module.cc.

unsigned int comi::FEBFlash::fdTFEBSlice = kTDC_PER_USEC/2

Definition at line 37 of file FEBFlash_module.cc.

TH1F* comi::FEBFlash::fFilterFrac

Fraction of hits filtered as FEB flash.

Definition at line 44 of file FEBFlash_module.cc.

unsigned int comi::FEBFlash::fNafter = 0

Definition at line 40 of file FEBFlash_module.cc.

Referenced by SliceStatistics().

TH1F* comi::FEBFlash::fNafterCand

Number of slices following a flash candidate.

Definition at line 51 of file FEBFlash_module.cc.

TH1F* comi::FEBFlash::fNafterNoCand

Number of slices following a non-candidate.

Definition at line 52 of file FEBFlash_module.cc.

TH1F* comi::FEBFlash::fNcand

Number of candidates found per event.

Definition at line 46 of file FEBFlash_module.cc.

TH1F* comi::FEBFlash::fNFEBSlice

Time slices found per FEB per event.

Definition at line 47 of file FEBFlash_module.cc.

TH1F* comi::FEBFlash::fNhit

Number of hits per FEB slice.

Definition at line 48 of file FEBFlash_module.cc.

unsigned int comi::FEBFlash::fNhit0 = 5

Definition at line 38 of file FEBFlash_module.cc.

unsigned int comi::FEBFlash::fNhitFEBSlice = 2

Definition at line 36 of file FEBFlash_module.cc.

TH1F* comi::FEBFlash::fNsat

Number of hits near saturation.

Definition at line 49 of file FEBFlash_module.cc.

unsigned int comi::FEBFlash::fNsat0 = 1

Definition at line 39 of file FEBFlash_module.cc.

TH1F* comi::FEBFlash::fSumADC

Total ADC in a slice.

Definition at line 50 of file FEBFlash_module.cc.

const int comi::FEBFlash::kTDC_PER_USEC = 64

Definition at line 33 of file FEBFlash_module.cc.

Referenced by FilterFEBFlash().

const double comi::FEBFlash::kUSEC_PER_TDC = 1.0/kTDC_PER_USEC

Definition at line 34 of file FEBFlash_module.cc.


The documentation for this class was generated from the following file: