Public Types | Public Member Functions | Static 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::EventObserverBase art::Consumer art::EngineCreator

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
 
bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

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

CurrentProcessingContext const * currentContext () const
 
detail::CachedProducts & cachedProducts ()
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Detailed Description

Analysis module to hunt for neutrino candidates.

Definition at line 29 of file FEBFlash_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 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(Table< Config > const &config)
Definition: EDAnalyzer.h:100
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::Event::run(), SliceStatistics(), and art::Event::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:28
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, and art::TFileDirectory::make().

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.
T * make(ARGS...args) const
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.
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDAnalyzer::currentContext ( ) const
protectedinherited
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
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
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inlineinherited

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and art::EventObserverBase::selectors_.

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:35
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::EventObserverBase::modifiesEvent ( ) const
inlineinherited

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void comi::FEBFlash::reconfigure ( const fhicl::ParameterSet p)
inline

Definition at line 135 of file FEBFlash_module.cc.

Referenced by FEBFlash().

135 { }
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inlineinherited

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

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, getGoodRuns4SAM::n, ns, and push_back().

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
unsigned int fNafter
base_types push_back(int_type())
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::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited

Definition at line 46 of file EventObserverBase.h.

References art::EventObserverBase::wantAllEvents_.

Referenced by art::RootOutput::RootOutput().

47  {
48  return wantAllEvents_;
49  }
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited

Definition at line 51 of file EventObserverBase.h.

References art::EventObserverBase::selectors_, and art::detail::CachedProducts::wantEvent().

52  {
53  return selectors_.wantEvent(e);
54  }
detail::CachedProducts selectors_
Float_t e
Definition: plot.C:35
bool wantEvent(Event const &)
std::string art::EDAnalyzer::workerType ( ) const
inlineinherited

Definition at line 109 of file EDAnalyzer.h.

References art::EDAnalyzer::currentContext().

110  {
111  return "WorkerT<EDAnalyzer>";
112  }

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: