LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MCMatchAlg.h
Go to the documentation of this file.
1 
14 #ifndef RECOTOOL_MCMATCHALG_H
15 #define RECOTOOL_MCMATCHALG_H
16 
18 
19 #include "MCBTAlg.h"
22 namespace detinfo {
23  class DetectorClocksData;
24 }
25 
26 #include <cstddef>
27 #include <utility>
28 #include <vector>
29 
30 namespace btutil {
36  class MCMatchAlg {
37 
38  public:
40  MCMatchAlg();
41 
43  virtual ~MCMatchAlg(){};
44 
46  bool BuildMap(detinfo::DetectorClocksData const& clockData,
47  const std::vector<unsigned int>& g4_trackid_v,
48  const std::vector<sim::SimChannel>& simch_v,
49  const std::vector<std::vector<art::Ptr<recob::Hit>>>& cluster_v);
50 
52  bool BuildMap(detinfo::DetectorClocksData const& clockData,
53  const std::vector<std::vector<unsigned int>>& g4_trackid_v,
54  const std::vector<sim::SimChannel>& simch_v,
55  const std::vector<std::vector<art::Ptr<recob::Hit>>>& cluster_v);
56 
62  const std::vector<int>& BestClusters(const size_t mcshower_index) const;
63 
68  double ClusterCorrectness(const size_t cluster_index, const size_t mcshower_index) const;
69 
76  std::pair<size_t, double> ShowerCorrectness(
77  const std::vector<unsigned int> cluster_indices) const;
78 
80  std::pair<double, double> ClusterEP(const size_t cluster_index,
81  const size_t mcshower_index) const;
82 
88  std::pair<double, double> BestClusterEP(const size_t mcshower_index,
89  const size_t plane_id) const;
90 
92  const MCBTAlg& BTAlg() const { return fBTAlgo; }
93 
94  protected:
95  bool BuildMap(detinfo::DetectorClocksData const& clockData,
96  const std::vector<std::vector<art::Ptr<recob::Hit>>>& cluster_v);
97 
100 
101  std::vector<size_t> _view_to_plane;
102 
103  std::vector<std::vector<double>> _summed_mcq;
104  std::vector<std::vector<double>> _cluster_mcq_v;
105 
106  std::vector<unsigned char> _cluster_plane_id;
107  std::vector<std::vector<int>> _bmatch_id;
108  };
109 }
110 #endif
111  // end of doxygen group
virtual ~MCMatchAlg()
Default destructor.
Definition: MCMatchAlg.h:43
Declaration of signal hit object.
Class def header for a class MCBTAlg.
const MCBTAlg & BTAlg() const
BTAlgo getter.
Definition: MCMatchAlg.h:92
std::vector< std::vector< double > > _summed_mcq
Definition: MCMatchAlg.h:103
std::vector< unsigned char > _cluster_plane_id
Definition: MCMatchAlg.h:106
std::vector< std::vector< double > > _cluster_mcq_v
Definition: MCMatchAlg.h:104
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
MCBTAlg fBTAlgo
MCBTAlg instance.
Definition: MCMatchAlg.h:99
General LArSoft Utilities.
std::vector< size_t > _view_to_plane
Definition: MCMatchAlg.h:101
Contains all timing reference information for the detector.
object containing MC truth information necessary for making RawDigits and doing back tracking ...
std::vector< std::vector< int > > _bmatch_id
Definition: MCMatchAlg.h:107