LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "MCMatchAlg.h"
Public Member Functions | |
MCMatchAlg () | |
Default constructor. More... | |
virtual | ~MCMatchAlg () |
Default destructor. More... | |
bool | BuildMap (const std::vector< unsigned int > &g4_trackid_v, const std::vector< sim::SimChannel > &simch_v, const std::vector< std::vector< art::Ptr< recob::Hit > > > &cluster_v) |
Constructs needed information for Reco=>MC matching. More... | |
bool | BuildMap (const std::vector< std::vector< unsigned int > > &g4_trackid_v, const std::vector< sim::SimChannel > &simch_v, const std::vector< std::vector< art::Ptr< recob::Hit > > > &cluster_v) |
Constructs needed information for Reco=>MC matching. More... | |
const std::vector< int > & | BestClusters (const size_t mcshower_index) const |
double | ClusterCorrectness (const size_t cluster_index, const size_t mcshower_index) const |
std::pair< size_t, double > | ShowerCorrectness (const std::vector< unsigned int > cluster_indices) const |
std::pair< double, double > | ClusterEP (const size_t cluster_index, const size_t mcshower_index) const |
For a specified cluster, compute cluster efficiency and purity in terms of specified MC object. More... | |
std::pair< double, double > | BestClusterEP (const size_t mcshower_index, const size_t plane_id) const |
const MCBTAlg & | BTAlg () const |
BTAlgo getter. More... | |
Protected Member Functions | |
bool | BuildMap (const std::vector< std::vector< art::Ptr< recob::Hit > > > &cluster_v) |
Protected Attributes | |
MCBTAlg | fBTAlgo |
MCBTAlg instance. More... | |
std::vector< size_t > | _view_to_plane |
std::vector< std::vector< double > > | _summed_mcq |
std::vector< std::vector< double > > | _cluster_mcq_v |
std::vector< unsigned char > | _cluster_plane_id |
std::vector< std::vector< int > > | _bmatch_id |
User defined class MCMatchAlg ... these comments are used to generate doxygen documentation!
Definition at line 32 of file MCMatchAlg.h.
btutil::MCMatchAlg::MCMatchAlg | ( | ) |
|
inlinevirtual |
Default destructor.
Definition at line 40 of file MCMatchAlg.h.
References BestClusterEP(), BestClusters(), BuildMap(), ClusterCorrectness(), ClusterEP(), ShowerCorrectness(), and lar::dump::vector().
std::pair< double, double > btutil::MCMatchAlg::BestClusterEP | ( | const size_t | mcshower_index, |
const size_t | plane_id | ||
) | const |
For a specified MC object, compute the best-matched cluster's efficiency and purity from the specified plane ID. Internally this function calls BestClusters() to find the best cluster on each plane, then calls ClusterEP() to retrieve the efficiency and purity.
Definition at line 239 of file MCMatchAlg.cxx.
References BestClusters(), and ClusterEP().
Referenced by ~MCMatchAlg().
const std::vector< int > & btutil::MCMatchAlg::BestClusters | ( | const size_t | mcshower_index | ) | const |
For a specified MC object (via index in MCShower/MCTrack), returns best-matched clusters represented by an index number of clusters. The return vector length is same as
Definition at line 224 of file MCMatchAlg.cxx.
References _bmatch_id.
Referenced by BestClusterEP(), and ~MCMatchAlg().
|
inline |
BTAlgo getter.
Definition at line 89 of file MCMatchAlg.h.
References BuildMap(), fBTAlgo, and lar::dump::vector().
Referenced by ShowerQuality::analyze().
bool btutil::MCMatchAlg::BuildMap | ( | const std::vector< unsigned int > & | g4_trackid_v, |
const std::vector< sim::SimChannel > & | simch_v, | ||
const std::vector< std::vector< art::Ptr< recob::Hit > > > & | cluster_v | ||
) |
Constructs needed information for Reco=>MC matching.
Definition at line 12 of file MCMatchAlg.cxx.
References fBTAlgo, and btutil::MCBTAlg::Reset().
Referenced by ShowerQuality::analyze(), BTAlg(), BuildMap(), and ~MCMatchAlg().
bool btutil::MCMatchAlg::BuildMap | ( | const std::vector< std::vector< unsigned int > > & | g4_trackid_v, |
const std::vector< sim::SimChannel > & | simch_v, | ||
const std::vector< std::vector< art::Ptr< recob::Hit > > > & | cluster_v | ||
) |
Constructs needed information for Reco=>MC matching.
Definition at line 21 of file MCMatchAlg.cxx.
References BuildMap(), fBTAlgo, and btutil::MCBTAlg::Reset().
|
protected |
Definition at line 31 of file MCMatchAlg.cxx.
References _bmatch_id, _cluster_mcq_v, _cluster_plane_id, _summed_mcq, btutil::WireRange_t::ch, btutil::WireRange_t::end, fBTAlgo, btutil::MCBTAlg::MCQ(), geo::GeometryCore::Nplanes(), btutil::MCBTAlg::NumParts(), and btutil::WireRange_t::start.
double btutil::MCMatchAlg::ClusterCorrectness | ( | const size_t | cluster_index, |
const size_t | mcshower_index | ||
) | const |
For a specified cluster, compute the correctness for the specified MC object
Definition at line 116 of file MCMatchAlg.cxx.
References _bmatch_id, _cluster_mcq_v, and _cluster_plane_id.
Referenced by ShowerCorrectness(), and ~MCMatchAlg().
std::pair< double, double > btutil::MCMatchAlg::ClusterEP | ( | const size_t | cluster_index, |
const size_t | mcshower_index | ||
) | const |
For a specified cluster, compute cluster efficiency and purity in terms of specified MC object.
Definition at line 189 of file MCMatchAlg.cxx.
References _bmatch_id, _cluster_mcq_v, _cluster_plane_id, and _summed_mcq.
Referenced by ShowerQuality::analyze(), BestClusterEP(), and ~MCMatchAlg().
std::pair< size_t, double > btutil::MCMatchAlg::ShowerCorrectness | ( | const std::vector< unsigned int > | cluster_indices | ) | const |
Similar to ClusterCorrectness() function except this one computes the correctness for multiple clusters. It is meant to compute the correctness for a cluster combination that is matched across plane to represent one 3D reco object. The return is a pair of best-matched MC object and correctness.
Definition at line 145 of file MCMatchAlg.cxx.
References _bmatch_id, _cluster_mcq_v, and ClusterCorrectness().
Referenced by ShowerQuality::analyze(), and ~MCMatchAlg().
|
protected |
Definition at line 104 of file MCMatchAlg.h.
Referenced by BestClusters(), BuildMap(), ClusterCorrectness(), ClusterEP(), and ShowerCorrectness().
|
protected |
Definition at line 101 of file MCMatchAlg.h.
Referenced by BuildMap(), ClusterCorrectness(), ClusterEP(), and ShowerCorrectness().
|
protected |
Definition at line 103 of file MCMatchAlg.h.
Referenced by BuildMap(), ClusterCorrectness(), and ClusterEP().
|
protected |
Definition at line 100 of file MCMatchAlg.h.
Referenced by BuildMap(), and ClusterEP().
|
protected |
Definition at line 98 of file MCMatchAlg.h.
Referenced by MCMatchAlg().
|
protected |
MCBTAlg instance.
Definition at line 96 of file MCMatchAlg.h.
Referenced by BTAlg(), and BuildMap().