|
|
Produces pat::Electron's.
More...
#include "PhysicsTools/PatAlgos/interface/PATElectronProducer.h"
|
void | embedHighLevel (pat::Electron &anElectron, reco::GsfTrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid) |
|
void | fillElectron (Electron &aElectron, const ElectronBaseRef &electronRef, const reco::CandidateBaseRef &baseRef, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const bool pfId, const IsolationValueMaps &isolationValues, const IsolationValueMaps &isolationValuesNoPFId) const |
| common electron filling, for both the standard and PF2PAT case More...
|
|
void | fillElectron2 (Electron &anElectron, const reco::CandidatePtr &candPtrForIsolation, const reco::CandidatePtr &candPtrForGenMatch, const reco::CandidatePtr &candPtrForLoader, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const IsolationValueMaps &isolationValues) const |
|
template<typename T > |
void | readIsolationLabels (const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &tokens) |
|
void | setElectronMiniIso (pat::Electron &anElectron, const pat::PackedCandidateCollection *pc) |
|
Produces pat::Electron's.
The PATElectronProducer produces analysis-level pat::Electron's starting from a collection of objects of reco::GsfElectron.
- Author
- Steven Lowette, James Lamb\
- Version
- Id
- PATElectronProducer.h,v 1.31 2013/02/27 23:26:56 wmtan Exp
Definition at line 50 of file PATElectronProducer.h.
◆ ElectronBaseRef
◆ GenAssociations
◆ IsoDepositMaps
◆ IsolationLabel
◆ IsolationLabels
◆ IsolationValueMaps
◆ NameTag
◆ PATElectronProducer()
Definition at line 52 of file PATElectronProducer.cc.
118 iConfig.
getParameter<std::vector<edm::InputTag>>(
"genParticleMatch"),
119 [
this](
edm::InputTag const&
tag) { return consumes<edm::Association<reco::GenParticleCollection>>(tag); });
153 <<
"PATElectronProducer: you can't specify both 'electronIDSource' and 'electronIDSources'\n";
158 for (std::vector<std::string>::const_iterator it =
names.begin(), ed =
names.end(); it != ed; ++it) {
165 <<
"PATElectronProducer: id addElectronID is true, you must specify either:\n"
166 <<
"\tInputTag electronIDSource = <someTag>\n"
168 <<
"\tPSet electronIDSources = { \n"
169 <<
"\t\tInputTag <someName> = <someTag> // as many as you want \n "
200 throw cms::Exception(
"ParameterError") <<
"miniIsoParams must have exactly 9 elements.\n";
224 throw cms::Exception(
"Configuration",
"usePfCandidateMultiMap not supported when useParticleFlow is set to true");
227 produces<std::vector<Electron>>();
◆ ~PATElectronProducer()
PATElectronProducer::~PATElectronProducer |
( |
| ) |
|
|
override |
◆ embedHighLevel()
Definition at line 1197 of file PATElectronProducer.cc.
1211 std::pair<bool, Measurement1D>
result =
1213 double d0_corr =
result.second.value();
1214 double d0_err = primaryVertexIsValid ?
result.second.error() : -1.0;
1226 d0_corr =
result.second.value();
1227 d0_err = beamspotIsValid ?
result.second.error() : -1.0;
References pat::Electron::BS2D, pat::Electron::BS3D, BeamMonitor_cff::primaryVertex, pat::Electron::PV2D, pat::Electron::PV3D, pat::Electron::PVDZ, mps_fire::result, pat::Electron::setDB(), IPTools::signedImpactParameter3D(), HLT_FULL_cff::track, and groupFilesInBlocks::tt.
Referenced by produce().
◆ fillDescriptions()
Definition at line 1021 of file PATElectronProducer.cc.
1023 iDesc.
setComment(
"PAT electron producer module");
1032 "ecalPFClusterIsoMap",
edm::InputTag(
"electronEcalPFClusterIsolationProducer"),
true) and
1034 "hcalPFClusterIsoMap",
edm::InputTag(
"electronHcalPFClusterIsolationProducer"),
true))
or
1040 "puppiIsolationChargedHadrons",
1041 edm::InputTag(
"egmElectronPUPPIIsolation",
"h+-DR030-BarVeto000-EndVeto001"),
1044 "puppiIsolationNeutralHadrons",
1045 edm::InputTag(
"egmElectronPUPPIIsolation",
"h0-DR030-BarVeto000-EndVeto000"),
1048 "puppiIsolationPhotons",
1049 edm::InputTag(
"egmElectronPUPPIIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1052 "puppiNoLeptonsIsolationChargedHadrons",
1053 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1056 "puppiNoLeptonsIsolationNeutralHadrons",
1057 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1060 "puppiNoLeptonsIsolationPhotons",
1061 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1066 iDesc.
add<
bool>(
"embedGsfElectronCore",
true)->setComment(
"embed external gsf electron core");
1067 iDesc.
add<
bool>(
"embedGsfTrack",
true)->setComment(
"embed external gsf track");
1068 iDesc.
add<
bool>(
"embedSuperCluster",
true)->setComment(
"embed external super cluster");
1069 iDesc.
add<
bool>(
"embedPflowSuperCluster",
true)->setComment(
"embed external super cluster");
1070 iDesc.
add<
bool>(
"embedSeedCluster",
true)->setComment(
"embed external seed cluster");
1071 iDesc.
add<
bool>(
"embedBasicClusters",
true)->setComment(
"embed external basic clusters");
1072 iDesc.
add<
bool>(
"embedPreshowerClusters",
true)->setComment(
"embed external preshower clusters");
1073 iDesc.
add<
bool>(
"embedPflowBasicClusters",
true)->setComment(
"embed external pflow basic clusters");
1074 iDesc.
add<
bool>(
"embedPflowPreshowerClusters",
true)->setComment(
"embed external pflow preshower clusters");
1075 iDesc.
add<
bool>(
"embedTrack",
false)->setComment(
"embed external track");
1076 iDesc.
add<
bool>(
"embedRecHits",
true)->setComment(
"embed external RecHits");
1080 ->setComment(
"particle flow input collection");
1083 "take ParticleFlow candidates from pfCandidateMultiMap instead of matching to pfElectrons by Gsf track "
1088 iDesc.
add<
bool>(
"useParticleFlow",
false)->setComment(
"whether to use particle flow or not");
1089 iDesc.
add<
bool>(
"embedPFCandidate",
false)->setComment(
"embed external particle flow object");
1092 iDesc.
add<
bool>(
"addGenMatch",
true)->setComment(
"add MC matching");
1093 iDesc.
add<
bool>(
"embedGenMatch",
false)->setComment(
"embed MC matched MC information");
1094 std::vector<edm::InputTag> emptySourceVector;
1098 ->
setComment(
"input with MC match information");
1101 iDesc.
add<
bool>(
"addElectronID",
true)->setComment(
"add electron ID variables");
1108 ->
setComment(
"input with electron ID variables");
1111 iDesc.
add<
bool>(
"computeMiniIso",
false)->setComment(
"whether or not to compute and store electron mini-isolation");
1113 ->setComment(
"collection to use to compute mini-iso");
1114 iDesc.
add<std::vector<double>>(
"miniIsoParamsE", std::vector<double>())
1115 ->setComment(
"mini-iso parameters to use for endcap electrons");
1116 iDesc.
add<std::vector<double>>(
"miniIsoParamsB", std::vector<double>())
1117 ->setComment(
"mini-iso parameters to use for barrel electrons");
1130 isoDepositsPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1131 iDesc.
addOptional(
"isoDeposits", isoDepositsPSet);
1144 isolationValuesPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1145 iDesc.
addOptional(
"isolationValues", isolationValuesPSet);
1158 isolationValuesNoPFIdPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1159 iDesc.
addOptional(
"isolationValuesNoPFId", isolationValuesNoPFIdPSet);
1164 iDesc.
add(
"efficiencies", efficienciesPSet);
1165 iDesc.
add<
bool>(
"addEfficiencies",
false);
1173 iDesc.
add<
bool>(
"addMVAVariables",
true)->setComment(
"embed extra variables in pat::Electron : sip3d, sigmaIEtaIPhi");
1179 iDesc.
add(
"userIsolation", isolationPSet);
1184 iDesc.
add<
bool>(
"embedHighLevelSelection",
true)->setComment(
"embed high level selection");
1188 ->
setComment(
"input with high level selection");
1190 ->
setComment(
"input with high level selection");
1192 descriptions.
add(
"PATElectronProducer", iDesc);
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addNode(), edm::ParameterSetDescription::addOptional(), pat::helper::KinResolutionsLoader::fillDescription(), pat::PATUserDataHelper< ObjectType >::fillDescription(), edm::ParameterSetDescription::ifValue(), HLT_FULL_cff::InputTag, or, edm::ParameterSetDescription::setAllowAnything(), edm::ParameterSetDescription::setComment(), edm::ParameterDescriptionNode::setComment(), and electronProducer_cfi::usePfCandidateMultiMap.
◆ fillElectron()
common electron filling, for both the standard and PF2PAT case
Definition at line 816 of file PATElectronProducer.cc.
842 anElectron.embedGsfElectronCore();
844 anElectron.embedGsfTrack();
846 anElectron.embedSuperCluster();
848 anElectron.embedPflowSuperCluster();
850 anElectron.embedSeedCluster();
852 anElectron.embedBasicClusters();
854 anElectron.embedPreshowerClusters();
856 anElectron.embedPflowBasicClusters();
858 anElectron.embedPflowPreshowerClusters();
860 anElectron.embedTrack();
864 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
867 anElectron.addGenParticleRef(genElectron);
870 anElectron.addGenParticleRef(genElectron);
874 anElectron.embedGenParticle();
885 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
References addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), cms::cuda::assert(), CandIsolatorFromDeposits_cfi::deposits, efficiencyLoader_, pat::Electron::embedBasicClusters(), embedBasicClusters_, embedGenMatch_, pat::PATObject< ObjectType >::embedGenParticle(), pat::Electron::embedGsfElectronCore(), embedGsfElectronCore_, pat::Electron::embedGsfTrack(), embedGsfTrack_, pat::Electron::embedPflowBasicClusters(), embedPflowBasicClusters_, pat::Electron::embedPflowPreshowerClusters(), embedPflowPreshowerClusters_, pat::Electron::embedPflowSuperCluster(), embedPflowSuperCluster_, pat::Electron::embedPreshowerClusters(), embedPreshowerClusters_, pat::Electron::embedSeedCluster(), embedSeedCluster_, pat::Electron::embedSuperCluster(), embedSuperCluster_, pat::Electron::embedTrack(), embedTrack_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), first, mps_fire::i, edm::Ref< C, T, F >::isNull(), isoDepositLabels_, isolationValueLabels_, isolationValueLabelsNoPFId_, electronProducer_cff::isolationValues, electronProducer_cff::isolationValuesNoPFId, dqmiolumiharvest::j, dqmiodumpmetadata::n, pat::Electron::pfCandidateRef(), resolutionLoader_, pat::helper::EfficiencyLoader::setEfficiencies(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), pat::helper::KinResolutionsLoader::setResolutions(), source, and useParticleFlow_.
Referenced by produce().
◆ fillElectron2()
Definition at line 912 of file PATElectronProducer.cc.
950 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
967 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
References addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), edm::contains(), CandIsolatorFromDeposits_cfi::deposits, pat::EcalIso, efficiencyLoader_, pat::Electron::embedBasicClusters(), embedBasicClusters_, embedGenMatch_, pat::PATObject< ObjectType >::embedGenParticle(), pat::Electron::embedGsfElectronCore(), embedGsfElectronCore_, pat::Electron::embedGsfTrack(), embedGsfTrack_, pat::Electron::embedPflowBasicClusters(), embedPflowBasicClusters_, pat::Electron::embedPflowPreshowerClusters(), embedPflowPreshowerClusters_, pat::Electron::embedPflowSuperCluster(), embedPflowSuperCluster_, pat::Electron::embedPreshowerClusters(), embedPreshowerClusters_, pat::Electron::embedSeedCluster(), embedSeedCluster_, pat::Electron::embedSuperCluster(), embedSuperCluster_, pat::Electron::embedTrack(), embedTrack_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), first, pat::HcalIso, mps_fire::i, edm::Ptr< T >::id(), isoDepositLabels_, isolationValueLabels_, electronProducer_cff::isolationValues, dqmiolumiharvest::j, dqmiodumpmetadata::n, reco::GsfElectron::p4(), pat::Electron::pfCandidateRef(), resolutionLoader_, pat::Electron::setEcalDrivenMomentum(), pat::helper::EfficiencyLoader::setEfficiencies(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), reco::GsfElectron::setP4(), pat::helper::KinResolutionsLoader::setResolutions(), and pat::TrackIso.
Referenced by produce().
◆ produce()
Definition at line 232 of file PATElectronProducer.cc.
234 if (
iEvent.isRealData()) {
300 std::vector<edm::Handle<edm::ValueMap<float>>> idhandles;
301 std::vector<pat::Electron::IdPair> ids;
316 bool beamSpotIsValid =
false;
317 bool primaryVertexIsValid =
false;
331 if (pvHandle.
isValid() && !pvHandle->empty()) {
333 primaryVertexIsValid =
true;
336 <<
"No primary vertex available from EventSetup, not adding high level selection \n";
358 std::vector<Electron>*
patElectrons =
new std::vector<Electron>();
373 bool MatchedToAmbiguousGsfTrack =
false;
378 if (
Matched || MatchedToAmbiguousGsfTrack)
383 if (itElectron->gsfTrack() ==
i->gsfTrackRef()) {
386 for (
auto const& it : itElectron->ambiguousGsfTracks()) {
387 MatchedToAmbiguousGsfTrack |= (
bool)(
i->gsfTrackRef() == it);
391 if (
Matched || MatchedToAmbiguousGsfTrack) {
398 anElectron.setPFCandidateRef(pfRef);
400 anElectron.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[elePtr],
401 (*PUPPIIsolation_neutral_hadrons)[elePtr],
402 (*PUPPIIsolation_photons)[elePtr]);
403 anElectron.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[elePtr],
404 (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
405 (*PUPPINoLeptonsIsolation_photons)[elePtr]);
407 anElectron.setIsolationPUPPI(-999., -999., -999.);
408 anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
412 anElectron.setIsPF(
true);
415 anElectron.embedPFCandidate();
429 if (
track.isNonnull() &&
track.isAvailable()) {
434 ip3d = ip3dpv.second.value();
443 ids[
i].second = (*idhandles[
i])[elecsRef];
446 ids.push_back(std::make_pair(
"pf_evspi", pfRef->mva_e_pi()));
447 ids.push_back(std::make_pair(
"pf_evsmu", pfRef->mva_e_mu()));
448 anElectron.setElectronIDs(ids);
453 const auto& vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
454 anElectron.setMvaVariables(vCov[1],
ip3d);
466 anElectron.setPfIsolationVariables(newPFIsol);
469 std::vector<DetId> selectedCells;
470 bool barrel = itElectron->isEB();
474 clusIt != itElectron->superCluster()->clustersEnd();
477 DetId seed = lazyTools.getMaximum(**clusIt).first;
479 std::vector<DetId> dets5x5 =
482 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
485 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
486 selectedCells.push_back(
hit.first);
493 clusIt != itElectron->parentSuperCluster()->clustersEnd();
496 DetId seed = lazyTools.getMaximum(**clusIt).first;
498 std::vector<DetId> dets5x5 =
501 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
504 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
505 selectedCells.push_back(
hit.first);
511 std::sort(selectedCells.begin(), selectedCells.end());
512 std::unique(selectedCells.begin(), selectedCells.end());
525 unsigned nSelectedCells = selectedCells.size();
526 for (
unsigned icell = 0; icell < nSelectedCells; ++icell) {
532 selectedRecHits.
sort();
534 anElectron.embedRecHits(&selectedRecHits);
537 bool passconversionveto =
false;
538 if (hConversions.isValid()) {
548 anElectron.setPassConversionVeto(passconversionveto);
580 bool pfCandsPresent =
false, valMapPresent =
false;
605 anElectron.setPFCandidateRef(
pf);
609 }
else if (pfCandsPresent) {
617 if (trkRef == pfTrkRef) {
620 anElectron.setPFCandidateRef(pfRef);
624 }
else if (valMapPresent) {
629 pfId = pfElePtr.isNonnull();
632 anElectron.setIsPF(pfId);
645 anElectron.setIsolation(it->first, it->second);
649 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
656 ids[
i].second = (*idhandles[
i])[elecsRef];
658 anElectron.setElectronIDs(ids);
673 if (
track.isNonnull() &&
track.isAvailable()) {
678 ip3d = ip3dpv.second.value();
684 const auto& vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
685 anElectron.setMvaVariables(vCov[1],
ip3d);
698 anElectron.setPfIsolationVariables(newPFIsol);
702 anElectron.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[elePtr],
703 (*PUPPIIsolation_neutral_hadrons)[elePtr],
704 (*PUPPIIsolation_photons)[elePtr]);
705 anElectron.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[elePtr],
706 (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
707 (*PUPPINoLeptonsIsolation_photons)[elePtr]);
709 anElectron.setIsolationPUPPI(-999., -999., -999.);
710 anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
713 std::vector<DetId> selectedCells;
714 bool barrel = itElectron->isEB();
718 clusIt != itElectron->superCluster()->clustersEnd();
721 DetId seed = lazyTools.getMaximum(**clusIt).first;
723 std::vector<DetId> dets5x5 =
726 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
729 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
730 selectedCells.push_back(
hit.first);
737 clusIt != itElectron->parentSuperCluster()->clustersEnd();
740 DetId seed = lazyTools.getMaximum(**clusIt).first;
742 std::vector<DetId> dets5x5 =
745 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
748 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
749 selectedCells.push_back(
hit.first);
755 std::sort(selectedCells.begin(), selectedCells.end());
756 std::unique(selectedCells.begin(), selectedCells.end());
769 unsigned nSelectedCells = selectedCells.size();
770 for (
unsigned icell = 0; icell < nSelectedCells; ++icell) {
776 selectedRecHits.
sort();
778 anElectron.embedRecHits(&selectedRecHits);
781 bool passconversionveto =
false;
782 if (hConversions.isValid()) {
791 anElectron.setPassConversionVeto(passconversionveto);
808 std::unique_ptr<std::vector<Electron>> ptr(
patElectrons);
References IPTools::absoluteImpactParameter3D(), pat::PATUserDataHelper< ObjectType >::add(), addElecID_, addGenMatch_, addMVAVariables_, addPFClusterIso_, addPuppiIsolation_, Reference_intrackfit_cff::barrel, beamLineToken_, pwdgSkimBPark_cfi::beamSpot, pat::helper::MultiIsolator::beginEvent(), electrons_cff::bool, TransientTrackBuilder::build(), computeMiniIso_, CandIsolatorFromDeposits_cfi::deposits, reco::PFCandidate::e, DetId::Ecal, EcalBarrel, ecalClusterToolsESGetTokens_, EcalEndcap, ecalPFClusterIsoT_, ecalTopology_, efficiencyLoader_, elecIDSrcs_, elecIDTokens_, pwdgSkimBPark_cfi::electrons, electronToken_, embedBasicClusters_, embedGenMatch_, embedHighLevel(), embedHighLevelSelection_, pat::Electron::embedPFCandidate(), embedPFCandidate_, embedPflowBasicClusters_, pat::Electron::embedRecHits(), embedRecHits_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), pat::helper::MultiIsolator::enabled(), pat::helper::MultiIsolator::endEvent(), pat::helper::MultiIsolator::fill(), fillElectron(), fillElectron2(), first, genMatchTokens_, EcalClusterLazyToolsBase::ESGetTokens::get(), edm::EventSetup::get(), get, CaloTopology::getSubdetectorTopology(), CaloSubdetectorTopology::getWindow(), ConversionTools::hasMatchedConversion(), hcalPFClusterIsoT_, hConversionsToken_, mps_fire::i, heavyIonCSV_trainingSettings::idx, iEvent, electrons_cff::ip3d, edm::Ptr< T >::isNonnull(), isoDepositLabels_, isoDepositTokens_, isolationValueNoPFIdTokens_, electronProducer_cff::isolationValues, electronProducer_cff::isolationValuesNoPFId, isolationValueTokens_, isolator_, isolatorTmpStorage_, edm::HandleBase::isValid(), dqmiolumiharvest::j, reco::Matched, reco::HitPattern::MISSING_INNER_HITS, eostools::move(), pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), patElectronEAIsoCorrectionProducer_cfi::patElectrons, pcToken_, packedPFCandidateRefMixer_cfi::pf, pfCandidateMapToken_, pfCandidateMultiMapToken_, pfElecToken_, electronIsolatorFromEffectiveArea_cfi::pfElectrons, reco::GsfElectron::pfIsolationVariables(), reco::BeamSpot::position(), BeamMonitor_cff::primaryVertex, edm::Handle< T >::product(), pTComparator_, PUPPIIsolation_charged_hadrons_, PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_photons_, PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_photons_, edm::SortedCollection< T, SORT >::push_back(), pvToken_, FastTrackerRecHitMaskProducer_cfi::recHits, reducedBarrelRecHitCollectionToken_, electronIdMVAProducer_cfi::reducedEBRecHitCollection, electronIdMVAProducer_cfi::reducedEERecHitCollection, reducedEndcapRecHitCollectionToken_, resolutionLoader_, fileCollector::seed, pat::Electron::setElectronIDs(), setElectronMiniIso(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), pat::Electron::setIsolationPUPPI(), pat::Electron::setIsolationPUPPINoLeptons(), pat::Electron::setIsPF(), pat::Electron::setMvaVariables(), pat::Electron::setPassConversionVeto(), pat::Electron::setPFCandidateRef(), reco::GsfElectron::setPfIsolationVariables(), jetUpdater_cfi::sort, edm::SortedCollection< T, SORT >::sort(), reco::GsfElectron::PflowIsolationVariables::sumEcalClusterEt, reco::GsfElectron::PflowIsolationVariables::sumHcalClusterEt, HLT_FULL_cff::track, groupFilesInBlocks::tt, tier0::unique(), useParticleFlow_, usePfCandidateMultiMap_, userDataHelper_, and useUserData_.
◆ readIsolationLabels()
fill the labels vector from the contents of the parameter set, for the isodeposit or isolation values embedding
Definition at line 197 of file PATElectronProducer.h.
203 if (iConfig.
exists(psetName)) {
206 if (depconf.
exists(
"tracker"))
208 if (depconf.
exists(
"ecal"))
210 if (depconf.
exists(
"hcal"))
212 if (depconf.
exists(
"pfAllParticles")) {
215 if (depconf.
exists(
"pfChargedHadrons")) {
219 if (depconf.
exists(
"pfChargedAll")) {
222 if (depconf.
exists(
"pfPUChargedHadrons")) {
226 if (depconf.
exists(
"pfNeutralHadrons")) {
230 if (depconf.
exists(
"pfPhotons")) {
233 if (depconf.
exists(
"user")) {
234 std::vector<edm::InputTag> userdeps = depconf.
getParameter<std::vector<edm::InputTag> >(
"user");
235 std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
237 for (; it != ed; ++it, ++
key) {
References pat::EcalIso, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), pat::HcalIso, crabWrapper::key, label, SummaryClient_cfi::labels, pat::PfAllParticleIso, pat::PfChargedAllIso, pat::PfChargedHadronIso, pat::PfGammaIso, pat::PfNeutralHadronIso, pat::PfPUChargedHadronIso, pat::TrackIso, pat::UserBaseIso, and edm::vector_transform().
◆ setElectronMiniIso()
◆ addEfficiencies_
const bool pat::PATElectronProducer::addEfficiencies_ |
|
private |
◆ addElecID_
const bool pat::PATElectronProducer::addElecID_ |
|
private |
◆ addGenMatch_
bool pat::PATElectronProducer::addGenMatch_ |
|
private |
◆ addMVAVariables_
const bool pat::PATElectronProducer::addMVAVariables_ |
|
private |
◆ addPFClusterIso_
const bool pat::PATElectronProducer::addPFClusterIso_ |
|
private |
◆ addPuppiIsolation_
const bool pat::PATElectronProducer::addPuppiIsolation_ |
|
private |
◆ addResolutions_
const bool pat::PATElectronProducer::addResolutions_ |
|
private |
◆ beamLineToken_
◆ computeMiniIso_
bool pat::PATElectronProducer::computeMiniIso_ |
|
private |
◆ ecalClusterToolsESGetTokens_
◆ ecalPFClusterIsoT_
◆ ecalTopology_
◆ efficiencyLoader_
◆ elecIDSrcs_
std::vector<NameTag> pat::PATElectronProducer::elecIDSrcs_ |
|
private |
◆ elecIDTokens_
◆ electronToken_
◆ embedBasicClusters_
const bool pat::PATElectronProducer::embedBasicClusters_ |
|
private |
◆ embedGenMatch_
bool pat::PATElectronProducer::embedGenMatch_ |
|
private |
◆ embedGsfElectronCore_
const bool pat::PATElectronProducer::embedGsfElectronCore_ |
|
private |
◆ embedGsfTrack_
const bool pat::PATElectronProducer::embedGsfTrack_ |
|
private |
◆ embedHighLevelSelection_
const bool pat::PATElectronProducer::embedHighLevelSelection_ |
|
private |
◆ embedPFCandidate_
const bool pat::PATElectronProducer::embedPFCandidate_ |
|
private |
◆ embedPflowBasicClusters_
const bool pat::PATElectronProducer::embedPflowBasicClusters_ |
|
private |
◆ embedPflowPreshowerClusters_
const bool pat::PATElectronProducer::embedPflowPreshowerClusters_ |
|
private |
◆ embedPflowSuperCluster_
const bool pat::PATElectronProducer::embedPflowSuperCluster_ |
|
private |
◆ embedPreshowerClusters_
const bool pat::PATElectronProducer::embedPreshowerClusters_ |
|
private |
◆ embedRecHits_
const bool pat::PATElectronProducer::embedRecHits_ |
|
private |
◆ embedSeedCluster_
const bool pat::PATElectronProducer::embedSeedCluster_ |
|
private |
◆ embedSuperCluster_
const bool pat::PATElectronProducer::embedSuperCluster_ |
|
private |
◆ embedTrack_
const bool pat::PATElectronProducer::embedTrack_ |
|
private |
◆ genMatchTokens_
◆ hcalPFClusterIsoT_
◆ hConversionsToken_
◆ isoDepositLabels_
◆ isoDepositTokens_
◆ isolationValueLabels_
◆ isolationValueLabelsNoPFId_
◆ isolationValueNoPFIdTokens_
◆ isolationValueTokens_
◆ isolator_
◆ isolatorTmpStorage_
◆ miniIsoParamsB_
std::vector<double> pat::PATElectronProducer::miniIsoParamsB_ |
|
private |
◆ miniIsoParamsE_
std::vector<double> pat::PATElectronProducer::miniIsoParamsE_ |
|
private |
◆ pcToken_
◆ pfCandidateMapToken_
◆ pfCandidateMultiMapToken_
◆ pfElecToken_
◆ pTComparator_
◆ PUPPIIsolation_charged_hadrons_
◆ PUPPIIsolation_neutral_hadrons_
◆ PUPPIIsolation_photons_
◆ PUPPINoLeptonsIsolation_charged_hadrons_
◆ PUPPINoLeptonsIsolation_neutral_hadrons_
◆ PUPPINoLeptonsIsolation_photons_
◆ pvToken_
◆ reducedBarrelRecHitCollection_
const edm::InputTag pat::PATElectronProducer::reducedBarrelRecHitCollection_ |
|
private |
◆ reducedBarrelRecHitCollectionToken_
◆ reducedEndcapRecHitCollection_
const edm::InputTag pat::PATElectronProducer::reducedEndcapRecHitCollection_ |
|
private |
◆ reducedEndcapRecHitCollectionToken_
◆ resolutionLoader_
◆ useParticleFlow_
const bool pat::PATElectronProducer::useParticleFlow_ |
|
private |
◆ usePfCandidateMultiMap_
const bool pat::PATElectronProducer::usePfCandidateMultiMap_ |
|
private |
◆ userDataHelper_
◆ useUserData_
const bool pat::PATElectronProducer::useUserData_ |
|
private |
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
void embedTrack()
method to store the electron's Track internally
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueNoPFIdTokens_
Assists in assimilating all pat::UserData into pat objects.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const bool embedGsfTrack_
std::vector< EcalRecHit >::const_iterator const_iterator
std::vector< NameTag > elecIDSrcs_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
const bool addPFClusterIso_
T const * product() const
void embedHighLevel(pat::Electron &anElectron, reco::GsfTrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid)
std::pair< pat::IsolationKeys, edm::InputTag > IsolationLabel
void fillElectron2(Electron &anElectron, const reco::CandidatePtr &candPtrForIsolation, const reco::CandidatePtr &candPtrForGenMatch, const reco::CandidatePtr &candPtrForLoader, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const IsolationValueMaps &isolationValues) const
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
void embedSeedCluster()
method to store the electron's seedcluster internally
void embedPreshowerClusters()
method to store the electron's preshower clusters
void setElectronMiniIso(pat::Electron &anElectron, const pat::PackedCandidateCollection *pc)
pat::helper::KinResolutionsLoader resolutionLoader_
IsolationLabels isolationValueLabels_
bool isNull() const
Checks for null.
void fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
static void fillDescription(edm::ParameterSetDescription &iDesc)
const edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
void embedGsfElectronCore()
method to store the electron's core internally
void setEcalDrivenMomentum(const Candidate::LorentzVector &mom)
PFCandidateCollection::const_iterator PFCandidateConstIterator
iterator
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > elecIDTokens_
void setIsolation(IsolationKeys key, float value)
bool enabled() const
'true' if this there is at least one efficiency configured
const bool embedPflowBasicClusters_
void addGenParticleRef(const reco::GenParticleRef &ref)
const bool embedHighLevelSelection_
embed high level selection variables?
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps
pat::PATUserDataHelper< pat::Electron > userDataHelper_
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_charged_hadrons_
const bool addEfficiencies_
Global3DVector GlobalVector
IsolationLabels isolationValueLabelsNoPFId_
void embedPflowBasicClusters()
method to store the electron's pflow basic clusters
std::pair< std::string, edm::InputTag > NameTag
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
reco::PFCandidateRef pfCandidateRef() const
reference to the source PFCandidates; null if this has been built from a standard electron
void push_back(T const &t)
void embedPflowSuperCluster()
method to store the electron's PflowSuperCluster internally
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
bool enabled() const
'true' if this there is at least one efficiency configured
void embedGsfTrack()
method to store the electron's GsfTrack internally
const bool embedPreshowerClusters_
const GreaterByPt< Electron > pTComparator_
const edm::EDGetTokenT< edm::ValueMap< reco::PFCandidatePtr > > pfCandidateMapToken_
bool enabled() const
True if it has a non null configuration.
const edm::EDGetTokenT< reco::PFCandidateCollection > pfElecToken_
const bool embedPflowSuperCluster_
const bool embedSeedCluster_
void setDB(double dB, double edB, IPTYPE type)
Set impact parameter of a certain type and its uncertainty.
primaryVertex
hltOfflineBeamSpot for HLTMON
reducedEBRecHitCollection
void setP4(P4Kind kind, const LorentzVector &p4, float p4Error, bool setCandidate)
const bool usePfCandidateMultiMap_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > pfCandidateMultiMapToken_
PFIsolation getMiniPFIsolation(const pat::PackedCandidateCollection *pfcands, const reco::Candidate::PolarLorentzVector &p4, float mindr=0.05, float maxdr=0.2, float kt_scale=10.0, float ptthresh=0.5, float deadcone_ch=0.0001, float deadcone_pu=0.01, float deadcone_ph=0.01, float deadcone_nh=0.01, float dZ_cut=0.0)
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
void embedPflowPreshowerClusters()
method to store the electron's pflow preshower clusters
const std::string names[nVars_]
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
reducedEERecHitCollection
const bool embedBasicClusters_
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
const bool embedGsfElectronCore_
static const std::string source
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
const edm::InputTag reducedEndcapRecHitCollection_
void embedBasicClusters()
method to store the electron's basic clusters
const Point & position() const
position
void embedSuperCluster()
method to store the electron's SuperCluster internally
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
const edm::EDGetTokenT< edm::ValueMap< float > > hcalPFClusterIsoT_
void setComment(std::string const &value)
ProductID id() const
Accessor for product ID.
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
const bool embedSuperCluster_
const edm::InputTag reducedBarrelRecHitCollection_
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases)
const edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
const bool embedPflowPreshowerClusters_
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
void setMiniPFIsolation(PFIsolation const &iso)
const CaloTopology * ecalTopology_
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
const bool embedPFCandidate_
bool contains(EventRange const &lh, EventID const &rh)
void setAllowAnything()
allow any parameter label/value pairs
Log< level::Error, false > LogError
const edm::EDGetTokenT< reco::ConversionCollection > hConversionsToken_
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
const LorentzVector & p4(P4Kind kind) const
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
const bool addMVAVariables_
mva input variables
const bool useParticleFlow_
pflow specific
const bool addPuppiIsolation_
pat::helper::MultiIsolator isolator_
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
math::XYZPoint Point
point in the space
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
edm::EDGetTokenT< pat::PackedCandidateCollection > pcToken_
IsolationKeys
Enum defining isolation keys.
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
def unique(seq, keepstr=True)
std::vector< double > miniIsoParamsB_
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
void fillElectron(Electron &aElectron, const ElectronBaseRef &electronRef, const reco::CandidateBaseRef &baseRef, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const bool pfId, const IsolationValueMaps &isolationValues, const IsolationValueMaps &isolationValuesNoPFId) const
common electron filling, for both the standard and PF2PAT case
const edm::EDGetTokenT< edm::ValueMap< float > > ecalPFClusterIsoT_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
const edm::EDGetTokenT< reco::BeamSpot > beamLineToken_
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_neutral_hadrons_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
reco::TransientTrack build(const reco::Track *p) const
std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > GenAssociations
const EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
const PolarLorentzVector & polarP4() const final
four-momentum Lorentz vector
void setComment(std::string const &value)
IsolationLabels isoDepositLabels_
std::vector< double > miniIsoParamsE_
const bool addResolutions_
pat::helper::EfficiencyLoader efficiencyLoader_
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &tokens)
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_