Particle Flow Algorithm. More...
#include <PFBlockAlgo.h>
Public Types | |
typedef reco::PFBlockCollection::const_iterator | IBC |
typedef std::list < reco::PFBlockElement * > ::iterator | IE |
define these in *Fwd files in DataFormats/ParticleFlowReco? More... | |
typedef std::list < reco::PFBlockElement * > ::const_iterator | IEC |
typedef std::vector< bool > | Mask |
Public Member Functions | |
const std::auto_ptr < reco::PFBlockCollection > & | blocks () const |
void | findBlocks () |
build blocks More... | |
PFBlockAlgo () | |
void | setDebug (bool debug) |
sets debug printout flag More... | |
template<template< typename > class T> | |
void | setInput (const T< reco::PFRecTrackCollection > &trackh, const T< reco::GsfPFRecTrackCollection > &gsftrackh, const T< reco::GsfPFRecTrackCollection > &convbremgsftrackh, const T< reco::MuonCollection > &muonh, const T< reco::PFDisplacedTrackerVertexCollection > &nuclearh, const T< reco::PFRecTrackCollection > &nucleartrackh, const T< reco::PFConversionCollection > &conv, const T< reco::PFV0Collection > &v0, const T< reco::PFClusterCollection > &ecalh, const T< reco::PFClusterCollection > &hcalh, const T< reco::PFClusterCollection > &hfemh, const T< reco::PFClusterCollection > &hfhadh, const T< reco::PFClusterCollection > &psh, const T< reco::PhotonCollection > &egphh, const Mask &trackMask=dummyMask_, const Mask &gsftrackMask=dummyMask_, const Mask &ecalMask=dummyMask_, const Mask &hcalMask=dummyMask_, const Mask &hfemMask=dummyMask_, const Mask &hfhadMask=dummyMask_, const Mask &psMask=dummyMask_, const Mask &phMask=dummyMask_) |
set input collections of tracks and clusters More... | |
template<template< typename > class T> | |
void | setInput (const T< reco::PFRecTrackCollection > &trackh, const T< reco::MuonCollection > &muonh, const T< reco::PFClusterCollection > &ecalh, const T< reco::PFClusterCollection > &hcalh, const T< reco::PFClusterCollection > &hfemh, const T< reco::PFClusterCollection > &hfhadh, const T< reco::PFClusterCollection > &psh, const Mask &trackMask=dummyMask_, const Mask &ecalMask=dummyMask_, const Mask &hcalMask=dummyMask_, const Mask &psMask=dummyMask_) |
COLIN: I think this is for particle flow at HLT... More... | |
template<template< typename > class T> | |
void | setInput (const T< reco::PFRecTrackCollection > &trackh, const T< reco::GsfPFRecTrackCollection > &gsftrackh, const T< reco::PFClusterCollection > &ecalh, const T< reco::PFClusterCollection > &hcalh, const T< reco::PFClusterCollection > &psh, const Mask &trackMask=dummyMask_, const Mask &gsftrackMask=dummyMask_, const Mask &ecalMask=dummyMask_, const Mask &hcalMask=dummyMask_, const Mask &psMask=dummyMask_) |
COLIN: what is this setinput function for? can it be removed? More... | |
void | setParameters (std::vector< double > &DPtovPtCut, std::vector< unsigned > &NHitCut, bool useConvBremPFRecTracks, bool useIterTracking, int nuclearInteractionsPurity, bool useEGPhotons, std::vector< double > &photonSelectionCuts) |
std::auto_ptr < reco::PFBlockCollection > | transferBlocks () |
~PFBlockAlgo () | |
Private Member Functions | |
IE | associate (IE next, IE last, std::vector< PFBlockLink > &links) |
void | buildGraph () |
void | checkDisplacedVertexLinks (reco::PFBlock &block) const |
remove extra links between primary track and clusters More... | |
void | checkMaskSize (const reco::PFRecTrackCollection &tracks, const reco::GsfPFRecTrackCollection &gsftracks, const reco::PFClusterCollection &ecals, const reco::PFClusterCollection &hcals, const reco::PFClusterCollection &hfems, const reco::PFClusterCollection &hfhads, const reco::PFClusterCollection &pss, const reco::PhotonCollection &egphh, const Mask &trackMask, const Mask &gsftrackMask, const Mask &ecalMask, const Mask &hcalMask, const Mask &hfemMask, const Mask &hfhadMask, const Mask &psMask, const Mask &phMask) const |
void | fillFromPhoton (const reco::Photon &photon, reco::PFBlockElementSuperCluster *pfbe) |
bool | goodPtResolution (const reco::TrackRef &trackref) |
open a resolution map More... | |
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... | |
int | muAssocToTrack (const reco::TrackRef &trackref, const edm::Handle< reco::MuonCollection > &muonh) const |
int | muAssocToTrack (const reco::TrackRef &trackref, const edm::OrphanHandle< reco::MuonCollection > &muonh) const |
void | packLinks (reco::PFBlock &block, const std::vector< PFBlockLink > &links) const |
double | testECALAndHCAL (const reco::PFCluster &ecal, const reco::PFCluster &hcal) const |
double | testLinkBySuperCluster (const reco::PFClusterRef &elt1, const reco::PFClusterRef &elt2) const |
test association by Supercluster between two ECAL More... | |
double | testLinkByVertex (const reco::PFBlockElement *elt1, const reco::PFBlockElement *elt2) const |
double | testPS1AndPS2 (const reco::PFCluster &ps1, const reco::PFCluster &ps2) const |
double | testSuperClusterPFCluster (const reco::SuperClusterRef &sct1, const reco::PFClusterRef &elt2) const |
test association between SuperClusters and ECAL More... | |
double | testTrackAndPS (const reco::PFRecTrack &track, const reco::PFCluster &ps) const |
Private Attributes | |
std::auto_ptr < reco::PFBlockCollection > | blocks_ |
bool | debug_ |
if true, debug printouts activated More... | |
std::vector< double > | DPtovPtCut_ |
DPt/Pt cut for creating atrack element. More... | |
std::list< reco::PFBlockElement * > | elements_ |
actually, particles will be created by a separate producer More... | |
std::vector< unsigned > | NHitCut_ |
Number of layers crossed cut for creating atrack element. More... | |
int | nuclearInteractionsPurity_ |
std::vector< int > | pfcSCVec_ |
SC corresponding to the PF cluster. More... | |
const PhotonSelectorAlgo * | photonSelector_ |
PhotonSelector. More... | |
std::vector< std::vector < reco::PFClusterRef > > | scpfcRefs_ |
PF clusters corresponding to a given SC. More... | |
std::vector < reco::SuperClusterRef > | superClusters_ |
list of superclusters More... | |
bool | useConvBremPFRecTracks_ |
switch on/off Conversions Brem Recovery with KF Tracks More... | |
bool | useEGPhotons_ |
Flag to turn off the import of EG Photons. More... | |
bool | useIterTracking_ |
Flag to turn off quality cuts which require iterative tracking (for heavy-ions) More... | |
Static Private Attributes | |
static const Mask | dummyMask_ |
Friends | |
std::ostream & | operator<< (std::ostream &, const PFBlockAlgo &) |
typedef reco::PFBlockCollection::const_iterator PFBlockAlgo::IBC |
Definition at line 177 of file PFBlockAlgo.h.
typedef std::list< reco::PFBlockElement* >::iterator PFBlockAlgo::IE |
define these in *Fwd files in DataFormats/ParticleFlowReco?
Definition at line 175 of file PFBlockAlgo.h.
typedef std::list< reco::PFBlockElement* >::const_iterator PFBlockAlgo::IEC |
Definition at line 176 of file PFBlockAlgo.h.
typedef std::vector<bool> PFBlockAlgo::Mask |
Definition at line 82 of file PFBlockAlgo.h.
PFBlockAlgo::PFBlockAlgo | ( | ) |
Definition at line 21 of file PFBlockAlgo.cc.
PFBlockAlgo::~PFBlockAlgo | ( | ) |
Definition at line 54 of file PFBlockAlgo.cc.
References gather_cfg::cout, debug_, elements_, and photonSelector_.
|
private |
recursive procedure which adds elements from elements_ to the current block, ie blocks_->back(). the resulting links between elements are stored in links, not in the block. afterwards, packLinks( reco::PFBlock& block, const vector<PFBlockLink>& links) has to be called in order to pack the link information in the block.
Definition at line 103 of file PFBlockAlgo.cc.
References blocks_, gather_cfg::cout, debug_, elements_, link(), and PFBlockLink::NONE.
Referenced by findBlocks().
|
inline |
Definition at line 168 of file PFBlockAlgo.h.
References blocks_.
Referenced by operator<<().
|
private |
COLIN: not used. Could be removed. Could also be implemented, to produce a graph of a block, Showing the connections between the elements
Definition at line 284 of file PFBlockAlgo.cc.
|
private |
remove extra links between primary track and clusters
Definition at line 1156 of file PFBlockAlgo.cc.
References reco::PFBlock::associatedElements(), reco::PFBlock::elements(), asciidump::els, reco::PFBlock::linkData(), reco::PFBlock::LINKTEST_ALL, reco::PFBlock::setLink(), edm::OwnVector< T, P >::size(), and reco::PFBlockElement::TRACK.
|
private |
checks size of the masks with respect to the vectors they refer to. throws std::length_error if one of the masks has the wrong size
Definition at line 928 of file PFBlockAlgo.cc.
Referenced by setInput().
|
private |
Definition at line 1186 of file PFBlockAlgo.cc.
References reco::Photon::ecalRecHitSumEtConeDR04(), reco::Photon::hadronicOverEm(), reco::Photon::hcalTowerSumEtConeDR04(), reco::PFBlockElementSuperCluster::setEcalIso(), reco::PFBlockElementSuperCluster::setFromPhoton(), reco::PFBlockElementSuperCluster::setHcalIso(), reco::PFBlockElementSuperCluster::setHoE(), reco::PFBlockElementSuperCluster::setTrackIso(), and reco::Photon::trkSumPtHollowConeDR04().
Referenced by setInput().
void PFBlockAlgo::findBlocks | ( | ) |
build blocks
Definition at line 66 of file PFBlockAlgo.cc.
References associate(), blocks_, gather_cfg::cout, debug_, elements_, and packLinks().
Referenced by PFRootEventManager::particleFlow().
|
private |
open a resolution map
check the Pt resolution
Definition at line 1048 of file PFBlockAlgo.cc.
References gather_cfg::cout, debug_, DPtovPtCut_, NHitCut_, P, reco::tau::disc::Pt(), mathSSE::sqrt(), and useIterTracking_.
Referenced by setInput().
|
private |
check whether 2 elements are linked. Returns distance and linktype
Definition at line 291 of file PFBlockAlgo.cc.
References reco::PFBlockElement::clusterRef(), gather_cfg::cout, debug_, ECAL, PFBlockLink::ECALandBREM, PFBlockLink::ECALandECAL, PFBlockLink::ECALandGSF, PFBlockLink::ECALandHCAL, PFBlockLink::GSFandBREM, PFBlockLink::GSFandGSF, reco::PFBlockElementBrem::GsftrackRefPF(), reco::PFBlockElementGsfTrack::GsftrackRefPF(), PFBlockLink::HCALandBREM, PFBlockLink::HCALandGSF, PFBlockLink::HFEMandHFHAD, reco::PFBlockElement::isLinkedToDisplacedVertex(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::isNull(), PFBlockLink::PS1andBREM, PFBlockLink::PS1andECAL, PFBlockLink::PS1andGSF, PFBlockLink::PS1andPS2, PFBlockLink::PS2andBREM, PFBlockLink::PS2andECAL, PFBlockLink::PS2andGSF, PFBlockLink::SCandECAL, reco::PFBlockElement::T_FROM_GAMMACONV, LinkByRecHit::testECALAndPSByRecHit(), LinkByRecHit::testHFEMAndHFHADByRecHit(), testLinkBySuperCluster(), testLinkByVertex(), testSuperClusterPFCluster(), LinkByRecHit::testTrackAndClusterByRecHit(), testTrackAndPS(), PFBlockLink::TRACKandECAL, PFBlockLink::TRACKandGSF, PFBlockLink::TRACKandHCAL, PFBlockLink::TRACKandPS1, PFBlockLink::TRACKandPS2, PFBlockLink::TRACKandTRACK, reco::PFBlockElement::trackRefPF(), reco::PFBlockElementGsfTrack::trackType(), reco::PFBlockElement::trackType(), reco::PFBlockElement::type(), and useConvBremPFRecTracks_.
Referenced by associate(), and packLinks().
|
private |
Definition at line 1129 of file PFBlockAlgo.cc.
References edm::Ref< C, T, F >::isNonnull(), edm::HandleBase::isValid(), and j.
Referenced by setInput().
|
private |
Definition at line 1142 of file PFBlockAlgo.cc.
References edm::Ref< C, T, F >::isNonnull(), edm::OrphanHandleBase::isValid(), and j.
|
private |
compute missing links in the blocks (the recursive procedure does not build all links)
Definition at line 211 of file PFBlockAlgo.cc.
References reco::PFBlock::bookLinkData(), gather_cfg::cout, debug_, reco::PFBlock::elements(), asciidump::els, link(), reco::PFBlock::linkData(), PFBlockLink::NONE, reco::PFBlock::setLink(), and edm::OwnVector< T, P >::size().
Referenced by findBlocks().
|
inline |
sets debug printout flag
Definition at line 160 of file PFBlockAlgo.h.
Referenced by PFRootEventManager::readOptions().
void PFBlockAlgo::setInput | ( | const T< reco::PFRecTrackCollection > & | trackh, |
const T< reco::GsfPFRecTrackCollection > & | gsftrackh, | ||
const T< reco::GsfPFRecTrackCollection > & | convbremgsftrackh, | ||
const T< reco::MuonCollection > & | muonh, | ||
const T< reco::PFDisplacedTrackerVertexCollection > & | nuclearh, | ||
const T< reco::PFRecTrackCollection > & | nucleartrackh, | ||
const T< reco::PFConversionCollection > & | conv, | ||
const T< reco::PFV0Collection > & | v0, | ||
const T< reco::PFClusterCollection > & | ecalh, | ||
const T< reco::PFClusterCollection > & | hcalh, | ||
const T< reco::PFClusterCollection > & | hfemh, | ||
const T< reco::PFClusterCollection > & | hfhadh, | ||
const T< reco::PFClusterCollection > & | psh, | ||
const T< reco::PhotonCollection > & | egphh, | ||
const Mask & | trackMask = dummyMask_ , |
||
const Mask & | gsftrackMask = dummyMask_ , |
||
const Mask & | ecalMask = dummyMask_ , |
||
const Mask & | hcalMask = dummyMask_ , |
||
const Mask & | hfemMask = dummyMask_ , |
||
const Mask & | hfhadMask = dummyMask_ , |
||
const Mask & | psMask = dummyMask_ , |
||
const Mask & | phMask = dummyMask_ |
||
) |
set input collections of tracks and clusters
–———— GSF Primary tracks and brems ———————
get tracks from converted brems
Loop over the photons
–———— conversions ———————
The tracks from conversions are filled into the elements collection
–———— V0 ———————
The tracks from V0 are filled into the elements collection
One need to cross check if those tracks was not already filled from the conversion collection
This is a new track not yet included into the elements collection
–———— Displaced Vertices ———————
The tracks from Displaced Vertices are filled into the elements collection
One need to cross check if those tracks was not already filled from the conversion or V0 collections
This is a new track not yet included into the elements collection
Fill the displaced vertex ref
--------—— Tracks ---------------——
Mask the tracks in trackh collection already included from Conversions V0 and Displaced Vertices. Take care that all those collections come from the same "generalTracks" collection.
Definition at line 328 of file PFBlockAlgo.h.
References checkMaskSize(), ClusterClusterMapping::checkOverlap(), gather_cfg::cout, debug_, reco::PFBlockElement::DEFAULT, reco::PFBlockElement::ECAL, elements_, fillFromPhoton(), spr::find(), goodPtResolution(), reco::PFBlockElement::HCAL, reco::PFBlockElement::HFEM, reco::PFBlockElement::HFHAD, i, edm::Ref< C, T, F >::isAvailable(), PFMuonAlgo::isLooseMuon(), PFMuonAlgo::isMuon(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), muAssocToTrack(), reco::PFBlockElement::NONE, nuclearInteractionsPurity_, PhotonSelectorAlgo::passPhotonSelection(), pfcSCVec_, photonSelector_, PFLayer::PS1, reco::PFBlockElement::PS1, PFLayer::PS2, reco::PFBlockElement::PS2, scpfcRefs_, reco::PFBlockElement::setConversionRef(), reco::PFBlockElement::setDisplacedVertexRef(), reco::PFBlockElementSuperCluster::setFromGsfElectron(), reco::PFBlockElementSuperCluster::setFromPhoton(), reco::PFBlockElement::setMuonRef(), reco::PFBlockElement::setTrackType(), reco::PFBlockElement::setV0Ref(), findQualityFiles::size, superClusters_, reco::PFBlockElement::T_FROM_DISP, reco::PFBlockElement::T_FROM_GAMMACONV, reco::PFBlockElement::T_FROM_V0, reco::PFBlockElement::T_TO_DISP, useConvBremPFRecTracks_, useEGPhotons_, and relativeConstraints::value.
Referenced by PFRootEventManager::particleFlow().
|
inline |
|
inline |
COLIN: what is this setinput function for? can it be removed?
Definition at line 137 of file PFBlockAlgo.h.
void PFBlockAlgo::setParameters | ( | std::vector< double > & | DPtovPtCut, |
std::vector< unsigned > & | NHitCut, | ||
bool | useConvBremPFRecTracks, | ||
bool | useIterTracking, | ||
int | nuclearInteractionsPurity, | ||
bool | useEGPhotons, | ||
std::vector< double > & | photonSelectionCuts | ||
) |
Definition at line 31 of file PFBlockAlgo.cc.
References DPtovPtCut_, NHitCut_, nuclearInteractionsPurity_, photonSelector_, useConvBremPFRecTracks_, useEGPhotons_, and useIterTracking_.
Referenced by PFRootEventManager::readOptions().
|
private |
tests association between an ECAL and an HCAL cluster
Definition at line 726 of file PFBlockAlgo.cc.
References gather_cfg::cout, debug_, and reco::PFCluster::positionREP().
|
private |
test association by Supercluster between two ECAL
Definition at line 754 of file PFBlockAlgo.cc.
References LinkByRecHit::computeDist(), i, edm::Ref< C, T, F >::key(), pfcSCVec_, and scpfcRefs_.
Referenced by link().
|
private |
Definition at line 869 of file PFBlockAlgo.cc.
References reco::PFBlockElement::convRef(), gather_cfg::cout, debug_, reco::PFBlockElement::displacedVertexRef(), edm::Ref< C, T, F >::isNonnull(), query::result, reco::PFBlockElement::T_FROM_DISP, reco::PFBlockElement::T_FROM_GAMMACONV, reco::PFBlockElement::T_FROM_V0, reco::PFBlockElement::T_TO_DISP, reco::PFBlockElement::trackType(), and reco::PFBlockElement::V0Ref().
Referenced by link().
|
private |
tests association between a PS1 v cluster and a PS2 h cluster returns distance
Definition at line 817 of file PFBlockAlgo.cc.
References gather_cfg::cout, debug_, reco::CaloCluster::position(), and mathSSE::sqrt().
|
private |
test association between SuperClusters and ECAL
Definition at line 795 of file PFBlockAlgo.cc.
References LinkByRecHit::computeDist(), ClusterClusterMapping::overlap(), and muon::overlap().
Referenced by link().
|
private |
tests association between a track and a PS cluster returns distance
Definition at line 662 of file PFBlockAlgo.cc.
References gather_cfg::cout, debug_, reco::PFTrack::extrapolatedPoint(), reco::PFTrajectoryPoint::isValid(), reco::PFCluster::layer(), reco::PFTrajectoryPoint::position(), reco::CaloCluster::position(), PFLayer::PS1, reco::PFTrajectoryPoint::PS1, PFLayer::PS2, reco::PFTrajectoryPoint::PS2, and mathSSE::sqrt().
Referenced by link().
|
inline |
Definition at line 172 of file PFBlockAlgo.h.
References blocks_.
Referenced by PFRootEventManager::particleFlow().
|
friend |
Definition at line 1012 of file PFBlockAlgo.cc.
|
private |
Definition at line 268 of file PFBlockAlgo.h.
Referenced by associate(), blocks(), findBlocks(), and transferBlocks().
|
private |
if true, debug printouts activated
Definition at line 314 of file PFBlockAlgo.h.
Referenced by associate(), findBlocks(), goodPtResolution(), link(), packLinks(), setDebug(), setInput(), testECALAndHCAL(), testLinkByVertex(), testPS1AndPS2(), testTrackAndPS(), and ~PFBlockAlgo().
|
private |
DPt/Pt cut for creating atrack element.
Definition at line 279 of file PFBlockAlgo.h.
Referenced by goodPtResolution(), and setParameters().
|
staticprivate |
Definition at line 276 of file PFBlockAlgo.h.
|
private |
actually, particles will be created by a separate producer
Definition at line 274 of file PFBlockAlgo.h.
Referenced by associate(), findBlocks(), operator<<(), setInput(), and ~PFBlockAlgo().
|
private |
Number of layers crossed cut for creating atrack element.
Definition at line 282 of file PFBlockAlgo.h.
Referenced by goodPtResolution(), and setParameters().
|
private |
Definition at line 297 of file PFBlockAlgo.h.
Referenced by setInput(), and setParameters().
|
private |
SC corresponding to the PF cluster.
Definition at line 309 of file PFBlockAlgo.h.
Referenced by setInput(), and testLinkBySuperCluster().
|
private |
Definition at line 303 of file PFBlockAlgo.h.
Referenced by setInput(), setParameters(), and ~PFBlockAlgo().
|
private |
PF clusters corresponding to a given SC.
Definition at line 312 of file PFBlockAlgo.h.
Referenced by setInput(), and testLinkBySuperCluster().
|
private |
|
private |
switch on/off Conversions Brem Recovery with KF Tracks
Definition at line 300 of file PFBlockAlgo.h.
Referenced by link(), setInput(), and setParameters().
|
private |
Flag to turn off the import of EG Photons.
Definition at line 288 of file PFBlockAlgo.h.
Referenced by setInput(), and setParameters().
|
private |
Flag to turn off quality cuts which require iterative tracking (for heavy-ions)
Definition at line 285 of file PFBlockAlgo.h.
Referenced by goodPtResolution(), and setParameters().