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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 ToFAnalysisMini (const fhicl::ParameterSet &pset)
 
void reconfigure (const fhicl::ParameterSet &pset)
 
void beginJob () override
 
void analyze (const art::Event &evt)
 
void endJob () override
 
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 fTriggerLabel
 
art::InputTag fRecoToFLabel
 
art::InputTag fToFDigitLabel
 
art::InputTag fRecoWCLabel
 
art::InputTag fRecoCherenkovLabel
 
unsigned int fTriggerBitTOFPrompt
 
unsigned int fTriggerBitTOFSlow
 
unsigned int fTriggerBitWCHDWR
 
double fSamplingInterval
 
TH1D * hToF_any
 
TH1D * hToF_all
 
TH1D * hToF_TOFPrompt
 
TH1D * hToF_TOFSlow
 
TH1D * hToF_WCHDWR
 
TH1D * hToF_SiPM
 
TH1D * hMomentum
 
TH2D * hTof_vs_momentum
 
TH2D * hTof_vs_momentum_SiPM
 
TH1D * hCherenkovStartTime
 
std::map< ChannelID, TH1D * > hPeakADC_GoodHits_channel
 
std::map< ChannelID, TH1D * > hStartTime_GoodHits_channel
 
std::map< ChannelID, TH1D * > hPeakADC_AllHits_channel
 
std::map< ChannelID, TH1D * > hStartTime_AllHits_channel
 
TH1I * hUSHitMultiplicity
 
TH1I * hDSHitMultiplicity
 
TH1I * hSiPMHitMultiplicity
 
TH1D * hUSdt [4][4]
 
TH1D * hUSdA [4][4]
 
TH1D * hUSrA [4][4]
 
TH2D * hUSAvdt [4][4]
 
TH2D * hUSdAvdt [4][4]
 
TH1D * hDSdt [4][4]
 
TH1D * hDSdA [4][4]
 
TH1D * hDSrA [4][4]
 
TH2D * hDSAvdt [4][4]
 
TH2D * hDSdAvdt [4][4]
 
TH1D * hSiPMdt [4][4]
 
TH1D * hSiPMdA [4][4]
 
TH1D * hSiPMrA [4][4]
 
TH2D * hSiPMAvdt [4][4]
 
TH2D * hSiPMdAvdt [4][4]
 
TH2D * hUSdt12vdt14
 
TH2D * hUSdt12vdt13
 
TH2D * hUSdt14vdt13
 
art::ServiceHandle< art::TFileServicetfs
 
art::ServiceHandle< beamlineutil::BeamlineChannelMapfChannelMap
 

Detailed Description

Definition at line 63 of file ToFAnalysisMini_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

beamlinereco::ToFAnalysisMini::ToFAnalysisMini ( const fhicl::ParameterSet pset)

Definition at line 145 of file ToFAnalysisMini_module.cc.

References reconfigure().

145  : EDAnalyzer(pset) {
146  this->reconfigure(pset);
147 }
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
void reconfigure(const fhicl::ParameterSet &pset)

Member Function Documentation

void beamlinereco::ToFAnalysisMini::analyze ( const art::Event evt)

Definition at line 231 of file ToFAnalysisMini_module.cc.

References beamlinegeo::Cherenkov, d, beamlinegeo::DS, beamlinegeo::DSSiPM, art::fill_ptr_vector(), fRecoCherenkovLabel, fRecoToFLabel, fRecoWCLabel, fToFDigitLabel, fTriggerBitTOFPrompt, fTriggerBitTOFSlow, fTriggerBitWCHDWR, fTriggerLabel, art::DataViewImpl::getByLabel(), hDSAvdt, hDSdA, hDSdAvdt, hDSdt, hDSHitMultiplicity, hDSrA, hMomentum, hPeakADC_AllHits_channel, hPeakADC_GoodHits_channel, hSiPMAvdt, hSiPMdA, hSiPMdAvdt, hSiPMdt, hSiPMHitMultiplicity, hSiPMrA, hStartTime_AllHits_channel, hStartTime_GoodHits_channel, hToF_all, hToF_any, hToF_SiPM, hToF_TOFPrompt, hToF_TOFSlow, hTof_vs_momentum, hTof_vs_momentum_SiPM, hToF_WCHDWR, hUSAvdt, hUSdA, hUSdAvdt, hUSdt, hUSdt12vdt13, hUSdt12vdt14, hUSdt14vdt13, hUSHitMultiplicity, hUSrA, MECModelEnuComparisons::i, calib::j, submit_syst::pattern, art::Event::run(), confusionMatrixTree::t, and beamlinegeo::US.

231  {
232  // Trigger bits
234  std::vector<art::Ptr<rawdata::RawBeamlineTrigger>> triggers;
235  if (e.getByLabel(fTriggerLabel, triggerHandle))
236  art::fill_ptr_vector(triggers, triggerHandle);
237 
238  bool isTOFPromptTrig = false;
239  bool isTOFSlowTrig = false;
240  bool isWCHDWRTrig = false;
241 
242  //if (triggers.size() != 1) {
243  //std::cerr << "WARNING: Got " << triggers.size() << " triggers instead of 1" << std::endl;
244  //}
245  for (auto trig : triggers) {
246  unsigned int pattern = trig->Pattern();
247  isTOFPromptTrig = bool(pattern & (1 << fTriggerBitTOFPrompt));
248  isTOFSlowTrig = bool(pattern & (1 << fTriggerBitTOFSlow));
249  isWCHDWRTrig = bool(pattern & (1 << fTriggerBitWCHDWR));
250  }
251  /*std::cout << "Event " << e.event() << " has trigger bits:";
252  if (isTOFPromptTrig) std::cout << " TOFPrompt";
253  if (isTOFSlowTrig) std::cout << " TOFSlow";
254  if (isWCHDWRTrig) std::cout << " WCHDWR";
255  std::cout << std::endl;*/
256 
257  // Get ToFs
259  std::vector<art::Ptr<brb::ToF>> tofs;
260  if (e.getByLabel(fRecoToFLabel, tofHandle))
261  art::fill_ptr_vector(tofs, tofHandle);
262 
264  std::vector<art::Ptr<brb::BeamlineDigit>> tofDigits;
265  if (e.getByLabel(fToFDigitLabel, tofDigitHandle))
266  art::fill_ptr_vector(tofDigits, tofDigitHandle);
267 
268  // Cherenkov
270  std::vector<art::Ptr<brb::BeamlineDigit>> cherenkovs;
271  if (e.getByLabel(fRecoCherenkovLabel, cherenkovHandle))
272  art::fill_ptr_vector(cherenkovs, cherenkovHandle);
273 
274  // Retrieve BeamlineDigits for tof reco
276 
277  // Get WC reco (for momentum)
279  std::vector<art::Ptr<brb::WCTrack>> wcs;
280  if (e.getByLabel(fRecoWCLabel, wcHandle))
281  art::fill_ptr_vector(wcs, wcHandle);
282 
283  // Fill all hits data
284  unsigned int nushits = 0;
285  unsigned int ndshits = 0;
286  for (auto d : tofDigits) {
287  if (d->ChannelID().Detector == beamlinegeo::ToFCounter::US) {
288  ++nushits;
289  } else if (d->ChannelID().Detector == beamlinegeo::ToFCounter::DS) {
290  ++ndshits;
291  }
292  hPeakADC_AllHits_channel[d->ChannelID()]->Fill(d->PeakADC());
293  hStartTime_AllHits_channel[d->ChannelID()]->Fill(d->StartTimeInNanoSec());
294  }
295  hUSHitMultiplicity->Fill(nushits);
296  hDSHitMultiplicity->Fill(ndshits);
297 
298  // Cherenkov
299  for (auto d : cherenkovs) {
300  if (d->ChannelID().System == beamlinegeo::BeamlineSystem::Cherenkov) {
301  hPeakADC_AllHits_channel[d->ChannelID()]->Fill(d->PeakADC());
302  hStartTime_AllHits_channel[d->ChannelID()]->Fill(d->StartTimeInNanoSec());
303  }
304  }
305  //bool hasCherenkov = (cherenkovs.size() > 0);
306  /*double cherenkovTime = -999;
307  if (hasCherenkov) {
308  cherenkovTime = cherenkovs[cherenkovs.size() - 1]->StartTimeInNanoSec();
309  }*/
310 
311  // SiPM
312  double sipmtimes[4] = { -1, -1, -1, -1 };
313  double sipmamps[4] = { -1, -1, -1, -1 };
314  unsigned int nsipmhits = 0;
315  for (auto d : tofDigits) {
316  if (d->ChannelID().Detector == beamlinegeo::ToFCounter::DSSiPM) {
317  ++nsipmhits;
318  hPeakADC_AllHits_channel[d->ChannelID()]->Fill(d->PeakADC());
319  hStartTime_AllHits_channel[d->ChannelID()]->Fill(d->StartTimeInNanoSec());
320  sipmtimes[d->ChannelID().Channel - 4] = d->StartTimeInNanoSec();
321  sipmamps[d->ChannelID().Channel - 4] = d->PeakADC();
322  }
323  }
324  for (int i=0; i<4; i++) {
325  for (int j=i+1; j<4; j++) {
326  if ((sipmtimes[i] >= 0) && (sipmtimes[j] >= 0)) {
327  double a_ratio = sipmamps[j] / sipmamps[i];
328  double dA = sipmamps[j] - sipmamps[i];
329  double dt = sipmtimes[j] - sipmtimes[i];
330  //double dt = (1.0/sipmdAdt_p1[4*i+j]) * (-sipmdAdt_p0[4*i+j] + dA);
331  hSiPMdt[i][j]->Fill(dt);
332  hSiPMdA[i][j]->Fill(dA);
333  hSiPMrA[i][j]->Fill(a_ratio);
334  hSiPMAvdt[i][j]->Fill(dt, a_ratio);
335  hSiPMdAvdt[i][j]->Fill(dt, dA);
336  }
337  }
338  }
339  hSiPMHitMultiplicity->Fill(nsipmhits);
340 
341  //if (tofs.size() > 1) return;
342 
343  for (auto wc : wcs) {
344  hMomentum->Fill(wc->Momentum());
345  }
346 
347  for (auto tof : tofs) {
348  // Get associated reco digits
349  const std::vector<art::Ptr<brb::BeamlineDigit>> tofdigits = fmbd.at(tof.key());
350  double ustimes[4] = { -1, -1, -1, -1 };
351  double usamps[4] = { -1, -1, -1, -1 };
352  double dstimes[4] = { -1, -1, -1, -1 };
353  double dsamps[4] = { -1, -1, -1, -1 };
354  for (auto d : tofdigits) {
355  hPeakADC_GoodHits_channel[d->ChannelID()]->Fill(d->PeakADC());
356  hStartTime_GoodHits_channel[d->ChannelID()]->Fill(d->StartTimeInNanoSec());
357  if (d->ChannelID().Detector == beamlinegeo::ToFCounter::US) {
358  ustimes[d->ChannelID().Channel - 8] = d->StartTimeInNanoSec();
359  usamps[d->ChannelID().Channel - 8] = d->PeakADC();
360  } else if (d->ChannelID().Detector == beamlinegeo::ToFCounter::DS) {
361  dstimes[d->ChannelID().Channel - 12] = d->StartTimeInNanoSec();
362  dsamps[d->ChannelID().Channel - 12] = d->PeakADC();
363  }
364  }
365 
366  for (int i=0; i<4; i++) {
367  for (int j=i+1; j<4; j++) {
368  if ((ustimes[i] >= 0) && (ustimes[j] >= 0)) {
369  double a_ratio = usamps[j] / usamps[i];
370  double dA = usamps[j] - usamps[i];
371  double dt = ustimes[j] - ustimes[i];
372  //double dt = (1.0/usdAdt_p1[4*i+j]) * (-usdAdt_p0[4*i+j] + dA);
373  hUSdt[i][j]->Fill(dt);
374  hUSdA[i][j]->Fill(dA);
375  hUSrA[i][j]->Fill(a_ratio);
376  hUSAvdt[i][j]->Fill(dt, a_ratio);
377  hUSdAvdt[i][j]->Fill(dt, dA);
378  }
379  if ((dstimes[i] >= 0) && (dstimes[j] >= 0)) {
380  double a_ratio = dsamps[j] / dsamps[i];
381  double dA = dsamps[j] - dsamps[i];
382  //double dt = (1.0/dsdAdt_p1[4*i+j]) * (-dsdAdt_p0[4*i+j] + dA);
383  double dt = dstimes[j] - dstimes[i];
384  hDSdt[i][j]->Fill(dt);
385  hDSdA[i][j]->Fill(dA);
386  hDSrA[i][j]->Fill(a_ratio);
387  hDSAvdt[i][j]->Fill(dt, a_ratio);
388  hDSdAvdt[i][j]->Fill(dt, dA);
389  }
390  }
391  }
392 
393  if ((ustimes[0]>=0) && (ustimes[1]>=0) && (ustimes[2]>=0) && (ustimes[3]>=0)) {
394  double dt12 = ustimes[1] - ustimes[0];
395  double dt13 = ustimes[2] - ustimes[0];
396  double dt14 = ustimes[3] - ustimes[0];
397  hUSdt12vdt14->Fill(dt14, dt12);
398  hUSdt12vdt13->Fill(dt13, dt12);
399  hUSdt14vdt13->Fill(dt13, dt14);
400  }
401 
402  // fill
403  bool sipm = false;
404  for (auto d : tofdigits) { if (d->ChannelID().Detector == beamlinegeo::ToFCounter::DSSiPM) sipm = true; }
405  if (sipm) {
406  hToF_SiPM->Fill(tof->Time());
407  for (auto wc : wcs) {
408  hTof_vs_momentum_SiPM->Fill(wc->Momentum(), tof->Time());
409  }
410  } else {
411  //if (!hasCherenkov) {
412  double t = tof->Time();
413  if (e.run() < 2889) t += 31.8;
414  t -= 21.0;
415  hToF_any->Fill(t);
416  if (isTOFPromptTrig) {
417  hToF_TOFPrompt->Fill(t);
418  }
419  if (isTOFSlowTrig) {
420  hToF_TOFSlow->Fill(t);
421  }
422  if (isWCHDWRTrig) {
423  hToF_WCHDWR->Fill(t);
424  }
425  if (isTOFPromptTrig && isTOFSlowTrig && isWCHDWRTrig) {
426  hToF_all->Fill(t);
427  }
428  for (auto wc : wcs) {
429  hTof_vs_momentum->Fill(wc->Momentum(), t);
430  }
431  //}
432  }
433  }
434 }
std::map< ChannelID, TH1D * > hPeakADC_AllHits_channel
Definition: Cand.cxx:23
std::map< ChannelID, TH1D * > hStartTime_AllHits_channel
Float_t d
Definition: plot.C:236
const double j
Definition: BetheBloch.cxx:29
std::map< ChannelID, TH1D * > hStartTime_GoodHits_channel
std::map< ChannelID, TH1D * > hPeakADC_GoodHits_channel
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:464
Float_t e
Definition: plot.C:35
void beamlinereco::ToFAnalysisMini::beginJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 163 of file ToFAnalysisMini_module.cc.

References beamlineutil::BeamlineChannelMap::ChannelIDs(), shutoffs::endtime, fChannelMap, fSamplingInterval, hDSAvdt, hDSdA, hDSdAvdt, hDSdt, hDSHitMultiplicity, hDSrA, hMomentum, hPeakADC_AllHits_channel, hPeakADC_GoodHits_channel, hSiPMAvdt, hSiPMdA, hSiPMdAvdt, hSiPMdt, hSiPMHitMultiplicity, hSiPMrA, hStartTime_AllHits_channel, hStartTime_GoodHits_channel, hToF_all, hToF_any, hToF_SiPM, hToF_TOFPrompt, hToF_TOFSlow, hTof_vs_momentum, hTof_vs_momentum_SiPM, hToF_WCHDWR, hUSAvdt, hUSdA, hUSdAvdt, hUSdt, hUSdt12vdt13, hUSdt12vdt14, hUSdt14vdt13, hUSHitMultiplicity, hUSrA, MECModelEnuComparisons::i, makeTrainCVSamples::int, calib::j, art::TFileDirectory::make(), art::TFileDirectory::mkdir(), beamlineutil::BeamlineChannelMap::OnlineDigitChannel(), and tfs.

163  {
164  double endtime = 1024.*fSamplingInterval;
165 
166  this->hToF_all = tfs->make<TH1D>("hToF_all", "Time of Flight (TOFPrompt & TOFSlow & WCHDWR)", 2*int(endtime), 0., int(endtime));
167  this->hToF_any = tfs->make<TH1D>("hToF_any", "Time of Flight (TOFPrompt | TOFSlow | WCHDWR)", 100, 0., 220);
168  this->hToF_TOFPrompt = tfs->make<TH1D>("hToF_TOFPrompt", "Time of Flight (TOFPrompt)", 2*int(endtime), 0., int(endtime));
169  this->hToF_TOFSlow = tfs->make<TH1D>("hToF_TOFSlow", "Time of Flight (TOFSlow)", 2*int(endtime), 0., int(endtime));
170  this->hToF_WCHDWR = tfs->make<TH1D>("hToF_WCHDWR", "Time of Flight (WCHDWR)", 2*int(endtime), 0., int(endtime));
171  this->hToF_SiPM = tfs->make<TH1D>("hToF_SiPM", "Time of Flight (SiPM)", 2*int(endtime), 0, int(endtime));
172 
173  this->hMomentum = tfs->make<TH1D>("hMomentum", "Momentum", 125, 0, 2500);
174  this->hTof_vs_momentum = tfs->make<TH2D>("hToFvsMomentum", "ToF vs. Momentum", 80, 0, 2500, 80, 0, 125);
175  this->hTof_vs_momentum_SiPM = tfs->make<TH2D>("hToFvsMomentum_SiPM", "ToF vs. Momentum (SiPM)", 100, 0, 2500, 400, 0, 400);
176 
177  for (auto channel : fChannelMap->ChannelIDs()) {
178  unsigned int online_channel = fChannelMap->OnlineDigitChannel(channel);
179  art::TFileDirectory chdir
180  //= tfs->mkdir(Form("System%dDetector%dChannel%d", channel.System, channel.Detector, channel.Channel));
181  = tfs->mkdir(Form("Channel%d", online_channel));
182  this->hPeakADC_GoodHits_channel[channel]
183  = chdir.make<TH1D>(Form("hPeakADC_GoodHits_channel%d",online_channel),
184  Form("Peak ADC Channel %d (good hits)",online_channel), 200, 0, 4000);
185  this->hStartTime_GoodHits_channel[channel]
186  = chdir.make<TH1D>(Form("hStartTime_GoodHits_channel%d",online_channel),
187  Form("Start Time Channel %d (good hits)",online_channel), 200, 0, endtime);
188  this->hPeakADC_AllHits_channel[channel]
189  = chdir.make<TH1D>(Form("hPeakADC_AllHits_channel%d",online_channel),
190  Form("Peak ADC Channel %d (all hits)",online_channel), 200, 0, 4000);
191  this->hStartTime_AllHits_channel[channel]
192  = chdir.make<TH1D>(Form("hStartTime_AllHits_channel%d",online_channel),
193  Form("Start Time Channel %d (all hits)",online_channel), 200, 0, endtime);
194  }
195 
196  this->hUSHitMultiplicity = tfs->make<TH1I>("hUSHitMultiplicity", "US Hits per Event", 15, 0, 15);
197  this->hDSHitMultiplicity = tfs->make<TH1I>("hDSHitMultiplicity", "DS Hits per Event", 15, 0, 15);
198  this->hSiPMHitMultiplicity = tfs->make<TH1I>("hSiPMHitMultiplicity", "SiPM Hits per Event", 15, 0, 15);
199 
200  hUSdt12vdt14 = tfs->make<TH2D>("hUSdt12vdt14", "ToF dt chs. 8+9 vs dt chs. 8+11", 100, -5, 5, 100, -5, 5);
201  hUSdt12vdt13 = tfs->make<TH2D>("hUSdt12vdt13", "ToF dt chs. 8+9 vs dt chs. 8+10", 100, -5, 5, 100, -5, 5);
202  hUSdt14vdt13 = tfs->make<TH2D>("hUSdt14vdt13", "ToF dt chs. 8+11 vs dt chs. 8+10", 100, -5, 5, 100, -5, 5);
203 
204  for (int i=0; i<4; i++) {
205  for (int j=i+1; j<4; j++) {
206  double dABound = 4000;
207  hUSdt[i][j] = tfs->make<TH1D>(Form("hUSdt%d%d",i+1,j+1), Form("ToF dt between channels %d and %d",i+8,j+8), 100., -5., 5.);
208  hDSdt[i][j] = tfs->make<TH1D>(Form("hDSdt%d%d",i+1,j+1), Form("ToF dt between channels %d and %d",i+12,j+12), 100., -5., 5.);
209  hSiPMdt[i][j] = tfs->make<TH1D>(Form("hSiPMdt%d%d",i+1,j+1), Form("ToF dt between channels %d and %d",i+4,j+4), 100., -5., 5.);
210 
211  hUSdA[i][j] = tfs->make<TH1D>(Form("hUSdA%d%d",i+1,j+1), Form("ToF dA between channels %d and %d",i+8,j+8), 400., -dABound, dABound);
212  hDSdA[i][j] = tfs->make<TH1D>(Form("hDSdA%d%d",i+1,j+1), Form("ToF dA between channels %d and %d",i+12,j+12), 400., -dABound, dABound);
213  hSiPMdA[i][j] = tfs->make<TH1D>(Form("hSiPMdA%d%d",i+1,j+1), Form("ToF dA between channels %d and %d",i+4,j+4), 400., -dABound, dABound);
214 
215  hUSrA[i][j] = tfs->make<TH1D>(Form("hUSrA%d%d",i+1,j+1), Form("ToF amplitude ratio between channels %d and %d",i+8,j+8), 100., 0, 4);
216  hDSrA[i][j] = tfs->make<TH1D>(Form("hDSrA%d%d",i+1,j+1), Form("ToF amplitude ratio between channels %d and %d",i+12,j+12), 100., 0, 4);
217  hSiPMrA[i][j] = tfs->make<TH1D>(Form("hSiPMrA%d%d",i+1,j+1), Form("ToF amplitude ratio between channels %d and %d",i+4,j+4), 100., 0, 4);
218 
219  hUSAvdt[i][j] = tfs->make<TH2D>(Form("hUSAvdt%d%d",i+1,j+1), Form("ToF amplitude ratio vs dt channels %d and %d",i+8,j+8), 100., -5.,5., 100, 0, 8);
220  hDSAvdt[i][j] = tfs->make<TH2D>(Form("hDSAvdt%d%d",i+1,j+1), Form("ToF amplitude ratio vs dt channels %d and %d",i+12,j+12), 100., -5.,5., 100, 0, 8);
221  hSiPMAvdt[i][j] = tfs->make<TH2D>(Form("hSiPMAvdt%d%d",i+1,j+1), Form("ToF amplitude ratio vs dt channels %d and %d",i+4,j+4), 100., -5.,5., 100, 0, 8);
222 
223  hUSdAvdt[i][j] = tfs->make<TH2D>(Form("hUSdAvdt%d%d",i+1,j+1), Form("ToF dA vs dt channels %d and %d",i+8,j+8), 100., -5.,5., 100, -dABound, dABound);
224  hDSdAvdt[i][j] = tfs->make<TH2D>(Form("hDSdAvdt%d%d",i+1,j+1), Form("ToF dA vs dt channels %d and %d",i+12,j+12), 100., -5.,5., 100, -dABound, dABound);
225  hSiPMdAvdt[i][j] = tfs->make<TH2D>(Form("hSiPMdAvdt%d%d",i+1,j+1), Form("ToF dA vs dt channels %d and %d",i+4,j+4), 100., -5.,5., 100, -dABound, dABound);
226  }
227  }
228 }
TFileDirectory mkdir(std::string const &dir, std::string const &descr="")
std::map< ChannelID, TH1D * > hPeakADC_AllHits_channel
std::vector< ChannelID > ChannelIDs() const
All the ChannelIDs in this channel mapping.
unsigned int OnlineDigitChannel(ChannelID channel) const
Online digiziter channel number for this offline ChannelID.
std::map< ChannelID, TH1D * > hStartTime_AllHits_channel
art::ServiceHandle< beamlineutil::BeamlineChannelMap > fChannelMap
const double j
Definition: BetheBloch.cxx:29
std::map< ChannelID, TH1D * > hStartTime_GoodHits_channel
T * make(ARGS...args) const
std::map< ChannelID, TH1D * > hPeakADC_GoodHits_channel
art::ServiceHandle< art::TFileService > tfs
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 beamlinereco::ToFAnalysisMini::endJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 436 of file ToFAnalysisMini_module.cc.

References demo5::c1, and hToF_any.

436  {
437  TH1D htof(*hToF_any);
438  TCanvas c1("c1", "", 600, 600);
439 
440  //suppress stats
441  htof.SetStats(kFALSE);
442 
443  //set range
444  htof.GetXaxis()->SetRangeUser(0.,220);
445 
446 
447  //draw options
448  htof.SetMarkerStyle(2);
449  htof.GetXaxis()->CenterTitle();
450  htof.GetYaxis()->CenterTitle();
451 
452  //labels
453  htof.GetXaxis()->SetTitle("#Deltat [ns]");
454  htof.SetTitle("Time of Flight Distribution");
455  htof.SetTitleSize(0.05, "XY");
456  htof.SetTitleOffset(.9, "XY");
457 
458  htof.Draw();
459 
460  c1.SaveAs("TOFPrompt_Rates_Monitoring.pdf");
461 }
c1
Definition: demo5.py:24
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 beamlinereco::ToFAnalysisMini::reconfigure ( const fhicl::ParameterSet pset)

Definition at line 150 of file ToFAnalysisMini_module.cc.

References fRecoCherenkovLabel, fRecoToFLabel, fRecoWCLabel, fSamplingInterval, fToFDigitLabel, fTriggerBitTOFPrompt, fTriggerBitTOFSlow, fTriggerBitWCHDWR, fTriggerLabel, and fhicl::ParameterSet::get().

Referenced by ToFAnalysisMini().

150  {
151  fTriggerLabel = pset.get<art::InputTag>("TriggerLabel");
152  fRecoToFLabel = pset.get<art::InputTag>("RecoToFLabel");
153  fToFDigitLabel = pset.get<art::InputTag>("ToFDigitLabel");
154  fRecoWCLabel = pset.get<art::InputTag>("RecoWCLabel", "wctrackreco");
155  fRecoCherenkovLabel = pset.get<art::InputTag>("RecoCherenkovDigitLabel");
156  fSamplingInterval = pset.get<double>("TimeSamplingInterval");
157  fTriggerBitTOFPrompt = pset.get<unsigned int>("TriggerBitTOFPrompt");
158  fTriggerBitTOFSlow = pset.get<unsigned int>("TriggerBitTOFSlow");
159  fTriggerBitWCHDWR = pset.get<unsigned int>("TriggerBitWCHDWR");
160 }
T get(std::string const &key) const
Definition: ParameterSet.h:231
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::ServiceHandle<beamlineutil::BeamlineChannelMap> beamlinereco::ToFAnalysisMini::fChannelMap
private

Definition at line 136 of file ToFAnalysisMini_module.cc.

Referenced by beginJob().

art::InputTag beamlinereco::ToFAnalysisMini::fRecoCherenkovLabel
private

Definition at line 80 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and reconfigure().

art::InputTag beamlinereco::ToFAnalysisMini::fRecoToFLabel
private

Definition at line 77 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and reconfigure().

art::InputTag beamlinereco::ToFAnalysisMini::fRecoWCLabel
private

Definition at line 79 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and reconfigure().

double beamlinereco::ToFAnalysisMini::fSamplingInterval
private

Definition at line 84 of file ToFAnalysisMini_module.cc.

Referenced by beginJob(), and reconfigure().

art::InputTag beamlinereco::ToFAnalysisMini::fToFDigitLabel
private

Definition at line 78 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and reconfigure().

unsigned int beamlinereco::ToFAnalysisMini::fTriggerBitTOFPrompt
private

Definition at line 81 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and reconfigure().

unsigned int beamlinereco::ToFAnalysisMini::fTriggerBitTOFSlow
private

Definition at line 82 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and reconfigure().

unsigned int beamlinereco::ToFAnalysisMini::fTriggerBitWCHDWR
private

Definition at line 83 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and reconfigure().

art::InputTag beamlinereco::ToFAnalysisMini::fTriggerLabel
private

Definition at line 76 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and reconfigure().

TH1D* beamlinereco::ToFAnalysisMini::hCherenkovStartTime
private

Definition at line 100 of file ToFAnalysisMini_module.cc.

TH2D* beamlinereco::ToFAnalysisMini::hDSAvdt[4][4]
private

Definition at line 121 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hDSdA[4][4]
private

Definition at line 119 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH2D* beamlinereco::ToFAnalysisMini::hDSdAvdt[4][4]
private

Definition at line 122 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hDSdt[4][4]
private

Definition at line 118 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1I* beamlinereco::ToFAnalysisMini::hDSHitMultiplicity
private

Definition at line 109 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hDSrA[4][4]
private

Definition at line 120 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hMomentum
private

Definition at line 96 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

std::map<ChannelID, TH1D*> beamlinereco::ToFAnalysisMini::hPeakADC_AllHits_channel
private

Definition at line 105 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

std::map<ChannelID, TH1D*> beamlinereco::ToFAnalysisMini::hPeakADC_GoodHits_channel
private

Definition at line 102 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH2D* beamlinereco::ToFAnalysisMini::hSiPMAvdt[4][4]
private

Definition at line 127 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hSiPMdA[4][4]
private

Definition at line 125 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH2D* beamlinereco::ToFAnalysisMini::hSiPMdAvdt[4][4]
private

Definition at line 128 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hSiPMdt[4][4]
private

Definition at line 124 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1I* beamlinereco::ToFAnalysisMini::hSiPMHitMultiplicity
private

Definition at line 110 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hSiPMrA[4][4]
private

Definition at line 126 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

std::map<ChannelID, TH1D*> beamlinereco::ToFAnalysisMini::hStartTime_AllHits_channel
private

Definition at line 106 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

std::map<ChannelID, TH1D*> beamlinereco::ToFAnalysisMini::hStartTime_GoodHits_channel
private

Definition at line 103 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hToF_all
private

Definition at line 89 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hToF_any
private

Definition at line 86 of file ToFAnalysisMini_module.cc.

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

TH1D* beamlinereco::ToFAnalysisMini::hToF_SiPM
private

Definition at line 94 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hToF_TOFPrompt
private

Definition at line 90 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hToF_TOFSlow
private

Definition at line 91 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH2D* beamlinereco::ToFAnalysisMini::hTof_vs_momentum
private

Definition at line 97 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH2D* beamlinereco::ToFAnalysisMini::hTof_vs_momentum_SiPM
private

Definition at line 98 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hToF_WCHDWR
private

Definition at line 92 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH2D* beamlinereco::ToFAnalysisMini::hUSAvdt[4][4]
private

Definition at line 115 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hUSdA[4][4]
private

Definition at line 113 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH2D* beamlinereco::ToFAnalysisMini::hUSdAvdt[4][4]
private

Definition at line 116 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hUSdt[4][4]
private

Definition at line 112 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH2D* beamlinereco::ToFAnalysisMini::hUSdt12vdt13
private

Definition at line 131 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH2D* beamlinereco::ToFAnalysisMini::hUSdt12vdt14
private

Definition at line 130 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH2D* beamlinereco::ToFAnalysisMini::hUSdt14vdt13
private

Definition at line 132 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1I* beamlinereco::ToFAnalysisMini::hUSHitMultiplicity
private

Definition at line 108 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

TH1D* beamlinereco::ToFAnalysisMini::hUSrA[4][4]
private

Definition at line 114 of file ToFAnalysisMini_module.cc.

Referenced by analyze(), and beginJob().

art::ServiceHandle<art::TFileService> beamlinereco::ToFAnalysisMini::tfs
private

Definition at line 135 of file ToFAnalysisMini_module.cc.

Referenced by beginJob().


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