LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
DBclusterAna_module.cc
Go to the documentation of this file.
1 //
3 // DBSCANfinderAna class
4 //
5 // \author kinga.partyka@yale.edu
6 //
8 
9 #include <algorithm>
10 #include <string>
11 
12 #include <TH1F.h>
13 #include <TH2F.h>
14 
15 //Framework includes
20 #include "art_root_io/TFileService.h"
24 #include "fhiclcpp/ParameterSet.h"
25 
26 //LArSoft includes
39 
41 
43 namespace cluster {
44 
45  class DBclusterAna : public art::EDAnalyzer {
46 
47  public:
48  explicit DBclusterAna(fhicl::ParameterSet const& pset);
49  virtual ~DBclusterAna();
50 
51  private:
53  void analyze(const art::Event& evt);
54  void beginJob();
55 
61  TH1F* fCl_for_Muon;
73 
82  TH1F* fEnergy;
83  TH2F* fbrian_in;
84  TH2F* fbrian_coll;
85 
86  std::string fDigitModuleLabel;
87  std::string fHitsModuleLabel;
88  std::string fLArG4ModuleLabel;
90  std::string fCalDataModuleLabel;
91  std::string fGenieGenModuleLabel;
92 
93  }; // class DBclusterAna
94 
95 }
96 
97 namespace cluster {
98 
99  //--------------------------------------------------------------------
101  : EDAnalyzer(pset)
102  , fDigitModuleLabel(pset.get<std::string>("DigitModuleLabel"))
103  , fHitsModuleLabel(pset.get<std::string>("HitsModuleLabel"))
104  , fLArG4ModuleLabel(pset.get<std::string>("LArGeantModuleLabel"))
105  , fClusterFinderModuleLabel(pset.get<std::string>("ClusterFinderModuleLabel"))
106  , fCalDataModuleLabel(pset.get<std::string>("CalDataModuleLabel"))
107  , fGenieGenModuleLabel(pset.get<std::string>("GenieGenModuleLabel"))
108  {}
109 
110  //------------------------------------------------------------------
112 
114  {
115  // get access to the TFile service
117 
118  fNoParticles_pdg_per_event = tfs->make<TH1F>(
119  "fNoParticles_pdg_per_event", "Average # of Particles per cluster for each event", 500, 0, 5);
120  fNoParticles_pdg = tfs->make<TH1F>(
121  "fNoParticles_pdg", "Number of Particles in a Cluster for each cluster", 500, 0, 5);
122  fNoParticles_trackid = tfs->make<TH1F>(
123  "fNoParticles_trackid", "Number of different TrackIDs in a Cluster", 300, 0, 30);
124 
126  tfs->make<TH1F>("fNoParticles_trackid_mother",
127  "Number of different TrackIDs in a Cluster(using mother)for each cluster",
128  300,
129  0,
130  30);
131 
133  tfs->make<TH1F>("fNoParticles_trackid_per_event",
134  "Avg Number of different TrackIDs per Cluster per event",
135  300,
136  0,
137  30);
138  fCl_for_Muon =
139  tfs->make<TH1F>("fCl_for_Muon", "Number of Clusters for Muon per plane (pdg)", 1500, 0, 15);
140 
142  tfs->make<TH1F>("fNoClustersInEvent", "Number of Clusters in an Event", 50, 0, 50);
143 
144  fPercentNoise =
145  tfs->make<TH1F>("fPercentNoise", "% of hits that were marked as Noise by DBSCAN", 250, 0, 25);
146 
147  fno_of_clusters_per_track = tfs->make<TH1F>(
148  "fno_of_clusters_per_track", "Number of Clusters per TrackID per plane", 1500, 0, 15);
149 
151  tfs->make<TH1F>("fPercent_lost_muon_hits",
152  "Number of muon hits excluded by dbscan in % (per Event)",
153  10000,
154  0,
155  100);
157  tfs->make<TH1F>("fPercent_lost_electron_hits",
158  "Number of electron hits excluded by dbscan in % (per Event)",
159  10000,
160  0,
161  100);
163  tfs->make<TH1F>("fPercent_lost_positron_hits",
164  "Number of positron hits excluded by dbscan in % (per Event)",
165  10000,
166  0,
167  100);
169  tfs->make<TH1F>("fPercent_lost_111_hits",
170  "Number of pion(111) hits excluded by dbscan in % (per Event)",
171  10000,
172  0,
173  100);
175  tfs->make<TH1F>("fPercent_lost_211_hits",
176  "Number of pion(211) hits excluded by dbscan in % (per Event)",
177  10000,
178  0,
179  100);
181  tfs->make<TH1F>("fPercent_lost_m211_hits",
182  "Number of pion(-211) hits excluded by dbscan in % (per Event)",
183  10000,
184  0,
185  100);
187  tfs->make<TH1F>("fPercent_lost_2212_hits",
188  "Number of proton hits excluded by dbscan in % (per Event)",
189  10000,
190  0,
191  100);
193  tfs->make<TH1F>("fPercent_lost_2112_hits",
194  "Number of neutron hits excluded by dbscan in % (per Event)",
195  10000,
196  0,
197  100);
198 
199  fPercent_lost_muon_energy = tfs->make<TH1F>("fPercent_lost_muon_energy",
200  " muon energy excluded by dbscan in % (per Event)",
201  10000,
202  0,
203  100);
205  tfs->make<TH1F>("fPercent_lost_electron_energy",
206  "electron energy excluded by dbscan in % (per Event)",
207  10000,
208  0,
209  100);
211  tfs->make<TH1F>("fPercent_lost_positron_energy",
212  " positron energy excluded by dbscan in % (per Event)",
213  10000,
214  0,
215  100);
217  tfs->make<TH1F>("fPercent_lost_111_energy",
218  "pion(111) energy excluded by dbscan in % (per Event)",
219  10000,
220  0,
221  100);
223  tfs->make<TH1F>("fPercent_lost_211_energy",
224  "pion(211) energy excluded by dbscan in % (per Event)",
225  10000,
226  0,
227  100);
229  tfs->make<TH1F>("fPercent_lost_m211_energy",
230  " pion(-211) energy excluded by dbscan in % (per Event)",
231  10000,
232  0,
233  100);
234  fPercent_lost_2212_energy = tfs->make<TH1F>("fPercent_lost_2212_energy",
235  "proton energy excluded by dbscan in % (per Event)",
236  10000,
237  0,
238  100);
240  tfs->make<TH1F>("fPercent_lost_2112_energy",
241  "neutron energy excluded by dbscan in % (per Event)",
242  10000,
243  0,
244  100);
245 
246  fEnergy = tfs->make<TH1F>("fEnergy", "energy for each voxel", 100000, 0, 0.0005);
247 
248  fbrian_in = tfs->make<TH2F>("fbrian_in",
249  ";# Electrons deposited; # Electrons detected by hitfinder",
250  1000,
251  0,
252  10000000,
253  1000,
254  0,
255  10000000);
256  fbrian_coll = tfs->make<TH2F>("fbrian_coll",
257  ";# Electrons deposited; # Electrons detected by hitfinder",
258  1000,
259  0,
260  10000000,
261  1000,
262  0,
263  10000000);
264  }
265 
267  {
268  std::cout << "run : " << evt.run() << std::endl;
269  std::cout << "event : " << evt.id().event() << std::endl;
270  //----------------------------------------------------------------
271 
272  /* This is basically a module for studying MC efficiency/purity. Kick out now if not MC. EC, 8-Oct-2010 */
273  if (evt.isRealData()) {
274  std::cout << "**** DBclusterAna: Bailing. Don't call this module if you're not MC. "
275  << std::endl;
276  exit(1);
277  }
278 
282 
284  evt.getByLabel(fDigitModuleLabel, rdListHandle);
286  evt.getByLabel(fHitsModuleLabel, hitListHandle);
287  art::Handle<std::vector<simb::MCTruth>> mctruthListHandle;
288  evt.getByLabel(fGenieGenModuleLabel, mctruthListHandle);
289  art::Handle<std::vector<recob::Cluster>> clusterListHandle;
290  evt.getByLabel(fClusterFinderModuleLabel, clusterListHandle);
291  art::Handle<std::vector<recob::Wire>> wireListHandle;
292  evt.getByLabel(fCalDataModuleLabel, wireListHandle);
293 
294  art::FindManyP<recob::Hit> fmh(clusterListHandle, evt, fClusterFinderModuleLabel);
295 
296  //----------------------------------------------------------------
297 
298  //----------------------------------------------------------------
299 
301 
302  for (size_t ii = 0; ii < rdListHandle->size(); ++ii) {
303  art::Ptr<raw::RawDigit> rawdigit(rdListHandle, ii);
304  rawdigits.push_back(rawdigit);
305  }
306 
307  //get the simb::MCParticle collection from the art::Event and then use the
308  //Simulation/SimListUtils object to create a sim::ParticleList from the art::Event.
310 
311  sim::ParticleList const& _particleList = pi_serv->ParticleList();
312 
313  std::vector<int> mc_trackids;
314 
315  for (auto i = _particleList.begin(); i != _particleList.end(); ++i) {
316  int trackID = (*i).first;
317  mc_trackids.push_back(trackID);
318  }
319 
320  //----------------------------------------------------------------
322  for (size_t ii = 0; ii < mctruthListHandle->size(); ++ii) {
323  art::Ptr<simb::MCTruth> mctparticle(mctruthListHandle, ii);
324  mclist.push_back(mctparticle);
325  }
326 
327  //--------------------------------------------------
328  std::vector<art::Ptr<recob::Hit>> hits_vec;
329 
330  //--------------------------------------------------
331  std::vector<art::Ptr<recob::Hit>> hits;
332  art::fill_ptr_vector(hits, hitListHandle);
333  //---------------------------------------------------
334 
336  for (unsigned int ii = 0; ii < clusterListHandle->size(); ++ii) {
337  art::Ptr<recob::Cluster> clusterHolder(clusterListHandle, ii);
338  clusters.push_back(clusterHolder);
339  }
340 
341  std::cout << "in Efficiency, clusters.size()= " << clusters.size() << std::endl;
342 
343  //---------------------------------------------------------------
345 
346  for (size_t ii = 0; ii < wireListHandle->size(); ++ii) {
347  art::Ptr<recob::Wire> wireHolder(wireListHandle, ii);
348 
349  wirelist.push_back(wireHolder);
350  }
351 
352  //...........................................................................
353  // How many different particles do we have in a cluster???
354  // -- I will answer that by 3 methods
355  // 1) count different TrackIDs in each cluster
356  // 2) count different TrackIDs in each cluster with the use of "Mother" to get rid of the ones that just randomly got their TrackIDs changed by Geant4
357  // 3) count different pdg codes in each cluster <--probably not very good b/c if you have 2 "different" electrons in a cluster it's going to count them as one.
358  //..........................................................................
359  // How many clusters it takes to contain a particle???
360  // take each TrackID and count in how many clusters it appears
361  //.........................................................................
362 
363  double no_of_particles_in_cluster = 0;
364  double sum_vec_trackid = 0;
365  double no_of_clusters = 0;
366  double total_no_hits_in_clusters = 0;
367  std::vector<int> vec_pdg;
368  std::vector<int> vec_trackid, vec_trackid_mother, vec_trackid_mother_en;
369  std::vector<int> all_trackids;
370  std::vector<int> ids;
371  std::vector<int>::iterator it, it2, it3, it4, it5, it6, it7, it8;
372  int no_cl_for_muon = 0;
373  int no_cl_for_electron = 0;
374  int no_cl_for_positron = 0;
375  int no_cl_for_pion_111 = 0;
376  int no_cl_for_pion_211 = 0;
377  int no_cl_for_pion_m211 = 0;
378  int no_cl_for_proton = 0;
379  double noCluster = 0;
380  double _hit_13 = 0, _hit_11 = 0, _hit_m_11 = 0, _hit_111 = 0, _hit_211 = 0, _hit_m211 = 0,
381  _hit_2212 = 0, _hit_2112 = 0;
382  double _en_13 = 0, _en_11 = 0, _en_m11 = 0, _en_111 = 0, _en_211 = 0, _en_m211 = 0,
383  _en_2212 = 0, _en_2112 = 0;
384  std::vector<double> diff_vec;
385 
386  double hit_energy = 0;
387 
388  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(evt);
389  if (clusters.size() != 0 && hits.size() != 0) {
390  for (auto const& plane : geom->Iterate<geo::PlaneGeo>(geo::TPCID{0, 0})) {
391  geo::View_t view = plane.View();
392  for (size_t j = 0; j < clusters.size(); ++j) {
393 
394  if (clusters[j]->View() == view) {
395 
396  std::vector<art::Ptr<recob::Hit>> _hits = fmh.at(j);
397  art::Ptr<recob::Hit> _hits_ptr;
398 
399  for (size_t p = 0; p < _hits.size(); ++p) {
400  _hits_ptr = _hits[p];
401  hits_vec.push_back(_hits_ptr);
402  }
403 
404  std::vector<art::Ptr<recob::Hit>>::iterator itr = hits_vec.begin();
405 
406  while (itr != hits_vec.end()) {
407  diff_vec.clear();
408 
409  hit_energy = _hits[itr - hits_vec.begin()]->Integral();
410 
411  std::vector<sim::TrackIDE> trackides = bt_serv->HitToTrackIDEs(clockData, *itr);
412  std::vector<sim::TrackIDE> eveides = bt_serv->HitToEveTrackIDEs(clockData, *itr);
413 
414  std::vector<sim::TrackIDE>::iterator idesitr = trackides.begin();
415 
416  while (idesitr != trackides.end()) {
417 
418  vec_trackid.push_back((*idesitr).trackID);
419 
420  const simb::MCParticle* particle = _particleList.at((*idesitr).trackID);
421  int pdg = particle->PdgCode();
422  if (pdg == 13 || pdg == -13) {
423  _hit_13++;
424  _en_13 += hit_energy * ((*idesitr).energyFrac);
425  }
426  idesitr++;
427  }
428 
429  itr++;
430 
431  } // loop thru hits
432 
433  it = find(vec_pdg.begin(), vec_pdg.end(), 13);
434  if (it != vec_pdg.end()) { no_cl_for_muon++; }
435 
436  it2 = find(vec_pdg.begin(), vec_pdg.end(), 11);
437  if (it2 != vec_pdg.end()) { no_cl_for_electron++; }
438 
439  it3 = find(vec_pdg.begin(), vec_pdg.end(), -11);
440  if (it3 != vec_pdg.end()) { no_cl_for_positron++; }
441 
442  it4 = find(vec_pdg.begin(), vec_pdg.end(), 111);
443  if (it4 != vec_pdg.end()) { no_cl_for_pion_111++; }
444  it6 = find(vec_pdg.begin(), vec_pdg.end(), 211);
445  if (it6 != vec_pdg.end()) { no_cl_for_pion_211++; }
446  it7 = find(vec_pdg.begin(), vec_pdg.end(), -211);
447  if (it7 != vec_pdg.end()) { no_cl_for_pion_m211++; }
448  it8 = find(vec_pdg.begin(), vec_pdg.end(), 2212);
449  if (it8 != vec_pdg.end()) { no_cl_for_proton++; }
450 
451  sort(vec_pdg.begin(), vec_pdg.end());
452  vec_pdg.erase(unique(vec_pdg.begin(), vec_pdg.end()), vec_pdg.end());
453 
454  //same for vec_trackid:
455 
456  sort(vec_trackid.begin(), vec_trackid.end());
457  vec_trackid.erase(unique(vec_trackid.begin(), vec_trackid.end()), vec_trackid.end());
458  for (unsigned int ii = 0; ii < vec_trackid.size(); ++ii) {
459  all_trackids.push_back(vec_trackid[ii]);
460  }
461 
462  //...............................................................
463  //Also Make vec_trackid_mother unique:
464 
465  sort(vec_trackid_mother.begin(), vec_trackid_mother.end());
466  vec_trackid_mother.erase(unique(vec_trackid_mother.begin(), vec_trackid_mother.end()),
467  vec_trackid_mother.end());
468 
469  // Also Make vec_trackid_mother_en unique:
470 
471  sort(vec_trackid_mother_en.begin(), vec_trackid_mother_en.end());
472  vec_trackid_mother_en.erase(
473  unique(vec_trackid_mother_en.begin(), vec_trackid_mother_en.end()),
474  vec_trackid_mother_en.end());
475 
476  //........................................................................
477 
478  // Q: How many clusters it takes to contain a certain particle?
479  for (unsigned int ii = 0; ii < mc_trackids.size(); ++ii) {
480  it5 = find(vec_trackid.begin(), vec_trackid.end(), mc_trackids[ii]);
481  if (it5 != vec_trackid.end()) {
482  ids.push_back(mc_trackids[ii]); // then make it unique
483  noCluster++;
484  }
485  }
486 
487  fNoParticles_pdg->Fill(vec_pdg.size());
488 
489  fNoParticles_trackid->Fill(vec_trackid.size());
490 
491  fNoParticles_trackid_mother->Fill(vec_trackid_mother.size());
492 
493  no_of_clusters++;
494 
495  no_of_particles_in_cluster += vec_pdg.size();
496  sum_vec_trackid += vec_trackid_mother.size();
497  total_no_hits_in_clusters += _hits.size();
498 
499  vec_pdg.clear();
500 
501  vec_trackid.clear();
502 
503  vec_trackid_mother.clear();
504 
505  vec_trackid_mother_en.clear();
506 
507  } // end if cluster is in correct view
508 
509  hits_vec.clear();
510  } // for each cluster
511 
512  sort(all_trackids.begin(), all_trackids.end());
513  all_trackids.erase(unique(all_trackids.begin(), all_trackids.end()), all_trackids.end());
514 
515  // now I have a vector(all_trackids) that only contains unique trackids
516  // go to it and search for each trackid in every cluster
517 
518  sort(ids.begin(), ids.end());
519  ids.erase(unique(ids.begin(), ids.end()), ids.end());
520  double no_of_clusters_per_track = noCluster / ids.size();
521 
522  // Filling Histograms:
523 
524  if (no_cl_for_muon != 0) { fCl_for_Muon->Fill(no_cl_for_muon); }
525 
526  fno_of_clusters_per_track->Fill(no_of_clusters_per_track);
527 
528  no_cl_for_muon = 0;
529  no_cl_for_electron = 0;
530  no_cl_for_positron = 0;
531  no_cl_for_pion_111 = 0;
532  no_cl_for_pion_211 = 0;
533  no_cl_for_pion_m211 = 0;
534  no_cl_for_proton = 0;
535  noCluster = 0;
536  ids.clear();
537 
538  } // for each plane
539  double result = no_of_particles_in_cluster / no_of_clusters;
540 
541  double no_noise_hits = hits.size() - total_no_hits_in_clusters;
542  double percent_noise = double(no_noise_hits / hits.size()) * 100;
543 
544  double no_trackid_per_cl_per_event = sum_vec_trackid / no_of_clusters;
545  fNoParticles_trackid_per_event->Fill(no_trackid_per_cl_per_event);
546  fNoParticles_pdg_per_event->Fill(result);
547  fNoClustersInEvent->Fill(clusters.size());
548 
549  fPercentNoise->Fill(percent_noise);
550 
551  //-----------------------------------------------------------------------
552  for (unsigned int i = 0; i < mclist.size(); ++i) {
553  art::Ptr<simb::MCTruth> mc(mclist[i]);
554 
555  for (int ii = 0; ii < mc->NParticles(); ++ii) {
557  std::cout << "FROM MC TRUTH,the particle's pdg code is: " << part.PdgCode() << std::endl;
558  std::cout << "with energy= " << part.E();
559  if (abs(part.PdgCode()) == 13) { std::cout << " I have a muon!!!" << std::endl; }
560  if (abs(part.PdgCode()) == 111) { std::cout << " I have a pi zero!!!" << std::endl; }
561  }
562  }
563  }
564 
565  // Now I can load just hits (not clusters) and see how many of what kind are
566  // lost due to dbscan marking them as noise:
567 
568  // Load hits and copy most of the code from above:
569 
570  double hit_13 = 0, hit_11 = 0, hit_m_11 = 0, hit_111 = 0, hit_211 = 0, hit_m211 = 0,
571  hit_2212 = 0, hit_2112 = 0;
572  double en_13 = 0, en_11 = 0, en_m11 = 0, en_111 = 0, en_211 = 0, en_m211 = 0, en_2212 = 0,
573  en_2112 = 0;
574 
575  std::vector<art::Ptr<recob::Hit>>::iterator itr = hits.begin();
576  while (itr != hits.end()) {
577 
578  std::vector<sim::TrackIDE> trackides = bt_serv->HitToTrackIDEs(clockData, *itr);
579  std::vector<sim::TrackIDE> eveides = bt_serv->HitToEveTrackIDEs(clockData, *itr);
580 
581  std::vector<sim::TrackIDE>::iterator idesitr = trackides.begin();
582 
583  hit_energy = hits[itr - hits.begin()]->Integral();
584 
585  while (idesitr != trackides.end()) {
586 
587  const simb::MCParticle* particle = _particleList.at((*idesitr).trackID);
588 
589  int pdg = particle->PdgCode();
590  diff_vec.clear();
591 
592  if (pdg == 13 || pdg == -13) {
593  hit_13++;
594  en_13 += hit_energy * ((*idesitr).energyFrac);
595  }
596  idesitr++;
597 
598  } // trackIDs
599 
600  itr++;
601  } // hits
602 
603  if (hit_13 != 0) { fPercent_lost_muon_hits->Fill(100 - ((_hit_13 / hit_13) * 100)); }
604  if (hit_11 != 0) { fPercent_lost_electron_hits->Fill(100 - ((_hit_11 / hit_11) * 100)); }
605  if (hit_m_11 != 0) { fPercent_lost_positron_hits->Fill(100 - ((_hit_m_11 / hit_m_11) * 100)); }
606  if (hit_111 != 0) { fPercent_lost_111_hits->Fill(100 - ((_hit_111 / hit_111) * 100)); }
607 
608  if (hit_211 != 0) { fPercent_lost_211_hits->Fill(100 - ((_hit_211 / hit_211) * 100)); }
609 
610  if (hit_m211 != 0) { fPercent_lost_m211_hits->Fill(100 - ((_hit_m211 / hit_m211) * 100)); }
611  if (hit_2212 != 0) { fPercent_lost_2212_hits->Fill(100 - ((_hit_2212 / hit_2212) * 100)); }
612  if (hit_2112 != 0) { fPercent_lost_2112_hits->Fill(100 - ((_hit_2112 / hit_2112) * 100)); }
613 
614  std::cout << "****** mu E from clusters = " << _en_13 << std::endl;
615  std::cout << "****** mu E from hits = " << en_13 << std::endl;
616 
617  if (en_13 != 0) { fPercent_lost_muon_energy->Fill(100 - ((_en_13 / en_13) * 100)); }
618  if (en_11 != 0) { fPercent_lost_electron_energy->Fill(100 - ((_en_11 / en_11) * 100)); }
619  if (en_m11 != 0) { fPercent_lost_positron_energy->Fill(100 - ((_en_m11 / en_m11) * 100)); }
620  if (en_111 != 0) { fPercent_lost_111_energy->Fill(100 - ((_en_111 / en_111) * 100)); }
621  if (en_211 != 0) { fPercent_lost_211_energy->Fill(100 - ((_en_211 / en_211) * 100)); }
622  if (en_m211 != 0) { fPercent_lost_m211_energy->Fill(100 - ((_en_m211 / en_m211) * 100)); }
623  if (en_2212 != 0) { fPercent_lost_2212_energy->Fill(100 - ((_en_2212 / en_2212) * 100)); }
624  if (en_2112 != 0) { fPercent_lost_2112_energy->Fill(100 - ((_en_2112 / en_2112) * 100)); }
625  }
626 
627 } // end namespace
628 
intermediate_table::iterator iterator
details::range_type< T > Iterate() const
Initializes the specified ID with the ID of the first cryostat.
Definition: GeometryCore.h:541
int PdgCode() const
Definition: MCParticle.h:213
DBclusterAna(fhicl::ParameterSet const &pset)
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Declaration of signal hit object.
void SetEveIdCalculator(sim::EveIdCalculator *ec)
mapped_type at(const key_type &key)
Definition: ParticleList.h:330
constexpr auto abs(T v)
Returns the absolute value of the argument.
STL namespace.
Definition of basic raw digits.
int NParticles() const
Definition: MCTruth.h:75
void analyze(const art::Event &evt)
read access to event
bool isRealData() const
Definition: Event.cc:53
Cluster finding and building.
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.cc:6
TString part[npart]
Definition: Style.C:32
void hits()
Definition: readHits.C:15
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:65
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:435
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:78
iterator begin()
Definition: ParticleList.h:305
The data type to uniquely identify a TPC.
Definition: geo_types.h:381
Declaration of cluster object.
size_type size() const
Definition: PtrVector.h:302
const sim::ParticleList & ParticleList() const
const simb::MCParticle & GetParticle(int i) const
Definition: MCTruth.h:76
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
Definition: StdUtils.h:120
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Encapsulate the construction of a single detector plane.
Example routine for calculating the "ultimate e-m mother" of a particle in a simulated event...
std::vector< sim::TrackIDE > HitToEveTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
EventNumber_t event() const
Definition: EventID.h:116
Declaration of basic channel signal object.
TCEvent evt
Definition: DataStructs.cxx:8
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:306
Particle list in DetSim contains Monte Carlo particle information.
RunNumber_t run() const
Definition: Event.cc:29
EventID id() const
Definition: Event.cc:23
std::string fClusterFinderModuleLabel
art framework interface to geometry description