10 #ifndef CLUSTERMATCHALG_H
11 #define CLUSTERMATCHALG_H
18 #include "canvas/Persistency/Common/Ptr.h"
19 #include "canvas/Persistency/Common/PtrVector.h"
34 class DetectorClocksData;
35 class DetectorPropertiesData;
120 const std::vector<art::Ptr<recob::Hit>>& in_hit_v);
140 const std::vector<std::vector<recob::SpacePoint>>&
173 art::PtrVector<recob::Hit>& out_hit_v,
174 const std::vector<art::Ptr<recob::Hit>>& in_hit_v);
184 const cluster_match_info& ci2,
189 bool Match_RoughTime(
const cluster_match_info& ci1,
const cluster_match_info& ci2);
202 bool Match_SumCharge(
const cluster_match_info& uc,
const cluster_match_info& vc);
215 std::vector<recob::SpacePoint>& sps_v);
233 std::vector<std::vector<recob::SpacePoint>>
250 std::vector<art::PtrVector<recob::Hit>>
252 std::vector<art::PtrVector<recob::Hit>>
254 std::vector<art::PtrVector<recob::Hit>>
std::vector< uint16_t > _w_nhits_v
Use summed charge comparison ... see Match_SumCharge() description.
void ClearMatchInputInfo()
Method to clear input cluster information.
std::vector< std::vector< unsigned int > > GetMatchedClusters() const
Method to retrieve matched cluster combinations. The format is [wire_plane][cluster_index].
trkf::SpacePointAlg * _sps_algo
SpacePointFinder algorithm pointer.
double peak_time_max
Maximum "peak time" among all hits in this cluster.
std::vector< art::PtrVector< recob::Hit > > _vhits_v
Local Hit pointer vector container ... V-plane.
void FillMCInfo(const art::Event &evt)
Internal method to fill MCTruth information when available.
void SetMCTruthModName(std::string name)
Method to specify input MCTruth's module name (optional)
double _time_offset_wplane
bool Match_RoughTime(const cluster_match_info &ci1, const cluster_match_info &ci2)
Checks min/max hit timing among two clusters and make sure there is an overlap.
double end_time_min
Minimum "end time" among all hits in this cluster.
std::vector< double > _vw_tratio_v
void AppendClusterInfo(detinfo::DetectorPropertiesData const &det_prop, const recob::Cluster &in_cluster, const std::vector< art::Ptr< recob::Hit >> &in_hit_v)
Method to fill cluster information to be used for matching.
unsigned short wire_min
Minimum wire number in this cluster.
std::vector< art::PtrVector< recob::Hit > > _whits_v
Local Hit pointer vector container ... W-plane.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
double _time_offset_uplane
double end_time_max
Maximum "end time" among all hits in this cluster.
unsigned short _tot_pass_t
bool Match_SpacePoint(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const size_t uindex, const size_t vindex, const size_t windex, std::vector< recob::SpacePoint > &sps_v)
Declaration of signal hit object.
std::vector< double > _wu_tratio_v
std::vector< double > _qratio_v
void ClearEventInfo()
Method to clear event-wise information.
void ClearMatchOutputInfo()
Method to clear output matched cluster information.
bool _store_sps
Boolean to enable storage of SpacePoint vector.
bool Match_RoughZ(const cluster_match_info &ci1, const cluster_match_info &ci2, const geo::View_t v1, const geo::View_t v2) const
MatchMethod_t
Enum switch for various matching methods.
Set of hits with a 2D structure.
Use SpacePoint finder algorithm ... see Match_SpacePoint() description.
std::vector< cluster_match_info > _wcluster_v
Local cluster data container... W-plane.
unsigned short _tot_pass_sps
bool StoreSpacePoints() const
Method to check if it is configured to store SpacePoint.
std::vector< double > _tpeak_max_v
double _overlay_tratio_cut
double _time_offset_vplane
std::vector< double > _charge_v
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< uint16_t > _nhits_v
unsigned short cluster_index
Cluster's index position in the input cluster vector array.
void PrepareTTree()
Internal method to create output TTree for quality checking of the algorithm.
cluster_match_info()
Default constructor.
std::vector< double > _tend_max_v
std::vector< double > _tend_min_v
std::vector< uint16_t > _nsps
double peak_time_min
Minimum "peak time" among all hits in this cluster.
double sum_charge
Summed charge among all hits in this cluster.
Rough-Time comparison method ... see Match_RoughTime() description.
std::string _ModName_MCTruth
MCTruth producer's module name.
std::vector< art::PtrVector< recob::Hit > > _uhits_v
Local Hit pointer vector container ... U-plane.
std::vector< uint16_t > _u_nhits_v
void AppendClusterTreeVariables(const cluster_match_info &ci)
Internal method to fill cluster-info tree.
Definition of data types for geometry description.
std::vector< double > _tstart_max_v
std::vector< cluster_match_info > _vcluster_v
Local cluster data container... V-plane.
std::vector< double > _tstart_min_v
std::vector< double > _uv_tratio_v
bool _debug_mode
Boolean to enable debug mode (call all enabled matching methods)
ClusterMatchAlg(fhicl::ParameterSet const &pset)
Default constructor with fhicl parameters.
const std::vector< std::vector< recob::SpacePoint > > & GetMatchedSpacePoints() const
Method to retrieve matched SpacePoint for each combinations.
void ClearTTreeInfo()
Method to clear TTree variables.
bool Match_SumCharge(const cluster_match_info &uc, const cluster_match_info &vc)
std::vector< uint16_t > _view_v
unsigned short _tot_pass_qsum
Contains all timing reference information for the detector.
unsigned short wire_max
Maximum wire number in this cluster.
bool _det_params_prepared
std::vector< uint16_t > _v_nhits_v
std::vector< unsigned int > _matched_uclusters_v
U plane matched clusters' index.
std::vector< std::vector< recob::SpacePoint > > _matched_sps_v
Local SpacePoint vector container.
unsigned int nhits
Number of hits.
unsigned short _tot_pass_z
double start_time_max
Maximum "start time" among all hits in this cluster.
bool _match_methods[kMATCH_METHOD_MAX]
Boolean list for enabled algorithms.
geo::View_t view
Wire plane ID.
void MatchTwoPlanes(detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop)
Two plane version of cluster matching method.
void ReportConfig() const
Method to report the current configuration.
cluster_match_info(unsigned short index)
Constructor with cluster's index ID.
void PrepareDetParams(detinfo::DetectorPropertiesData const &clockData)
Internal method, called only once, to fill detector-wise information.
std::vector< unsigned int > _matched_wclusters_v
W plane matched clusters' index.
std::vector< unsigned int > _matched_vclusters_v
V plane matched clusters' index.
void MatchThreePlanes(detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop)
void FillHitInfo(cluster_match_info &ci, art::PtrVector< recob::Hit > &out_hit_v, const std::vector< art::Ptr< recob::Hit >> &in_hit_v)
Rough-Z comparison method ... see Match_RoughZ() description.
std::vector< double > _tpeak_min_v
std::vector< cluster_match_info > _ucluster_v
Local cluster data container... U-plane.
double start_time_min
Minimum "start time" among all hits in this cluster.