|
 |
Produces pat::Electron's.
More...
|
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 68 of file PATElectronProducer.cc.
◆ ElectronBaseRef
◆ GenAssociations
◆ IsoDepositMaps
◆ IsolationLabel
◆ IsolationLabels
◆ IsolationValueMaps
◆ NameTag
◆ PATElectronProducer()
Definition at line 270 of file PATElectronProducer.cc.
297 ? consumes<
edm::ValueMap<std::vector<reco::PFCandidateRef>>>(
336 iConfig.
getParameter<std::vector<edm::InputTag>>(
"genParticleMatch"),
337 [
this](
edm::InputTag const&
tag) { return consumes<edm::Association<reco::GenParticleCollection>>(tag); });
371 <<
"PATElectronProducer: you can't specify both 'electronIDSource' and 'electronIDSources'\n";
376 for (std::vector<std::string>::const_iterator it =
names.begin(), ed =
names.end(); it != ed; ++it) {
383 <<
"PATElectronProducer: id addElectronID is true, you must specify either:\n"
384 <<
"\tInputTag electronIDSource = <someTag>\n"
386 <<
"\tPSet electronIDSources = { \n"
387 <<
"\t\tInputTag <someName> = <someTag> // as many as you want \n "
418 throw cms::Exception(
"ParameterError") <<
"miniIsoParams must have exactly 9 elements.\n";
442 throw cms::Exception(
"Configuration",
"usePfCandidateMultiMap not supported when useParticleFlow is set to true");
445 produces<std::vector<Electron>>();
◆ ~PATElectronProducer()
PATElectronProducer::~PATElectronProducer |
( |
| ) |
|
|
override |
◆ embedHighLevel()
Definition at line 1413 of file PATElectronProducer.cc.
1427 std::pair<bool, Measurement1D>
result =
1429 double d0_corr =
result.second.value();
1430 double d0_err = primaryVertexIsValid ?
result.second.error() : -1.0;
1442 d0_corr =
result.second.value();
1443 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 1237 of file PATElectronProducer.cc.
1239 iDesc.
setComment(
"PAT electron producer module");
1248 "ecalPFClusterIsoMap",
edm::InputTag(
"electronEcalPFClusterIsolationProducer"),
true) and
1250 "hcalPFClusterIsoMap",
edm::InputTag(
"electronHcalPFClusterIsolationProducer"),
true))
or
1256 "puppiIsolationChargedHadrons",
1257 edm::InputTag(
"egmElectronPUPPIIsolation",
"h+-DR030-BarVeto000-EndVeto001"),
1260 "puppiIsolationNeutralHadrons",
1261 edm::InputTag(
"egmElectronPUPPIIsolation",
"h0-DR030-BarVeto000-EndVeto000"),
1264 "puppiIsolationPhotons",
1265 edm::InputTag(
"egmElectronPUPPIIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1268 "puppiNoLeptonsIsolationChargedHadrons",
1269 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1272 "puppiNoLeptonsIsolationNeutralHadrons",
1273 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1276 "puppiNoLeptonsIsolationPhotons",
1277 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1282 iDesc.
add<
bool>(
"embedGsfElectronCore",
true)->setComment(
"embed external gsf electron core");
1283 iDesc.
add<
bool>(
"embedGsfTrack",
true)->setComment(
"embed external gsf track");
1284 iDesc.
add<
bool>(
"embedSuperCluster",
true)->setComment(
"embed external super cluster");
1285 iDesc.
add<
bool>(
"embedPflowSuperCluster",
true)->setComment(
"embed external super cluster");
1286 iDesc.
add<
bool>(
"embedSeedCluster",
true)->setComment(
"embed external seed cluster");
1287 iDesc.
add<
bool>(
"embedBasicClusters",
true)->setComment(
"embed external basic clusters");
1288 iDesc.
add<
bool>(
"embedPreshowerClusters",
true)->setComment(
"embed external preshower clusters");
1289 iDesc.
add<
bool>(
"embedPflowBasicClusters",
true)->setComment(
"embed external pflow basic clusters");
1290 iDesc.
add<
bool>(
"embedPflowPreshowerClusters",
true)->setComment(
"embed external pflow preshower clusters");
1291 iDesc.
add<
bool>(
"embedTrack",
false)->setComment(
"embed external track");
1292 iDesc.
add<
bool>(
"embedRecHits",
true)->setComment(
"embed external RecHits");
1296 ->setComment(
"particle flow input collection");
1299 "take ParticleFlow candidates from pfCandidateMultiMap instead of matching to pfElectrons by Gsf track "
1304 iDesc.
add<
bool>(
"useParticleFlow",
false)->setComment(
"whether to use particle flow or not");
1305 iDesc.
add<
bool>(
"embedPFCandidate",
false)->setComment(
"embed external particle flow object");
1308 iDesc.
add<
bool>(
"addGenMatch",
true)->setComment(
"add MC matching");
1309 iDesc.
add<
bool>(
"embedGenMatch",
false)->setComment(
"embed MC matched MC information");
1310 std::vector<edm::InputTag> emptySourceVector;
1314 ->
setComment(
"input with MC match information");
1317 iDesc.
add<
bool>(
"addElectronID",
true)->setComment(
"add electron ID variables");
1324 ->
setComment(
"input with electron ID variables");
1327 iDesc.
add<
bool>(
"computeMiniIso",
false)->setComment(
"whether or not to compute and store electron mini-isolation");
1329 ->setComment(
"collection to use to compute mini-iso");
1330 iDesc.
add<std::vector<double>>(
"miniIsoParamsE", std::vector<double>())
1331 ->setComment(
"mini-iso parameters to use for endcap electrons");
1332 iDesc.
add<std::vector<double>>(
"miniIsoParamsB", std::vector<double>())
1333 ->setComment(
"mini-iso parameters to use for barrel electrons");
1346 isoDepositsPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1347 iDesc.
addOptional(
"isoDeposits", isoDepositsPSet);
1360 isolationValuesPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1361 iDesc.
addOptional(
"isolationValues", isolationValuesPSet);
1374 isolationValuesNoPFIdPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1375 iDesc.
addOptional(
"isolationValuesNoPFId", isolationValuesNoPFIdPSet);
1380 iDesc.
add(
"efficiencies", efficienciesPSet);
1381 iDesc.
add<
bool>(
"addEfficiencies",
false);
1389 iDesc.
add<
bool>(
"addMVAVariables",
true)->setComment(
"embed extra variables in pat::Electron : sip3d, sigmaIEtaIPhi");
1395 iDesc.
add(
"userIsolation", isolationPSet);
1400 iDesc.
add<
bool>(
"embedHighLevelSelection",
true)->setComment(
"embed high level selection");
1404 ->
setComment(
"input with high level selection");
1406 ->
setComment(
"input with high level selection");
1408 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 1032 of file PATElectronProducer.cc.
1058 anElectron.embedGsfElectronCore();
1060 anElectron.embedGsfTrack();
1062 anElectron.embedSuperCluster();
1064 anElectron.embedPflowSuperCluster();
1066 anElectron.embedSeedCluster();
1068 anElectron.embedBasicClusters();
1070 anElectron.embedPreshowerClusters();
1072 anElectron.embedPflowBasicClusters();
1074 anElectron.embedPflowPreshowerClusters();
1076 anElectron.embedTrack();
1080 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
1083 anElectron.addGenParticleRef(genElectron);
1086 anElectron.addGenParticleRef(genElectron);
1090 anElectron.embedGenParticle();
1101 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 1128 of file PATElectronProducer.cc.
1166 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
1183 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 450 of file PATElectronProducer.cc.
452 if (
iEvent.isRealData()) {
516 std::vector<edm::Handle<edm::ValueMap<float>>> idhandles;
517 std::vector<pat::Electron::IdPair> ids;
532 bool beamSpotIsValid =
false;
533 bool primaryVertexIsValid =
false;
547 if (pvHandle.
isValid() && !pvHandle->empty()) {
549 primaryVertexIsValid =
true;
552 <<
"No primary vertex available from EventSetup, not adding high level selection \n";
574 std::vector<Electron>*
patElectrons =
new std::vector<Electron>();
589 bool MatchedToAmbiguousGsfTrack =
false;
594 if (
Matched || MatchedToAmbiguousGsfTrack)
599 if (itElectron->gsfTrack() ==
i->gsfTrackRef()) {
602 for (
auto const& it : itElectron->ambiguousGsfTracks()) {
603 MatchedToAmbiguousGsfTrack |= (
bool)(
i->gsfTrackRef() == it);
607 if (
Matched || MatchedToAmbiguousGsfTrack) {
614 anElectron.setPFCandidateRef(pfRef);
616 anElectron.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[elePtr],
617 (*PUPPIIsolation_neutral_hadrons)[elePtr],
618 (*PUPPIIsolation_photons)[elePtr]);
619 anElectron.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[elePtr],
620 (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
621 (*PUPPINoLeptonsIsolation_photons)[elePtr]);
623 anElectron.setIsolationPUPPI(-999., -999., -999.);
624 anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
628 anElectron.setIsPF(
true);
631 anElectron.embedPFCandidate();
645 if (
track.isNonnull() &&
track.isAvailable()) {
650 ip3d = ip3dpv.second.value();
659 ids[
i].second = (*idhandles[
i])[elecsRef];
662 ids.push_back(std::make_pair(
"pf_evspi", pfRef->mva_e_pi()));
663 ids.push_back(std::make_pair(
"pf_evsmu", pfRef->mva_e_mu()));
664 anElectron.setElectronIDs(ids);
669 const auto& vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
670 anElectron.setMvaVariables(vCov[1],
ip3d);
682 anElectron.setPfIsolationVariables(newPFIsol);
685 std::vector<DetId> selectedCells;
686 bool barrel = itElectron->isEB();
690 clusIt != itElectron->superCluster()->clustersEnd();
693 DetId seed = lazyTools.getMaximum(**clusIt).first;
695 std::vector<DetId> dets5x5 =
698 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
701 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
702 selectedCells.push_back(
hit.first);
709 clusIt != itElectron->parentSuperCluster()->clustersEnd();
712 DetId seed = lazyTools.getMaximum(**clusIt).first;
714 std::vector<DetId> dets5x5 =
717 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
720 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
721 selectedCells.push_back(
hit.first);
727 std::sort(selectedCells.begin(), selectedCells.end());
728 std::unique(selectedCells.begin(), selectedCells.end());
741 unsigned nSelectedCells = selectedCells.size();
742 for (
unsigned icell = 0; icell < nSelectedCells; ++icell) {
748 selectedRecHits.
sort();
750 anElectron.embedRecHits(&selectedRecHits);
753 bool passconversionveto =
false;
754 if (hConversions.isValid()) {
764 anElectron.setPassConversionVeto(passconversionveto);
796 bool pfCandsPresent =
false, valMapPresent =
false;
821 anElectron.setPFCandidateRef(
pf);
825 }
else if (pfCandsPresent) {
833 if (trkRef == pfTrkRef) {
836 anElectron.setPFCandidateRef(pfRef);
840 }
else if (valMapPresent) {
845 pfId = pfElePtr.isNonnull();
848 anElectron.setIsPF(pfId);
861 anElectron.setIsolation(it->first, it->second);
865 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
872 ids[
i].second = (*idhandles[
i])[elecsRef];
874 anElectron.setElectronIDs(ids);
889 if (
track.isNonnull() &&
track.isAvailable()) {
894 ip3d = ip3dpv.second.value();
900 const auto& vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
901 anElectron.setMvaVariables(vCov[1],
ip3d);
914 anElectron.setPfIsolationVariables(newPFIsol);
918 anElectron.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[elePtr],
919 (*PUPPIIsolation_neutral_hadrons)[elePtr],
920 (*PUPPIIsolation_photons)[elePtr]);
921 anElectron.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[elePtr],
922 (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
923 (*PUPPINoLeptonsIsolation_photons)[elePtr]);
925 anElectron.setIsolationPUPPI(-999., -999., -999.);
926 anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
929 std::vector<DetId> selectedCells;
930 bool barrel = itElectron->isEB();
934 clusIt != itElectron->superCluster()->clustersEnd();
937 DetId seed = lazyTools.getMaximum(**clusIt).first;
939 std::vector<DetId> dets5x5 =
942 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
945 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
946 selectedCells.push_back(
hit.first);
953 clusIt != itElectron->parentSuperCluster()->clustersEnd();
956 DetId seed = lazyTools.getMaximum(**clusIt).first;
958 std::vector<DetId> dets5x5 =
961 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
964 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
965 selectedCells.push_back(
hit.first);
971 std::sort(selectedCells.begin(), selectedCells.end());
972 std::unique(selectedCells.begin(), selectedCells.end());
985 unsigned nSelectedCells = selectedCells.size();
986 for (
unsigned icell = 0; icell < nSelectedCells; ++icell) {
992 selectedRecHits.
sort();
994 anElectron.embedRecHits(&selectedRecHits);
997 bool passconversionveto =
false;
998 if (hConversions.isValid()) {
1000 passconversionveto =
1004 passconversionveto =
1007 anElectron.setPassConversionVeto(passconversionveto);
1024 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_, ecalTopologyToken_, 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::getData(), edm::EventSetup::getHandle(), 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, trackBuilderToken_, 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 218 of file PATElectronProducer.cc.
224 if (iConfig.
exists(psetName)) {
227 if (depconf.
exists(
"tracker"))
229 if (depconf.
exists(
"ecal"))
231 if (depconf.
exists(
"hcal"))
233 if (depconf.
exists(
"pfAllParticles")) {
236 if (depconf.
exists(
"pfChargedHadrons")) {
240 if (depconf.
exists(
"pfChargedAll")) {
243 if (depconf.
exists(
"pfPUChargedHadrons")) {
247 if (depconf.
exists(
"pfNeutralHadrons")) {
251 if (depconf.
exists(
"pfPhotons")) {
254 if (depconf.
exists(
"user")) {
255 std::vector<edm::InputTag> userdeps = depconf.
getParameter<std::vector<edm::InputTag>>(
"user");
256 std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
258 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_
◆ ecalTopologyToken_
◆ 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_
◆ trackBuilderToken_
◆ 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
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > trackBuilderToken_
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T >>> &tokens)
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
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
void setMiniPFIsolation(PFIsolation const &iso)
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > ecalTopologyToken_
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
bool getData(T &iHolder) const
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_
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_