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 "fhiclcpp/ParameterSet.h"
16 #include "art_root_io/TFileService.h"
24 class TrackContainmentAnalyzer;
40 void analyze(art::Event
const &
e)
override;
57 fAlg.
Configure(p.get<fhicl::ParameterSet>(
"TrackContainmentAlg"));
60 art::ServiceHandle<art::TFileService const>
tfs;
67 fAlg.SetRunEvent(e.run(),e.event());
69 std::vector< std::vector<recob::Track> > trackVectors;
70 for(
size_t i_l=0; i_l<fTrackModuleLabels.size(); ++i_l){
71 art::Handle< std::vector<recob::Track> > trackHandle;
72 e.getByLabel(fTrackModuleLabels[i_l],trackHandle);
73 trackVectors.push_back(*trackHandle);
76 art::ServiceHandle<geo::Geometry const> geoHandle;
78 fAlg.ProcessTracks(trackVectors,*geoHandle);
std::vector< std::string > fTrackModuleLabels
void setFillOutputTree(bool flag=true)
void SetupOutputTree(TTree *)
TrackContainmentAnalyzer & operator=(TrackContainmentAnalyzer const &)=delete
void Configure(fhicl::ParameterSet const &)
trk::TrackContainmentAlg fAlg
void analyze(art::Event const &e) override
TrackContainmentAnalyzer(fhicl::ParameterSet const &p)
art::ServiceHandle< art::TFileService > tfs
art framework interface to geometry description