Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
novatb::BeamTuning Class Reference
Inheritance diagram for novatb::BeamTuning:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 BeamTuning (fhicl::ParameterSet const &p)
 
void reconfigure (const fhicl::ParameterSet &p)
 
void analyze (art::Event const &e) override
 
void beginJob () override
 
void beginRun (art::Run const &r) override
 
void beginSubRun (art::SubRun const &sr) override
 
void endJob () override
 
void endRun (art::Run const &r) override
 
void endSubRun (art::SubRun const &sr) override
 
std::vector< double > findCluster (unsigned int tofIndex)
 
void makeLinesAndTexts (TH1D *histogram, double ymin, double ymax, std::vector< TLine * > &lines, std::vector< TText * > &texts)
 
void findTime (unsigned int subrunNo, int &srH, int &srM)
 
bool convertNovaTimeToUnixTime (uint64_t const &inputNovaTime, struct tm &outputUnixTime)
 
bool convertNovaTimeToUnixTime (uint64_t const &inputNovaTime, struct timeval &outputUnixTime)
 
void decimal2binary (unsigned int decimalNumber, unsigned int *binaryNumber)
 
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 ()
 

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
 

Private Attributes

art::InputTag _ToFInputTag
 
art::InputTag _WCInputTag
 
art::InputTag _CherenkovInputTag
 
art::InputTag _TriggerInputTag
 
art::InputTag _RawWCInputTag
 
unsigned int runNumber
 
std::string TriggerBitName [16]
 
std::vector< double > startTimeOfHits [12]
 
std::vector< double > tof_p1_p4
 
std::vector< double > momentum
 
std::vector< bool > isElectron
 
unsigned int totalTriggersInSubrun
 
unsigned int goodTriggersInSubrun
 
unsigned int decentTriggersInSubrun
 
TH1D * hGoodTriggerRatio
 
TH1D * hDecentTriggerRatio
 
TH1D * hTotalTrigger
 
TH1D * hGoodTrigger
 
TH1D * hDecentTrigger
 
int _RunStartH
 
int _RunStartM
 
unsigned int _TimeRange
 
unsigned int _TimeInterval
 
double _RangeRatio
 
double _RangeTotal
 
double _RangeGood
 
bool _DrawLinesAndTimes
 
bool _RequireWCTrack
 
bool _Require3WCs
 
unsigned int countTriggerBit_TOFDS
 
unsigned int countTriggerBit_TOFUS
 
unsigned int countTriggerBit_TOFPrompt
 
unsigned int countTriggerBit_TOFSlow
 
unsigned int countTriggerBit_WCHDWR
 
unsigned int countTriggerBit_PAD1
 
unsigned int countTriggerBit_PAD2
 
unsigned int countTriggerBit_PAD3
 
unsigned int countTriggerBit_PAD4
 
std::ofstream TriggerBitCountFile
 
art::ServiceHandle< beamlineutil::BeamlineChannelMapfChannelMap
 

Detailed Description

Definition at line 153 of file BeamTuning_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

novatb::BeamTuning::BeamTuning ( fhicl::ParameterSet const &  p)
explicit

Definition at line 234 of file BeamTuning_module.cc.

References reconfigure().

234  : EDAnalyzer(p) {
235  reconfigure(p);
236 }
const char * p
Definition: xmltok.h:285
void reconfigure(const fhicl::ParameterSet &p)
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100

Member Function Documentation

void novatb::BeamTuning::analyze ( art::Event const &  e)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 337 of file BeamTuning_module.cc.

References _RawWCInputTag, _Require3WCs, _RequireWCTrack, _RunStartH, _RunStartM, _ToFInputTag, _TriggerInputTag, _WCInputTag, convertNovaTimeToUnixTime(), countTriggerBit_PAD1, countTriggerBit_PAD2, countTriggerBit_PAD3, countTriggerBit_PAD4, countTriggerBit_TOFDS, countTriggerBit_TOFPrompt, countTriggerBit_TOFSlow, countTriggerBit_TOFUS, countTriggerBit_WCHDWR, om::cout, decentTriggersInSubrun, decimal2binary(), allTimeWatchdog::endl, fChannelMap, art::fill_ptr_vector(), findCluster(), art::DataViewImpl::getByLabel(), goodTriggersInSubrun, beamlineutil::BeamlineChannelMap::OnlineDigitChannel(), submit_syst::pattern, gen_flatrecord::size, startTimeOfHits, art::Event::subRun(), and totalTriggersInSubrun.

337  {
339  std::vector<art::Ptr<brb::BeamlineDigit> > ToFs;
340  if (e.getByLabel(_ToFInputTag, ToFHandle))
341  art::fill_ptr_vector(ToFs, ToFHandle);
342 
344  std::vector<art::Ptr<brb::WCTrack> > WCs;
345  if (e.getByLabel(_WCInputTag, WCHandle)) art::fill_ptr_vector(WCs, WCHandle);
346 
348  std::vector<art::Ptr<rawdata::RawBeamlineTrigger> > Triggers;
349  if (e.getByLabel(_TriggerInputTag, TriggerHandle))
350  art::fill_ptr_vector(Triggers, TriggerHandle);
351 
353  std::vector<art::Ptr<rawdata::RawBeamlineWC> > RawWCs;
354  if (e.getByLabel(_RawWCInputTag, RawWCHandle))
355  art::fill_ptr_vector(RawWCs, RawWCHandle);
356 
357  for (auto trigItr = Triggers.begin(); trigItr != Triggers.end(); trigItr++) {
358  unsigned int pattern = (*trigItr)->Pattern();
359  unsigned int binaryNumber[32];
360  decimal2binary(pattern, &binaryNumber[0]);
361  if (binaryNumber[13] == 1) countTriggerBit_TOFDS++;
362  if (binaryNumber[8] == 1) countTriggerBit_TOFUS++;
363  if (binaryNumber[14] == 1) countTriggerBit_TOFPrompt++;
364  if (binaryNumber[15] == 1) countTriggerBit_TOFSlow++;
365  if (binaryNumber[12] == 1) countTriggerBit_WCHDWR++;
366  if (binaryNumber[4] == 1) countTriggerBit_PAD1++;
367  if (binaryNumber[5] == 1) countTriggerBit_PAD2++;
368  if (binaryNumber[6] == 1) countTriggerBit_PAD3++;
369  if (binaryNumber[7] == 1) countTriggerBit_PAD4++;
370  }
371 
372  if (e.subRun() < 20 && _RunStartH == -9999 && _RunStartM == -9999) {
373  struct tm outputTime;
374  if (Triggers.size() >= 1) {
375  auto TriggerItr = Triggers.begin();
376  uint64_t inputNovaTime = (*TriggerItr)->TDUTime();
377  convertNovaTimeToUnixTime(inputNovaTime, outputTime);
378  }
379  bool hourBack = false;
380  if (outputTime.tm_min < (int)(e.subRun() - 1)) {
381  _RunStartM = outputTime.tm_min - (e.subRun() - 1) + 60;
382  hourBack = true;
383  } else {
384  _RunStartM = outputTime.tm_min - (e.subRun() - 1);
385  }
386  if (hourBack) {
387  _RunStartH = outputTime.tm_hour - 6 > 0 ? outputTime.tm_hour - 6
388  : outputTime.tm_hour - 6 + 24;
389  } else {
390  _RunStartH = outputTime.tm_hour - 5 > 0 ? outputTime.tm_hour - 5
391  : outputTime.tm_hour - 5 + 24;
392  }
393  std::cout << "_RunStartH: " << _RunStartH << std::endl;
394  std::cout << "_RunStartM: " << _RunStartM << std::endl;
395  }
396 
397  for (unsigned int iCh = 0; iCh < 12; iCh++) {
398  startTimeOfHits[iCh].clear();
399  }
400 
401  for (auto TOFitr = ToFs.begin(); TOFitr != ToFs.end(); TOFitr++) {
402  unsigned int channel = fChannelMap->OnlineDigitChannel((*TOFitr)->ChannelID());
403  startTimeOfHits[channel - 4].push_back((*TOFitr)->StartTimeInNanoSec());
404  }
405 
406  std::vector<double> hitStartTOFUS = findCluster(0);
407  std::vector<double> hitStartTOFDS = findCluster(1);
408  int nHitsTOFUS = hitStartTOFUS.size();
409  int nHitsTOFDS = hitStartTOFDS.size();
410 
411  bool passSelectionGoodTrack = false;
412  if (nHitsTOFUS >= 1 && nHitsTOFDS >= 1) passSelectionGoodTrack = true;
413  if (passSelectionGoodTrack) {
414  if (_RequireWCTrack) {
415  if (WCs.size() >= 1) {
417  } // make sure only one and only one track is associated with this
418  // trigger
419  } else {
421  }
422  }
423 
424  unsigned int foundWC[4] = {1, 1, 1, 1} ;
425  for (auto RawWCitr = RawWCs.begin(); RawWCitr != RawWCs.end(); RawWCitr++) {
426  unsigned int wcnumber = (*RawWCitr)->DetectorID().Detector;
427  unsigned int nhitX = ((*RawWCitr)->XPulses()).size();
428  unsigned int nhitY = ((*RawWCitr)->YPulses()).size();
429  if (nhitX == 0 || nhitY == 0) {
430  foundWC[wcnumber] = 0;
431  }
432  }
433  unsigned int numberOfWCsHit = foundWC[0] + foundWC[1] + foundWC[2] + foundWC[3];
434 
435  bool passSelection3WCs = false;
436  if (nHitsTOFUS >= 1 && nHitsTOFDS >= 1) passSelection3WCs = true;
437  if (passSelection3WCs) {
438  if (_Require3WCs) {
439  if (numberOfWCsHit >= 3) {
441  } // make sure only one and only one track is associated with this
442  // trigger
443  } else {
445  }
446  }
447 
449 }
std::vector< double > startTimeOfHits[12]
unsigned int countTriggerBit_PAD2
art::InputTag _WCInputTag
unsigned int OnlineDigitChannel(ChannelID channel) const
Online digiziter channel number for this offline ChannelID.
art::InputTag _RawWCInputTag
unsigned int countTriggerBit_TOFDS
unsigned int countTriggerBit_PAD1
unsigned int goodTriggersInSubrun
art::InputTag _TriggerInputTag
unsigned int countTriggerBit_TOFSlow
void decimal2binary(unsigned int decimalNumber, unsigned int *binaryNumber)
unsigned int decentTriggersInSubrun
std::vector< double > findCluster(unsigned int tofIndex)
bool convertNovaTimeToUnixTime(uint64_t const &inputNovaTime, struct tm &outputUnixTime)
OStream cout
Definition: OStream.cxx:6
unsigned int countTriggerBit_PAD4
unsigned int totalTriggersInSubrun
unsigned int countTriggerBit_WCHDWR
unsigned int countTriggerBit_TOFPrompt
art::ServiceHandle< beamlineutil::BeamlineChannelMap > fChannelMap
unsigned int countTriggerBit_TOFUS
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:464
Float_t e
Definition: plot.C:35
unsigned int countTriggerBit_PAD3
art::InputTag _ToFInputTag
void novatb::BeamTuning::beginJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 267 of file BeamTuning_module.cc.

References _RunStartH, _RunStartM, _TimeRange, allTimeWatchdog::endl, hDecentTrigger, hDecentTriggerRatio, hGoodTrigger, hGoodTriggerRatio, hTotalTrigger, and TriggerBitCountFile.

267  {
268  _RunStartH = -9999;
269  _RunStartM = -9999;
270 
271  TriggerBitCountFile.open(Form("TriggerBitCountFile.txt"));
273 
274  TriggerBitCountFile << std::setw(15) << "SUBRUN"
275  << " ";
276  ;
277  TriggerBitCountFile << std::setw(15) << "TOFDS"
278  << " ";
279  ;
280  TriggerBitCountFile << std::setw(15) << "TOFUS"
281  << " ";
282  ;
283  TriggerBitCountFile << std::setw(15) << "TOFPrompt"
284  << " ";
285  ;
286  TriggerBitCountFile << std::setw(15) << "TOFSlow"
287  << " ";
288  ;
289  TriggerBitCountFile << std::setw(15) << "WCHDWR"
290  << " ";
291  ;
292  TriggerBitCountFile << std::setw(15) << "PAD1"
293  << " ";
294  ;
295  TriggerBitCountFile << std::setw(15) << "PAD2"
296  << " ";
297  ;
298  TriggerBitCountFile << std::setw(15) << "PAD3"
299  << " ";
300  ;
301  TriggerBitCountFile << std::setw(15) << "PAD4" << std::endl;
302 
304  new TH1D("hGoodTriggerRatio", ";Subrun Number;Ratio of Good Trigger (%)",
305  _TimeRange - 1, 1, _TimeRange);
307  new TH1D("hDecentTriggerRatio", ";Subrun Number;Ratio of Good Triggers (%)",
308  _TimeRange - 1, 1, _TimeRange);
309  hTotalTrigger = new TH1D("hTotalTrigger", ";Subrun Number;Trigger Counts",
310  _TimeRange - 1, 1, _TimeRange);
311  hGoodTrigger = new TH1D("hGoodTrigger", ";Subrun Number;Good Triggers",
312  _TimeRange - 1, 1, _TimeRange);
313  hDecentTrigger = new TH1D("hGoodTrigger", ";Subrun Number;Good Triggers",
314  _TimeRange - 1, 1, _TimeRange);
315 }
std::ofstream TriggerBitCountFile
void novatb::BeamTuning::beginRun ( art::Run const &  r)
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 317 of file BeamTuning_module.cc.

References art::Run::id(), art::RunID::run(), and runNumber.

317  {
318  runNumber = r.id().run();
319 }
TRandom3 r(0)
void novatb::BeamTuning::beginSubRun ( art::SubRun const &  sr)
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 321 of file BeamTuning_module.cc.

References countTriggerBit_PAD1, countTriggerBit_PAD2, countTriggerBit_PAD3, countTriggerBit_PAD4, countTriggerBit_TOFDS, countTriggerBit_TOFPrompt, countTriggerBit_TOFSlow, countTriggerBit_TOFUS, countTriggerBit_WCHDWR, decentTriggersInSubrun, goodTriggersInSubrun, and totalTriggersInSubrun.

321  {
325 
335 }
unsigned int countTriggerBit_PAD2
unsigned int countTriggerBit_TOFDS
unsigned int countTriggerBit_PAD1
unsigned int goodTriggersInSubrun
unsigned int countTriggerBit_TOFSlow
unsigned int decentTriggersInSubrun
unsigned int countTriggerBit_PAD4
unsigned int totalTriggersInSubrun
unsigned int countTriggerBit_WCHDWR
unsigned int countTriggerBit_TOFPrompt
unsigned int countTriggerBit_TOFUS
unsigned int countTriggerBit_PAD3
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
bool novatb::BeamTuning::convertNovaTimeToUnixTime ( uint64_t const &  inputNovaTime,
struct tm &  outputUnixTime 
)

Definition at line 573 of file BeamTuning_module.cc.

Referenced by analyze().

574  {
575  timeval outputTimeval;
576  if (!convertNovaTimeToUnixTime(inputNovaTime, outputTimeval)) return false;
577  outputUnixTime = *gmtime(&(outputTimeval.tv_sec));
578 
579  return true;
580 }
bool convertNovaTimeToUnixTime(uint64_t const &inputNovaTime, struct tm &outputUnixTime)
bool novatb::BeamTuning::convertNovaTimeToUnixTime ( uint64_t const &  inputNovaTime,
struct timeval &  outputUnixTime 
)

Definition at line 582 of file BeamTuning_module.cc.

References NOVA_EPOCH, and NOVA_TIME_FACTOR.

583  {
584  double doubleTime = (double)inputNovaTime / (double)NOVA_TIME_FACTOR;
585  time_t time_sec = (time_t)doubleTime;
586  outputUnixTime.tv_sec = NOVA_EPOCH + time_sec;
587  outputUnixTime.tv_usec =
588  (suseconds_t)((doubleTime - (double)time_sec) * 1000000);
589  // test in chrono order
590  if (outputUnixTime.tv_sec > 1341100799) // Jun 30 23:59:59 2012 UTC
591  {
592  --outputUnixTime.tv_sec;
593  }
594  if (outputUnixTime.tv_sec > 1435708799) // Jun 30 23:59:59 2015 UTC
595  {
596  --outputUnixTime.tv_sec;
597  }
598 
599  if (outputUnixTime.tv_sec > 1483228799) // Dec 31 23:59:59 2016 UTC
600  {
601  --outputUnixTime.tv_sec;
602  }
603  return true;
604 }
const uint64_t NOVA_TIME_FACTOR
const uint32_t NOVA_EPOCH
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 novatb::BeamTuning::decimal2binary ( unsigned int  decimalNumber,
unsigned int binaryNumber 
)

Definition at line 238 of file BeamTuning_module.cc.

References allTimeWatchdog::index.

Referenced by analyze().

239  {
240  for (int index = 31; index >= 0; index--) {
241  unsigned int reference = TMath::Power(2, (int)index);
242  if (decimalNumber >= reference) {
243  *(binaryNumber + index) = 1;
244  decimalNumber = decimalNumber - reference;
245  } else {
246  *(binaryNumber + index) = 0;
247  }
248  }
249 }
void novatb::BeamTuning::endJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 654 of file BeamTuning_module.cc.

References _DrawLinesAndTimes, _RangeGood, _RangeRatio, _RangeTotal, plot_validation_datamc::c, DEFINE_ART_MODULE(), hDecentTrigger, hDecentTriggerRatio, hGoodTrigger, hGoodTriggerRatio, hTotalTrigger, kBlue, kRed, MECModelEnuComparisons::leg, makeLinesAndTexts(), runNumber, and TriggerBitCountFile.

654  {
655  // rootlogon();
656  gStyle->SetOptStat(0);
657 
658  TCanvas* c = new TCanvas("c", "c", 3600, 2400);
659  c->Divide(1, 2);
660  hGoodTriggerRatio->SetLineWidth(1);
661  hGoodTriggerRatio->SetLineColor(kRed);
662  hDecentTriggerRatio->SetLineWidth(1);
663  hDecentTriggerRatio->SetLineColor(kBlue);
664  hTotalTrigger->SetLineWidth(1);
665  hTotalTrigger->SetLineColor(kBlack);
666  hGoodTrigger->SetLineWidth(1);
667  hGoodTrigger->SetLineColor(kRed);
668  hDecentTrigger->SetLineWidth(1);
669  hDecentTrigger->SetLineColor(kBlue);
670 
671  _RangeRatio = hDecentTriggerRatio->GetBinContent(hDecentTriggerRatio->GetMaximumBin());
672  _RangeTotal = hTotalTrigger->GetBinContent(hTotalTrigger->GetMaximumBin());
673  _RangeGood = hDecentTrigger->GetBinContent(hDecentTrigger->GetMaximumBin());
674 
675  _RangeRatio = _RangeRatio * 1.2;
676  _RangeTotal = _RangeTotal * 1.2;
677  _RangeGood = _RangeGood * 1.2;
678 
679  hDecentTriggerRatio->GetYaxis()->SetRangeUser(0, _RangeRatio);
680  hTotalTrigger->GetYaxis()->SetRangeUser(0, _RangeTotal);
681  hDecentTrigger->GetYaxis()->SetRangeUser(0, _RangeGood);
682 
683  hGoodTriggerRatio->GetXaxis()->CenterTitle();
684  hDecentTriggerRatio->GetXaxis()->CenterTitle();
685  hTotalTrigger->GetXaxis()->CenterTitle();
686  hGoodTrigger->GetXaxis()->CenterTitle();
687  hDecentTrigger->GetXaxis()->CenterTitle();
688 
689  c->cd(1);
690  TLegend* leg_ratio = new TLegend(0.75, 0.75, 0.95, 0.95);
691  leg_ratio->AddEntry(hDecentTriggerRatio, "TOF & atleast 3WCs", "l");
692  leg_ratio->AddEntry(hGoodTriggerRatio, "TOF & Track (4WCs)", "l");
693  hDecentTriggerRatio->Draw();
694  hGoodTriggerRatio->Draw("SAME");
695  leg_ratio->Draw();
696  std::vector<TLine*> ratiolines;
697  std::vector<TText*> ratiotexts;
698  makeLinesAndTexts(hDecentTriggerRatio, 0, _RangeRatio, ratiolines, ratiotexts);
699  if (_DrawLinesAndTimes) {
700  for (unsigned int k = 0; k < ratiolines.size(); k++) {
701  ratiolines.at(k)->SetLineStyle(kDashed);
702  ratiolines.at(k)->Draw();
703  ratiotexts.at(k)->SetTextAngle(90);
704  ratiotexts.at(k)->Draw();
705  }
706  }
707 
708  c->cd(2);
709  TLegend* leg = new TLegend(0.75, 0.70, 0.95, 0.95);
710  leg->AddEntry(hTotalTrigger, "All triggers", "l");
711  leg->AddEntry(hDecentTrigger, "TOF & atleast 3WCs", "l");
712  leg->AddEntry(hGoodTrigger, "TOF & Track (4WCs)", "l");
713  hTotalTrigger->Draw();
714  hGoodTrigger->Draw("SAME");
715  hDecentTrigger->Draw("SAME");
716  leg->Draw();
717  std::vector<TLine*> totallines;
718  std::vector<TText*> totaltexts;
719  makeLinesAndTexts(hTotalTrigger, 0, _RangeTotal, totallines, totaltexts);
720  if (_DrawLinesAndTimes) {
721  for (unsigned int k = 0; k < totallines.size(); k++) {
722  totallines.at(k)->SetLineStyle(kDashed);
723  totallines.at(k)->Draw();
724  totaltexts.at(k)->SetTextAngle(90);
725  totaltexts.at(k)->Draw();
726  }
727  }
728 
729  c->SaveAs(Form("tune_run_%i.pdf", (int)runNumber));
730 
731  TriggerBitCountFile.close();
732 }
std::ofstream TriggerBitCountFile
enum BeamMode kRed
void makeLinesAndTexts(TH1D *histogram, double ymin, double ymax, std::vector< TLine * > &lines, std::vector< TText * > &texts)
enum BeamMode kBlue
void novatb::BeamTuning::endRun ( art::Run const &  r)
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 571 of file BeamTuning_module.cc.

571 {}
void novatb::BeamTuning::endSubRun ( art::SubRun const &  sr)
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 542 of file BeamTuning_module.cc.

References countTriggerBit_PAD1, countTriggerBit_PAD2, countTriggerBit_PAD3, countTriggerBit_PAD4, countTriggerBit_TOFDS, countTriggerBit_TOFPrompt, countTriggerBit_TOFSlow, countTriggerBit_TOFUS, countTriggerBit_WCHDWR, decentTriggersInSubrun, allTimeWatchdog::endl, goodTriggersInSubrun, hDecentTrigger, hDecentTriggerRatio, hGoodTrigger, hGoodTriggerRatio, hTotalTrigger, art::SubRun::id(), art::SubRunID::subRun(), art::SubRun::subRun(), totalTriggersInSubrun, and TriggerBitCountFile.

542  {
543  // std::cout << "totalTriggersInSubrun: " << totalTriggersInSubrun << std::endl;
544  // std::cout << "goodTriggersInSubrun: " << goodTriggersInSubrun << std::endl;
545  // std::cout << "sr.subRun(): " << sr.subRun() << std::endl;
546  hGoodTriggerRatio->SetBinContent(
547  (unsigned int)sr.subRun(),
548  100. * ((double)goodTriggersInSubrun) / ((double)totalTriggersInSubrun));
549  hDecentTriggerRatio->SetBinContent(
550  (unsigned int)sr.subRun(),
551  100. * ((double)decentTriggersInSubrun) / ((double)totalTriggersInSubrun));
552  hTotalTrigger->SetBinContent((unsigned int)sr.subRun(),
553  (double)totalTriggersInSubrun);
554  hGoodTrigger->SetBinContent((unsigned int)sr.subRun(),
555  (double)goodTriggersInSubrun);
556  hDecentTrigger->SetBinContent((unsigned int)sr.subRun(),
557  (double)decentTriggersInSubrun);
558 
559  TriggerBitCountFile << std::setw(15) << sr.id().subRun() << " ";
560  TriggerBitCountFile << std::setw(15) << countTriggerBit_TOFDS << " ";
561  TriggerBitCountFile << std::setw(15) << countTriggerBit_TOFUS << " ";
562  TriggerBitCountFile << std::setw(15) << countTriggerBit_TOFPrompt << " ";
563  TriggerBitCountFile << std::setw(15) << countTriggerBit_TOFSlow << " ";
564  TriggerBitCountFile << std::setw(15) << countTriggerBit_WCHDWR << " ";
565  TriggerBitCountFile << std::setw(15) << countTriggerBit_PAD1 << " ";
566  TriggerBitCountFile << std::setw(15) << countTriggerBit_PAD2 << " ";
567  TriggerBitCountFile << std::setw(15) << countTriggerBit_PAD3 << " ";
568  TriggerBitCountFile << std::setw(15) << countTriggerBit_PAD4 << std::endl;
569 }
std::ofstream TriggerBitCountFile
unsigned int countTriggerBit_PAD2
unsigned int countTriggerBit_TOFDS
unsigned int countTriggerBit_PAD1
unsigned int goodTriggersInSubrun
unsigned int countTriggerBit_TOFSlow
caf::StandardRecord * sr
unsigned int decentTriggersInSubrun
unsigned int countTriggerBit_PAD4
unsigned int totalTriggersInSubrun
unsigned int countTriggerBit_WCHDWR
unsigned int countTriggerBit_TOFPrompt
unsigned int countTriggerBit_TOFUS
unsigned int countTriggerBit_PAD3
std::vector< double > novatb::BeamTuning::findCluster ( unsigned int  tofIndex)

Definition at line 451 of file BeamTuning_module.cc.

References makeTrainCVSamples::int, startTimeOfHits, and sum.

Referenced by analyze().

451  {
452  std::vector<double> hitStartTOF;
453 
454  std::vector<double> TOFGroup[4];
455  if (tofIndex == 0) {
456  for (unsigned int iCh = 8; iCh < 12; iCh++) {
457  for (unsigned int iElem = 0; iElem < startTimeOfHits[iCh - 4].size();
458  iElem++) {
459  TOFGroup[iCh - 8].push_back(startTimeOfHits[iCh - 4].at(iElem));
460  }
461  }
462  } else if (tofIndex == 1) {
463  for (unsigned int iCh = 12; iCh < 16; iCh++) {
464  for (unsigned int iElem = 0; iElem < startTimeOfHits[iCh - 4].size();
465  iElem++) {
466  TOFGroup[iCh - 12].push_back(startTimeOfHits[iCh - 4].at(iElem));
467  }
468  }
469  }
470 
471  for (unsigned int iNS = 0; iNS < 400; iNS++) {
472  double coincWindowStart = (double)iNS;
473  double coincWindowEnd = (double)iNS + 5.;
474 
475  bool coincidence_individual_channel[4];
476  double coincidence_time_individual_channel[4];
477  for (unsigned int iCh = 0; iCh < 4; iCh++) {
478  coincidence_individual_channel[iCh] = false;
479  coincidence_time_individual_channel[iCh] = 0.;
480  }
481 
482  for (unsigned int iCh = 0; iCh < 4; iCh++) {
483  for (unsigned int iElem = 0; iElem < TOFGroup[iCh].size(); iElem++) {
484  if (coincWindowStart < TOFGroup[iCh].at(iElem) &&
485  TOFGroup[iCh].at(iElem) < coincWindowEnd) {
486  coincidence_individual_channel[iCh] = true;
487  coincidence_time_individual_channel[iCh] = TOFGroup[iCh].at(iElem);
488  }
489  }
490  }
491 
492  // check coinciden 3 out of 4 or 4 out of 4
493  bool tof_conic_3in4[4];
494  for (unsigned int iChNegate = 0; iChNegate < 4; iChNegate++) {
495  tof_conic_3in4[iChNegate] = true;
496  for (unsigned int iChCoinc = 0; iChCoinc < 4; iChCoinc++) {
497  if (iChCoinc != iChNegate)
498  tof_conic_3in4[iChNegate] = tof_conic_3in4[iChNegate] &&
499  coincidence_individual_channel[iChCoinc];
500  }
501  }
502  bool tof_conic_4in4 = true;
503  for (unsigned int iChCoinc = 0; iChCoinc < 4; iChCoinc++) {
504  tof_conic_4in4 =
505  tof_conic_4in4 && coincidence_individual_channel[iChCoinc];
506  }
507 
508  bool tof_conic = tof_conic_4in4;
509  for (unsigned int iChNegate = 0; iChNegate < 4; iChNegate++) {
510  tof_conic = tof_conic || tof_conic_3in4[iChNegate];
511  }
512 
513  if (tof_conic) {
514  double sum = 0;
515  for (unsigned int iCh = 0; iCh < 4; iCh++) {
516  sum += coincidence_time_individual_channel[iCh];
517  }
518  if (tof_conic_4in4) {
519  hitStartTOF.push_back(sum / 4.);
520  } else {
521  hitStartTOF.push_back(sum / 3.);
522  }
523  iNS = (unsigned int)coincWindowEnd;
524  } else
525  continue;
526  } // loop over 400ns step of 1ns
527 
528  return hitStartTOF;
529 }
std::vector< double > startTimeOfHits[12]
Double_t sum
Definition: plot.C:31
void novatb::BeamTuning::findTime ( unsigned int  subrunNo,
int srH,
int srM 
)

Definition at line 531 of file BeamTuning_module.cc.

References _RunStartH, _RunStartM, and makeTrainCVSamples::int.

Referenced by makeLinesAndTexts().

531  {
532  srM = _RunStartM + subrunNo - 1;
533  // std::cout << "srM: " << srM << std::endl;
534  int hourAdded = (int)srM / 60;
535  // std::cout << "hourAdded: " << hourAdded << std::endl;
536  srM = srM % 60;
537  // std::cout << "srM: " << srM << std::endl;
538  srH = _RunStartH + hourAdded;
539  // std::cout << "srH: " << srH << std::endl;
540 }
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
void novatb::BeamTuning::makeLinesAndTexts ( TH1D *  histogram,
double  ymin,
double  ymax,
std::vector< TLine * > &  lines,
std::vector< TText * > &  texts 
)

Definition at line 606 of file BeamTuning_module.cc.

References _TimeInterval, findTime(), MECModelEnuComparisons::i, makeTrainCVSamples::int, ss, and string.

Referenced by endJob().

609  {
610  for (int i = 2; i < histogram->GetSize() - 2; i++) {
611  std::string leadingZeroSr;
612  std::string leadingZeroSrH;
613  std::string leadingZeroSrM;
614 
615  int srH;
616  int srM;
617  int subrunno = (int)(histogram->GetBinCenter(i) - 0.4);
618  if (subrunno % _TimeInterval == 0) {
619  findTime(subrunno, srH, srM);
620 
621  std::stringstream ss;
622  ss << subrunno;
623  leadingZeroSr = ss.str();
624  if (subrunno < 10) {
625  leadingZeroSr = "00" + leadingZeroSr;
626  } else if (subrunno < 100) {
627  leadingZeroSr = "0" + leadingZeroSr;
628  }
629 
630  std::stringstream ssh;
631  ssh << srH;
632  leadingZeroSrH = ssh.str();
633  if (srH < 10) {
634  leadingZeroSrH = "0" + leadingZeroSrH;
635  }
636 
637  std::stringstream ssm;
638  ssm << srM;
639  leadingZeroSrM = ssm.str();
640  if (srM < 10) {
641  leadingZeroSrM = "0" + leadingZeroSrM;
642  }
643 
644  TLine* newLine = new TLine((double)i, ymin, (double)i, ymax);
645  lines.push_back(newLine);
646  TText* newText = new TText(
647  (double)subrunno - 0.8, ymin + 0.6 * (ymax - ymin),
648  Form("%s:%s", leadingZeroSrH.c_str(), leadingZeroSrM.c_str()));
649  texts.push_back(newText);
650  }
651  }
652 }
Float_t ss
Definition: plot.C:24
unsigned int _TimeInterval
Double_t ymax
Definition: plot.C:25
void findTime(unsigned int subrunNo, int &srH, int &srM)
Double_t ymin
Definition: plot.C:24
enum BeamMode string
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 novatb::BeamTuning::reconfigure ( const fhicl::ParameterSet p)

Definition at line 251 of file BeamTuning_module.cc.

References _DrawLinesAndTimes, _RangeGood, _RangeRatio, _RangeTotal, _RawWCInputTag, _Require3WCs, _RequireWCTrack, _TimeInterval, _TimeRange, _ToFInputTag, _TriggerInputTag, _WCInputTag, and fhicl::ParameterSet::get().

Referenced by BeamTuning().

251  {
252  _ToFInputTag = "cfdhitreco";
253  _WCInputTag = "wctrackreco";
254  _TriggerInputTag = "daq:Trigger";
255  _RawWCInputTag = "daq:WC";
256 
257  _TimeRange = p.get<unsigned int>("time_range");
258  _RangeTotal = p.get<double>("range_total");
259  _RangeGood = p.get<double>("range_good");
260  _RangeRatio = p.get<double>("range_ratio");
261  _TimeInterval = p.get<unsigned int>("time_interval");
262  _DrawLinesAndTimes = p.get<bool>("drawlines");
263  _RequireWCTrack = p.get<bool>("requiretrack");
264  _Require3WCs = p.get<bool>("require3wcs");
265 }
art::InputTag _WCInputTag
unsigned int _TimeInterval
art::InputTag _RawWCInputTag
art::InputTag _TriggerInputTag
T get(std::string const &key) const
Definition: ParameterSet.h:231
art::InputTag _ToFInputTag
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 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

art::InputTag novatb::BeamTuning::_CherenkovInputTag
private

Definition at line 180 of file BeamTuning_module.cc.

bool novatb::BeamTuning::_DrawLinesAndTimes
private

Definition at line 215 of file BeamTuning_module.cc.

Referenced by endJob(), and reconfigure().

double novatb::BeamTuning::_RangeGood
private

Definition at line 214 of file BeamTuning_module.cc.

Referenced by endJob(), and reconfigure().

double novatb::BeamTuning::_RangeRatio
private

Definition at line 212 of file BeamTuning_module.cc.

Referenced by endJob(), and reconfigure().

double novatb::BeamTuning::_RangeTotal
private

Definition at line 213 of file BeamTuning_module.cc.

Referenced by endJob(), and reconfigure().

art::InputTag novatb::BeamTuning::_RawWCInputTag
private

Definition at line 182 of file BeamTuning_module.cc.

Referenced by analyze(), and reconfigure().

bool novatb::BeamTuning::_Require3WCs
private

Definition at line 217 of file BeamTuning_module.cc.

Referenced by analyze(), and reconfigure().

bool novatb::BeamTuning::_RequireWCTrack
private

Definition at line 216 of file BeamTuning_module.cc.

Referenced by analyze(), and reconfigure().

int novatb::BeamTuning::_RunStartH
private

Definition at line 208 of file BeamTuning_module.cc.

Referenced by analyze(), beginJob(), and findTime().

int novatb::BeamTuning::_RunStartM
private

Definition at line 209 of file BeamTuning_module.cc.

Referenced by analyze(), beginJob(), and findTime().

unsigned int novatb::BeamTuning::_TimeInterval
private

Definition at line 211 of file BeamTuning_module.cc.

Referenced by makeLinesAndTexts(), and reconfigure().

unsigned int novatb::BeamTuning::_TimeRange
private

Definition at line 210 of file BeamTuning_module.cc.

Referenced by beginJob(), and reconfigure().

art::InputTag novatb::BeamTuning::_ToFInputTag
private

Definition at line 178 of file BeamTuning_module.cc.

Referenced by analyze(), and reconfigure().

art::InputTag novatb::BeamTuning::_TriggerInputTag
private

Definition at line 181 of file BeamTuning_module.cc.

Referenced by analyze(), and reconfigure().

art::InputTag novatb::BeamTuning::_WCInputTag
private

Definition at line 179 of file BeamTuning_module.cc.

Referenced by analyze(), and reconfigure().

unsigned int novatb::BeamTuning::countTriggerBit_PAD1
private

Definition at line 224 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

unsigned int novatb::BeamTuning::countTriggerBit_PAD2
private

Definition at line 225 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

unsigned int novatb::BeamTuning::countTriggerBit_PAD3
private

Definition at line 226 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

unsigned int novatb::BeamTuning::countTriggerBit_PAD4
private

Definition at line 227 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

unsigned int novatb::BeamTuning::countTriggerBit_TOFDS
private

Definition at line 219 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

unsigned int novatb::BeamTuning::countTriggerBit_TOFPrompt
private

Definition at line 221 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

unsigned int novatb::BeamTuning::countTriggerBit_TOFSlow
private

Definition at line 222 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

unsigned int novatb::BeamTuning::countTriggerBit_TOFUS
private

Definition at line 220 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

unsigned int novatb::BeamTuning::countTriggerBit_WCHDWR
private

Definition at line 223 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

unsigned int novatb::BeamTuning::decentTriggersInSubrun
private

Definition at line 200 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

art::ServiceHandle<beamlineutil::BeamlineChannelMap> novatb::BeamTuning::fChannelMap
private

Definition at line 231 of file BeamTuning_module.cc.

Referenced by analyze().

unsigned int novatb::BeamTuning::goodTriggersInSubrun
private

Definition at line 199 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

TH1D* novatb::BeamTuning::hDecentTrigger
private

Definition at line 206 of file BeamTuning_module.cc.

Referenced by beginJob(), endJob(), and endSubRun().

TH1D* novatb::BeamTuning::hDecentTriggerRatio
private

Definition at line 203 of file BeamTuning_module.cc.

Referenced by beginJob(), endJob(), and endSubRun().

TH1D* novatb::BeamTuning::hGoodTrigger
private

Definition at line 205 of file BeamTuning_module.cc.

Referenced by beginJob(), endJob(), and endSubRun().

TH1D* novatb::BeamTuning::hGoodTriggerRatio
private

Definition at line 202 of file BeamTuning_module.cc.

Referenced by beginJob(), endJob(), and endSubRun().

TH1D* novatb::BeamTuning::hTotalTrigger
private

Definition at line 204 of file BeamTuning_module.cc.

Referenced by beginJob(), endJob(), and endSubRun().

std::vector<bool> novatb::BeamTuning::isElectron
private

Definition at line 196 of file BeamTuning_module.cc.

std::vector<double> novatb::BeamTuning::momentum
private

Definition at line 195 of file BeamTuning_module.cc.

unsigned int novatb::BeamTuning::runNumber
private

Definition at line 184 of file BeamTuning_module.cc.

Referenced by beginRun(), and endJob().

std::vector<double> novatb::BeamTuning::startTimeOfHits[12]
private

Definition at line 192 of file BeamTuning_module.cc.

Referenced by analyze(), and findCluster().

std::vector<double> novatb::BeamTuning::tof_p1_p4
private

Definition at line 194 of file BeamTuning_module.cc.

unsigned int novatb::BeamTuning::totalTriggersInSubrun
private

Definition at line 198 of file BeamTuning_module.cc.

Referenced by analyze(), beginSubRun(), and endSubRun().

std::ofstream novatb::BeamTuning::TriggerBitCountFile
private

Definition at line 229 of file BeamTuning_module.cc.

Referenced by beginJob(), endJob(), and endSubRun().

std::string novatb::BeamTuning::TriggerBitName[16]
private
Initial value:
= {
"WC1IGNOREME", "WC2IGNOREME", "WC3IGNOREME", "WCCOINC",
"PAD1", "PAD2", "PAD3", "PAD4",
"TOFUS", "SWYDGATE", "MWPCOFF", "DIGBUSY",
"WCHDWR", "TOFDS", "TOFPrompt", "TOFSlow"}

Definition at line 186 of file BeamTuning_module.cc.


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