|
|
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 1199 of file PATElectronProducer.cc.
1213 std::pair<bool, Measurement1D>
result =
1215 double d0_corr =
result.second.value();
1216 double d0_err = primaryVertexIsValid ?
result.second.error() : -1.0;
1228 d0_corr =
result.second.value();
1229 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 1023 of file PATElectronProducer.cc.
1025 iDesc.
setComment(
"PAT electron producer module");
1034 "ecalPFClusterIsoMap",
edm::InputTag(
"electronEcalPFClusterIsolationProducer"),
true) and
1036 "hcalPFClusterIsoMap",
edm::InputTag(
"electronHcalPFClusterIsolationProducer"),
true))
or
1042 "puppiIsolationChargedHadrons",
1043 edm::InputTag(
"egmElectronPUPPIIsolation",
"h+-DR030-BarVeto000-EndVeto001"),
1046 "puppiIsolationNeutralHadrons",
1047 edm::InputTag(
"egmElectronPUPPIIsolation",
"h0-DR030-BarVeto000-EndVeto000"),
1050 "puppiIsolationPhotons",
1051 edm::InputTag(
"egmElectronPUPPIIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1054 "puppiNoLeptonsIsolationChargedHadrons",
1055 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1058 "puppiNoLeptonsIsolationNeutralHadrons",
1059 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1062 "puppiNoLeptonsIsolationPhotons",
1063 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1068 iDesc.
add<
bool>(
"embedGsfElectronCore",
true)->setComment(
"embed external gsf electron core");
1069 iDesc.
add<
bool>(
"embedGsfTrack",
true)->setComment(
"embed external gsf track");
1070 iDesc.
add<
bool>(
"embedSuperCluster",
true)->setComment(
"embed external super cluster");
1071 iDesc.
add<
bool>(
"embedPflowSuperCluster",
true)->setComment(
"embed external super cluster");
1072 iDesc.
add<
bool>(
"embedSeedCluster",
true)->setComment(
"embed external seed cluster");
1073 iDesc.
add<
bool>(
"embedBasicClusters",
true)->setComment(
"embed external basic clusters");
1074 iDesc.
add<
bool>(
"embedPreshowerClusters",
true)->setComment(
"embed external preshower clusters");
1075 iDesc.
add<
bool>(
"embedPflowBasicClusters",
true)->setComment(
"embed external pflow basic clusters");
1076 iDesc.
add<
bool>(
"embedPflowPreshowerClusters",
true)->setComment(
"embed external pflow preshower clusters");
1077 iDesc.
add<
bool>(
"embedTrack",
false)->setComment(
"embed external track");
1078 iDesc.
add<
bool>(
"embedRecHits",
true)->setComment(
"embed external RecHits");
1082 ->setComment(
"particle flow input collection");
1085 "take ParticleFlow candidates from pfCandidateMultiMap instead of matching to pfElectrons by Gsf track "
1090 iDesc.
add<
bool>(
"useParticleFlow",
false)->setComment(
"whether to use particle flow or not");
1091 iDesc.
add<
bool>(
"embedPFCandidate",
false)->setComment(
"embed external particle flow object");
1094 iDesc.
add<
bool>(
"addGenMatch",
true)->setComment(
"add MC matching");
1095 iDesc.
add<
bool>(
"embedGenMatch",
false)->setComment(
"embed MC matched MC information");
1096 std::vector<edm::InputTag> emptySourceVector;
1100 ->
setComment(
"input with MC match information");
1103 iDesc.
add<
bool>(
"addElectronID",
true)->setComment(
"add electron ID variables");
1110 ->
setComment(
"input with electron ID variables");
1113 iDesc.
add<
bool>(
"computeMiniIso",
false)->setComment(
"whether or not to compute and store electron mini-isolation");
1115 ->setComment(
"collection to use to compute mini-iso");
1116 iDesc.
add<std::vector<double>>(
"miniIsoParamsE", std::vector<double>())
1117 ->setComment(
"mini-iso parameters to use for endcap electrons");
1118 iDesc.
add<std::vector<double>>(
"miniIsoParamsB", std::vector<double>())
1119 ->setComment(
"mini-iso parameters to use for barrel electrons");
1132 isoDepositsPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1133 iDesc.
addOptional(
"isoDeposits", isoDepositsPSet);
1146 isolationValuesPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1147 iDesc.
addOptional(
"isolationValues", isolationValuesPSet);
1160 isolationValuesNoPFIdPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1161 iDesc.
addOptional(
"isolationValuesNoPFId", isolationValuesNoPFIdPSet);
1166 iDesc.
add(
"efficiencies", efficienciesPSet);
1167 iDesc.
add<
bool>(
"addEfficiencies",
false);
1175 iDesc.
add<
bool>(
"addMVAVariables",
true)->setComment(
"embed extra variables in pat::Electron : sip3d, sigmaIEtaIPhi");
1181 iDesc.
add(
"userIsolation", isolationPSet);
1186 iDesc.
add<
bool>(
"embedHighLevelSelection",
true)->setComment(
"embed high level selection");
1190 ->
setComment(
"input with high level selection");
1192 ->
setComment(
"input with high level selection");
1194 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 818 of file PATElectronProducer.cc.
844 anElectron.embedGsfElectronCore();
846 anElectron.embedGsfTrack();
848 anElectron.embedSuperCluster();
850 anElectron.embedPflowSuperCluster();
852 anElectron.embedSeedCluster();
854 anElectron.embedBasicClusters();
856 anElectron.embedPreshowerClusters();
858 anElectron.embedPflowBasicClusters();
860 anElectron.embedPflowPreshowerClusters();
862 anElectron.embedTrack();
866 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
869 anElectron.addGenParticleRef(genElectron);
872 anElectron.addGenParticleRef(genElectron);
876 anElectron.embedGenParticle();
887 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 914 of file PATElectronProducer.cc.
952 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
969 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 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()) {
387 it != itElectron->ambiguousGsfTracksEnd();
389 MatchedToAmbiguousGsfTrack |= (
bool)(
i->gsfTrackRef() == (*it));
393 if (
Matched || MatchedToAmbiguousGsfTrack) {
400 anElectron.setPFCandidateRef(pfRef);
402 anElectron.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[elePtr],
403 (*PUPPIIsolation_neutral_hadrons)[elePtr],
404 (*PUPPIIsolation_photons)[elePtr]);
405 anElectron.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[elePtr],
406 (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
407 (*PUPPINoLeptonsIsolation_photons)[elePtr]);
409 anElectron.setIsolationPUPPI(-999., -999., -999.);
410 anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
414 anElectron.setIsPF(
true);
417 anElectron.embedPFCandidate();
431 if (
track.isNonnull() &&
track.isAvailable()) {
436 ip3d = ip3dpv.second.value();
445 ids[
i].second = (*idhandles[
i])[elecsRef];
448 ids.push_back(std::make_pair(
"pf_evspi", pfRef->mva_e_pi()));
449 ids.push_back(std::make_pair(
"pf_evsmu", pfRef->mva_e_mu()));
450 anElectron.setElectronIDs(ids);
455 std::vector<float> vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
456 anElectron.setMvaVariables(vCov[1],
ip3d);
468 anElectron.setPfIsolationVariables(newPFIsol);
471 std::vector<DetId> selectedCells;
472 bool barrel = itElectron->isEB();
476 clusIt != itElectron->superCluster()->clustersEnd();
479 DetId seed = lazyTools.getMaximum(**clusIt).first;
481 std::vector<DetId> dets5x5 =
484 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
487 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
488 selectedCells.push_back(
hit.first);
495 clusIt != itElectron->parentSuperCluster()->clustersEnd();
498 DetId seed = lazyTools.getMaximum(**clusIt).first;
500 std::vector<DetId> dets5x5 =
503 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
506 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
507 selectedCells.push_back(
hit.first);
513 std::sort(selectedCells.begin(), selectedCells.end());
514 std::unique(selectedCells.begin(), selectedCells.end());
527 unsigned nSelectedCells = selectedCells.size();
528 for (
unsigned icell = 0; icell < nSelectedCells; ++icell) {
534 selectedRecHits.
sort();
536 anElectron.embedRecHits(&selectedRecHits);
539 bool passconversionveto =
false;
540 if (hConversions.isValid()) {
550 anElectron.setPassConversionVeto(passconversionveto);
582 bool pfCandsPresent =
false, valMapPresent =
false;
607 anElectron.setPFCandidateRef(
pf);
611 }
else if (pfCandsPresent) {
619 if (trkRef == pfTrkRef) {
622 anElectron.setPFCandidateRef(pfRef);
626 }
else if (valMapPresent) {
631 pfId = pfElePtr.isNonnull();
634 anElectron.setIsPF(pfId);
647 anElectron.setIsolation(it->first, it->second);
651 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
658 ids[
i].second = (*idhandles[
i])[elecsRef];
660 anElectron.setElectronIDs(ids);
675 if (
track.isNonnull() &&
track.isAvailable()) {
680 ip3d = ip3dpv.second.value();
686 std::vector<float> vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
687 anElectron.setMvaVariables(vCov[1],
ip3d);
700 anElectron.setPfIsolationVariables(newPFIsol);
704 anElectron.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[elePtr],
705 (*PUPPIIsolation_neutral_hadrons)[elePtr],
706 (*PUPPIIsolation_photons)[elePtr]);
707 anElectron.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[elePtr],
708 (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
709 (*PUPPINoLeptonsIsolation_photons)[elePtr]);
711 anElectron.setIsolationPUPPI(-999., -999., -999.);
712 anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
715 std::vector<DetId> selectedCells;
716 bool barrel = itElectron->isEB();
720 clusIt != itElectron->superCluster()->clustersEnd();
723 DetId seed = lazyTools.getMaximum(**clusIt).first;
725 std::vector<DetId> dets5x5 =
728 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
731 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
732 selectedCells.push_back(
hit.first);
739 clusIt != itElectron->parentSuperCluster()->clustersEnd();
742 DetId seed = lazyTools.getMaximum(**clusIt).first;
744 std::vector<DetId> dets5x5 =
747 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
750 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
751 selectedCells.push_back(
hit.first);
757 std::sort(selectedCells.begin(), selectedCells.end());
758 std::unique(selectedCells.begin(), selectedCells.end());
771 unsigned nSelectedCells = selectedCells.size();
772 for (
unsigned icell = 0; icell < nSelectedCells; ++icell) {
778 selectedRecHits.
sort();
780 anElectron.embedRecHits(&selectedRecHits);
783 bool passconversionveto =
false;
784 if (hConversions.isValid()) {
793 anElectron.setPassConversionVeto(passconversionveto);
810 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(), dqmdumpme::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(), 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_