CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
PFBlockAlgo Class Reference

Particle Flow Algorithm. More...

#include <PFBlockAlgo.h>

Public Types

typedef std::vector
< std::unique_ptr
< reco::PFBlockElement > > 
ElementList
 
typedef std::array< std::pair
< unsigned int, unsigned int >
, reco::PFBlockElement::kNBETypes
ElementRanges
 

Public Member Functions

void buildElements (const edm::Event &)
 
reco::PFBlockCollection findBlocks ()
 build blocks More...
 
 PFBlockAlgo ()
 
void setDebug (bool debug)
 sets debug printout flag More...
 
void setImporters (const std::vector< edm::ParameterSet > &, edm::ConsumesCollector &)
 
void setLinkers (const std::vector< edm::ParameterSet > &)
 
void updateEventSetup (const edm::EventSetup &)
 
 ~PFBlockAlgo ()
 

Private Member Functions

void link (const reco::PFBlockElement *el1, const reco::PFBlockElement *el2, double &dist) const
 check whether 2 elements are linked. Returns distance More...
 
void packLinks (reco::PFBlock &block, const std::unordered_map< std::pair< unsigned int, unsigned int >, double > &links) const
 

Private Attributes

bool debug_
 if true, debug printouts activated More...
 
ElementList elements_
 
const std::unordered_map
< std::string,
reco::PFBlockElement::Type
elementTypes_
 
std::vector< std::unique_ptr
< BlockElementImporterBase > > 
importers_
 
std::vector< std::unique_ptr
< KDTreeLinkerBase > > 
kdtrees_
 
std::vector< std::unique_ptr
< BlockElementLinkerBase > > 
linkTests_
 
unsigned int linkTestSquare_ [reco::PFBlockElement::kNBETypes][reco::PFBlockElement::kNBETypes]
 
ElementRanges ranges_
 
bool useHO_
 

Friends

std::ostream & operator<< (std::ostream &, const PFBlockAlgo &)
 

Detailed Description

Particle Flow Algorithm.

Author
Colin Bernet (rewrite/refactor by L. Gray)
Date
January 2006 (April 2014)

Definition at line 34 of file PFBlockAlgo.h.

Member Typedef Documentation

typedef std::vector<std::unique_ptr<reco::PFBlockElement> > PFBlockAlgo::ElementList

Definition at line 37 of file PFBlockAlgo.h.

typedef std::array<std::pair<unsigned int, unsigned int>, reco::PFBlockElement::kNBETypes> PFBlockAlgo::ElementRanges

Definition at line 39 of file PFBlockAlgo.h.

Constructor & Destructor Documentation

PFBlockAlgo::PFBlockAlgo ( )

Definition at line 69 of file PFBlockAlgo.cc.

References ECAL, HCAL, hcaldqm::constants::HO, and INIT_ENTRY.

70  : debug_(false),
71  elementTypes_({INIT_ENTRY(PFBlockElement::TRACK),
72  INIT_ENTRY(PFBlockElement::PS1),
73  INIT_ENTRY(PFBlockElement::PS2),
76  INIT_ENTRY(PFBlockElement::GSF),
77  INIT_ENTRY(PFBlockElement::BREM),
78  INIT_ENTRY(PFBlockElement::HFEM),
79  INIT_ENTRY(PFBlockElement::HFHAD),
80  INIT_ENTRY(PFBlockElement::SC),
82  INIT_ENTRY(PFBlockElement::HGCAL)}) {}
#define INIT_ENTRY(name)
Definition: PFBlockAlgo.cc:17
const std::unordered_map< std::string, reco::PFBlockElement::Type > elementTypes_
Definition: PFBlockAlgo.h:82
bool debug_
if true, debug printouts activated
Definition: PFBlockAlgo.h:75
PFBlockAlgo::~PFBlockAlgo ( )

Member Function Documentation

void PFBlockAlgo::buildElements ( const edm::Event )
reco::PFBlockCollection PFBlockAlgo::findBlocks ( )

build blocks

Referenced by PFBlockProducer::produce().

void PFBlockAlgo::link ( const reco::PFBlockElement el1,
const reco::PFBlockElement el2,
double &  dist 
) const
inlineprivate

check whether 2 elements are linked. Returns distance

void PFBlockAlgo::packLinks ( reco::PFBlock block,
const std::unordered_map< std::pair< unsigned int, unsigned int >, double > &  links 
) const
private

compute missing links in the blocks (the recursive procedure does not build all links)

void PFBlockAlgo::setDebug ( bool  debug)
inline

sets debug printout flag

Definition at line 59 of file PFBlockAlgo.h.

References debug, and debug_.

Referenced by PFBlockProducer::PFBlockProducer().

59 { debug_ = debug; }
#define debug
Definition: HDRShower.cc:19
bool debug_
if true, debug printouts activated
Definition: PFBlockAlgo.h:75
void PFBlockAlgo::setImporters ( const std::vector< edm::ParameterSet > &  ,
edm::ConsumesCollector  
)
void PFBlockAlgo::setLinkers ( const std::vector< edm::ParameterSet > &  )
void PFBlockAlgo::updateEventSetup ( const edm::EventSetup )

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const PFBlockAlgo  
)
friend

Member Data Documentation

bool PFBlockAlgo::debug_
private

if true, debug printouts activated

Definition at line 75 of file PFBlockAlgo.h.

Referenced by setDebug().

ElementList PFBlockAlgo::elements_
private

Definition at line 71 of file PFBlockAlgo.h.

const std::unordered_map<std::string, reco::PFBlockElement::Type> PFBlockAlgo::elementTypes_
private

Definition at line 82 of file PFBlockAlgo.h.

std::vector<std::unique_ptr<BlockElementImporterBase> > PFBlockAlgo::importers_
private

Definition at line 80 of file PFBlockAlgo.h.

std::vector<std::unique_ptr<KDTreeLinkerBase> > PFBlockAlgo::kdtrees_
private

Definition at line 86 of file PFBlockAlgo.h.

std::vector<std::unique_ptr<BlockElementLinkerBase> > PFBlockAlgo::linkTests_
private

Definition at line 83 of file PFBlockAlgo.h.

unsigned int PFBlockAlgo::linkTestSquare_[reco::PFBlockElement::kNBETypes][reco::PFBlockElement::kNBETypes]
private

Definition at line 84 of file PFBlockAlgo.h.

ElementRanges PFBlockAlgo::ranges_
private

Definition at line 72 of file PFBlockAlgo.h.

bool PFBlockAlgo::useHO_
private

Definition at line 78 of file PFBlockAlgo.h.