#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 |
|
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 caloReLinkDr_, caloReLinkThreshold_, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, flavorHistoryFilter_cfi::dr, alignCSCRings::r, 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_, AlCaHLTBitMon_ParallelJobs::p, ptMatchHigh_, ptMatchLow_, alignCSCRings::r, 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, AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::r, 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 dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, flavorHistoryFilter_cfi::dr, drMatchEmHad_, ptMinFracMatchEm_, and alignCSCRings::r.
Referenced by runPF().
|
protected |
track to calo matching
Definition at line 538 of file PFAlgo3.cc.
References BestByDR, BestByDR2Pt2, BestByDRPt, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, flavorHistoryFilter_cfi::dr, drMatch_, ptMatchLow_, alignCSCRings::r, and tkCaloLinkMetric_.
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_, flavorHistoryFilter_cfi::dr, drMatchEm_, and alignCSCRings::r.
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_, PbPb_ZMuSkimMuonDPG_cff::deltaR, HLT_FULL_cff::distance, flavorHistoryFilter_cfi::dr, DrBestByPtDiff, DrBestByPtRatio, drMatchMu_, M_PI, amptDefaultParameters_cff::mu, muMatchMode_, convertSQLiteXML::ok, alignCSCRings::r, and mathSSE::sqrt().
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(), dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, ecalPriority_, min(), l1t::PFCandidate::NeutralHadron, AlCaHLTBitMon_ParallelJobs::p, l1t::PFCandidate::Photon, ptMatchHigh_, ptMatchLow_, alignCSCRings::r, 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(), caloTrkWeightedAverage_, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, GoodTk_Calo_CaloPt, GoodTK_Calo_TkCaloPt, GoodTK_Calo_TkPt, createfilelist::int, AlCaHLTBitMon_ParallelJobs::p, funct::pow(), and alignCSCRings::r.
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 calo_relink(), caloReLinkStep_, dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, emcalo_algo(), emtk_algo(), l1tpf_impl::PFAlgoBase::initRegion(), createfilelist::int, link_em2calo(), link_tk2calo(), link_tk2em(), link_tk2mu(), linkedcalo_algo(), linkedtk_algo(), amptDefaultParameters_cff::mu, alignCSCRings::r, save_muons(), sub_em2calo(), sum_tk2calo(), sum_tk2em(), 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_, AlCaHLTBitMon_ParallelJobs::p, and alignCSCRings::r.
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 dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, emCaloUseAlsoCaloSigma_, emHadSubtractionPtSlope_, DiDispStaMuonMonitor_cfi::pt, and alignCSCRings::r.
Referenced by runPF().
|
protected |
for each calo, compute the sum of the track pt
Definition at line 625 of file PFAlgo3.cc.
References funct::pow(), alignCSCRings::r, mathSSE::sqrt(), and sumTkCaloErr2_.
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 alignCSCRings::r.
Referenced by runPF().
|
protected |
process unmatched calo clusters
Definition at line 890 of file PFAlgo3.cc.
References l1tpf_impl::PFAlgoBase::addCaloToPF(), dbgPrintf(), l1tpf_impl::PFAlgoBase::debug_, and alignCSCRings::r.
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_, MuonErrorMatrixAnalyzer_cfi::maxPt, AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::r, tightTrackMaxChi2_, tightTrackMaxInvisiblePt_, and tightTrackMinStubs_.
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().