Block of elements. More...
#include <PFBlock.h>
Classes | |
struct | Link |
Public Types | |
typedef edm::OwnVector< reco::PFBlockElement >::const_iterator | IE |
typedef std::map< unsigned int, Link > | LinkData |
enum | LinkTest { LINKTEST_RECHIT, LINKTEST_NLINKTEST, LINKTEST_ALL } |
Public Member Functions | |
void | addElement (reco::PFBlockElement *element) |
void | associatedElements (unsigned i, const LinkData &linkData, std::multimap< double, unsigned > &sortedAssociates, reco::PFBlockElement::Type type=PFBlockElement::NONE, LinkTest test=LINKTEST_RECHIT) const |
void | bookLinkData () |
double | dist (unsigned ie1, unsigned ie2, const LinkData &linkData, LinkTest test) const |
double | dist (unsigned ie1, unsigned ie2, const LinkData &linkData) const |
const edm::OwnVector< reco::PFBlockElement > & | elements () const |
const LinkData & | linkData () const |
LinkData & | linkData () |
bool | matrix2vector (unsigned i, unsigned j, unsigned &index) const |
PFBlock () | |
void | setLink (unsigned i1, unsigned i2, double dist, LinkData &linkData, LinkTest test=LINKTEST_RECHIT) const |
Private Member Functions | |
unsigned | linkDataSize () const |
Private Attributes | |
edm::OwnVector< reco::PFBlockElement > | elements_ |
all elements More... | |
LinkData | linkData_ |
link data (permanent) More... | |
Block of elements.
A PFBlock is:
typedef edm::OwnVector<reco::PFBlockElement>::const_iterator reco::PFBlock::IE |
typedef std::map<unsigned int, Link> reco::PFBlock::LinkData |
Enumerator | |
---|---|
LINKTEST_RECHIT | |
LINKTEST_NLINKTEST | |
LINKTEST_ALL |
|
inline |
Definition at line 43 of file PFBlock.h.
References addElement(), associatedElements(), bookLinkData(), dist(), mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, dqmiolumiharvest::j, linkData(), LINKTEST_RECHIT, matrix2vector(), reco::PFBlockElement::NONE, and setLink().
void PFBlock::addElement | ( | reco::PFBlockElement * | element | ) |
add an element to the current PFBlock the block will keep a copy.
Definition at line 11 of file PFBlock.cc.
References reco::PFBlockElement::clone(), reco::PFBlockElement::lock(), and reco::PFBlockElement::setIndex().
Referenced by PFBlock().
void PFBlock::associatedElements | ( | unsigned | i, |
const LinkData & | linkData, | ||
std::multimap< double, unsigned > & | sortedAssociates, | ||
reco::PFBlockElement::Type | type = PFBlockElement::NONE , |
||
LinkTest | test = LINKTEST_RECHIT |
||
) | const |
lock an element ( unlink it from the others ) Colin: this function is misleading void lock(unsigned i, LinkData& linkData ) const; fills a map with the elements associated to element i. elements are sorted by increasing distance. if specified, only the elements of type "type" will be considered if specified, only the link calculated from a certain "test" will be considered: distance test, etc..
Definition at line 60 of file PFBlock.cc.
References NONE, and ctpps_dqm_sourceclient-live_cfg::test.
Referenced by PFAlgo::associatePSClusters(), PFAlgo::createCandidatesHCAL(), PFAlgo::createCandidatesHCALUnlinked(), PFAlgo::createCandidatesHF(), PFAlgo::elementLoop(), PFEGammaAlgo::evaluateSingleLegMVA(), PFEGammaFilters::isElectronSafeForJetMET(), PFBlock(), PFAlgo::recoTracksNotHCAL(), and PFAlgo::relinkTrackToHcal().
void PFBlock::bookLinkData | ( | ) |
Definition at line 17 of file PFBlock.cc.
Referenced by PFBlockAlgo::packLinks(), and PFBlock().
|
inline |
Definition at line 77 of file PFBlock.h.
Referenced by PFAlgo::createCandidatesHCAL(), PFAlgo::createCandidatesHF(), PFAlgo::elementLoop(), and PFBlock().
double PFBlock::dist | ( | unsigned | ie1, |
unsigned | ie2, | ||
const LinkData & | linkData | ||
) | const |
Definition at line 122 of file PFBlock.cc.
|
inline |
Definition at line 85 of file PFBlock.h.
References elements_.
Referenced by FWPFBlockProxyBuilder::buildViewType(), PFEGammaAlgo::evaluateSingleLegMVA(), PFEGammaFilters::isElectronSafeForJetMET(), PFEGammaFilters::isPhotonSafeForJetMET(), reco::tau::RecoTauElectronRejectionPlugin::operator()(), PFBlockAlgo::packLinks(), and PFAlgo::reconstructParticles().
|
inline |
Definition at line 88 of file PFBlock.h.
References linkData_.
Referenced by PFEGammaAlgo::evaluateSingleLegMVA(), PFEGammaFilters::isElectronSafeForJetMET(), PFBlockAlgo::packLinks(), and PFBlock().
|
inline |
|
private |
Definition at line 323 of file PFBlock.cc.
References dqmiodumpmetadata::n.
Referenced by linkData().
bool PFBlock::matrix2vector | ( | unsigned | i, |
unsigned | j, | ||
unsigned & | index | ||
) | const |
makes the correspondance between a 2d element matrix and the 1D vector which is the most compact way to store the matrix
Definition at line 102 of file PFBlock.cc.
References combine::missing, findQualityFiles::size, and std::swap().
Referenced by PFBlock().
void PFBlock::setLink | ( | unsigned | i1, |
unsigned | i2, | ||
double | dist, | ||
LinkData & | linkData, | ||
LinkTest | test = LINKTEST_RECHIT |
||
) | const |
set a link between elements of indices i1 and i2, of "distance" dist the link is set in the linkData vector provided as an argument. As indicated by the 'const' statement, 'this' is not modified.
Definition at line 19 of file PFBlock.cc.
References reco::PFBlock::Link::distance, cmsLHEtoEOSManager::l, convertSQLiteXML::ok, ctpps_dqm_sourceclient-live_cfg::test, and reco::PFBlock::Link::test.
Referenced by PFAlgo::elementLoop(), PFBlockAlgo::packLinks(), PFBlock(), and PFAlgo::relinkTrackToHcal().
|
private |
|
private |