Pandora
Pandora source code navigator
|
PFParticleValidation class. More...
Classes | |
class | MatchingDetails |
MatchingDetails class. More... | |
class | SimpleMatchedPfo |
SimpleMatchedPfo class. More... | |
class | SimpleMCPrimary |
SimpleMCPrimary class. More... | |
Public Member Functions | |
PFParticleValidation (fhicl::ParameterSet const &pset) | |
Constructor. | |
virtual | ~PFParticleValidation () |
Destructor. | |
void | beginJob () |
void | endJob () |
void | analyze (const art::Event &evt) |
void | reconfigure (fhicl::ParameterSet const &pset) |
Private Types | |
typedef std::vector< SimpleMCPrimary > | SimpleMCPrimaryList |
typedef std::vector< SimpleMatchedPfo > | SimpleMatchedPfoList |
typedef std::map< int, MatchingDetails > | MatchingDetailsMap |
typedef std::map< SimpleMCPrimary, SimpleMatchedPfoList > | MCPrimaryMatchingMap |
typedef std::map< art::Ptr< recob::PFParticle >, HitVector > | PFParticleToMatchedHits |
typedef std::map< art::Ptr< simb::MCParticle >, PFParticleToMatchedHits > | MCParticleMatchingMap |
typedef std::set< int > | IntSet |
Private Member Functions | |
void | GetMCParticleMatchingMap (const PFParticlesToHits &recoParticlesToHits, const MCParticlesToHits &trueParticlesToHits, const HitsToMCParticles &hitsToTrueParticles, MCParticleMatchingMap &mcParticleMatchingMap) const |
Performing matching between true and reconstructed particles. | |
void | GetSimpleMCPrimaryList (const art::Event &evt, const MCParticlesToHits &mcParticlesToHits, const HitsToMCParticles &hitsToMCParticles, const MCParticleMatchingMap &mcParticleMatchingMap, SimpleMCPrimaryList &simpleMCPrimaryList) const |
Extract details of each mc primary (ordered by number of true hits) | |
void | GetMCPrimaryMatchingMap (const SimpleMCPrimaryList &simpleMCPrimaryList, const MCParticleMatchingMap &mcParticleMatchingMap, const PFParticlesToHits &pfParticlesToHits, MCPrimaryMatchingMap &mcPrimaryMatchingMap) const |
Obtain a sorted list of matched pfos for each mc primary. | |
bool | IsNeutrinoInduced (const art::Ptr< simb::MCParticle > pMCParticle, const MCParticlesToMCTruth &artMCParticlesToMCTruth) const |
Whether a mc particle is neutrino induced. | |
void | GetMCTruth (const art::Event &evt, MCTruthVector &mcTruthVector) const |
Obtain a vector of mc truth. | |
void | GetRecoNeutrinos (const art::Event &evt, PFParticleVector &recoNeutrinoVector) const |
Obtain a vector of reco neutrinos. | |
void | PrintAllOutput (const MCTruthVector &mcTruthVector, const PFParticleVector &recoNeutrinoVector, const MCPrimaryMatchingMap &mcPrimaryMatchingMap) const |
Print all the raw matching output to screen. | |
void | PerformMatching (const MCPrimaryMatchingMap &mcPrimaryMatchingMap, MatchingDetailsMap &matchingDetailsMap) const |
Apply a well-defined matching procedure to the comprehensive matches in the provided mc primary matching map. | |
bool | GetStrongestPfoMatch (const MCPrimaryMatchingMap &mcPrimaryMatchingMap, IntSet &usedMCIds, IntSet &usedPfoIds, MatchingDetailsMap &matchingDetailsMap) const |
Get the strongest pfo match (most matched hits) between an available mc primary and an available pfo. | |
void | GetRemainingPfoMatches (const MCPrimaryMatchingMap &mcPrimaryMatchingMap, const IntSet &usedPfoIds, MatchingDetailsMap &matchingDetailsMap) const |
Get the best matches for any pfos left-over after the strong matching procedure. | |
void | PrintMatchingOutput (const MCPrimaryMatchingMap &mcPrimaryMatchingMap, const MatchingDetailsMap &matchingDetailsMap) const |
Print the results of the matching procedure. | |
bool | IsGoodMCPrimary (const SimpleMCPrimary &simpleMCPrimary) const |
Whether a provided mc primary passes selection, based on number of "good" hits. | |
bool | HasMatch (const SimpleMCPrimary &simpleMCPrimary, const SimpleMatchedPfoList &simpleMatchedPfoList, const MatchingDetailsMap &matchingDetailsMap) const |
Whether a provided mc primary has a match, of any quality (use simple matched pfo list and information in matching details map) | |
bool | IsGoodMatch (const SimpleMCPrimary &simpleMCPrimary, const SimpleMatchedPfo &simpleMatchedPfo) const |
Whether a provided mc primary and pfo are deemed to be a good match. | |
unsigned int | CountHitsByType (const geo::View_t view, const HitVector &hitVector) const |
Count the number of hits, in a provided vector, of a specified view. | |
Static Private Member Functions | |
static bool | SortSimpleMCPrimaries (const SimpleMCPrimary &lhs, const SimpleMCPrimary &rhs) |
Sort simple mc primaries by number of mc hits. | |
static bool | SortSimpleMatchedPfos (const SimpleMatchedPfo &lhs, const SimpleMatchedPfo &rhs) |
Sort simple matched pfos by number of matched hits. | |
Private Attributes | |
std::string | m_hitfinderLabel |
The name/label of the hit producer module. | |
std::string | m_particleLabel |
The name/label of the particle producer module. | |
std::string | m_geantModuleLabel |
The name/label of the geant module. | |
std::string | m_backtrackerLabel |
The name/label of the back-tracker module. | |
bool | m_printAllToScreen |
Whether to print all/raw matching details to screen. | |
bool | m_printMatchingToScreen |
Whether to print matching output to screen. | |
bool | m_neutrinoInducedOnly |
Whether to consider only mc particles that were neutrino induced. | |
int | m_matchingMinPrimaryHits |
The minimum number of good mc primary hits used in matching scheme. | |
int | m_matchingMinHitsForGoodView |
The minimum number of good mc primary hits in given view to declare view to be good. | |
int | m_matchingMinPrimaryGoodViews |
The minimum number of good views for a mc primary. | |
bool | m_useSmallPrimaries |
Whether to consider matches to mc primaries with fewer than m_matchingMinPrimaryHits. | |
int | m_matchingMinSharedHits |
The minimum number of shared hits used in matching scheme. | |
float | m_matchingMinCompleteness |
The minimum particle completeness to declare a match. | |
float | m_matchingMinPurity |
The minimum particle purity to declare a match. | |
PFParticleValidation class.
Definition at line 23 of file PFParticleValidation_module.cc.
|
private |
Definition at line 211 of file PFParticleValidation_module.cc.
|
private |
Definition at line 116 of file PFParticleValidation_module.cc.
|
private |
Definition at line 121 of file PFParticleValidation_module.cc.
|
private |
Definition at line 118 of file PFParticleValidation_module.cc.
|
private |
Definition at line 120 of file PFParticleValidation_module.cc.
|
private |
Definition at line 99 of file PFParticleValidation_module.cc.
|
private |
Definition at line 73 of file PFParticleValidation_module.cc.
lar_pandora::PFParticleValidation::PFParticleValidation | ( | fhicl::ParameterSet const & | pset | ) |
Constructor.
pset |
Definition at line 354 of file PFParticleValidation_module.cc.
|
virtual |
Destructor.
Definition at line 362 of file PFParticleValidation_module.cc.
void lar_pandora::PFParticleValidation::analyze | ( | const art::Event & | evt | ) |
Definition at line 394 of file PFParticleValidation_module.cc.
void lar_pandora::PFParticleValidation::beginJob | ( | ) |
Definition at line 386 of file PFParticleValidation_module.cc.
|
private |
Count the number of hits, in a provided vector, of a specified view.
view | the view |
hitVector | the hit vector |
Definition at line 923 of file PFParticleValidation_module.cc.
void lar_pandora::PFParticleValidation::endJob | ( | ) |
Definition at line 390 of file PFParticleValidation_module.cc.
|
private |
Performing matching between true and reconstructed particles.
recoParticlesToHits | the mapping from reconstructed particles to hits |
trueParticlesToHits | the mapping from true particles to hits |
hitsToTrueParticles | the mapping from hits to true particles |
mcParticleMatchingMap | the output matches between all reconstructed and true particles |
Definition at line 459 of file PFParticleValidation_module.cc.
|
private |
Obtain a sorted list of matched pfos for each mc primary.
simpleMCPrimaryList | the simple mc primary list |
mcToFullPfoMatchingMap | the mc to full pfo matching map |
pfoToHitListMap | the pfo to hit list map |
mcPrimaryMatchingMap | to receive the populated mc primary matching map |
Definition at line 557 of file PFParticleValidation_module.cc.
|
private |
Obtain a vector of mc truth.
evt | the event |
mcNeutrinoVector | to receive the populated vector of mc truth |
Definition at line 643 of file PFParticleValidation_module.cc.
|
private |
Obtain a vector of reco neutrinos.
evt | the event |
recoNeutrinoVector | to receive the populated vector of reco neutrinos |
Definition at line 662 of file PFParticleValidation_module.cc.
|
private |
Get the best matches for any pfos left-over after the strong matching procedure.
mcPrimaryMatchingMap | the input/raw mc primary matching map |
usedPfoIds | the list of pfo ids with an existing match |
matchingDetailsMap | the matching details map, to be populated |
Definition at line 778 of file PFParticleValidation_module.cc.
|
private |
Extract details of each mc primary (ordered by number of true hits)
evt | the event |
mcParticlesToHits | the mc primary to hits map |
hitsToMCParticles | the hits to mc particles map |
mcParticleMatchingMap | the mc to particle to pf particle matching map (to record number of matched pf particles) |
simpleMCPrimaryList | to receive the populated simple mc primary list |
Definition at line 490 of file PFParticleValidation_module.cc.
|
private |
Get the strongest pfo match (most matched hits) between an available mc primary and an available pfo.
mcPrimaryMatchingMap | the input/raw mc primary matching map |
usedMCIds | the list of mc primary ids with an existing match |
usedPfoIds | the list of pfo ids with an existing match |
matchingDetailsMap | the matching details map, to be populated |
Definition at line 735 of file PFParticleValidation_module.cc.
|
private |
Whether a provided mc primary has a match, of any quality (use simple matched pfo list and information in matching details map)
simpleMCPrimary | the simple mc primary |
simpleMatchedPfoList | the list of simple matched pfos |
matchingDetailsMap | the matching details map |
Definition at line 890 of file PFParticleValidation_module.cc.
|
private |
Whether a provided mc primary and pfo are deemed to be a good match.
simpleMCPrimary | the simple mc primary |
simpleMatchedPfo | the simple matched pfo |
Definition at line 905 of file PFParticleValidation_module.cc.
|
private |
Whether a provided mc primary passes selection, based on number of "good" hits.
simpleMCPrimary | the simple mc primary |
Definition at line 874 of file PFParticleValidation_module.cc.
|
private |
Whether a mc particle is neutrino induced.
pMCParticle | address of the mc particle |
artMCParticlesToMCTruth | the mapping from mc particles to mc truth |
Definition at line 543 of file PFParticleValidation_module.cc.
|
private |
Apply a well-defined matching procedure to the comprehensive matches in the provided mc primary matching map.
mcPrimaryMatchingMap | the input/raw mc primary matching map |
matchingDetailsMap | the matching details map, to be populated |
Definition at line 722 of file PFParticleValidation_module.cc.
|
private |
Print all the raw matching output to screen.
mcTruthVector | the mc truth vector |
recoNeutrinoVector | the reco neutrino vector |
mcPrimaryMatchingMap | the input/raw mc primary matching map |
Definition at line 672 of file PFParticleValidation_module.cc.
|
private |
Print the results of the matching procedure.
mcPrimaryMatchingMap | the input/raw mc primary matching map |
matchingDetailsMap | the matching details map |
Definition at line 806 of file PFParticleValidation_module.cc.
void lar_pandora::PFParticleValidation::reconfigure | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 366 of file PFParticleValidation_module.cc.
|
staticprivate |
Sort simple matched pfos by number of matched hits.
lhs | the left-hand side |
rhs | the right-hand side |
Definition at line 947 of file PFParticleValidation_module.cc.
|
staticprivate |
Sort simple mc primaries by number of mc hits.
lhs | the left-hand side |
rhs | the right-hand side |
Definition at line 937 of file PFParticleValidation_module.cc.
|
private |
The name/label of the back-tracker module.
Definition at line 312 of file PFParticleValidation_module.cc.
|
private |
The name/label of the geant module.
Definition at line 311 of file PFParticleValidation_module.cc.
|
private |
The name/label of the hit producer module.
Definition at line 309 of file PFParticleValidation_module.cc.
|
private |
The minimum particle completeness to declare a match.
Definition at line 329 of file PFParticleValidation_module.cc.
|
private |
The minimum number of good mc primary hits in given view to declare view to be good.
Definition at line 323 of file PFParticleValidation_module.cc.
|
private |
The minimum number of good views for a mc primary.
Definition at line 324 of file PFParticleValidation_module.cc.
|
private |
The minimum number of good mc primary hits used in matching scheme.
Definition at line 321 of file PFParticleValidation_module.cc.
|
private |
The minimum particle purity to declare a match.
Definition at line 330 of file PFParticleValidation_module.cc.
|
private |
The minimum number of shared hits used in matching scheme.
Definition at line 328 of file PFParticleValidation_module.cc.
|
private |
Whether to consider only mc particles that were neutrino induced.
Definition at line 318 of file PFParticleValidation_module.cc.
|
private |
The name/label of the particle producer module.
Definition at line 310 of file PFParticleValidation_module.cc.
|
private |
Whether to print all/raw matching details to screen.
Definition at line 314 of file PFParticleValidation_module.cc.
|
private |
Whether to print matching output to screen.
Definition at line 315 of file PFParticleValidation_module.cc.
|
private |
Whether to consider matches to mc primaries with fewer than m_matchingMinPrimaryHits.
Definition at line 327 of file PFParticleValidation_module.cc.