#include <ClusterMatchAlg.h>
Classes | |
struct | cluster_match_info |
Public Types | |
enum | MatchMethod_t { kRoughZ = 0, kRoughT, kSpacePoint, kSumCharge, kMATCH_METHOD_MAX } |
Enum switch for various matching methods. More... | |
Public Member Functions | |
ClusterMatchAlg (fhicl::ParameterSet const &pset) | |
Default constructor with fhicl parameters. More... | |
void | ReportConfig () const |
Method to report the current configuration. More... | |
void | SetMCTruthModName (std::string name) |
Method to specify input MCTruth's module name (optional) More... | |
void | FillMCInfo (const art::Event &evt) |
Internal method to fill MCTruth information when available. More... | |
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. More... | |
void | MatchThreePlanes (detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop) |
void | MatchTwoPlanes (detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop) |
Two plane version of cluster matching method. More... | |
std::vector< std::vector < unsigned int > > | GetMatchedClusters () const |
Method to retrieve matched cluster combinations. The format is [wire_plane][cluster_index]. More... | |
const std::vector< std::vector < recob::SpacePoint > > & | GetMatchedSpacePoints () const |
Method to retrieve matched SpacePoint for each combinations. More... | |
bool | StoreSpacePoints () const |
Method to check if it is configured to store SpacePoint. More... | |
void | ClearEventInfo () |
Method to clear event-wise information. More... | |
Protected Member Functions | |
void | ClearMatchInputInfo () |
Method to clear input cluster information. More... | |
void | ClearMatchOutputInfo () |
Method to clear output matched cluster information. More... | |
void | ClearTTreeInfo () |
Method to clear TTree variables. More... | |
void | PrepareDetParams (detinfo::DetectorPropertiesData const &clockData) |
Internal method, called only once, to fill detector-wise information. More... | |
void | PrepareTTree () |
Internal method to create output TTree for quality checking of the algorithm. More... | |
void | FillHitInfo (cluster_match_info &ci, art::PtrVector< recob::Hit > &out_hit_v, const std::vector< art::Ptr< recob::Hit >> &in_hit_v) |
void | AppendClusterTreeVariables (const cluster_match_info &ci) |
Internal method to fill cluster-info tree. More... | |
bool | Match_RoughZ (const cluster_match_info &ci1, const cluster_match_info &ci2, const geo::View_t v1, const geo::View_t v2) const |
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. More... | |
bool | Match_SumCharge (const cluster_match_info &uc, const cluster_match_info &vc) |
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) |
Protected Attributes | |
size_t | _num_sps_cut |
double | _overlay_tratio_cut |
double | _qratio_cut |
std::vector< unsigned int > | _matched_uclusters_v |
U plane matched clusters' index. More... | |
std::vector< unsigned int > | _matched_vclusters_v |
V plane matched clusters' index. More... | |
std::vector< unsigned int > | _matched_wclusters_v |
W plane matched clusters' index. More... | |
std::vector< std::vector < recob::SpacePoint > > | _matched_sps_v |
Local SpacePoint vector container. More... | |
bool | _match_methods [kMATCH_METHOD_MAX] |
Boolean list for enabled algorithms. More... | |
bool | _det_params_prepared |
bool | _debug_mode |
Boolean to enable debug mode (call all enabled matching methods) More... | |
bool | _store_sps |
Boolean to enable storage of SpacePoint vector. More... | |
unsigned int | _tot_planes |
double | _time_offset_uplane |
double | _time_offset_vplane |
double | _time_offset_wplane |
std::string | _ModName_MCTruth |
MCTruth producer's module name. More... | |
std::vector< art::PtrVector < recob::Hit > > | _uhits_v |
Local Hit pointer vector container ... U-plane. More... | |
std::vector< art::PtrVector < recob::Hit > > | _vhits_v |
Local Hit pointer vector container ... V-plane. More... | |
std::vector< art::PtrVector < recob::Hit > > | _whits_v |
Local Hit pointer vector container ... W-plane. More... | |
std::vector< cluster_match_info > | _ucluster_v |
Local cluster data container... U-plane. More... | |
std::vector< cluster_match_info > | _vcluster_v |
Local cluster data container... V-plane. More... | |
std::vector< cluster_match_info > | _wcluster_v |
Local cluster data container... W-plane. More... | |
trkf::SpacePointAlg * | _sps_algo |
SpacePointFinder algorithm pointer. More... | |
TTree * | _match_tree |
double | _mc_E |
double | _mc_Px |
double | _mc_Py |
double | _mc_Pz |
double | _mc_Vx |
double | _mc_Vy |
double | _mc_Vz |
int | _pdgid |
unsigned short | _tot_u |
unsigned short | _tot_v |
unsigned short | _tot_w |
unsigned short | _tot_pass_qsum |
unsigned short | _tot_pass_t |
unsigned short | _tot_pass_z |
unsigned short | _tot_pass_sps |
std::vector< uint16_t > | _u_nhits_v |
std::vector< uint16_t > | _v_nhits_v |
std::vector< uint16_t > | _w_nhits_v |
std::vector< uint16_t > | _nsps |
std::vector< double > | _qratio_v |
std::vector< double > | _uv_tratio_v |
std::vector< double > | _vw_tratio_v |
std::vector< double > | _wu_tratio_v |
bool | _save_cluster_info |
TTree * | _cluster_tree |
std::vector< uint16_t > | _view_v |
std::vector< double > | _charge_v |
std::vector< uint16_t > | _nhits_v |
std::vector< double > | _tstart_min_v |
std::vector< double > | _tstart_max_v |
std::vector< double > | _tpeak_min_v |
std::vector< double > | _tpeak_max_v |
std::vector< double > | _tend_min_v |
std::vector< double > | _tend_max_v |
Definition at line 48 of file ClusterMatchAlg.h.
Enum switch for various matching methods.
Enumerator | |
---|---|
kRoughZ |
Rough-Z comparison method ... see Match_RoughZ() description. |
kRoughT |
Rough-Time comparison method ... see Match_RoughTime() description. |
kSpacePoint |
Use SpacePoint finder algorithm ... see Match_SpacePoint() description. |
kSumCharge |
Use summed charge comparison ... see Match_SumCharge() description. |
kMATCH_METHOD_MAX |
Definition at line 52 of file ClusterMatchAlg.h.
cluster::ClusterMatchAlg::ClusterMatchAlg | ( | fhicl::ParameterSet const & | pset | ) |
Default constructor with fhicl parameters.
Definition at line 31 of file ClusterMatchAlg.cxx.
void cluster::ClusterMatchAlg::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.
Definition at line 269 of file ClusterMatchAlg.cxx.
|
protected |
Internal method to fill cluster-info tree.
Definition at line 346 of file ClusterMatchAlg.cxx.
void cluster::ClusterMatchAlg::ClearEventInfo | ( | ) |
Method to clear event-wise information.
Definition at line 150 of file ClusterMatchAlg.cxx.
|
protected |
Method to clear input cluster information.
Definition at line 90 of file ClusterMatchAlg.cxx.
|
protected |
Method to clear output matched cluster information.
Definition at line 102 of file ClusterMatchAlg.cxx.
|
protected |
Method to clear TTree variables.
Definition at line 111 of file ClusterMatchAlg.cxx.
|
protected |
Definition at line 303 of file ClusterMatchAlg.cxx.
void cluster::ClusterMatchAlg::FillMCInfo | ( | const art::Event & | evt | ) |
Internal method to fill MCTruth information when available.
Definition at line 206 of file ClusterMatchAlg.cxx.
std::vector< std::vector< unsigned int > > cluster::ClusterMatchAlg::GetMatchedClusters | ( | ) | const |
Method to retrieve matched cluster combinations. The format is [wire_plane][cluster_index].
Definition at line 503 of file ClusterMatchAlg.cxx.
|
inline |
Method to retrieve matched SpacePoint for each combinations.
Definition at line 141 of file ClusterMatchAlg.h.
|
protected |
Checks min/max hit timing among two clusters and make sure there is an overlap.
Definition at line 377 of file ClusterMatchAlg.cxx.
|
protected |
Match clusters based on min/max Z boundary information. It checks clusters' overlap along Z spatial coordinate based on 2 input cluster information.
Definition at line 363 of file ClusterMatchAlg.cxx.
|
protected |
Cluster matching using space points. This can be slow as we run SpacePointFinder algorithm per cluster pair. Three clusters (U, V, W) are considerd to "match" if there found N spacepoints using hits in them and N > min_nsps where "min_nsps" is the cut value you can set in SetNSpacePointCut() method.
Definition at line 411 of file ClusterMatchAlg.cxx.
|
protected |
Checks min/max hit timing among three clusters and make sure there is an overlap. If _overlay_tratio_cut is set, then overlapped-time / cluster-timespan fraction is compared to the set cut value to claim a match. Checks the ratio of two clusters' summed charge. If the ratio is within 1 +/- set cut value, two clusters are considered to match.
Definition at line 400 of file ClusterMatchAlg.cxx.
void cluster::ClusterMatchAlg::MatchThreePlanes | ( | detinfo::DetectorClocksData const & | clock_data, |
detinfo::DetectorPropertiesData const & | det_prop | ||
) |
Method to run matching algorithms for three planes. Event info must be provided prior to this function call through FillEventInfo() function call. If the function is called more than once w/o supplying the new art::Event object, it does not perform any new matching unless a user explicitly calls ClearEventInfo() and then fill event info again though FillEventInfo().
Definition at line 622 of file ClusterMatchAlg.cxx.
void cluster::ClusterMatchAlg::MatchTwoPlanes | ( | detinfo::DetectorClocksData const & | clock_data, |
detinfo::DetectorPropertiesData const & | det_prop | ||
) |
Two plane version of cluster matching method.
Clear TTree variables
Definition at line 513 of file ClusterMatchAlg.cxx.
|
protected |
Internal method, called only once, to fill detector-wise information.
Definition at line 251 of file ClusterMatchAlg.cxx.
|
protected |
Internal method to create output TTree for quality checking of the algorithm.
Definition at line 158 of file ClusterMatchAlg.cxx.
void cluster::ClusterMatchAlg::ReportConfig | ( | ) | const |
Method to report the current configuration.
Definition at line 66 of file ClusterMatchAlg.cxx.
|
inline |
Method to specify input MCTruth's module name (optional)
Definition at line 109 of file ClusterMatchAlg.h.
|
inline |
Method to check if it is configured to store SpacePoint.
Definition at line 148 of file ClusterMatchAlg.h.
|
protected |
Definition at line 298 of file ClusterMatchAlg.h.
|
protected |
Definition at line 296 of file ClusterMatchAlg.h.
|
protected |
Boolean to enable debug mode (call all enabled matching methods)
Definition at line 241 of file ClusterMatchAlg.h.
|
protected |
Definition at line 240 of file ClusterMatchAlg.h.
|
protected |
Boolean list for enabled algorithms.
Definition at line 239 of file ClusterMatchAlg.h.
|
protected |
Definition at line 266 of file ClusterMatchAlg.h.
|
protected |
Local SpacePoint vector container.
Definition at line 234 of file ClusterMatchAlg.h.
|
protected |
U plane matched clusters' index.
Definition at line 230 of file ClusterMatchAlg.h.
|
protected |
V plane matched clusters' index.
Definition at line 231 of file ClusterMatchAlg.h.
|
protected |
W plane matched clusters' index.
Definition at line 232 of file ClusterMatchAlg.h.
|
protected |
Definition at line 268 of file ClusterMatchAlg.h.
|
protected |
Definition at line 269 of file ClusterMatchAlg.h.
|
protected |
Definition at line 270 of file ClusterMatchAlg.h.
|
protected |
Definition at line 271 of file ClusterMatchAlg.h.
|
protected |
Definition at line 272 of file ClusterMatchAlg.h.
|
protected |
Definition at line 273 of file ClusterMatchAlg.h.
|
protected |
Definition at line 274 of file ClusterMatchAlg.h.
|
protected |
MCTruth producer's module name.
Definition at line 248 of file ClusterMatchAlg.h.
|
protected |
Definition at line 299 of file ClusterMatchAlg.h.
|
protected |
Definition at line 288 of file ClusterMatchAlg.h.
|
protected |
Number of SpacePoint used to cut in Match_SpacePoint method
Definition at line 220 of file ClusterMatchAlg.h.
|
protected |
Minimum overlayed time fraction among two clusters used in Match_RoughTime method
Definition at line 222 of file ClusterMatchAlg.h.
|
protected |
Definition at line 275 of file ClusterMatchAlg.h.
|
protected |
Maximum difference among clusters' charge sum used in Match_SumCharge method
Definition at line 224 of file ClusterMatchAlg.h.
|
protected |
Definition at line 289 of file ClusterMatchAlg.h.
|
protected |
Definition at line 295 of file ClusterMatchAlg.h.
|
protected |
SpacePointFinder algorithm pointer.
Definition at line 261 of file ClusterMatchAlg.h.
|
protected |
Boolean to enable storage of SpacePoint vector.
Definition at line 242 of file ClusterMatchAlg.h.
|
protected |
Definition at line 305 of file ClusterMatchAlg.h.
|
protected |
Definition at line 304 of file ClusterMatchAlg.h.
|
protected |
Definition at line 244 of file ClusterMatchAlg.h.
|
protected |
Definition at line 245 of file ClusterMatchAlg.h.
|
protected |
Definition at line 246 of file ClusterMatchAlg.h.
|
protected |
Definition at line 279 of file ClusterMatchAlg.h.
|
protected |
Definition at line 282 of file ClusterMatchAlg.h.
|
protected |
Definition at line 280 of file ClusterMatchAlg.h.
|
protected |
Definition at line 281 of file ClusterMatchAlg.h.
|
protected |
Definition at line 243 of file ClusterMatchAlg.h.
|
protected |
Definition at line 276 of file ClusterMatchAlg.h.
|
protected |
Definition at line 277 of file ClusterMatchAlg.h.
|
protected |
Definition at line 278 of file ClusterMatchAlg.h.
|
protected |
Definition at line 303 of file ClusterMatchAlg.h.
|
protected |
Definition at line 302 of file ClusterMatchAlg.h.
|
protected |
Definition at line 301 of file ClusterMatchAlg.h.
|
protected |
Definition at line 300 of file ClusterMatchAlg.h.
|
protected |
Definition at line 285 of file ClusterMatchAlg.h.
|
protected |
Local cluster data container... U-plane.
Definition at line 257 of file ClusterMatchAlg.h.
|
protected |
Local Hit pointer vector container ... U-plane.
Definition at line 251 of file ClusterMatchAlg.h.
|
protected |
Definition at line 290 of file ClusterMatchAlg.h.
|
protected |
Definition at line 286 of file ClusterMatchAlg.h.
|
protected |
Local cluster data container... V-plane.
Definition at line 258 of file ClusterMatchAlg.h.
|
protected |
Local Hit pointer vector container ... V-plane.
Definition at line 253 of file ClusterMatchAlg.h.
|
protected |
Definition at line 297 of file ClusterMatchAlg.h.
|
protected |
Definition at line 291 of file ClusterMatchAlg.h.
|
protected |
Definition at line 287 of file ClusterMatchAlg.h.
|
protected |
Local cluster data container... W-plane.
Definition at line 259 of file ClusterMatchAlg.h.
|
protected |
Local Hit pointer vector container ... W-plane.
Definition at line 255 of file ClusterMatchAlg.h.
|
protected |
Definition at line 292 of file ClusterMatchAlg.h.