#include <PFAlgo3.h>
Public Member Functions | |
PFAlgo3 (const edm::ParameterSet &) | |
void | runPF (Region &r) const override |
Public Member Functions inherited from l1tpf_impl::PFAlgoBase | |
PFAlgoBase (const edm::ParameterSet &) | |
virtual | ~PFAlgoBase () |
Protected Types | |
enum | BadTrackStatus { BadTK_NoCalo = 1 } |
enum | GoodTrackStatus { GoodTK_Calo_TkPt = 0, GoodTK_Calo_TkCaloPt = 1, GoodTk_Calo_CaloPt = 2, GoodTK_NoCalo = 3 } |
enum | MuMatchMode { MuMatchMode::BoxBestByPtRatio, MuMatchMode::DrBestByPtRatio, MuMatchMode::DrBestByPtDiff } |
enum | TkCaloLinkMetric { TkCaloLinkMetric::BestByDR = 0, TkCaloLinkMetric::BestByDRPt = 1, TkCaloLinkMetric::BestByDR2Pt2 = 2 } |
Protected Member Functions | |
void | calo_relink (Region &r, const std::vector< int > &calo2ntk, const std::vector< float > &calo2sumtkpt, const std::vector< float > &calo2sumtkpterr) const |
try to recover split hadron showers (v1.0): More... | |
void | emcalo_algo (Region &r, const std::vector< int > &em2ntk, const std::vector< float > &em2sumtkpt, const std::vector< float > &em2sumtkpterr) const |
process ecal clusters after linking More... | |
void | emtk_algo (Region &r, const std::vector< int > &tk2em, const std::vector< int > &em2ntk, const std::vector< float > &em2sumtkpterr) const |
promote all flagged tracks to electrons More... | |
void | link_em2calo (Region &r, std::vector< int > &em2calo) const |
match all em to the closest had (can happen in parallel to the above) More... | |
void | link_tk2calo (Region &r, std::vector< int > &tk2calo) const |
track to calo matching More... | |
void | link_tk2em (Region &r, std::vector< int > &tk2em) const |
match all tracks to the closest EM cluster More... | |
void | link_tk2mu (Region &r, std::vector< int > &tk2mu, std::vector< int > &mu2tk) const |
do muon track linking (also sets track.muonLink) More... | |
void | linkedcalo_algo (Region &r, const std::vector< int > &calo2ntk, const std::vector< float > &calo2sumtkpt, const std::vector< float > &calo2sumtkpterr, std::vector< float > &calo2alpha) const |
process matched calo clusters, compare energy to sum track pt, compute track rescaling factor if needed More... | |
void | linkedtk_algo (Region &r, const std::vector< int > &tk2calo, const std::vector< int > &calo2ntk, const std::vector< float > &calo2alpha) const |
process matched tracks, if necessary rescale or average More... | |
void | save_muons (Region &r, const std::vector< int > &tk2mu) const |
save muons in output list More... | |
void | sub_em2calo (Region &r, const std::vector< int > &em2calo) const |
subtract EM component from Calo clusters for all photons and electrons (within tracker coverage) More... | |
void | sum_tk2calo (Region &r, const std::vector< int > &tk2calo, std::vector< int > &calo2ntk, std::vector< float > &calo2sumtkpt, std::vector< float > &calo2sumtkpterr) const |
for each calo, compute the sum of the track pt More... | |
void | sum_tk2em (Region &r, const std::vector< int > &tk2em, std::vector< int > &em2ntk, std::vector< float > &em2sumtkpt, std::vector< float > &em2sumtkpterr) const |
for each EM cluster, count and add up the pt of all the corresponding tracks (skipping muons) More... | |
void | unlinkedcalo_algo (Region &r) const |
process unmatched calo clusters More... | |
void | unlinkedtk_algo (Region &r, const std::vector< int > &tk2calo) const |
promote unlinked low pt tracks to hadrons More... | |
Protected Member Functions inherited from l1tpf_impl::PFAlgoBase | |
PFParticle & | addCaloToPF (Region &r, const CaloCluster &calo) const |
PFParticle & | addCaloToPF (std::vector< PFParticle > &pfs, const CaloCluster &calo) const |
PFParticle & | addTrackToPF (Region &r, const PropagatedTrack &tk) const |
PFParticle & | addTrackToPF (std::vector< PFParticle > &pfs, const PropagatedTrack &tk) const |
void | initRegion (Region &r) const |
Protected Attributes | |
float | caloReLinkDr_ |
bool | caloReLinkStep_ |
float | caloReLinkThreshold_ |
bool | caloTrkWeightedAverage_ |
float | drMatch_ |
float | drMatchEm_ |
float | drMatchEmHad_ |
float | drMatchMu_ |
bool | ecalPriority_ |
bool | emCaloUseAlsoCaloSigma_ |
float | emHadSubtractionPtSlope_ |
float | maxInvisiblePt_ |
enum l1tpf_impl::PFAlgo3::MuMatchMode | muMatchMode_ |
float | ptMatchHigh_ |
float | ptMatchLow_ |
float | ptMinFracMatchEm_ |
bool | rescaleTracks_ |
bool | rescaleUnmatchedTrack_ |
bool | sumTkCaloErr2_ |
float | tightTrackMaxChi2_ |
float | tightTrackMaxInvisiblePt_ |
unsigned int | tightTrackMinStubs_ |
TkCaloLinkMetric | tkCaloLinkMetric_ |
bool | trackEmMayUseCaloMomenta_ |
bool | trackEmUseAlsoTrackSigma_ |
bool | useTrackCaloSigma_ |
Protected Attributes inherited from l1tpf_impl::PFAlgoBase | |
int | debug_ |
|
protected |
|
protected |
Enumerator | |
---|---|
GoodTK_Calo_TkPt | |
GoodTK_Calo_TkCaloPt | |
GoodTk_Calo_CaloPt | |
GoodTK_NoCalo |
Definition at line 27 of file PFAlgo3.h.
|
strongprotected |
|
strongprotected |
PFAlgo3::PFAlgo3 | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 19 of file PFAlgo3.cc.
References BestByDR, BestByDR2Pt2, BestByDRPt, BoxBestByPtRatio, caloReLinkDr_, caloReLinkStep_, caloReLinkThreshold_, caloTrkWeightedAverage_, l1tpf_impl::PFAlgoBase::debug_, DrBestByPtDiff, DrBestByPtRatio, drMatch_, drMatchEm_, drMatchEmHad_, drMatchMu_, ecalPriority_, emCaloUseAlsoCaloSigma_, emHadSubtractionPtSlope_, Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), maxInvisiblePt_, muMatchMode_, ptMatchHigh_, ptMatchLow_, ptMinFracMatchEm_, rescaleTracks_, AlCaHLTBitMon_QueryRunRegistry::string, sumTkCaloErr2_, tightTrackMaxChi2_, tightTrackMaxInvisiblePt_, tightTrackMinStubs_, tkCaloLinkMetric_, trackEmMayUseCaloMomenta_, trackEmUseAlsoTrackSigma_, and useTrackCaloSigma_.
|
protected |
try to recover split hadron showers (v1.0):
OPTIONAL STEP: try to recover split hadron showers (v1.0):
Definition at line 672 of file PFAlgo3.cc.
References l1tpf_impl::InputRegion::calo, caloReLinkDr_, caloReLinkThreshold_, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, runTauDisplay::dr, l1tpf_impl::Region::globalAbsEta(), and useTrackCaloSigma_.
Referenced by runPF().
|
protected |
process ecal clusters after linking
Definition at line 376 of file PFAlgo3.cc.
References l1tpf_impl::PFAlgoBase::addCaloToPF(), dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, l1tpf_impl::InputRegion::emcalo, l1tpf_impl::Region::globalAbsEta(), AlCaHLTBitMon_ParallelJobs::p, ptMatchHigh_, ptMatchLow_, and trackEmUseAlsoTrackSigma_.
Referenced by runPF().
|
protected |
promote all flagged tracks to electrons
Definition at line 444 of file PFAlgo3.cc.
References l1tpf_impl::PFAlgoBase::addTrackToPF(), dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, l1t::PFCandidate::Electron, l1tpf_impl::InputRegion::emcalo, AlCaHLTBitMon_ParallelJobs::p, l1tpf_impl::InputRegion::track, and trackEmMayUseCaloMomenta_.
Referenced by runPF().
|
protected |
match all em to the closest had (can happen in parallel to the above)
Definition at line 327 of file PFAlgo3.cc.
References l1tpf_impl::InputRegion::calo, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, runTauDisplay::dr, drMatchEmHad_, l1tpf_impl::InputRegion::emcalo, and ptMinFracMatchEm_.
Referenced by runPF().
|
protected |
track to calo matching
Definition at line 538 of file PFAlgo3.cc.
References BestByDR, BestByDR2Pt2, BestByDRPt, l1tpf_impl::InputRegion::calo, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, runTauDisplay::dr, drMatch_, ptMatchLow_, tkCaloLinkMetric_, and l1tpf_impl::InputRegion::track.
Referenced by runPF().
|
protected |
match all tracks to the closest EM cluster
Definition at line 303 of file PFAlgo3.cc.
References dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, runTauDisplay::dr, drMatchEm_, l1tpf_impl::InputRegion::emcalo, and l1tpf_impl::InputRegion::track.
Referenced by runPF().
|
protected |
do muon track linking (also sets track.muonLink)
Definition at line 216 of file PFAlgo3.cc.
References funct::abs(), BoxBestByPtRatio, reco::ceil(), dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, HLT_FULL_cff::deltaR, HLT_FULL_cff::distance, runTauDisplay::dr, DrBestByPtDiff, DrBestByPtRatio, drMatchMu_, M_PI, RPCpg::mu, muMatchMode_, l1tpf_impl::InputRegion::muon, convertSQLiteXML::ok, mathSSE::sqrt(), and l1tpf_impl::InputRegion::track.
Referenced by runPF().
|
protected |
process matched calo clusters, compare energy to sum track pt, compute track rescaling factor if needed
----------— next step (needs the previous) -------------—
Definition at line 736 of file PFAlgo3.cc.
References l1tpf_impl::PFAlgoBase::addCaloToPF(), l1tpf_impl::InputRegion::calo, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, ecalPriority_, min(), l1t::PFCandidate::NeutralHadron, AlCaHLTBitMon_ParallelJobs::p, l1t::PFCandidate::Photon, ptMatchHigh_, ptMatchLow_, rescaleTracks_, and useTrackCaloSigma_.
Referenced by runPF().
|
protected |
process matched tracks, if necessary rescale or average
Definition at line 828 of file PFAlgo3.cc.
References l1tpf_impl::PFAlgoBase::addTrackToPF(), l1tpf_impl::InputRegion::calo, caloTrkWeightedAverage_, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, GoodTk_Calo_CaloPt, GoodTK_Calo_TkCaloPt, GoodTK_Calo_TkPt, AlCaHLTBitMon_ParallelJobs::p, funct::pow(), and l1tpf_impl::InputRegion::track.
Referenced by runPF().
|
overridevirtual |
-———— first step (can all go in parallel) -—————
-———— next step (needs the previous) -—————
-———— next step (needs the previous) -—————
-———— next step (needs the previous) -—————
-———— next step (needs the previous) -—————
-———— next step (needs the previous) ----————
----——— next step (needs the previous) -------——— OPTIONAL STEP: try to recover split hadron showers (v1.0):
-------—— next step (needs the previous) ----------——
----------— next step (needs the previous) -------------— process matched tracks, if necessary rescale or average
Implements l1tpf_impl::PFAlgoBase.
Definition at line 69 of file PFAlgo3.cc.
References l1tpf_impl::InputRegion::calo, calo_relink(), caloReLinkStep_, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, l1tpf_impl::InputRegion::emcalo, emcalo_algo(), emtk_algo(), l1tpf_impl::InputRegion::etaExtra, l1tpf_impl::InputRegion::etaMax, l1tpf_impl::InputRegion::etaMin, l1tpf_impl::Region::fiducialLocal(), l1tpf_impl::PFAlgoBase::initRegion(), link_em2calo(), link_tk2calo(), link_tk2em(), link_tk2mu(), linkedcalo_algo(), linkedtk_algo(), RPCpg::mu, l1tpf_impl::InputRegion::muon, l1tpf_impl::InputRegion::phiCenter, l1tpf_impl::InputRegion::phiExtra, l1tpf_impl::InputRegion::phiHalfWidth, save_muons(), sub_em2calo(), sum_tk2calo(), sum_tk2em(), l1tpf_impl::InputRegion::track, unlinkedcalo_algo(), and unlinkedtk_algo().
|
protected |
save muons in output list
Definition at line 901 of file PFAlgo3.cc.
References l1tpf_impl::PFAlgoBase::addTrackToPF(), dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, l1tpf_impl::InputRegion::muon, AlCaHLTBitMon_ParallelJobs::p, and l1tpf_impl::InputRegion::track.
Referenced by runPF().
|
protected |
subtract EM component from Calo clusters for all photons and electrons (within tracker coverage)
Definition at line 476 of file PFAlgo3.cc.
References l1tpf_impl::InputRegion::calo, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, l1tpf_impl::InputRegion::emcalo, emCaloUseAlsoCaloSigma_, emHadSubtractionPtSlope_, and DiDispStaMuonMonitor_cfi::pt.
Referenced by runPF().
|
protected |
for each calo, compute the sum of the track pt
Definition at line 625 of file PFAlgo3.cc.
References l1tpf_impl::InputRegion::calo, l1tpf_impl::Region::globalAbsEta(), funct::pow(), mathSSE::sqrt(), sumTkCaloErr2_, and l1tpf_impl::InputRegion::track.
Referenced by runPF().
|
protected |
for each EM cluster, count and add up the pt of all the corresponding tracks (skipping muons)
Definition at line 353 of file PFAlgo3.cc.
References l1tpf_impl::InputRegion::emcalo, l1tpf_impl::Region::globalAbsEta(), and l1tpf_impl::InputRegion::track.
Referenced by runPF().
|
protected |
process unmatched calo clusters
Definition at line 890 of file PFAlgo3.cc.
References l1tpf_impl::PFAlgoBase::addCaloToPF(), l1tpf_impl::InputRegion::calo, dbgPrintf(), and l1tpf_impl::PFAlgoBase::debug_.
Referenced by runPF().
|
protected |
promote unlinked low pt tracks to hadrons
Definition at line 650 of file PFAlgo3.cc.
References l1tpf_impl::PFAlgoBase::addTrackToPF(), dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, GoodTK_NoCalo, maxInvisiblePt_, AlCaHLTBitMon_ParallelJobs::p, tightTrackMaxChi2_, tightTrackMaxInvisiblePt_, tightTrackMinStubs_, and l1tpf_impl::InputRegion::track.
Referenced by runPF().
|
protected |
Definition at line 22 of file PFAlgo3.h.
Referenced by calo_relink(), and PFAlgo3().
|
protected |
|
protected |
Definition at line 22 of file PFAlgo3.h.
Referenced by calo_relink(), and PFAlgo3().
|
protected |
Definition at line 16 of file PFAlgo3.h.
Referenced by linkedtk_algo(), and PFAlgo3().
|
protected |
Definition at line 15 of file PFAlgo3.h.
Referenced by link_tk2calo(), and PFAlgo3().
|
protected |
Definition at line 18 of file PFAlgo3.h.
Referenced by link_tk2em(), and PFAlgo3().
|
protected |
Definition at line 18 of file PFAlgo3.h.
Referenced by link_em2calo(), and PFAlgo3().
|
protected |
Definition at line 13 of file PFAlgo3.h.
Referenced by link_tk2mu(), and PFAlgo3().
|
protected |
Definition at line 23 of file PFAlgo3.h.
Referenced by linkedcalo_algo(), and PFAlgo3().
|
protected |
Definition at line 23 of file PFAlgo3.h.
Referenced by PFAlgo3(), and sub_em2calo().
|
protected |
Definition at line 19 of file PFAlgo3.h.
Referenced by PFAlgo3(), and sub_em2calo().
|
protected |
Definition at line 15 of file PFAlgo3.h.
Referenced by PFAlgo3(), and unlinkedtk_algo().
|
protected |
Referenced by link_tk2mu(), and PFAlgo3().
|
protected |
Definition at line 15 of file PFAlgo3.h.
Referenced by emcalo_algo(), linkedcalo_algo(), and PFAlgo3().
|
protected |
Definition at line 15 of file PFAlgo3.h.
Referenced by emcalo_algo(), link_tk2calo(), linkedcalo_algo(), and PFAlgo3().
|
protected |
Definition at line 18 of file PFAlgo3.h.
Referenced by link_em2calo(), and PFAlgo3().
|
protected |
Definition at line 23 of file PFAlgo3.h.
Referenced by linkedcalo_algo(), and PFAlgo3().
|
protected |
Definition at line 23 of file PFAlgo3.h.
Referenced by PFAlgo3(), and sum_tk2calo().
|
protected |
Definition at line 26 of file PFAlgo3.h.
Referenced by PFAlgo3(), and unlinkedtk_algo().
|
protected |
Definition at line 26 of file PFAlgo3.h.
Referenced by PFAlgo3(), and unlinkedtk_algo().
|
protected |
Definition at line 25 of file PFAlgo3.h.
Referenced by PFAlgo3(), and unlinkedtk_algo().
|
protected |
Definition at line 20 of file PFAlgo3.h.
Referenced by link_tk2calo(), and PFAlgo3().
|
protected |
Definition at line 23 of file PFAlgo3.h.
Referenced by emtk_algo(), and PFAlgo3().
|
protected |
Definition at line 23 of file PFAlgo3.h.
Referenced by emcalo_algo(), and PFAlgo3().
|
protected |
Definition at line 16 of file PFAlgo3.h.
Referenced by calo_relink(), linkedcalo_algo(), and PFAlgo3().