CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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
reco::PFBlockCollection::const_iterator 
IBC
 
typedef ElementList::iterator IE
 define these in *Fwd files in DataFormats/ParticleFlowReco? More...
 
typedef ElementList::const_iterator IEC
 
typedef std::unique_ptr
< BlockElementImporterBase
ImporterPtr
 
typedef std::unique_ptr
< KDTreeLinkerBase
KDTreePtr
 
typedef std::unique_ptr
< BlockElementLinkerBase
LinkTestPtr
 

Public Member Functions

const std::auto_ptr
< reco::PFBlockCollection > & 
blocks () const
 
void buildElements (const edm::Event &)
 
void 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 > &)
 
std::auto_ptr
< reco::PFBlockCollection
transferBlocks ()
 
void updateEventSetup (const edm::EventSetup &)
 
 ~PFBlockAlgo ()
 

Private Member Functions

IE associate (ElementList &elems, std::unordered_map< std::pair< size_t, size_t >, PFBlockLink > &links, reco::PFBlock &)
 
void link (const reco::PFBlockElement *el1, const reco::PFBlockElement *el2, PFBlockLink::Type &linktype, reco::PFBlock::LinkTest &linktest, double &dist) const
 check whether 2 elements are linked. Returns distance and linktype More...
 
bool linkPrefilter (const reco::PFBlockElement *last, const reco::PFBlockElement *next) const
 Avoid to check links when not useful. More...
 
void packLinks (reco::PFBlock &block, const std::unordered_map< std::pair< size_t, size_t >, PFBlockLink > &links) const
 

Private Attributes

const std::unordered_map
< std::string,
reco::PFBlockElement::Type
_elementTypes
 
std::vector< ImporterPtr_importers
 
std::vector< KDTreePtr_kdtrees
 
std::vector< LinkTestPtr_linkTests
 
std::auto_ptr
< reco::PFBlockCollection
blocks_
 
bool debug_
 if true, debug printouts activated More...
 
ElementList elements_
 
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 90 of file PFBlockAlgo.h.

Member Typedef Documentation

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

Definition at line 94 of file PFBlockAlgo.h.

typedef reco::PFBlockCollection::const_iterator PFBlockAlgo::IBC

Definition at line 101 of file PFBlockAlgo.h.

typedef ElementList::iterator PFBlockAlgo::IE

define these in *Fwd files in DataFormats/ParticleFlowReco?

Definition at line 99 of file PFBlockAlgo.h.

typedef ElementList::const_iterator PFBlockAlgo::IEC

Definition at line 100 of file PFBlockAlgo.h.

Definition at line 95 of file PFBlockAlgo.h.

typedef std::unique_ptr<KDTreeLinkerBase> PFBlockAlgo::KDTreePtr

Definition at line 97 of file PFBlockAlgo.h.

Definition at line 96 of file PFBlockAlgo.h.

Constructor & Destructor Documentation

PFBlockAlgo::PFBlockAlgo ( )

Definition at line 21 of file PFBlockAlgo.cc.

References ECAL, HCAL, and INIT_ENTRY.

21  :
23  debug_(false),
24  _elementTypes( {
25  INIT_ENTRY(PFBlockElement::TRACK),
26  INIT_ENTRY(PFBlockElement::PS1),
27  INIT_ENTRY(PFBlockElement::PS2),
30  INIT_ENTRY(PFBlockElement::GSF),
31  INIT_ENTRY(PFBlockElement::BREM),
32  INIT_ENTRY(PFBlockElement::HFEM),
33  INIT_ENTRY(PFBlockElement::HFHAD),
34  INIT_ENTRY(PFBlockElement::SC),
35  INIT_ENTRY(PFBlockElement::HO)
36  } ) {}
const std::unordered_map< std::string, reco::PFBlockElement::Type > _elementTypes
Definition: PFBlockAlgo.h:171
std::auto_ptr< reco::PFBlockCollection > blocks_
Definition: PFBlockAlgo.h:157
#define INIT_ENTRY(name)
Definition: PFBlockAlgo.cc:16
std::vector< PFBlock > PFBlockCollection
collection of PFBlock objects
Definition: PFBlockFwd.h:11
bool debug_
if true, debug printouts activated
Definition: PFBlockAlgo.h:163
PFBlockAlgo::~PFBlockAlgo ( )

Member Function Documentation

IE PFBlockAlgo::associate ( ElementList elems,
std::unordered_map< std::pair< size_t, size_t >, PFBlockLink > &  links,
reco::PFBlock  
)
private
const std::auto_ptr< reco::PFBlockCollection >& PFBlockAlgo::blocks ( ) const
inline
Returns
collection of blocks

Definition at line 126 of file PFBlockAlgo.h.

References blocks_.

127  {return blocks_;}
std::auto_ptr< reco::PFBlockCollection > blocks_
Definition: PFBlockAlgo.h:157
void PFBlockAlgo::buildElements ( const edm::Event )
void PFBlockAlgo::findBlocks ( )

build blocks

void PFBlockAlgo::link ( const reco::PFBlockElement el1,
const reco::PFBlockElement el2,
PFBlockLink::Type linktype,
reco::PFBlock::LinkTest linktest,
double &  dist 
) const
inlineprivate

check whether 2 elements are linked. Returns distance and linktype

bool PFBlockAlgo::linkPrefilter ( const reco::PFBlockElement last,
const reco::PFBlockElement next 
) const
inlineprivate

Avoid to check links when not useful.

void PFBlockAlgo::packLinks ( reco::PFBlock block,
const std::unordered_map< std::pair< size_t, size_t >, PFBlockLink > &  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 122 of file PFBlockAlgo.h.

References debug, and debug_.

122 {debug_ = debug;}
#define debug
Definition: HDRShower.cc:19
bool debug_
if true, debug printouts activated
Definition: PFBlockAlgo.h:163
void PFBlockAlgo::setImporters ( const std::vector< edm::ParameterSet > &  ,
edm::ConsumesCollector  
)
void PFBlockAlgo::setLinkers ( const std::vector< edm::ParameterSet > &  )
std::auto_ptr< reco::PFBlockCollection > PFBlockAlgo::transferBlocks ( )
inline
Returns
auto_ptr to collection of blocks

Definition at line 130 of file PFBlockAlgo.h.

References blocks_.

130 {return blocks_;}
std::auto_ptr< reco::PFBlockCollection > blocks_
Definition: PFBlockAlgo.h:157
void PFBlockAlgo::updateEventSetup ( const edm::EventSetup )

Friends And Related Function Documentation

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

Member Data Documentation

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

Definition at line 171 of file PFBlockAlgo.h.

std::vector<ImporterPtr> PFBlockAlgo::_importers
private

Definition at line 168 of file PFBlockAlgo.h.

std::vector<KDTreePtr> PFBlockAlgo::_kdtrees
private

Definition at line 174 of file PFBlockAlgo.h.

std::vector<LinkTestPtr> PFBlockAlgo::_linkTests
private

Definition at line 172 of file PFBlockAlgo.h.

std::auto_ptr< reco::PFBlockCollection > PFBlockAlgo::blocks_
private

Definition at line 157 of file PFBlockAlgo.h.

Referenced by blocks(), and transferBlocks().

bool PFBlockAlgo::debug_
private

if true, debug printouts activated

Definition at line 163 of file PFBlockAlgo.h.

Referenced by setDebug().

ElementList PFBlockAlgo::elements_
private

Definition at line 160 of file PFBlockAlgo.h.

bool PFBlockAlgo::useHO_
private

Definition at line 166 of file PFBlockAlgo.h.