10 #include "art/Framework/Core/EDAnalyzer.h"
11 #include "art/Framework/Core/ModuleMacros.h"
12 #include "art/Framework/Principal/Event.h"
13 #include "art/Framework/Principal/Handle.h"
14 #include "art/Framework/Principal/Run.h"
15 #include "art/Framework/Principal/SubRun.h"
16 #include "canvas/Utilities/InputTag.h"
17 #include "fhiclcpp/ParameterSet.h"
18 #include "messagefacility/MessageLogger/MessageLogger.h"
51 void analyze(art::Event
const&
e)
override;
62 fHitLabels =
p.get<std::vector<std::string>>(
"HitLabels");
64 for (
const std::string &label: fHitLabels) {
65 std::cout <<
"Processing hits with label: " << label << std::endl;
73 std::cout <<
"New Event!\n";
76 for (
const std::string &label: fHitLabels) {
77 std::cout <<
"Processing hits with label: " << label << std::endl;
79 art::Handle<std::vector<recob::Hit>> hit_handle;
80 e.getByLabel(label, hit_handle);
82 std::vector<art::Ptr<recob::Hit>> hits;
83 art::fill_ptr_vector(hits, hit_handle);
85 for (art::Ptr<recob::Hit>
hit: hits) {
86 std::cout <<
"Hit on wire: " <<
hit->WireID() <<
" channel: " <<
hit->Channel() <<
" view: " <<
hit->View() << std::endl;
87 std::cout <<
"Hit amp: " <<
hit->PeakAmplitude() <<
" RMS: " <<
hit->RMS() <<
" width: " <<
hit->SigmaPeakAmplitude();
88 std::cout <<
" from: " <<
hit->StartTick() <<
" to: " <<
hit->EndTick() <<
" center: " <<
hit->PeakTime() << std::endl;
89 std::cout <<
"area: " <<
hit->Integral() <<
" sim ADC: " <<
hit->SummedADC() << std::endl;
Data product for reconstructed trajectory in space.
Declaration of signal hit object.
std::vector< std::string > fHitLabels
Access the description of detector geometry.
TrackHitDumper & operator=(TrackHitDumper const &)=delete
Data product for reconstructed trajectory in space.
Provides recob::Track data product.
TrackHitDumper(fhicl::ParameterSet const &p)
Declaration of basic channel signal object.
void analyze(art::Event const &e) override
art framework interface to geometry description
BEGIN_PROLOG could also be cout