.. _program_listing_file_larflow_CRTMatch_CRTHitMatch.h: Program Listing for File CRTHitMatch.h ====================================== |exhale_lsh| :ref:`Return to documentation for file ` (``larflow/CRTMatch/CRTHitMatch.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef __LARFLOW_RECO_CRTHITMATCH_H__ #define __LARFLOW_RECO_CRTHITMATCH_H__ #include #include "larcv/core/Base/larcv_base.h" #include "larcv/core/DataFormat/IOManager.h" #include "DataFormat/storage_manager.h" #include "DataFormat/crthit.h" #include "DataFormat/crttrack.h" #include "DataFormat/opflash.h" #include "DataFormat/pcaxis.h" #include "DataFormat/larflowcluster.h" #include "larflow/Reco/cluster_functions.h" namespace larflow { namespace crtmatch { class CRTHitMatch : public larcv::larcv_base { public: struct match_t { int hitidx; int trackidx; // variables to rank matches float dist2hit; float tracklen; bool operator<( const match_t& rhs ) { // for distances over 10 cm, we rank by distance if ( dist2hit& panel_pos ); float getLength( const larlite::pcaxis& pca ); bool was_cluster_used( int idx ); // data stores std::vector _intime_opflash_v; std::vector _outtime_opflash_v; std::vector< const larlite::opflash* > _flash_v; // crt hits std::vector _crthit_v; std::vector _crttrack_v; // clusters std::string _input_cluster_treename; std::string _input_pcaxis_treename; void setInputClusterTreename( std::string name ) { _input_cluster_treename = name; }; void setInputPCAxisTreename( std::string name ) { _input_pcaxis_treename = name; }; std::vector< const larlite::larflowcluster* > _lfcluster_v; std::vector< const larlite::pcaxis* > _pcaxis_v; std::vector< std::vector< match_t > > _hit2track_rank_v; std::vector< match_t > _all_rank_v; void _matchOpflashes( const std::vector< const larlite::opflash* >& flash_v, const std::vector< const larlite::crthit* >& hit_v, const std::vector< larlite::larflowcluster >& cluster_v, std::vector< larlite::opflash >& matched_opflash_v ); larlite::larflowcluster _merge_matched_cluster( const std::vector< CRTHitMatch::match_t >& hit_match_v, std::vector& used_in_merge, bool& merged ); // output containers std::vector _matched_hitidx; std::vector< const larlite::crthit* > _match_hit_v; std::vector _matched_cluster; std::vector _matched_cluster_t; std::vector< larlite::opflash > _matched_opflash_v; std::vector _used_tracks_v; }; } } #endif