.. _program_listing_file_larflow_Reco_NuVertexMaker.h: Program Listing for File NuVertexMaker.h ======================================== |exhale_lsh| :ref:`Return to documentation for file ` (``larflow/Reco/NuVertexMaker.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef __NU_VERTEX_MAKER_H__ #define __NU_VERTEX_MAKER_H__ #include #include #include "TTree.h" #include "larcv/core/Base/larcv_base.h" #include "larcv/core/DataFormat/IOManager.h" #include "DataFormat/storage_manager.h" #include "DataFormat/pcaxis.h" #include "DataFormat/larflow3dhit.h" #include "DataFormat/larflowcluster.h" #include "NuVertexCandidate.h" namespace larflow { namespace reco { class NuVertexMaker : public larcv::larcv_base { public: NuVertexMaker(); virtual ~NuVertexMaker() {}; void process( larcv::IOManager& ioman, larlite::storage_manager& ioll ); protected: std::vector _vertex_v; std::vector _merged_v; std::vector _vetoed_v; std::vector _fitted_v; protected: std::map _keypoint_producers; std::map _keypoint_pca_producers; std::map _cluster_producers; std::map _cluster_pca_producers; std::map _cluster_type; std::map _cluster_type_max_impact_radius; std::map _cluster_type_max_gap; public: void add_keypoint_producer( std::string name ) { _keypoint_producers[name] = nullptr; _keypoint_pca_producers[name] = nullptr; }; void add_cluster_producer( std::string name, NuVertexCandidate::ClusterType_t ctype ) { _cluster_producers[name] = nullptr; _cluster_pca_producers[name] = nullptr; _cluster_type[name] = ctype; }; const std::vector& get_nu_candidates() const { return _vertex_v; }; const std::vector& get_vetoed_candidates() const { return _vetoed_v; }; const std::vector& get_merged_candidates() const { return _merged_v; }; const std::vector& get_fitted_candidates() const { return _fitted_v; }; void clear(); protected: void _createCandidates(); void _set_defaults(); void _score_vertex( NuVertexCandidate& vtx ); void _merge_candidates(); bool _attachClusterToCandidate( NuVertexCandidate& vertex, const larlite::larflowcluster& lfcluster, const larlite::pcaxis& lfpca, NuVertexCandidate::ClusterType_t ctype, std::string producer, int icluster, bool apply_cut ); void _cosmic_veto_candidates( larlite::storage_manager& ioll ); void _refine_position( larcv::IOManager& iolcv, larlite::storage_manager& ioll ); protected: bool _own_tree; int _ana_run; int _ana_subrun; int _ana_event; TTree* _ana_tree; bool _apply_cosmic_veto; public: void make_ana_tree(); void add_nuvertex_branch( TTree* tree ); void fill_ana_tree() { if (_ana_tree) _ana_tree->Fill(); }; void write_ana_tree() { if (_ana_tree) _ana_tree->Write(); }; void apply_cosmic_veto( bool applyveto ) { _apply_cosmic_veto=applyveto; }; }; } } #endif