11 #include "canvas/Utilities/InputTag.h"
22 #include "canvas/Persistency/Common/FindManyP.h"
23 #include "fhiclcpp/ParameterSet.h"
46 fPandoraTags = config ? config->get<std::vector<std::string>>(
"PandoraTags", {
"pandora"}) : std::vector<std::string>(1,
"pandora");
47 fPandoraTrackTags = config ? config->get<std::vector<std::string>>(
"PandoraTags", {
"pandoraTrack"}) : std::vector<std::string>(1,
"pandoraTrack");
62 bool ProcessEvent(
const gallery::Event& ev,
const std::vector<event::Interaction> &truth, std::vector<event::RecoInteraction>&
reco) {
64 auto const &tracks_handle = ev.getValidHandle<std::vector<recob::Track>>(
fPandoraTrackTags[j]);;
65 art::FindManyP<recob::PFParticle, void> tracks_to_particles(tracks_handle, ev,
fPandoraTrackTags[j]);
66 const std::vector<recob::Track> &
tracks = *tracks_handle;
68 for (
unsigned i = 0; i < tracks.size(); i++) {
69 unsigned pfp_id = tracks_to_particles.at(i).at(0)->Self();
70 std::cout <<
"Index: " << i <<
" track ID: " << tracks[i].ID() <<
" pfp id: " << pfp_id <<std::endl;
bool ProcessEvent(const gallery::Event &ev, const std::vector< event::Interaction > &truth, std::vector< event::RecoInteraction > &reco)
std::vector< std::string > fPandoraTags
ClusterModuleLabel join with tracks
Electron neutrino event selection.
process_name opflashCryoW ana
void Initialize(fhicl::ParameterSet *config=NULL)
process_name standard_reco_uboone reco
#define DECLARE_SBN_PROCESSOR(classname)
Base class for event selections.
Provides recob::Track data product.
std::vector< std::string > fPandoraTrackTags
BEGIN_PROLOG could also be cout