test
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 std::array< std::pair
< unsigned int, unsigned int >
, reco::PFBlockElement::kNBETypes
ElementRanges
 
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

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< unsigned int, unsigned int >, 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
 
unsigned int _linkTestSquare [reco::PFBlockElement::kNBETypes][reco::PFBlockElement::kNBETypes]
 
std::vector
< ElementList::value_type::pointer > 
bare_elements_
 
std::auto_ptr
< reco::PFBlockCollection
blocks_
 
std::auto_ptr
< reco::PFBlockCollection
blocksNew_
 
bool debug_
 if true, debug printouts activated More...
 
ElementList elements_
 
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 91 of file PFBlockAlgo.h.

Member Typedef Documentation

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

Definition at line 95 of file PFBlockAlgo.h.

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

Definition at line 104 of file PFBlockAlgo.h.

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

Definition at line 102 of file PFBlockAlgo.h.

typedef ElementList::iterator PFBlockAlgo::IE

define these in *Fwd files in DataFormats/ParticleFlowReco?

Definition at line 100 of file PFBlockAlgo.h.

typedef ElementList::const_iterator PFBlockAlgo::IEC

Definition at line 101 of file PFBlockAlgo.h.

Definition at line 96 of file PFBlockAlgo.h.

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

Definition at line 98 of file PFBlockAlgo.h.

Definition at line 97 of file PFBlockAlgo.h.

Constructor & Destructor Documentation

PFBlockAlgo::PFBlockAlgo ( )

Definition at line 67 of file PFBlockAlgo.cc.

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

67  :
69  debug_(false),
70  _elementTypes( {
71  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  } ) {}
const std::unordered_map< std::string, reco::PFBlockElement::Type > _elementTypes
Definition: PFBlockAlgo.h:172
std::auto_ptr< reco::PFBlockCollection > blocks_
Definition: PFBlockAlgo.h:156
#define INIT_ENTRY(name)
Definition: PFBlockAlgo.cc:17
std::vector< PFBlock > PFBlockCollection
collection of PFBlock objects
Definition: PFBlockFwd.h:11
bool debug_
if true, debug printouts activated
Definition: PFBlockAlgo.h:164
PFBlockAlgo::~PFBlockAlgo ( )

Member Function Documentation

const std::auto_ptr< reco::PFBlockCollection >& PFBlockAlgo::blocks ( ) const
inline
Returns
collection of blocks

Definition at line 129 of file PFBlockAlgo.h.

References blocks_.

130  {return blocks_;}
std::auto_ptr< reco::PFBlockCollection > blocks_
Definition: PFBlockAlgo.h:156
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< unsigned int, unsigned int >, 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 125 of file PFBlockAlgo.h.

References debug, and debug_.

125 {debug_ = debug;}
#define debug
Definition: HDRShower.cc:19
bool debug_
if true, debug printouts activated
Definition: PFBlockAlgo.h:164
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 133 of file PFBlockAlgo.h.

References blocks_.

133 {return blocks_;}
std::auto_ptr< reco::PFBlockCollection > blocks_
Definition: PFBlockAlgo.h:156
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 172 of file PFBlockAlgo.h.

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

Definition at line 169 of file PFBlockAlgo.h.

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

Definition at line 176 of file PFBlockAlgo.h.

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

Definition at line 173 of file PFBlockAlgo.h.

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

Definition at line 174 of file PFBlockAlgo.h.

std::vector<ElementList::value_type::pointer> PFBlockAlgo::bare_elements_
private

Definition at line 160 of file PFBlockAlgo.h.

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

Definition at line 156 of file PFBlockAlgo.h.

Referenced by blocks(), and transferBlocks().

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

Definition at line 155 of file PFBlockAlgo.h.

bool PFBlockAlgo::debug_
private

if true, debug printouts activated

Definition at line 164 of file PFBlockAlgo.h.

Referenced by setDebug().

ElementList PFBlockAlgo::elements_
private

Definition at line 159 of file PFBlockAlgo.h.

ElementRanges PFBlockAlgo::ranges_
private

Definition at line 161 of file PFBlockAlgo.h.

bool PFBlockAlgo::useHO_
private

Definition at line 167 of file PFBlockAlgo.h.