LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
MCMatchAlg.h
Go to the documentation of this file.
1 
14 #ifndef RECOTOOL_MCMATCHALG_H
15 #define RECOTOOL_MCMATCHALG_H
16 
17 #include <iostream>
18 //#include "DataFormat/simch.h"
19 //#include "DataFormat/hit.h"
20 //#include "LArUtil/Geometry.h"
24 #include "MCBTAlg.h"
25 
26 namespace btutil {
32  class MCMatchAlg {
33 
34  public:
35 
37  MCMatchAlg();
38 
40  virtual ~MCMatchAlg(){};
41 
42 
44  bool BuildMap(const std::vector< unsigned int> &g4_trackid_v,
45  const std::vector<sim::SimChannel> &simch_v,
46  const std::vector<std::vector<art::Ptr<recob::Hit> > > &cluster_v);
47 
49  bool BuildMap(const std::vector<std::vector< unsigned int> > &g4_trackid_v,
50  const std::vector<sim::SimChannel> &simch_v,
51  const std::vector<std::vector<art::Ptr<recob::Hit> > > &cluster_v);
52 
58  const std::vector<int>& BestClusters(const size_t mcshower_index) const;
59 
64  double ClusterCorrectness(const size_t cluster_index,
65  const size_t mcshower_index) const;
66 
73  std::pair<size_t,double> ShowerCorrectness(const std::vector<unsigned int> cluster_indices) const;
74 
75 
77  std::pair<double,double> ClusterEP(const size_t cluster_index,
78  const size_t mcshower_index) const;
79 
85  std::pair<double,double> BestClusterEP(const size_t mcshower_index,
86  const size_t plane_id) const;
87 
89  const MCBTAlg& BTAlg() const { return fBTAlgo; }
90 
91  protected:
92 
93  bool BuildMap(const std::vector<std::vector<art::Ptr<recob::Hit> > > &cluster_v);
94 
97 
98  std::vector<size_t> _view_to_plane;
99 
100  std::vector<std::vector<double> > _summed_mcq;
101  std::vector<std::vector<double> > _cluster_mcq_v;
102 
103  std::vector<unsigned char> _cluster_plane_id;
104  std::vector<std::vector<int> > _bmatch_id;
105 
106  };
107 }
108 #endif
109  // end of doxygen group
110 
virtual ~MCMatchAlg()
Default destructor.
Definition: MCMatchAlg.h:40
std::pair< double, double > BestClusterEP(const size_t mcshower_index, const size_t plane_id) const
Definition: MCMatchAlg.cxx:239
Declaration of signal hit object.
Class def header for a class MCBTAlg.
const MCBTAlg & BTAlg() const
BTAlgo getter.
Definition: MCMatchAlg.h:89
std::vector< std::vector< double > > _summed_mcq
Definition: MCMatchAlg.h:100
std::vector< unsigned char > _cluster_plane_id
Definition: MCMatchAlg.h:103
std::vector< std::vector< double > > _cluster_mcq_v
Definition: MCMatchAlg.h:101
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.
Definition: MCMatchAlg.cxx:12
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
double ClusterCorrectness(const size_t cluster_index, const size_t mcshower_index) const
Definition: MCMatchAlg.cxx:116
MCBTAlg fBTAlgo
MCBTAlg instance.
Definition: MCMatchAlg.h:96
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...
Definition: MCMatchAlg.cxx:189
const std::vector< int > & BestClusters(const size_t mcshower_index) const
Definition: MCMatchAlg.cxx:224
std::vector< size_t > _view_to_plane
Definition: MCMatchAlg.h:98
MCMatchAlg()
Default constructor.
Definition: MCMatchAlg.cxx:8
object containing MC truth information necessary for making RawDigits and doing back tracking ...
std::pair< size_t, double > ShowerCorrectness(const std::vector< unsigned int > cluster_indices) const
Definition: MCMatchAlg.cxx:145
std::vector< std::vector< int > > _bmatch_id
Definition: MCMatchAlg.h:104
art framework interface to geometry description