17 #ifndef TrackHitAna_module
18 #define TrackHitAna_module
36 #include "cetlib/cpu_timer.h"
42 #include "art/Framework/Core/EDAnalyzer.h"
43 #include "art/Framework/Principal/Event.h"
44 #include "art/Framework/Principal/Handle.h"
45 #include "art/Framework/Principal/View.h"
46 #include "art/Framework/Services/Registry/ServiceHandle.h"
47 #include "art_root_io/TFileService.h"
48 #include "art/Framework/Core/ModuleMacros.h"
49 #include "art/Utilities/make_tool.h"
50 #include "canvas/Utilities/InputTag.h"
51 #include "canvas/Persistency/Common/FindManyP.h"
52 #include "messagefacility/MessageLogger/MessageLogger.h"
53 #include "fhiclcpp/ParameterSet.h"
54 #include "cetlib_except/exception.h"
81 explicit TrackHitAna(fhicl::ParameterSet
const& pset);
108 const art::FindManyP<recob::Track>&,
109 const art::FindManyP<recob::Vertex>&,
148 : EDAnalyzer(parameterSet),
149 fPedestalRetrievalAlg(*lar::
providerFrom<lariov::DetPedestalService>())
152 fGeometry = lar::providerFrom<geo::Geometry>();
160 TrackHitAna::~TrackHitAna()
164 void TrackHitAna::beginJob()
172 art::ServiceHandle<art::TFileService>
tfs;
184 void TrackHitAna::beginRun(
const art::Run& )
198 fHitProducerLabelVec = p.get< std::vector<art::InputTag> >(
"HitModuleLabel", std::vector<art::InputTag>() = {
"gauss"});
199 fPFParticleProducerLabelVec = p.get< std::vector<art::InputTag> >(
"PFParticleProducerLabel", std::vector<art::InputTag>() = {
"cluster3d"});
200 fTrackProducerLabelVec = p.get< std::vector<art::InputTag> >(
"TrackProducerLabel", std::vector<art::InputTag>() = {
"trackkalmanhit"});
201 fWireProducerLabelVec = p.get< std::vector<art::InputTag> >(
"WireProducerLabel", std::vector<art::InputTag>() = {
"caldata"});
204 const std::vector<fhicl::ParameterSet>& hitHistogramToolVec = p.get<std::vector<fhicl::ParameterSet>>(
"HitHistogramToolList");
206 for(
auto& hitHistogramTool : hitHistogramToolVec)
216 fEvent =
event.id().event();
225 art::Handle< std::vector<recob::Hit> > hitHandle;
226 event.getByLabel(hitLabel, hitHandle);
228 if (hitHandle.isValid())
231 art::fill_ptr_vector(allHitVec, hitHandle);
240 void TrackHitAna::endJob()
306 int TrackHitAna::traversePFParticleHierarchy(art::Handle<std::vector<recob::PFParticle>>& pfParticleHandle,
307 size_t pfParticleIdx,
308 const art::FindManyP<recob::Track>& trackAssns,
309 const art::FindManyP<recob::Vertex>& vertexAssns,
311 int& nVertices)
const
341 #endif // TrackHitAna_module
process_name opflashCryo1 flashfilter analyze
Utilities related to art service access.
std::vector< std::unique_ptr< IHitHistogramTool > > fHitHistogramToolVec
std::vector< art::InputTag > fPFParticleProducerLabelVec
T::provider_type const * providerFrom()
Returns a constant pointer to the provider of specified service.
std::vector< art::InputTag > fHitProducerLabelVec
Declaration of signal hit object.
Definition of basic raw digits.
process_name use argoneut_mc_hitfinder track
std::vector< std::vector< double > > fChannelPedVec
void beginRun(const art::Run &run)
Collect all the RawData header files together.
std::vector< art::InputTag > fTrackProducerLabelVec
Description of geometry of one entire detector.
Declaration of cluster object.
Definition of data types for geometry description.
Provides recob::Track data product.
int traversePFParticleHierarchy(art::Handle< std::vector< recob::PFParticle >> &, size_t, const art::FindManyP< recob::Track > &, const art::FindManyP< recob::Vertex > &, int &, int &) const
void reconfigure(fhicl::ParameterSet const &pset)
double length(const recob::Track *track)
std::vector< art::InputTag > fWireProducerLabelVec
TrackHitAna(fhicl::ParameterSet const &pset)
art::ServiceHandle< art::TFileService > tfs
double projectedLength(const recob::Track *track)
const geo::GeometryCore * fGeometry
void analyze(const art::Event &evt)
const lariov::DetPedestalProvider & fPedestalRetrievalAlg
Keep track of an instance to the pedestal retrieval alg.
art framework interface to geometry description
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track: