#include <PandoraNuScoreCosmicIdAlg.h>
Definition at line 34 of file PandoraNuScoreCosmicIdAlg.h.
sbnd::PandoraNuScoreCosmicIdAlg::PandoraNuScoreCosmicIdAlg |
( |
const Config & |
config | ) |
|
sbnd::PandoraNuScoreCosmicIdAlg::PandoraNuScoreCosmicIdAlg |
( |
const fhicl::ParameterSet & |
pset | ) |
|
|
inline |
sbnd::PandoraNuScoreCosmicIdAlg::~PandoraNuScoreCosmicIdAlg |
( |
| ) |
|
Definition at line 110 of file PandoraNuScoreCosmicIdAlg.cc.
113 const std::vector<art::Ptr<larpandoraobj::PFParticleMetadata> > pfpMetaVec =
114 PFPMetaDataAssoc.at(pfparticle.
Self());
116 if (pfpMetaVec.size() !=1){
117 std::cout<<
"Cannot get PFPMetadata"<<std::endl;
121 art::Ptr<larpandoraobj::PFParticleMetadata> pfpMeta = pfpMetaVec.front();
124 auto propertiesMapIter = propertiesMap.find(
"NuScore");
125 if (propertiesMapIter == propertiesMap.end()){
126 std::cout<<
"Cannot get PFP Nu Score in Metadata"<<std::endl;
131 return propertiesMapIter->second;
size_t Self() const
Returns the index of this particle.
int PdgCode() const
Return the type of particle as a PDG ID.
std::map< std::string, float > PropertiesMap
BEGIN_PROLOG could also be cout
Definition at line 82 of file PandoraNuScoreCosmicIdAlg.cc.
87 art::Ptr<recob::PFParticle> parentPFP= pfParticleMap.at(pfparticle.
Parent());
int PdgCode() const
Return the type of particle as a PDG ID.
recob::PFParticle GetPFPNeutrino(recob::PFParticle pfparticle, std::map< size_t, art::Ptr< recob::PFParticle > > &pfParticleMap)
Definition at line 92 of file PandoraNuScoreCosmicIdAlg.cc.
95 if ((pfparticle.PdgCode()==12) ||(pfparticle.PdgCode()==14)){
98 size_t parentID = pfparticle.Parent();
99 auto parentPFPIter = std::find_if(pfpVec.begin(), pfpVec.end(),
100 [&](
const auto& pfp){
return pfp.
Self()==parentID;});
102 if (parentPFPIter==pfpVec.end()){
size_t Self() const
Returns the index of this particle.
recob::PFParticle GetPFPNeutrino(recob::PFParticle pfparticle, std::map< size_t, art::Ptr< recob::PFParticle > > &pfParticleMap)
bool sbnd::PandoraNuScoreCosmicIdAlg::PandoraNuScoreCosmicId |
( |
recob::Track |
track, |
|
|
const art::Event & |
event |
|
) |
| |
Definition at line 32 of file PandoraNuScoreCosmicIdAlg.cc.
35 art::Handle< std::vector<recob::PFParticle> > pfParticleHandle;
38 art::FindManyP<larpandoraobj::PFParticleMetadata> PFPMetaDataAssoc(pfParticleHandle, event,
fPandoraLabel);
41 for(
auto const pfp : (*pfParticleHandle)){
43 const std::vector< art::Ptr<recob::Track> > associatedTracks(pfPartToTrackAssoc.at(pfp.Self()));
44 if(associatedTracks.size() != 1)
continue;
46 if(trk.
ID() != track.
ID())
continue;
art::InputTag fPandoraLabel
recob::PFParticle GetPFPNeutrino(recob::PFParticle pfparticle, std::map< size_t, art::Ptr< recob::PFParticle > > &pfParticleMap)
float GetPandoraNuScore(recob::PFParticle pfparticle, art::FindManyP< larpandoraobj::PFParticleMetadata > PFPMetaDataAssoc)
Hierarchical representation of particle flow.
art::InputTag fTpcTrackModuleLabel
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
bool sbnd::PandoraNuScoreCosmicIdAlg::PandoraNuScoreCosmicId |
( |
recob::PFParticle |
pfparticle, |
|
|
std::map< size_t, art::Ptr< recob::PFParticle > > |
pfParticleMap, |
|
|
const art::Event & |
event |
|
) |
| |
Definition at line 62 of file PandoraNuScoreCosmicIdAlg.cc.
66 art::Handle< std::vector<recob::PFParticle> > pfParticleHandle;
69 art::FindManyP<larpandoraobj::PFParticleMetadata> PFPMetaDataAssoc(pfParticleHandle, event,
fPandoraLabel);
art::InputTag fPandoraLabel
recob::PFParticle GetPFPNeutrino(recob::PFParticle pfparticle, std::map< size_t, art::Ptr< recob::PFParticle > > &pfParticleMap)
float GetPandoraNuScore(recob::PFParticle pfparticle, art::FindManyP< larpandoraobj::PFParticleMetadata > PFPMetaDataAssoc)
Hierarchical representation of particle flow.
void sbnd::PandoraNuScoreCosmicIdAlg::reconfigure |
( |
const Config & |
config | ) |
|
float sbnd::PandoraNuScoreCosmicIdAlg::fNuScoreCut |
|
private |
art::InputTag sbnd::PandoraNuScoreCosmicIdAlg::fPandoraLabel |
|
private |
art::InputTag sbnd::PandoraNuScoreCosmicIdAlg::fTpcTrackModuleLabel |
|
private |
The documentation for this class was generated from the following files: