1 #ifndef RecoParticleFlow_PFProducer_PFBlockAlgo_h 2 #define RecoParticleFlow_PFProducer_PFBlockAlgo_h 16 #include <unordered_map> 21 struct hash<
std::pair<unsigned int, unsigned int>> {
22 typedef std::pair<unsigned int, unsigned int>
arg_type;
37 typedef std::vector<std::unique_ptr<reco::PFBlockElement>>
ElementList;
45 void setLinkers(
const std::vector<edm::ParameterSet>&);
65 const std::unordered_map<std::pair<unsigned int, unsigned int>,
double>&
links)
const;
80 std::vector<std::unique_ptr<BlockElementImporterBase>>
importers_;
82 const std::unordered_map<std::string, reco::PFBlockElement::Type>
elementTypes_;
83 std::vector<std::unique_ptr<BlockElementLinkerBase>>
linkTests_;
86 std::vector<std::unique_ptr<KDTreeLinkerBase>>
kdtrees_;
Abstract base class for a PFBlock element (track, cluster...)
std::array< std::pair< unsigned int, unsigned int >, reco::PFBlockElement::kNBETypes > ElementRanges
friend std::ostream & operator<<(std::ostream &, const PFBlockAlgo &)
std::vector< std::unique_ptr< reco::PFBlockElement > > ElementList
void setDebug(bool debug)
sets debug printout flag
std::vector< std::unique_ptr< KDTreeLinkerBase > > kdtrees_
std::pair< unsigned int, unsigned int > arg_type
void updateEventSetup(const edm::EventSetup &)
void setImporters(const std::vector< edm::ParameterSet > &, edm::ConsumesCollector &)
void packLinks(reco::PFBlock &block, const std::unordered_map< std::pair< unsigned int, unsigned int >, double > &links) const
std::vector< PFBlock > PFBlockCollection
collection of PFBlock objects
void link(const reco::PFBlockElement *el1, const reco::PFBlockElement *el2, double &dist) const
check whether 2 elements are linked. Returns distance
value_type operator()(const arg_type &arg) const
std::vector< std::unique_ptr< BlockElementLinkerBase > > linkTests_
const std::unordered_map< std::string, reco::PFBlockElement::Type > elementTypes_
unsigned int linkTestSquare_[reco::PFBlockElement::kNBETypes][reco::PFBlockElement::kNBETypes]
std::vector< std::unique_ptr< BlockElementImporterBase > > importers_
reco::PFBlockCollection findBlocks()
build blocks
void buildElements(const edm::Event &)
bool debug_
if true, debug printouts activated
void setLinkers(const std::vector< edm::ParameterSet > &)