|
|
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.
117 iConfig.
getParameter<std::vector<edm::InputTag>>(
"genParticleMatch"),
118 [
this](
edm::InputTag const&
tag) { return consumes<edm::Association<reco::GenParticleCollection>>(tag); });
152 <<
"PATElectronProducer: you can't specify both 'electronIDSource' and 'electronIDSources'\n";
157 for (std::vector<std::string>::const_iterator it =
names.begin(), ed =
names.end(); it != ed; ++it) {
164 <<
"PATElectronProducer: id addElectronID is true, you must specify either:\n"
165 <<
"\tInputTag electronIDSource = <someTag>\n"
167 <<
"\tPSet electronIDSources = { \n"
168 <<
"\t\tInputTag <someName> = <someTag> // as many as you want \n "
199 throw cms::Exception(
"ParameterError") <<
"miniIsoParams must have exactly 9 elements.\n";
223 throw cms::Exception(
"Configuration",
"usePfCandidateMultiMap not supported when useParticleFlow is set to true");
226 produces<std::vector<Electron>>();
References addEfficiencies_, addElecID_, addGenMatch_, addPuppiIsolation_, addResolutions_, computeMiniIso_, efficiencyLoader_, elecIDSrcs_, elecIDTokens_, Exception, edm::ParameterSet::existsAs(), genMatchTokens_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNamesForType(), isoDepositLabels_, isoDepositTokens_, isolationValueLabels_, isolationValueLabelsNoPFId_, isolationValueNoPFIdTokens_, isolationValueTokens_, miniIsoParamsB_, miniIsoParamsE_, names, pcToken_, PUPPIIsolation_charged_hadrons_, PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_photons_, PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_photons_, readIsolationLabels(), resolutionLoader_, GlobalPosition_Frontier_DevDB_cff::tag, useParticleFlow_, usePfCandidateMultiMap_, userDataHelper_, useUserData_, and edm::vector_transform().
◆ ~PATElectronProducer()
PATElectronProducer::~PATElectronProducer |
( |
| ) |
|
|
override |
◆ embedHighLevel()
Definition at line 1196 of file PATElectronProducer.cc.
1206 std::pair<bool, Measurement1D>
result =
1208 double d0_corr =
result.second.value();
1209 double d0_err = primaryVertexIsValid ?
result.second.error() : -1.0;
1214 d0_corr =
result.second.value();
1215 d0_err = primaryVertexIsValid ?
result.second.error() : -1.0;
1224 d0_corr =
result.second.value();
1225 d0_err = beamspotIsValid ?
result.second.error() : -1.0;
1230 d0_corr =
result.second.value();
1231 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(), IPTools::signedTransverseImpactParameter(), HLT_2018_cff::track, and groupFilesInBlocks::tt.
Referenced by produce().
◆ fillDescriptions()
Definition at line 1020 of file PATElectronProducer.cc.
1022 iDesc.
setComment(
"PAT electron producer module");
1031 "ecalPFClusterIsoMap",
edm::InputTag(
"electronEcalPFClusterIsolationProducer"),
true) and
1033 "hcalPFClusterIsoMap",
edm::InputTag(
"electronHcalPFClusterIsolationProducer"),
true))
or
1039 "puppiIsolationChargedHadrons",
1040 edm::InputTag(
"egmElectronPUPPIIsolation",
"h+-DR030-BarVeto000-EndVeto001"),
1043 "puppiIsolationNeutralHadrons",
1044 edm::InputTag(
"egmElectronPUPPIIsolation",
"h0-DR030-BarVeto000-EndVeto000"),
1047 "puppiIsolationPhotons",
1048 edm::InputTag(
"egmElectronPUPPIIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1051 "puppiNoLeptonsIsolationChargedHadrons",
1052 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1055 "puppiNoLeptonsIsolationNeutralHadrons",
1056 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1059 "puppiNoLeptonsIsolationPhotons",
1060 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1065 iDesc.
add<
bool>(
"embedGsfElectronCore",
true)->setComment(
"embed external gsf electron core");
1066 iDesc.
add<
bool>(
"embedGsfTrack",
true)->setComment(
"embed external gsf track");
1067 iDesc.
add<
bool>(
"embedSuperCluster",
true)->setComment(
"embed external super cluster");
1068 iDesc.
add<
bool>(
"embedPflowSuperCluster",
true)->setComment(
"embed external super cluster");
1069 iDesc.
add<
bool>(
"embedSeedCluster",
true)->setComment(
"embed external seed cluster");
1070 iDesc.
add<
bool>(
"embedBasicClusters",
true)->setComment(
"embed external basic clusters");
1071 iDesc.
add<
bool>(
"embedPreshowerClusters",
true)->setComment(
"embed external preshower clusters");
1072 iDesc.
add<
bool>(
"embedPflowBasicClusters",
true)->setComment(
"embed external pflow basic clusters");
1073 iDesc.
add<
bool>(
"embedPflowPreshowerClusters",
true)->setComment(
"embed external pflow preshower clusters");
1074 iDesc.
add<
bool>(
"embedTrack",
false)->setComment(
"embed external track");
1075 iDesc.
add<
bool>(
"embedRecHits",
true)->setComment(
"embed external RecHits");
1079 ->setComment(
"particle flow input collection");
1082 "take ParticleFlow candidates from pfCandidateMultiMap instead of matching to pfElectrons by Gsf track "
1087 iDesc.
add<
bool>(
"useParticleFlow",
false)->setComment(
"whether to use particle flow or not");
1088 iDesc.
add<
bool>(
"embedPFCandidate",
false)->setComment(
"embed external particle flow object");
1091 iDesc.
add<
bool>(
"addGenMatch",
true)->setComment(
"add MC matching");
1092 iDesc.
add<
bool>(
"embedGenMatch",
false)->setComment(
"embed MC matched MC information");
1093 std::vector<edm::InputTag> emptySourceVector;
1097 ->
setComment(
"input with MC match information");
1100 iDesc.
add<
bool>(
"addElectronID",
true)->setComment(
"add electron ID variables");
1107 ->
setComment(
"input with electron ID variables");
1110 iDesc.
add<
bool>(
"computeMiniIso",
false)->setComment(
"whether or not to compute and store electron mini-isolation");
1112 ->setComment(
"collection to use to compute mini-iso");
1113 iDesc.
add<std::vector<double>>(
"miniIsoParamsE", std::vector<double>())
1114 ->setComment(
"mini-iso parameters to use for endcap electrons");
1115 iDesc.
add<std::vector<double>>(
"miniIsoParamsB", std::vector<double>())
1116 ->setComment(
"mini-iso parameters to use for barrel electrons");
1129 isoDepositsPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1130 iDesc.
addOptional(
"isoDeposits", isoDepositsPSet);
1143 isolationValuesPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1144 iDesc.
addOptional(
"isolationValues", isolationValuesPSet);
1157 isolationValuesNoPFIdPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1158 iDesc.
addOptional(
"isolationValuesNoPFId", isolationValuesNoPFIdPSet);
1163 iDesc.
add(
"efficiencies", efficienciesPSet);
1164 iDesc.
add<
bool>(
"addEfficiencies",
false);
1172 iDesc.
add<
bool>(
"addMVAVariables",
true)->setComment(
"embed extra variables in pat::Electron : sip3d, sigmaIEtaIPhi");
1178 iDesc.
add(
"userIsolation", isolationPSet);
1183 iDesc.
add<
bool>(
"embedHighLevelSelection",
true)->setComment(
"embed high level selection");
1187 ->
setComment(
"input with high level selection");
1189 ->
setComment(
"input with high level selection");
1191 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_2018_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 815 of file PATElectronProducer.cc.
841 anElectron.embedGsfElectronCore();
843 anElectron.embedGsfTrack();
845 anElectron.embedSuperCluster();
847 anElectron.embedPflowSuperCluster();
849 anElectron.embedSeedCluster();
851 anElectron.embedBasicClusters();
853 anElectron.embedPreshowerClusters();
855 anElectron.embedPflowBasicClusters();
857 anElectron.embedPflowPreshowerClusters();
859 anElectron.embedTrack();
863 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
866 anElectron.addGenParticleRef(genElectron);
869 anElectron.addGenParticleRef(genElectron);
873 anElectron.embedGenParticle();
884 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(), dqmdumpme::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 911 of file PATElectronProducer.cc.
949 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
966 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(), dqmdumpme::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 231 of file PATElectronProducer.cc.
233 if (
iEvent.isRealData()) {
297 std::vector<edm::Handle<edm::ValueMap<float>>> idhandles;
298 std::vector<pat::Electron::IdPair> ids;
313 bool beamSpotIsValid =
false;
314 bool primaryVertexIsValid =
false;
328 if (pvHandle.
isValid() && !pvHandle->empty()) {
330 primaryVertexIsValid =
true;
333 <<
"No primary vertex available from EventSetup, not adding high level selection \n";
355 std::vector<Electron>*
patElectrons =
new std::vector<Electron>();
370 bool MatchedToAmbiguousGsfTrack =
false;
375 if (
Matched || MatchedToAmbiguousGsfTrack)
380 if (itElectron->gsfTrack() ==
i->gsfTrackRef()) {
384 it != itElectron->ambiguousGsfTracksEnd();
386 MatchedToAmbiguousGsfTrack |= (
bool)(
i->gsfTrackRef() == (*it));
390 if (
Matched || MatchedToAmbiguousGsfTrack) {
397 anElectron.setPFCandidateRef(pfRef);
399 anElectron.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[elePtr],
400 (*PUPPIIsolation_neutral_hadrons)[elePtr],
401 (*PUPPIIsolation_photons)[elePtr]);
402 anElectron.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[elePtr],
403 (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
404 (*PUPPINoLeptonsIsolation_photons)[elePtr]);
406 anElectron.setIsolationPUPPI(-999., -999., -999.);
407 anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
411 anElectron.setIsPF(
true);
414 anElectron.embedPFCandidate();
428 if (
track.isNonnull() &&
track.isAvailable()) {
433 ip3d = ip3dpv.second.value();
442 ids[
i].second = (*idhandles[
i])[elecsRef];
445 ids.push_back(std::make_pair(
"pf_evspi", pfRef->mva_e_pi()));
446 ids.push_back(std::make_pair(
"pf_evsmu", pfRef->mva_e_mu()));
447 anElectron.setElectronIDs(ids);
452 std::vector<float> vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
453 anElectron.setMvaVariables(vCov[1],
ip3d);
465 anElectron.setPfIsolationVariables(newPFIsol);
468 std::vector<DetId> selectedCells;
469 bool barrel = itElectron->isEB();
473 clusIt != itElectron->superCluster()->clustersEnd();
476 DetId seed = lazyTools.getMaximum(**clusIt).first;
478 std::vector<DetId> dets5x5 =
481 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
484 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
485 selectedCells.push_back(
hit.first);
492 clusIt != itElectron->parentSuperCluster()->clustersEnd();
495 DetId seed = lazyTools.getMaximum(**clusIt).first;
497 std::vector<DetId> dets5x5 =
500 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
503 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
504 selectedCells.push_back(
hit.first);
510 std::sort(selectedCells.begin(), selectedCells.end());
511 std::unique(selectedCells.begin(), selectedCells.end());
524 unsigned nSelectedCells = selectedCells.size();
525 for (
unsigned icell = 0; icell < nSelectedCells; ++icell) {
531 selectedRecHits.
sort();
533 anElectron.embedRecHits(&selectedRecHits);
536 bool passconversionveto =
false;
547 anElectron.setPassConversionVeto(passconversionveto);
579 bool pfCandsPresent =
false, valMapPresent =
false;
604 anElectron.setPFCandidateRef(
pf);
608 }
else if (pfCandsPresent) {
616 if (trkRef == pfTrkRef) {
619 anElectron.setPFCandidateRef(pfRef);
623 }
else if (valMapPresent) {
628 pfId = pfElePtr.isNonnull();
631 anElectron.setIsPF(pfId);
644 anElectron.setIsolation(it->first, it->second);
648 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
655 ids[
i].second = (*idhandles[
i])[elecsRef];
657 anElectron.setElectronIDs(ids);
672 if (
track.isNonnull() &&
track.isAvailable()) {
677 ip3d = ip3dpv.second.value();
683 std::vector<float> vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
684 anElectron.setMvaVariables(vCov[1],
ip3d);
697 anElectron.setPfIsolationVariables(newPFIsol);
701 anElectron.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[elePtr],
702 (*PUPPIIsolation_neutral_hadrons)[elePtr],
703 (*PUPPIIsolation_photons)[elePtr]);
704 anElectron.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[elePtr],
705 (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
706 (*PUPPINoLeptonsIsolation_photons)[elePtr]);
708 anElectron.setIsolationPUPPI(-999., -999., -999.);
709 anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
712 std::vector<DetId> selectedCells;
713 bool barrel = itElectron->isEB();
717 clusIt != itElectron->superCluster()->clustersEnd();
720 DetId seed = lazyTools.getMaximum(**clusIt).first;
722 std::vector<DetId> dets5x5 =
725 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
728 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
729 selectedCells.push_back(
hit.first);
736 clusIt != itElectron->parentSuperCluster()->clustersEnd();
739 DetId seed = lazyTools.getMaximum(**clusIt).first;
741 std::vector<DetId> dets5x5 =
744 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
747 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
748 selectedCells.push_back(
hit.first);
754 std::sort(selectedCells.begin(), selectedCells.end());
755 std::unique(selectedCells.begin(), selectedCells.end());
768 unsigned nSelectedCells = selectedCells.size();
769 for (
unsigned icell = 0; icell < nSelectedCells; ++icell) {
775 selectedRecHits.
sort();
777 anElectron.embedRecHits(&selectedRecHits);
780 bool passconversionveto =
false;
790 anElectron.setPassConversionVeto(passconversionveto);
807 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, 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(), dqmdumpme::first, genMatchTokens_, edm::EventSetup::get(), get, CaloTopology::getSubdetectorTopology(), CaloSubdetectorTopology::getWindow(), ConversionTools::hasMatchedConversion(), hcalPFClusterIsoT_, hConversionsToken_, mps_fire::i, training_settings::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_, SurveyInfoScenario_cff::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(), edm::SortedCollection< T, SORT >::sort(), reco::GsfElectron::PflowIsolationVariables::sumEcalClusterEt, reco::GsfElectron::PflowIsolationVariables::sumHcalClusterEt, HLT_2018_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 196 of file PATElectronProducer.h.
202 if (iConfig.
exists(psetName)) {
205 if (depconf.
exists(
"tracker"))
207 if (depconf.
exists(
"ecal"))
209 if (depconf.
exists(
"hcal"))
211 if (depconf.
exists(
"pfAllParticles")) {
214 if (depconf.
exists(
"pfChargedHadrons")) {
218 if (depconf.
exists(
"pfChargedAll")) {
221 if (depconf.
exists(
"pfPUChargedHadrons")) {
225 if (depconf.
exists(
"pfNeutralHadrons")) {
229 if (depconf.
exists(
"pfPhotons")) {
232 if (depconf.
exists(
"user")) {
233 std::vector<edm::InputTag> userdeps = depconf.
getParameter<std::vector<edm::InputTag> >(
"user");
234 std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
236 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().
Referenced by PATElectronProducer().
◆ 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 |
◆ 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
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
T getParameter(std::string const &) 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_
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 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_