36 art::Handle< std::vector<recob::PFParticle> > pfParticleHandle;
39 art::FindManyP<anab::T0> findManyT0(pfParticleHandle, event,
fPandoraLabel);
42 for(
auto const pfp : (*pfParticleHandle)){
44 const std::vector< art::Ptr<recob::Track> > associatedTracks(pfPartToTrackAssoc.at(pfp.Self()));
45 if(associatedTracks.size() != 1)
continue;
47 if(trk.
ID() != track.
ID())
continue;
49 const std::vector< art::Ptr<anab::T0> > associatedT0s(findManyT0.at(pfp.Self()));
52 for(
size_t i = 0; i < associatedT0s.size(); i++){
53 double pandoraTime = associatedT0s[i]->Time()*1
e-3;
54 if(pandoraTime < fBeamTimeMin || pandoraTime >
fBeamTimeMax)
return true;
66 art::Handle< std::vector<recob::PFParticle> > pfParticleHandle;
68 art::FindManyP<anab::T0> findManyT0(pfParticleHandle, event,
fPandoraLabel);
71 for (
const size_t daughterId : pfparticle.
Daughters()){
73 art::Ptr<recob::PFParticle> pParticle = pfParticleMap.at(daughterId);
74 const std::vector< art::Ptr<anab::T0> > associatedT0s(findManyT0.at(pParticle.key()));
77 for(
size_t i = 0; i < associatedT0s.size(); i++){
78 double pandoraTime = associatedT0s[i]->Time()*1
e-3;
79 if(pandoraTime < fBeamTimeMin || pandoraTime >
fBeamTimeMax)
return true;
void reconfigure(const Config &config)
const std::vector< size_t > & Daughters() const
Returns the collection of daughter particles.
bool PandoraT0CosmicId(recob::Track track, const art::Event &event)
process_name use argoneut_mc_hitfinder track
fhicl::Table< BeamTime > BeamTimeLimits
art::InputTag fPandoraLabel
art::InputTag fTpcTrackModuleLabel
fhicl::Atom< art::InputTag > PandoraLabel
Hierarchical representation of particle flow.
PandoraT0CosmicIdAlg(const Config &config)
stream1 can override from command line with o or output services user sbnd
fhicl::Atom< art::InputTag > TpcTrackModuleLabel
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track: