![]() |
LArSoft
v10_06_00
Liquid Argon Software toolkit - https://larsoft.org/
|
LArMonitoringHelper class. More...
#include "LArMonitoringHelper.h"
Static Public Member Functions | |
static unsigned int | CountHitsByType (const pandora::HitType hitType, const pandora::CaloHitList &caloHitList) |
Count the number of calo hits, in a provided list, of a specified type. More... | |
static void | GetOrderedMCParticleVector (const LArMCParticleHelper::MCContributionMapVector &selectedMCParticleToGoodHitsMaps, pandora::MCParticleVector &orderedMCParticleVector) |
Order input MCParticles by their number of hits. More... | |
static void | GetOrderedPfoVector (const LArMCParticleHelper::PfoContributionMap &pfoToReconstructable2DHitsMap, pandora::PfoVector &orderedPfoVector) |
Order input Pfos by their number of hits. More... | |
static void | PrintMCParticleTable (const LArMCParticleHelper::MCContributionMap &selectedMCParticleToGoodHitsMaps, const pandora::MCParticleVector &orderedMCParticleVector) |
Print details of selected MCParticles to the terminal in a table. More... | |
static void | PrintPfoTable (const LArMCParticleHelper::PfoContributionMap &pfoToReconstructable2DHitsMap, const pandora::PfoVector &orderedPfoVector) |
Print details of input Pfos to the terminal in a table. More... | |
static void | PrintMatchingTable (const pandora::PfoVector &orderedPfoVector, const pandora::MCParticleVector &orderedMCParticleVector, const LArMCParticleHelper::MCParticleToPfoHitSharingMap &mcParticleToPfoHitSharingMap, const unsigned int nMatches) |
Print the shared good hits between all Pfos and MCParticles. More... | |
template<typename Ti , typename Tj > | |
static float | CalcRandIndex (const std::map< const Ti, std::map< const Tj, int >> &cTable) |
Calculate the adjusted Rand Index for a given contingency table that summarises two clusterings A and B. Adjusted Rand Index is a measure of the similarity of two clusterings that is bounded above by 1 (identical), is 0 when the two clusterings are as similar as two random clusterings with the same number of clusters, and has no lower bound. An index < 0 means very discordant clusterings and is rare in most cases. Reference - https://link.springer.com/article/10.1007/BF01908075. More... | |
static float | CalcRandIndex (const pandora::CaloHitList &caloHits, const pandora::ClusterList &clusters) |
Calculate the adjusted Rand Index for the clustering defined by MCPartices and by CaloHits. Adjusted Rand Index is a measure of the similarity of two clusterings that is bounded above by 1 (identical), is 0 when the two clusterings are as similar as two random clusterings with the same number of clusters, and has no lower bound. An index < 0 means very discordant clusterings and is rare in most cases. Reference - https://link.springer.com/article/10.1007/BF01908075. More... | |
static void | FillContingencyTable (const pandora::CaloHitList &caloHits, const pandora::ClusterList &clusters, std::map< const pandora::Cluster *const, std::map< const pandora::MCParticle *const, int >> &cTable) |
Fill the contingency table for a set of CaloHits partitioned by Cluster and parent MCParticle. More... | |
LArMonitoringHelper class.
Definition at line 21 of file LArMonitoringHelper.h.
|
static |
Calculate the adjusted Rand Index for a given contingency table that summarises two clusterings A and B. Adjusted Rand Index is a measure of the similarity of two clusterings that is bounded above by 1 (identical), is 0 when the two clusterings are as similar as two random clusterings with the same number of clusters, and has no lower bound. An index < 0 means very discordant clusterings and is rare in most cases. Reference - https://link.springer.com/article/10.1007/BF01908075.
[in] | cTable | Contingency table as a map of the object that defines the clustering A (e.g. pandora::Cluster) to a map of the object that defines the clustering B (e.g. pandora::MCParticle) to the value of the table at this entry (which is the intersection of the two clusters) |
Definition at line 319 of file LArMonitoringHelper.cc.
References util::abs(), f, and n.
Referenced by lar_content::EventClusterValidationAlgorithm::CalcRandIndex().
|
static |
Calculate the adjusted Rand Index for the clustering defined by MCPartices and by CaloHits. Adjusted Rand Index is a measure of the similarity of two clusterings that is bounded above by 1 (identical), is 0 when the two clusterings are as similar as two random clusterings with the same number of clusters, and has no lower bound. An index < 0 means very discordant clusterings and is rare in most cases. Reference - https://link.springer.com/article/10.1007/BF01908075.
[in] | caloHits | List of hits |
[in] | clusters | List of clusters |
|
static |
Count the number of calo hits, in a provided list, of a specified type.
hitType | the hit type |
caloHitList | the calo hit list |
Definition at line 28 of file LArMonitoringHelper.cc.
Referenced by lar_content::MCParticleMonitoringAlgorithm::PrintMCParticle(), lar_content::CosmicRayTaggingMonitoringTool::PrintPfoTable(), lar_content::MCParticleMonitoringAlgorithm::PrintPrimaryMCParticles(), lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput(), lar_content::MuonLeadingEventValidationAlgorithm::ProcessOutput(), and lar_content::LArMCParticleHelper::SelectParticlesByHitCount().
|
static |
Fill the contingency table for a set of CaloHits partitioned by Cluster and parent MCParticle.
[in] | caloHits | List of hits to be considered |
[in] | clusters | List of clusters that contain the hits |
[out] | cTable | Contingency table as a map of Cluster to a map of MCParticle to the value of the table at this entry which is the intersection of clusterings defined by each object |
Definition at line 385 of file LArMonitoringHelper.cc.
References weight.
|
static |
Order input MCParticles by their number of hits.
selectedMCParticleToGoodHitsMaps | the input vector of mappings from selected reconstructable MCParticles to their good hits |
orderedMCParticleVector | the output vector of ordered MCParticles |
Definition at line 43 of file LArMonitoringHelper.cc.
Referenced by lar_content::MuonLeadingEventValidationAlgorithm::DetermineIncorrectlyReconstructedCosmicRays(), lar_content::NeutrinoEventValidationAlgorithm::FillValidationInfo(), lar_content::CosmicRayTaggingMonitoringTool::FindAmbiguousPfos(), lar_content::EventValidationBaseAlgorithm::InterpretMatching(), lar_content::MCParticleMonitoringAlgorithm::PrintPrimaryMCParticles(), lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput(), and lar_content::PfoValidationAlgorithm::Run().
|
static |
Order input Pfos by their number of hits.
pfoToReconstructable2DHitsMap | the input vector of mappings from Pfos to their reconstructable hits |
orderedPfoVector | the output vector of ordered Pfos |
Definition at line 92 of file LArMonitoringHelper.cc.
Referenced by lar_content::CosmicRayTaggingMonitoringTool::FindAmbiguousPfos(), lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput(), and lar_content::PfoValidationAlgorithm::Run().
|
static |
Print the shared good hits between all Pfos and MCParticles.
orderedPfoVector | the input vector of ordered Pfos |
orderedMCParticleVector | the input vector of ordered MCParticles |
mcParticleToPfoHitSharingMap | the output mapping from selected reconstructable MCParticles to Pfos and the number hits shared |
nMatches | the maximum number of Pfo matches to show |
Definition at line 205 of file LArMonitoringHelper.cc.
References lar_content::LArFormattingHelper::Table::AddElement(), and lar_content::LArFormattingHelper::Table::Print().
Referenced by lar_content::PfoValidationAlgorithm::Run().
|
static |
Print details of selected MCParticles to the terminal in a table.
selectedMCParticleToGoodHitsMap | the input mapping from selected reconstructable MCParticles to their good hits |
orderedMCParticleVector | the input vector of ordered MCParticles |
Definition at line 126 of file LArMonitoringHelper.cc.
Referenced by lar_content::CosmicRayTaggingMonitoringTool::FindAmbiguousPfos(), and lar_content::PfoValidationAlgorithm::Run().
|
static |
Print details of input Pfos to the terminal in a table.
pfoToReconstructable2DHitsMap | the input vector of mappings from Pfos to their reconstructable hits |
orderedPfoVector | the input vector of ordered Pfos |
Definition at line 171 of file LArMonitoringHelper.cc.
Referenced by lar_content::PfoValidationAlgorithm::Run().