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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 Monopole (fhicl::ParameterSet const &p)
 
 Monopole (Monopole const &)=delete
 
 Monopole (Monopole &&)=delete
 
Monopoleoperator= (Monopole const &)=delete
 
Monopoleoperator= (Monopole &&)=delete
 
void beginJob () override
 
void analyze (art::Event const &e) override
 
void respondToOpenInputFile (art::FileBlock const &fb) 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 Member Functions

int extent_cell (std::vector< sim::FLSHit > const &hits) const
 
int extent_plane (std::vector< sim::FLSHit > const &hits) const
 
TVector3 get_position (sim::FLSHit const &hit) const
 
unsigned n_mc_hits (mono::Track3D const &track) const
 
unsigned n_slices (std::vector< rb::Cluster > const &slices) const
 
double phi (sim::Particle const *particle) const
 
void split_by_view (std::map< std::string, std::vector< sim::FLSHit > > &hitmap) const
 
double theta (sim::Particle const *particle) const
 
geo::View_t view (unsigned plane) const
 
void tset (std::string const &branch_name, double const &value)
 

Private Attributes

std::string current_file_name_
 
double branch_default_value_
 
unsigned n_tracks_to_record_
 
TTree * tree_
 
std::map< std::string, TH1 * > h_
 
std::map< std::string, double > t_
 
art::ServiceHandle< art::TFileServicetfs_
 
art::ServiceHandle< cheat::BackTrackerbt_
 
art::ServiceHandle< geo::Geometrygeo_
 

Detailed Description

Definition at line 57 of file Monopole_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

mono::Monopole::Monopole ( fhicl::ParameterSet const &  p)
explicit

Definition at line 115 of file Monopole_module.cc.

115  :
116  EDAnalyzer(p),
117  current_file_name_("not set"),
118  branch_default_value_(-9999),
120 {
121 }
std::string current_file_name_
const char * p
Definition: xmltok.h:285
double branch_default_value_
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
unsigned n_tracks_to_record_
mono::Monopole::Monopole ( Monopole const &  )
delete
mono::Monopole::Monopole ( Monopole &&  )
delete

Member Function Documentation

void mono::Monopole::analyze ( art::Event const &  e)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 218 of file Monopole_module.cc.

References compare_h5_caf::branch, branch_default_value_, bt_, plot_validation_datamc::c, om::cout, art::errors::DataCorruption, edep, sim::ParticleNavigator::empty(), allTimeWatchdog::endl, art::Event::event(), galleryMaker::ext, extent_cell(), extent_plane(), art::Handle< T >::failedToGet(), art::FindManyP< ProdB, Data >::get(), get_position(), art::DataViewImpl::getByLabel(), sim::FLSHit::GetEntryT(), h_, cheat::BackTracker::HaveTruthInfo(), hits(), cheat::BackTracker::HitToFLSHit(), MECModelEnuComparisons::i, cheat::BackTracker::IsNoise(), kX, kY, art::errors::LogicError, m, simb::MCParticle::Mass(), std::max(), std::min(), simb::MCParticle::Momentum(), n_mc_hits(), n_slices(), n_tracks_to_record_, cheat::BackTracker::ParticleNavigator(), cheat::BackTracker::ParticleToFLSHit(), phi(), cet::pow(), sim::ParticleNavigator::Primary(), util::pythag(), art::Event::run(), sim::ParticleNavigator::size(), mono::Constants::SPEED_OF_LIGHT, split_by_view(), std::sqrt(), string, art::Event::subRun(), sum, t_, theta(), art::to_string(), simb::MCParticle::TrackId(), tree_, tset(), view(), and test::z.

219 {
220  //
221  // Extract Objects from the Event
222  //
223  // Raw Trigger Header
225  e.getByLabel("daq", raw_triggers);
226  if (raw_triggers->size() != 1)
228  << __FILE__ << ":" << __LINE__ << "\n"
229  << "RawTrigger vector has incorrect size: " << raw_triggers->size()
230  << std::endl;
231  unsigned long long
232  event_time(raw_triggers->front().fTriggerTimingMarker_TimeStart);
233  uint32_t event_length(raw_triggers->front().fTriggerRange_TriggerLength);
234 
235  // Offline Cell Hits
237  e.getByLabel("calhit", offline_hits);
238  std::vector<art::Ptr<rb::CellHit> > offline_hitptrs;
239  for (unsigned i = 0; i < offline_hits->size(); ++i)
240  offline_hitptrs.emplace_back(offline_hits, i);
241 
242  /*
243  EXCLUDE EXTRA INFO PARSING FOR NOW
244 
245  uint32_t extra_info(raw_triggers->front().fTriggerHeader_SourceSubID);
246  std::bitset<novaddt::smt::Extra_Info::BITSET_SIZE> extra_bits(extra_info);
247 
248  std::cout << "MF: extra_info = " << extra_info << std::endl;
249  std::cout << "MF: extra_bits = " << extra_bits << std::endl;
250  if (extra_bits.test(novaddt::smt::Extra_Info::INVALID_OLD_DEFAULT_BIT))
251  std::cout << "MF: extra_info is invalid (i.e. set to old default)"
252  << std::endl;
253  else
254  std::cout << "MF: (Check, Timeout, Invalid) = (" << std::boolalpha
255  << extra_bits.test(novaddt::smt::Extra_Info::TIMEOUT_BIT)
256  << ", " << extra_bits.test(novaddt::smt::Extra_Info::CHECK_BIT)
257  << ", " << extra_bits.
258  test(novaddt::smt::Extra_Info::INVALID_OLD_DEFAULT_BIT)
259  << ")" << std::endl;
260  */
261 
262  // DDT Decisions
264  e.getByLabel("slowmonopoletrigger", ddt_decisions);
265 
266  // NOvA Slicer (Slicer4D)
268  e.getByLabel("slicer", nova_slices);
269 
270  // Cosmic Tracks
271  art::Handle<std::vector<rb::Track> > cosmic_tracks;
272  e.getByLabel("cosmictrack", cosmic_tracks);
273 
274  // Monopole Cluster
275  art::Handle<std::vector<rb::Cluster> > mono_clusters;
276  e.getByLabel("monocluster", mono_clusters);
277 
278  // Monopole Slicer
280  e.getByLabel("monoslicer", mono_slices);
281 
282  // High Energy Removed Slices
283  art::Handle<std::vector<rb::Cluster> > higheremoved_slices;
284  e.getByLabel("higheremoval", higheremoved_slices);
285 
286  // Reconstructed Tracks
288  e.getByLabel("monotrack", reco_tracks);
289 
290  // Generator Information
292  e.getByLabel("generator", gen_info);
293 
294 
295  //
296  // Print Hits
297  //
298  // Monopole Track Hits
299  // std::cout << "MF: N_tracks = " << reco_tracks->size() << std::endl;
300  // if (reco_tracks->size() == 1)
301  // std::cout << reco_tracks->front() << std::endl;
302 
303  // // All Hits
304  // art::ServiceHandle<geo::Geometry> geometry;
305  // for (auto const& hit : offline_hitptrs)
306  // {
307  // std::string view;
308  // if (hit->View() == geo::View_t::kX)
309  // view = "XZ";
310  // else if (hit->View() == geo::View_t::kY)
311  // view = "YZ";
312  // else
313  // view = "BAD";
314 
315  // double xyz[3];
316  // geometry->CellInfo(hit->Plane(), hit->Cell(), NULL, xyz);
317  // TVector3 hit_vector(xyz);
318  // double v = geometry->CellTpos(hit->Plane(), hit->Cell());
319  // double z = hit_vector.z();
320  // double t = hit->TNS();
321 
322  // if (z > 1050 && z < 1400 &&
323  // t > -16000 && t < -9000)
324  // std::cout << "AllHits: View " << view
325  // << " Hit: t, v, z = " << t << ", " << v << ", " << z << "\n";
326  // }
327 
328 
329 
330  //
331  // Fill Histograms (and add some hit-based quantities together)
332  //
333  int n_hits_ge_100_ADC = 0;
334  int n_hits_ge_150_ADC = 0;
335 
336  double mc_n_hits_all_without_noise = 0.0;
337  int mc_n_hits_ge_100_ADC = 0;
338  int mc_n_hits_ge_150_ADC = 0;
339 
340  double mc_adc_total = 0.0;
341  double mc_adc_mean = 0.0;
342  double mc_adc_variance = 0.0;
343  double mc_adc_max = -9999;
344  double mc_adc_min = -9999;
345  if (!offline_hits.failedToGet())
346  {
347  std::vector<int32_t> mc_tdc_values;
348  std::vector<double> mc_adc_values;
349  for (auto const& hit : offline_hitptrs)
350  {
351  if (hit->ADC() >= 100)
352  ++n_hits_ge_100_ADC;
353 
354  if (hit->ADC() >= 150)
355  ++n_hits_ge_150_ADC;
356 
357  if (hit->IsMC())
358  {
359  if (!bt_->IsNoise(hit))
360  {
361  ++mc_n_hits_all_without_noise;
362 
363  h_.at("adc_mc")->Fill(hit->ADC());
364  mc_adc_values.push_back(hit->ADC());
365  mc_tdc_values.push_back(hit->TDC());
366 
367  if (hit->ADC() >= 100)
368  ++mc_n_hits_ge_100_ADC;
369 
370  if (hit->ADC() >= 150)
371  ++mc_n_hits_ge_150_ADC;
372  }
373  } else {
374  h_.at("adc_data")->Fill(hit->ADC());
375  }
376  }
377 
378  if (!mc_tdc_values.empty())
379  {
380  auto tdc_min =
381  *std::min_element(mc_tdc_values.cbegin(), mc_tdc_values.cend());
382  for (auto const& tdc : mc_tdc_values)
383  h_.at("tdc_mc")->Fill(tdc - tdc_min);
384  }
385 
386  if (mc_n_hits_all_without_noise > 1)
387  {
388  for (auto const& adc : mc_adc_values)
389  mc_adc_total += adc;
390 
391  mc_adc_mean = mc_adc_total / mc_n_hits_all_without_noise;
392 
393  for (auto const& adc : mc_adc_values)
394  mc_adc_variance += std::pow(adc - mc_adc_mean, 2);
395 
396  mc_adc_variance = std::sqrt(mc_adc_variance /
397  (mc_n_hits_all_without_noise - 1));
398 
399  mc_adc_min =
400  *std::min_element(mc_adc_values.cbegin(), mc_adc_values.cend());
401  mc_adc_max =
402  *std::max_element(mc_adc_values.cbegin(), mc_adc_values.cend());
403  }
404  }
405 
406  // Slicer4D Hit Counts
407  int mc_n_hits_in_slice4d = 0;
408  int mc_n_hits_in_slice4d_ge_100_ADC = 0;
409  if (!nova_slices.failedToGet())
410  {
411  for (auto const& nova_slice : *nova_slices)
412  {
413  if (!nova_slice.IsNoise())
414  {
415  for (auto const& nova_slice_hit : nova_slice.AllCells())
416  {
417  if (nova_slice_hit->IsMC() &&
418  !bt_->IsNoise(nova_slice_hit))
419  {
420  ++mc_n_hits_in_slice4d;
421 
422  if (nova_slice_hit->ADC() >= 100)
423  ++mc_n_hits_in_slice4d_ge_100_ADC;
424  }
425  }
426  }
427  }
428  }
429 
430  // Cosmic Track Hit Counts
431  int mc_n_hits_on_cosmic_track = 0;
432  int mc_n_hits_on_cosmic_track_ge_100_ADC = 0;
433  if (!cosmic_tracks.failedToGet())
434  {
435  for (auto const& cosmic_track : *cosmic_tracks)
436  {
437  for (auto const& cosmic_track_hit : cosmic_track.AllCells())
438  {
439  if (cosmic_track_hit->IsMC() &&
440  !bt_->IsNoise(cosmic_track_hit))
441  {
442  ++mc_n_hits_on_cosmic_track;
443 
444  if (cosmic_track_hit->ADC() >= 100)
445  ++mc_n_hits_on_cosmic_track_ge_100_ADC;
446  }
447  }
448  }
449  }
450 
451 
452 
453  //
454  // Fill Tree
455  //
456  for (auto & branch : t_)
457  branch.second = branch_default_value_;
458 
459  // Event Information
460  tset("run_number", e.run());
461  tset("subrun_number", e.subRun());
462  tset("event_number", e.event());
463  tset("event_length", event_length);
464 
465  // DDT Information
466  if (!ddt_decisions.failedToGet())
467  tset("ddt_trigger_decisions", ddt_decisions->size());
468 
469  // Hit-Level Information (from histogram filling above)
470  tset("n_hits_ge_100_ADC", n_hits_ge_100_ADC);
471  tset("n_hits_ge_150_ADC", n_hits_ge_150_ADC);
472 
473  tset("mc_n_hits_all_without_noise", mc_n_hits_all_without_noise);
474  tset("mc_n_hits_ge_100_ADC", mc_n_hits_ge_100_ADC);
475  tset("mc_n_hits_ge_150_ADC", mc_n_hits_ge_150_ADC);
476 
477  tset("mc_adc_total", mc_adc_total);
478  tset("mc_adc_mean", mc_adc_mean);
479  tset("mc_adc_variance", mc_adc_variance);
480  tset("mc_adc_min", mc_adc_min);
481  tset("mc_adc_max", mc_adc_max);
482 
483  // NOvA Slice (Slicer4D) Information
484  tset("mc_n_hits_in_slice4d", mc_n_hits_in_slice4d);
485  tset("mc_n_hits_in_slice4d_ge_100_ADC", mc_n_hits_in_slice4d_ge_100_ADC);
486 
487  // Cosmic Track Information
488  tset("mc_n_hits_on_cosmic_track", mc_n_hits_on_cosmic_track);
489  tset("mc_n_hits_on_cosmic_track_ge_100_ADC",
490  mc_n_hits_on_cosmic_track_ge_100_ADC);
491 
492  // Reconstruction Information
493  if (!offline_hits.failedToGet())
494  tset("n_hits", offline_hits->size());
495 
496  if (!mono_clusters.failedToGet())
497  {
498  tset("n_clusters", mono_clusters->size());
499 
500  if (mono_clusters->size() == 1)
501  {
502  auto cluster = mono_clusters->front();
503  tset("cluster_n_hits", cluster.NCell());
504  tset("cluster_n_hits_x", cluster.NXCell());
505  tset("cluster_n_hits_y", cluster.NYCell());
506  }
507  }
508 
509  if (!mono_slices.failedToGet())
510  {
511  tset("n_slices_monopole", n_slices(*mono_slices));
512 
513  auto max_it = std::max_element
514  (mono_slices->begin(), mono_slices->end(),
515  [](auto const lhs, auto const rhs)
516  { return lhs.TotalADC() < rhs.TotalADC(); });
517  tset("slice_sum_adc_max", max_it->TotalADC());
518  }
519 
520  if (!higheremoved_slices.failedToGet())
521  {
522  tset("n_slices_higheremoved", n_slices(*higheremoved_slices));
523 
524  // Retrieve Hough information from the event:
526  find_hough_results(higheremoved_slices, e, "hough");
527 
528  // Record the maximum number of Hough peaks:
529  std::map<geo::View_t, unsigned> n_peaks_max =
530  { {geo::View_t::kX, 0},
531  {geo::View_t::kY, 0} };
532 
533  for (size_t n_slice = 0; n_slice != higheremoved_slices->size(); ++n_slice)
534  {
535  if (!higheremoved_slices->at(n_slice).IsNoise())
536  {
537  std::vector<art::Ptr<rb::HoughResult> > hough_results;
538  find_hough_results.get(n_slice, hough_results);
539 
540  for (auto const& hough_result : hough_results)
541  {
542  auto view = hough_result->fView;
543  unsigned n_peak = hough_result->fPeak.size();
544  n_peaks_max.at(view) = std::max(n_peak, n_peaks_max.at(view));
545  }
546  }
547  }
548  tset("n_hough_peaks_x_max", n_peaks_max.at(geo::View_t::kX));
549  tset("n_hough_peaks_y_max", n_peaks_max.at(geo::View_t::kY));
550  }
551 
552  if (!reco_tracks.failedToGet())
553  {
554  tset("reco_n_tracks", reco_tracks->size());
555 
556  unsigned n_tracks =
557  std::min(n_tracks_to_record_, unsigned(reco_tracks->size()));
558  for (unsigned n_track = 1; n_track <= n_tracks; ++n_track)
559  {
560  auto track = reco_tracks->at(n_track - 1);
561 
562  std::string name = "reco_track_" + std::to_string(n_track) + "_";
563  tset(name + "dxdz", track.dxdz());
564  tset(name + "dydz", track.dydz());
565 
566  tset(name + "dxdt", track.velocity().x());
567  tset(name + "dydt", track.velocity().y());
568  tset(name + "dzdt", track.velocity().z());
569  tset(name + "velocity", track.velocity().Mag());
570  tset(name + "beta", track.beta());
571 
572  tset(name + "dzdt_x", track.dzdt(geo::View_t::kX));
573  tset(name + "dzdt_y", track.dzdt(geo::View_t::kY));
574 
575  // squared linear correlation factors:
576  tset(name + "r2_xt", track.r2_xt());
577  tset(name + "r2_yt", track.r2_yt());
578  tset(name + "r2_zt_x", track.r2_zt(geo::View_t::kX));
579  tset(name + "r2_zt_y", track.r2_zt(geo::View_t::kY));
580 
581  tset(name + "n_hits", track.cluster().NCell());
582  tset(name + "n_hits_x", track.cluster().NXCell());
583  tset(name + "n_hits_y", track.cluster().NYCell());
584  tset(name + "n_mc_hits", n_mc_hits(track));
585 
586  tset(name + "sum_adc", track.cluster().TotalADC());
587 
588  tset(name + "tstart", track.cluster().MinTNS());
589  tset(name + "tend", track.cluster().MaxTNS());
590 
591  tset(name + "dcell_x", track.cluster().ExtentCell(geo::View_t::kX));
592  tset(name + "dcell_y", track.cluster().ExtentCell(geo::View_t::kY));
593 
594  tset(name + "dplane_x", track.cluster().ExtentPlane(geo::View_t::kX));
595  tset(name + "dplane_y", track.cluster().ExtentPlane(geo::View_t::kY));
596 
597  TVector3 ext = track.cluster().ExtentXYZ();
598  tset(name + "dx", ext.x());
599  tset(name + "dy", ext.y());
600  tset(name + "dz", ext.z());
601  tset(name + "length", ext.Mag());
602  tset(name + "length_xz", util::pythag(ext.x(), ext.z()));
603  tset(name + "length_yz", util::pythag(ext.y(), ext.z()));
604  tset(name + "dt", track.cluster().ExtentTNS());
605 
606  tset(name + "max_time_gap_xz", track.max_time_gap_xz());
607  tset(name + "max_time_gap_yz", track.max_time_gap_yz());
608 
609  tset(name + "most_missing_planes_xz",
610  track.cluster().MostMissingPlanes(geo::View_t::kX));
611  tset(name + "most_missing_planes_yz",
612  track.cluster().MostMissingPlanes(geo::View_t::kY));
613  }
614  }
615 
616  if (bt_->HaveTruthInfo())
617  {
618  tset("is_mc", true);
619  tset("mc_monopole_hit_detector", false);
620 
622 
623  // Generator Information
624  /*
625  While working with the generator information, I found that its
626  information is incorrect (e.g. m = -2e9 GeV/c^2 for monopole).
627  The information extracted from the particle navigator, however,
628  is correct.
629 
630  TO DO:
631  1. since the generator mass is incorrect, implement it manually:
632  const double MONOPOLE_MASS = 1e16; // GeV / c^2
633 
634  2. use the hard-coded mass to calculate all of the generator quantities
635 
636  3. add all of the MC quantities at the generator level
637 
638  4. add the mass, px, py, pz, and p to MC and Gen level information
639  (makes it easy to calculate all quantities with the tree)
640  */
641  if (gen_info->size() == 1)
642  {
643  simb::MCParticle const& particle = gen_info->front().GetParticle(0);
644  unsigned const trajectory = 0;
645 
646  auto m = particle.Mass();
647  auto p = particle.Momentum(trajectory);
648 
649  tset("gen_dxdz", p.Px() / p.Pz());
650  tset("gen_dydz", p.Py() / p.Pz());
651  tset("gen_beta", p.P() / m);
652  } else {
654  << __FILE__ << ":" << __LINE__ << "\n"
655  << "The generator object contains " << gen_info->size()
656  << " elements, there should only be 1." << std::endl;
657  }
658 
659  // MC Information
661  std::cout << "MF: Number of MC Particles in Navigator = "
662  << pn.size() << std::endl;
663  if (!pn.empty())
664  {
665  tset("mc_monopole_hit_detector", true);
666 
667  sim::Particle const* particle = pn.Primary(0);
668  unsigned const trajectory = 0;
669 
670  auto m = particle->Mass();
671  auto p = particle->Momentum(trajectory);
672 
673  tset("mc_phi", phi(particle));
674  tset("mc_theta", theta(particle));
675 
676  tset("mc_dxdz", p.Px() / p.Pz());
677  tset("mc_dydz", p.Py() / p.Pz());
678 
679  tset("mc_dxdt", c * p.Px() / m);
680  tset("mc_dydt", c * p.Py() / m);
681  tset("mc_dzdt", c * p.Pz() / m);
682  tset("mc_velocity", c * p.P() / m);
683  tset("mc_beta", p.P() / m);
684 
685  std::map<std::string, std::vector<sim::FLSHit> > fls_hits;
686  fls_hits["all"] = bt_->ParticleToFLSHit(particle->TrackId());
687  split_by_view(fls_hits);
688 
689  // dE/dx
690  double Edep_sum = 0.0;
691  double Edep_Birks_sum = 0.0;
692  double path_length_sum = 0.0;
693  double n_cerenkov_sum = 0.0;
694  for (auto hit : fls_hits["all"])
695  {
696  double path_length = hit.GetTotalPathLength();
697  if (path_length > 5.0)
698  {
699  Edep_sum += hit.GetEdep();
700  Edep_Birks_sum += hit.GetEdepBirks();
701  path_length_sum += path_length;
702 
703  h_.at("dEdx")->Fill(hit.GetEdep() / path_length * 1e3); // MeV/cm
704  }
705  }
706 
707  tset("mc_path_length_sum", path_length_sum); // cm
708  if (path_length_sum > 0)
709  {
710  tset("mc_dEdx", Edep_sum / path_length_sum); // GeV/cm
711  tset("mc_dEdx_Birks", Edep_Birks_sum / path_length_sum); // GeV/cm
712  tset("mc_n_cerenkov", n_cerenkov_sum / path_length_sum);
713  }
714 
715  for (auto const& hits : fls_hits)
716  {
717  std::string suffix = hits.first;
718 
719  tset("mc_n_hits_" + suffix, hits.second.size());
720  tset("mc_dplane_" + suffix, extent_plane(hits.second));
721  tset("mc_dcell_" + suffix, extent_cell(hits.second));
722  }
723 
724  std::sort(fls_hits.at("all").begin(), fls_hits.at("all").end(),
725  [](sim::FLSHit const& lhs, sim::FLSHit const& rhs)
726  { return lhs.GetEntryT() < rhs.GetEntryT(); });
727 
728  auto entry_hit = fls_hits.at("all").front();
729  auto exit_hit = fls_hits.at("all").back();
730  TVector3 entry_position = get_position(entry_hit);
731  TVector3 exit_position = get_position(exit_hit);
732  TVector3 track = exit_position - entry_position;
733  tset("mc_dx", track.X());
734  tset("mc_dy", track.Y());
735  tset("mc_dz", track.Z());
736  tset("mc_length", track.Mag());
737  }
738 
739  // Energy Deposition
740  std::map<std::string, std::vector<double> > edeps;
741  for (auto const& hit : offline_hitptrs)
742  {
743  auto fls_hits = bt_->HitToFLSHit(hit);
744  for (auto const& fls_hit : fls_hits)
745  {
746  double edep =
747  static_cast<double>(hit->ADC()) / fls_hit.GetTotalPathLength();
748 
749  double z = (fls_hit.GetEntryZ() + fls_hit.GetExitZ()) / 2.0;
750  if (-25.0 < z && z < 25.0)
751  edeps["center"].push_back(edep);
752  else if (-650.0 < z && z < -600.0)
753  edeps["far_end"].push_back(edep);
754  else if (600.0 < z && z < 650)
755  edeps["near_end"].push_back(edep);
756  }
757  }
758 
759  for (auto const& position : edeps)
760  {
761  double sum = 0.0;
762  for (auto const& value : position.second)
763  sum += value;
764 
765  double average_edep = sum / static_cast<double>(position.second.size());
766  tset("mc_" + position.first + "_average_edep", average_edep);
767  tset("mc_" + position.first + "_n_hits", position.second.size());
768  }
769  } else {
770  tset("is_mc", false);
771  }
772 
773  tree_->Fill();
774 }
T max(const caf::Proxy< T > &a, T b)
const XML_Char * name
Definition: expat.h:151
void tset(std::string const &branch_name, double const &value)
const sim::ParticleNavigator & ParticleNavigator() const
Get a reference to the ParticleNavigator.
Definition: BackTracker.h:744
size_type size() const
const char * p
Definition: xmltok.h:285
T sqrt(T number)
Definition: d0nt_math.hpp:156
double theta(sim::Particle const *particle) const
std::vector< sim::FLSHit > ParticleToFLSHit(const int &trackID) const
All the FLSHits that were created by the track id trackID, sorted from most to least light...
double Mass() const
Definition: MCParticle.h:238
constexpr T pow(T x)
Definition: pow.h:75
TVector3 get_position(sim::FLSHit const &hit) const
unsigned n_slices(std::vector< rb::Cluster > const &slices) const
Definition: event.h:19
A single unit of energy deposition in the liquid scintillator.
Definition: FLSHit.h:19
const double SPEED_OF_LIGHT
Definition: Constants.h:8
const Var kY([](const caf::SRProxy *sr){float tmp=0.f;if(sr->mc.nu.empty()) return tmp;tmp=sr->mc.nu[0].y;return tmp;})
bool IsNoise(const art::Ptr< rb::CellHit > &hit) const
Is this hit not associated with any particles?
int TrackId() const
Definition: MCParticle.h:209
int extent_plane(std::vector< sim::FLSHit > const &hits) const
double branch_default_value_
void hits()
Definition: readHits.C:15
const sim::Particle * Primary(const int) const
const XML_Char int const XML_Char * value
Definition: expat.h:331
void split_by_view(std::map< std::string, std::vector< sim::FLSHit > > &hitmap) const
std::vector< sim::FLSHit > HitToFLSHit(const rb::CellHit &hit) const
All the FLSHits that contributed to this hit, sorted from most to least light.
double phi(sim::Particle const *particle) const
Double_t edep
Definition: macro.C:13
z
Definition: test.py:28
unsigned n_mc_hits(mono::Track3D const &track) const
OStream cout
Definition: OStream.cxx:6
float GetEntryT() const
Definition: FLSHit.h:51
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::map< std::string, double > t_
unsigned n_tracks_to_record_
std::map< std::string, TH1 * > h_
double pythag(double x, double y)
2D Euclidean distance
Definition: MathUtil.h:29
Definition: structs.h:12
const TLorentzVector & Momentum(const int i=0) const
Definition: MCParticle.h:219
bool HaveTruthInfo() const
Is this a file with truth info in? (Is BackTracker going to be any use to you?)
Definition: BackTracker.h:133
Definition: geo.h:1
geo::View_t view(unsigned plane) const
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
T min(const caf::Proxy< T > &a, T b)
Double_t sum
Definition: plot.C:31
Float_t e
Definition: plot.C:35
art::ServiceHandle< cheat::BackTracker > bt_
bool failedToGet() const
Definition: Handle.h:196
int extent_cell(std::vector< sim::FLSHit > const &hits) const
enum BeamMode string
void mono::Monopole::beginJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 137 of file Monopole_module.cc.

References current_file_name_, h_, art::TFileDirectory::make(), n_tracks_to_record_, push_back(), t_, tfs_, getGoodRuns4SAM::tname, art::to_string(), and tree_.

138 {
139  tree_ = tfs_->make<TTree>("Event", "Monopole Event Tree");
140 
141  std::vector<std::string> branch_names =
142  { "run_number", "subrun_number", "event_number", "event_length", "n_hits",
143  "n_clusters", "cluster_n_hits", "cluster_n_hits_x", "cluster_n_hits_y",
144  "reco_n_tracks", "is_mc", "n_slices_monopole", "n_slices_higheremoved",
145  "n_hough_peaks_x_max", "n_hough_peaks_y_max",
146  "slice_sum_adc_max",
147  "gen_dxdz", "gen_dydz", "gen_beta",
148  "mc_dxdz", "mc_dydz", "mc_dxdt", "mc_dydt", "mc_dzdt",
149  "mc_velocity", "mc_beta",
150  "mc_length", "mc_phi", "mc_theta",
151  "mc_center_average_edep", "mc_center_n_hits",
152  "mc_near_end_average_edep", "mc_near_end_n_hits",
153  "mc_far_end_average_edep", "mc_far_end_n_hits",
154  "mc_monopole_hit_detector",
155  "mc_dx", "mc_dy", "mc_dz",
156  "mc_dplane_all", "mc_dplane_x", "mc_dplane_y",
157  "mc_dcell_all", "mc_dcell_x", "mc_dcell_y",
158  "mc_n_hits_all", "mc_n_hits_x", "mc_n_hits_y",
159  "ddt_trigger_decisions",
160  "n_hits_ge_100_ADC",
161  "n_hits_ge_150_ADC",
162  "mc_n_hits_all_without_noise",
163  "mc_n_hits_ge_100_ADC",
164  "mc_n_hits_ge_150_ADC",
165  "mc_n_hits_in_slice4d",
166  "mc_n_hits_in_slice4d_ge_100_ADC",
167  "mc_n_hits_on_cosmic_track",
168  "mc_n_hits_on_cosmic_track_ge_100_ADC",
169  "mc_adc_total",
170  "mc_adc_mean",
171  "mc_adc_variance",
172  "mc_adc_min",
173  "mc_adc_max",
174  "mc_dEdx",
175  "mc_dEdx_Birks",
176  "mc_n_cerenkov",
177  "mc_path_length_sum"
178  };
179 
180  std::vector<std::string> track_names =
181  { "dxdz", "dydz", "dxdt", "dydt", "dzdt", "velocity", "beta",
182  "dzdt_x", "dzdt_y", "r2_xt", "r2_yt", "r2_zt_x", "r2_zt_y",
183  "n_hits", "n_hits_x", "n_hits_y", "n_mc_hits", "sum_adc",
184  "dt", "dx", "dy", "dz", "length", "length_xz", "length_yz",
185  "tstart", "tend",
186  "max_time_gap_xz", "max_time_gap_yz",
187  "most_missing_planes_xz", "most_missing_planes_yz",
188  "dcell_x", "dcell_y", "dplane_x", "dplane_y"
189  };
190 
191  for (auto const& tname : track_names)
192  for (unsigned n_track = 1; n_track <= n_tracks_to_record_; ++n_track)
193  branch_names.
194  push_back("reco_track_" + std::to_string(n_track) + "_" + tname);
195 
196  for (auto const& bname : branch_names)
197  tree_->Branch(bname.c_str(), &t_[bname], (bname + "/D").c_str());
198 
199  tree_->Branch("input_file_name", &current_file_name_);
200 
201 
202  h_["adc_mc"] =
203  tfs_->make<TH1F>("adc_mc", "ADC Distribution - MC", 4096, -0.5, 4095.5);
204  h_["adc_data"] =
205  tfs_->make<TH1F>("adc_data", "ADC Distribution - Data", 4096, -0.5, 4095.5);
206 
207 
208  // 64,000 TDC = 1000 us
209  h_["tdc_mc"] =
210  tfs_->make<TH1F>("tdc_mc", "TDC Distribution - MC", 1000, 0, 64000);
211 
212  h_["dEdx"] =
213  tfs_->make<TH1F>("dEdx", "dE/dx Distribution;dE/dx [MeV/cm]", 200, 0, 40);
214 }
std::string current_file_name_
art::ServiceHandle< art::TFileService > tfs_
base_types push_back(int_type())
std::map< std::string, double > t_
T * make(ARGS...args) const
unsigned n_tracks_to_record_
std::map< std::string, TH1 * > h_
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
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
int mono::Monopole::extent_cell ( std::vector< sim::FLSHit > const &  hits) const
private

Definition at line 779 of file Monopole_module.cc.

References std::abs(), branch_default_value_, extent_plane(), and it.

Referenced by analyze().

780 {
781  if (hits.empty())
782  return branch_default_value_;
783 
784  auto it = std::minmax_element
785  (hits.cbegin(), hits.cend(),
786  [](auto const lhs, auto const rhs)
787  { return lhs.GetCellID() < rhs.GetCellID(); });
788 
789  // we add 1 to be consistent with rb::Cluster::ExtentCell()
790  return std::abs(it.first->GetCellID() - it.second->GetCellID()) + 1;
791 }
set< int >::iterator it
float abs(float number)
Definition: d0nt_math.hpp:39
double branch_default_value_
void hits()
Definition: readHits.C:15
int mono::Monopole::extent_plane ( std::vector< sim::FLSHit > const &  hits) const
private

Definition at line 796 of file Monopole_module.cc.

References std::abs(), branch_default_value_, and it.

Referenced by analyze(), and extent_cell().

797 {
798  if (hits.empty())
799  return branch_default_value_;
800 
801  auto it = std::minmax_element
802  (hits.cbegin(), hits.cend(),
803  [](auto const lhs, auto const rhs)
804  { return lhs.GetPlaneID() < rhs.GetPlaneID(); });
805 
806  // we add 1 to be consistent with rb::Cluster::ExtentPlane()
807  return std::abs(it.first->GetPlaneID() - it.second->GetPlaneID()) + 1;
808 }
set< int >::iterator it
float abs(float number)
Definition: d0nt_math.hpp:39
double branch_default_value_
void hits()
Definition: readHits.C:15
TVector3 mono::Monopole::get_position ( sim::FLSHit const &  hit) const
private

Definition at line 812 of file Monopole_module.cc.

References geo_, sim::FLSHit::GetCellID(), sim::FLSHit::GetPlaneID(), sim::FLSHit::GetZAverage(), geo::GeometryBase::Plane(), and fillBadChanDBTables::result.

Referenced by analyze().

813 {
814  TVector3 result;
815  geo_->Plane(hit.GetPlaneID())->Cell(hit.GetCellID())->
816  GetCenter(result, hit.GetZAverage());
817 
818  return result;
819 }
const PlaneGeo * Plane(unsigned int i) const
Definition: structs.h:12
art::ServiceHandle< geo::Geometry > geo_
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  }
unsigned mono::Monopole::n_mc_hits ( mono::Track3D const &  track) const
private

Definition at line 823 of file Monopole_module.cc.

References rb::Cluster::AllCells(), bt_, mono::Track3D::cluster(), cheat::BackTracker::HaveTruthInfo(), and fillBadChanDBTables::result.

Referenced by analyze().

824 {
825  unsigned result = 0;
826 
827  if (!bt_->HaveTruthInfo())
828  return result;
829 
830  for (auto const& hit : track.cluster().AllCells())
831  if (hit->IsMC())
832  ++result;
833 
834  return result;
835 }
Definition: event.h:19
Definition: structs.h:12
bool HaveTruthInfo() const
Is this a file with truth info in? (Is BackTracker going to be any use to you?)
Definition: BackTracker.h:133
art::ServiceHandle< cheat::BackTracker > bt_
unsigned mono::Monopole::n_slices ( std::vector< rb::Cluster > const &  slices) const
private

Definition at line 839 of file Monopole_module.cc.

References fillBadChanDBTables::result.

Referenced by analyze().

840 {
841  unsigned result = std::count_if
842  (slices.begin(), slices.end(),
843  [](rb::Cluster const& slice){ return !slice.IsNoise(); });
844 
845  return result;
846 }
A collection of associated CellHits.
Definition: Cluster.h:47
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
Monopole& mono::Monopole::operator= ( Monopole const &  )
delete
Monopole& mono::Monopole::operator= ( Monopole &&  )
delete
double mono::Monopole::phi ( sim::Particle const *  particle) const
private

Definition at line 850 of file Monopole_module.cc.

References std::atan2(), simb::MCParticle::Px(), simb::MCParticle::Py(), and split_by_view().

Referenced by analyze().

851 {
852  double Px(particle->Px()), Py(particle->Py());
853 
854  return std::atan2(Py, Px);
855 }
T atan2(T number)
Definition: d0nt_math.hpp:72
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
void mono::Monopole::respondToOpenInputFile ( art::FileBlock const &  fb)
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 125 of file Monopole_module.cc.

References om::cout, current_file_name_, allTimeWatchdog::endl, and art::FileBlock::fileName().

126 {
127  current_file_name_ = fb.fileName();
128 
129  std::cout << "mono::Monopole::respondToOpenInputFile: "
130  << "The current file name is "
132  << std::endl;
133 }
std::string current_file_name_
OStream cout
Definition: OStream.cxx:6
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 mono::Monopole::split_by_view ( std::map< std::string, std::vector< sim::FLSHit > > &  hitmap) const
private

Definition at line 860 of file Monopole_module.cc.

References kX, and view().

Referenced by analyze(), and phi().

861 {
862  hitmap["x"].clear();
863  hitmap["y"].clear();
864 
865  for (auto const & hit : hitmap.at("all"))
866  {
867  if (view(hit.GetPlaneID()) == geo::View_t::kX)
868  hitmap.at("x").push_back(hit);
869  else
870  hitmap.at("y").push_back(hit);
871  }
872 }
Definition: structs.h:12
Definition: geo.h:1
geo::View_t view(unsigned plane) const
double mono::Monopole::theta ( sim::Particle const *  particle) const
private

Definition at line 876 of file Monopole_module.cc.

References std::atan2(), simb::MCParticle::Px(), simb::MCParticle::Py(), simb::MCParticle::Pz(), and std::sqrt().

Referenced by analyze().

877 {
878  double Px(particle->Px()), Py(particle->Py()), Pz(particle->Pz());
879  double Pt = std::sqrt(Px * Px + Py * Py);
880 
881  return std::atan2(Pt, Pz);
882 }
T sqrt(T number)
Definition: d0nt_math.hpp:156
T atan2(T number)
Definition: d0nt_math.hpp:72
void mono::Monopole::tset ( std::string const &  branch_name,
double const &  value 
)
private

Definition at line 101 of file Monopole_module.cc.

References allTimeWatchdog::endl, it, t_, and art::errors::UnimplementedFeature.

Referenced by analyze().

102 {
103  auto it = t_.find(branch_name);
104  if (it == t_.end())
106  << __FILE__ << ":" << __LINE__ << "\n"
107  << "Branch " << branch_name << " does not exist!"
108  << std::endl;
109 
110  it->second = value;
111 }
set< int >::iterator it
const XML_Char int const XML_Char * value
Definition: expat.h:331
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::map< std::string, double > t_
void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
geo::View_t mono::Monopole::view ( unsigned  plane) const
private

Definition at line 886 of file Monopole_module.cc.

References DEFINE_ART_MODULE(), kX, and kY.

Referenced by analyze(), and split_by_view().

887 {
888  // x planes are odd, y planes are even
889  if (plane % 2 == 1)
890  return geo::View_t::kX;
891 
892  return geo::View_t::kY;
893 }
const Var kY([](const caf::SRProxy *sr){float tmp=0.f;if(sr->mc.nu.empty()) return tmp;tmp=sr->mc.nu[0].y;return tmp;})
Definition: geo.h:1
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

double mono::Monopole::branch_default_value_
private

Definition at line 89 of file Monopole_module.cc.

Referenced by analyze(), extent_cell(), and extent_plane().

art::ServiceHandle<cheat::BackTracker> mono::Monopole::bt_
private

Definition at line 95 of file Monopole_module.cc.

Referenced by analyze(), and n_mc_hits().

std::string mono::Monopole::current_file_name_
private

Definition at line 87 of file Monopole_module.cc.

Referenced by beginJob(), and respondToOpenInputFile().

art::ServiceHandle<geo::Geometry> mono::Monopole::geo_
private

Definition at line 96 of file Monopole_module.cc.

Referenced by get_position().

std::map<std::string, TH1*> mono::Monopole::h_
private

Definition at line 92 of file Monopole_module.cc.

Referenced by analyze(), and beginJob().

unsigned mono::Monopole::n_tracks_to_record_
private

Definition at line 90 of file Monopole_module.cc.

Referenced by analyze(), and beginJob().

std::map<std::string, double> mono::Monopole::t_
private

Definition at line 93 of file Monopole_module.cc.

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

art::ServiceHandle<art::TFileService> mono::Monopole::tfs_
private

Definition at line 94 of file Monopole_module.cc.

Referenced by beginJob().

TTree* mono::Monopole::tree_
private

Definition at line 91 of file Monopole_module.cc.

Referenced by analyze(), and beginJob().


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