CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
pat::PATElectronProducer Class Reference

Produces pat::Electron's. More...

#include "PhysicsTools/PatAlgos/interface/PATElectronProducer.h"

Inheritance diagram for pat::PATElectronProducer:
edm::stream::EDProducer<>

Public Member Functions

 PATElectronProducer (const edm::ParameterSet &iConfig)
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 ~PATElectronProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Types

typedef edm::RefToBase< reco::GsfElectronElectronBaseRef
 
typedef std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > GenAssociations
 
typedef std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps
 
typedef std::pair< pat::IsolationKeys, edm::InputTagIsolationLabel
 
typedef std::vector< IsolationLabelIsolationLabels
 
typedef std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
 
typedef std::pair< std::string, edm::InputTagNameTag
 

Private Member Functions

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)
 

Private Attributes

const bool addEfficiencies_
 
const bool addElecID_
 
bool addGenMatch_
 
const bool addMVAVariables_
 mva input variables More...
 
const bool addPFClusterIso_
 
const bool addPuppiIsolation_
 
const bool addResolutions_
 
const edm::EDGetTokenT< reco::BeamSpotbeamLineToken_
 
bool computeMiniIso_
 
const EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
 
const edm::EDGetTokenT< edm::ValueMap< float > > ecalPFClusterIsoT_
 
const CaloTopologyecalTopology_
 
pat::helper::EfficiencyLoader efficiencyLoader_
 
std::vector< NameTagelecIDSrcs_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > elecIDTokens_
 
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
 
const bool embedBasicClusters_
 
bool embedGenMatch_
 
const bool embedGsfElectronCore_
 
const bool embedGsfTrack_
 
const bool embedHighLevelSelection_
 embed high level selection variables? More...
 
const bool embedPFCandidate_
 
const bool embedPflowBasicClusters_
 
const bool embedPflowPreshowerClusters_
 
const bool embedPflowSuperCluster_
 
const bool embedPreshowerClusters_
 
const bool embedRecHits_
 
const bool embedSeedCluster_
 
const bool embedSuperCluster_
 
const bool embedTrack_
 
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
 
const edm::EDGetTokenT< edm::ValueMap< float > > hcalPFClusterIsoT_
 
const edm::EDGetTokenT< reco::ConversionCollectionhConversionsToken_
 
IsolationLabels isoDepositLabels_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
 
IsolationLabels isolationValueLabels_
 
IsolationLabels isolationValueLabelsNoPFId_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueNoPFIdTokens_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
 
pat::helper::MultiIsolator isolator_
 
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
 
std::vector< double > miniIsoParamsB_
 
std::vector< double > miniIsoParamsE_
 
edm::EDGetTokenT< pat::PackedCandidateCollectionpcToken_
 
const edm::EDGetTokenT< edm::ValueMap< reco::PFCandidatePtr > > pfCandidateMapToken_
 
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > pfCandidateMultiMapToken_
 
const edm::EDGetTokenT< reco::PFCandidateCollectionpfElecToken_
 
const GreaterByPt< ElectronpTComparator_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_charged_hadrons_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_neutral_hadrons_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
 
const edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
 
const edm::InputTag reducedBarrelRecHitCollection_
 
const edm::EDGetTokenT< EcalRecHitCollectionreducedBarrelRecHitCollectionToken_
 
const edm::InputTag reducedEndcapRecHitCollection_
 
const edm::EDGetTokenT< EcalRecHitCollectionreducedEndcapRecHitCollectionToken_
 
pat::helper::KinResolutionsLoader resolutionLoader_
 
const bool useParticleFlow_
 pflow specific More...
 
const bool usePfCandidateMultiMap_
 
pat::PATUserDataHelper< pat::ElectronuserDataHelper_
 
const bool useUserData_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

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.

Member Typedef Documentation

◆ ElectronBaseRef

Definition at line 112 of file PATElectronProducer.h.

◆ GenAssociations

Definition at line 82 of file PATElectronProducer.h.

◆ IsoDepositMaps

Definition at line 113 of file PATElectronProducer.h.

◆ IsolationLabel

Definition at line 147 of file PATElectronProducer.h.

◆ IsolationLabels

Definition at line 148 of file PATElectronProducer.h.

◆ IsolationValueMaps

Definition at line 114 of file PATElectronProducer.h.

◆ NameTag

typedef std::pair<std::string, edm::InputTag> pat::PATElectronProducer::NameTag
private

Definition at line 159 of file PATElectronProducer.h.

Constructor & Destructor Documentation

◆ PATElectronProducer()

PATElectronProducer::PATElectronProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 52 of file PATElectronProducer.cc.

53  : // general configurables
54  electronToken_(consumes<edm::View<reco::GsfElectron>>(iConfig.getParameter<edm::InputTag>("electronSource"))),
55  hConversionsToken_(consumes<reco::ConversionCollection>(edm::InputTag("allConversions"))),
56  embedGsfElectronCore_(iConfig.getParameter<bool>("embedGsfElectronCore")),
57  embedGsfTrack_(iConfig.getParameter<bool>("embedGsfTrack")),
58  embedSuperCluster_(iConfig.getParameter<bool>("embedSuperCluster")),
59  embedPflowSuperCluster_(iConfig.getParameter<bool>("embedPflowSuperCluster")),
60  embedSeedCluster_(iConfig.getParameter<bool>("embedSeedCluster")),
61  embedBasicClusters_(iConfig.getParameter<bool>("embedBasicClusters")),
62  embedPreshowerClusters_(iConfig.getParameter<bool>("embedPreshowerClusters")),
63  embedPflowBasicClusters_(iConfig.getParameter<bool>("embedPflowBasicClusters")),
64  embedPflowPreshowerClusters_(iConfig.getParameter<bool>("embedPflowPreshowerClusters")),
65  embedTrack_(iConfig.getParameter<bool>("embedTrack")),
66  addGenMatch_(iConfig.getParameter<bool>("addGenMatch")),
67  embedGenMatch_(addGenMatch_ ? iConfig.getParameter<bool>("embedGenMatch") : false),
68  embedRecHits_(iConfig.getParameter<bool>("embedRecHits")),
69  // pflow configurables
70  useParticleFlow_(iConfig.getParameter<bool>("useParticleFlow")),
71  usePfCandidateMultiMap_(iConfig.getParameter<bool>("usePfCandidateMultiMap")),
73  ? consumes<reco::PFCandidateCollection>(iConfig.getParameter<edm::InputTag>("pfElectronSource"))
76  iConfig.getParameter<edm::InputTag>("pfCandidateMap"))
79  ? consumes<edm::ValueMap<std::vector<reco::PFCandidateRef>>>(
80  iConfig.getParameter<edm::InputTag>("pfCandidateMultiMap"))
81  : edm::EDGetTokenT<edm::ValueMap<std::vector<reco::PFCandidateRef>>>()),
82  embedPFCandidate_(iConfig.getParameter<bool>("embedPFCandidate")),
83  // mva input variables
84  addMVAVariables_(iConfig.getParameter<bool>("addMVAVariables")),
85  reducedBarrelRecHitCollection_(iConfig.getParameter<edm::InputTag>("reducedBarrelRecHitCollection")),
87  reducedEndcapRecHitCollection_(iConfig.getParameter<edm::InputTag>("reducedEndcapRecHitCollection")),
89  ecalClusterToolsESGetTokens_{consumesCollector()},
90  // PFCluster Isolation maps
91  addPFClusterIso_(iConfig.getParameter<bool>("addPFClusterIso")),
92  addPuppiIsolation_(iConfig.getParameter<bool>("addPuppiIsolation")),
93  ecalPFClusterIsoT_(consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("ecalPFClusterIsoMap"))),
94  hcalPFClusterIsoT_(consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("hcalPFClusterIsoMap"))),
95  // embed high level selection variables?
96  embedHighLevelSelection_(iConfig.getParameter<bool>("embedHighLevelSelection")),
97  beamLineToken_(consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamLineSrc"))),
98  pvToken_(mayConsume<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("pvSrc"))),
99  addElecID_(iConfig.getParameter<bool>("addElectronID")),
100  pTComparator_(),
101  isolator_(iConfig.exists("userIsolation") ? iConfig.getParameter<edm::ParameterSet>("userIsolation")
102  : edm::ParameterSet(),
103  consumesCollector(),
104  false),
105  addEfficiencies_(iConfig.getParameter<bool>("addEfficiencies")),
106  addResolutions_(iConfig.getParameter<bool>("addResolutions")),
107  useUserData_(iConfig.exists("userData"))
108 
109 {
110  // MC matching configurables (scheduled mode)
111 
112  if (addGenMatch_) {
113  if (iConfig.existsAs<edm::InputTag>("genParticleMatch")) {
115  iConfig.getParameter<edm::InputTag>("genParticleMatch")));
116  } else {
118  iConfig.getParameter<std::vector<edm::InputTag>>("genParticleMatch"),
119  [this](edm::InputTag const& tag) { return consumes<edm::Association<reco::GenParticleCollection>>(tag); });
120  }
121  }
122  // resolution configurables
123  if (addResolutions_) {
125  }
126  if (addPuppiIsolation_) {
127  //puppi
129  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationChargedHadrons"));
131  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationNeutralHadrons"));
133  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationPhotons"));
134  //puppiNoLeptons
136  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationChargedHadrons"));
138  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationNeutralHadrons"));
140  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationPhotons"));
141  }
142  // electron ID configurables
143  if (addElecID_) {
144  // it might be a single electron ID
145  if (iConfig.existsAs<edm::InputTag>("electronIDSource")) {
146  elecIDSrcs_.push_back(NameTag("", iConfig.getParameter<edm::InputTag>("electronIDSource")));
147  }
148  // or there might be many of them
149  if (iConfig.existsAs<edm::ParameterSet>("electronIDSources")) {
150  // please don't configure me twice
151  if (!elecIDSrcs_.empty()) {
152  throw cms::Exception("Configuration")
153  << "PATElectronProducer: you can't specify both 'electronIDSource' and 'electronIDSources'\n";
154  }
155  // read the different electron ID names
156  edm::ParameterSet idps = iConfig.getParameter<edm::ParameterSet>("electronIDSources");
157  std::vector<std::string> names = idps.getParameterNamesForType<edm::InputTag>();
158  for (std::vector<std::string>::const_iterator it = names.begin(), ed = names.end(); it != ed; ++it) {
159  elecIDSrcs_.push_back(NameTag(*it, idps.getParameter<edm::InputTag>(*it)));
160  }
161  }
162  // but in any case at least once
163  if (elecIDSrcs_.empty()) {
164  throw cms::Exception("Configuration")
165  << "PATElectronProducer: id addElectronID is true, you must specify either:\n"
166  << "\tInputTag electronIDSource = <someTag>\n"
167  << "or\n"
168  << "\tPSet electronIDSources = { \n"
169  << "\t\tInputTag <someName> = <someTag> // as many as you want \n "
170  << "\t}\n";
171  }
172  }
174  elecIDSrcs_, [this](NameTag const& tag) { return mayConsume<edm::ValueMap<float>>(tag.second); });
175  // construct resolution calculator
176 
177  // // IsoDeposit configurables
178  // if (iConfig.exists("isoDeposits")) {
179  // edm::ParameterSet depconf = iConfig.getParameter<edm::ParameterSet>("isoDeposits");
180  // if (depconf.exists("tracker")) isoDepositLabels_.push_back(std::make_pair(TrackerIso, depconf.getParameter<edm::InputTag>("tracker")));
181  // if (depconf.exists("ecal")) isoDepositLabels_.push_back(std::make_pair(ECalIso, depconf.getParameter<edm::InputTag>("ecal")));
182  // if (depconf.exists("hcal")) isoDepositLabels_.push_back(std::make_pair(HCalIso, depconf.getParameter<edm::InputTag>("hcal")));
183 
184  // if (depconf.exists("user")) {
185  // std::vector<edm::InputTag> userdeps = depconf.getParameter<std::vector<edm::InputTag> >("user");
186  // std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
187  // int key = UserBaseIso;
188  // for ( ; it != ed; ++it, ++key) {
189  // isoDepositLabels_.push_back(std::make_pair(IsolationKeys(key), *it));
190  // }
191  // }
192  // }
193  // isoDepositTokens_ = edm::vector_transform(isoDepositLabels_, [this](std::pair<IsolationKeys,edm::InputTag> const & label){return consumes<edm::ValueMap<IsoDeposit> >(label.second);});
194 
195  // for mini-iso
196  computeMiniIso_ = iConfig.getParameter<bool>("computeMiniIso");
197  miniIsoParamsE_ = iConfig.getParameter<std::vector<double>>("miniIsoParamsE");
198  miniIsoParamsB_ = iConfig.getParameter<std::vector<double>>("miniIsoParamsB");
199  if (computeMiniIso_ && (miniIsoParamsE_.size() != 9 || miniIsoParamsB_.size() != 9)) {
200  throw cms::Exception("ParameterError") << "miniIsoParams must have exactly 9 elements.\n";
201  }
202  if (computeMiniIso_)
203  pcToken_ = consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("pfCandsForMiniIso"));
204 
205  // read isoDeposit labels, for direct embedding
206  readIsolationLabels(iConfig, "isoDeposits", isoDepositLabels_, isoDepositTokens_);
207  // read isolation value labels, for direct embedding
209  // read isolation value labels for non PF identified electron, for direct embedding
211  // Efficiency configurables
212  if (addEfficiencies_) {
214  pat::helper::EfficiencyLoader(iConfig.getParameter<edm::ParameterSet>("efficiencies"), consumesCollector());
215  }
216  // Check to see if the user wants to add user data
217  if (useUserData_) {
219  PATUserDataHelper<Electron>(iConfig.getParameter<edm::ParameterSet>("userData"), consumesCollector());
220  }
221 
222  // consistency check
224  throw cms::Exception("Configuration", "usePfCandidateMultiMap not supported when useParticleFlow is set to true");
225 
226  // produces vector of muons
227  produces<std::vector<Electron>>();
228 }

◆ ~PATElectronProducer()

PATElectronProducer::~PATElectronProducer ( )
override

Definition at line 230 of file PATElectronProducer.cc.

230 {}

Member Function Documentation

◆ embedHighLevel()

void PATElectronProducer::embedHighLevel ( pat::Electron anElectron,
reco::GsfTrackRef  track,
reco::TransientTrack tt,
reco::Vertex primaryVertex,
bool  primaryVertexIsValid,
reco::BeamSpot beamspot,
bool  beamspotIsValid 
)
private

Definition at line 1199 of file PATElectronProducer.cc.

1205  {
1206  // Correct to PV
1207  // PV2D
1208  anElectron.setDB(track->dxy(primaryVertex.position()),
1209  track->dxyError(primaryVertex.position(), primaryVertex.covariance()),
1211 
1212  // PV3D
1213  std::pair<bool, Measurement1D> result =
1215  double d0_corr = result.second.value();
1216  double d0_err = primaryVertexIsValid ? result.second.error() : -1.0;
1217  anElectron.setDB(d0_corr, d0_err, pat::Electron::PV3D);
1218 
1219  // Correct to beam spot
1220  // BS2D
1221  anElectron.setDB(track->dxy(beamspot), track->dxyError(beamspot), pat::Electron::BS2D);
1222 
1223  // make a fake vertex out of beam spot
1224  reco::Vertex vBeamspot(beamspot.position(), beamspot.covariance3D());
1225 
1226  // BS3D
1227  result = IPTools::signedImpactParameter3D(tt, GlobalVector(track->px(), track->py(), track->pz()), vBeamspot);
1228  d0_corr = result.second.value();
1229  d0_err = beamspotIsValid ? result.second.error() : -1.0;
1230  anElectron.setDB(d0_corr, d0_err, pat::Electron::BS3D);
1231 
1232  // PVDZ
1233  anElectron.setDB(
1234  track->dz(primaryVertex.position()), std::hypot(track->dzError(), primaryVertex.zError()), pat::Electron::PVDZ);
1235 }

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()

void PATElectronProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 1023 of file PATElectronProducer.cc.

1023  {
1025  iDesc.setComment("PAT electron producer module");
1026 
1027  // input source
1028  iDesc.add<edm::InputTag>("pfCandidateMap", edm::InputTag("no default"))->setComment("input collection");
1029  iDesc.add<edm::InputTag>("electronSource", edm::InputTag("no default"))->setComment("input collection");
1030 
1031  iDesc.ifValue(
1032  edm::ParameterDescription<bool>("addPFClusterIso", false, true),
1034  "ecalPFClusterIsoMap", edm::InputTag("electronEcalPFClusterIsolationProducer"), true) and
1036  "hcalPFClusterIsoMap", edm::InputTag("electronHcalPFClusterIsolationProducer"), true)) or
1037  false >> (edm::ParameterDescription<edm::InputTag>("ecalPFClusterIsoMap", edm::InputTag(""), true) and
1038  edm::ParameterDescription<edm::InputTag>("hcalPFClusterIsoMap", edm::InputTag(""), true)));
1039 
1040  iDesc.ifValue(edm::ParameterDescription<bool>("addPuppiIsolation", false, true),
1042  "puppiIsolationChargedHadrons",
1043  edm::InputTag("egmElectronPUPPIIsolation", "h+-DR030-BarVeto000-EndVeto001"),
1044  true) and
1046  "puppiIsolationNeutralHadrons",
1047  edm::InputTag("egmElectronPUPPIIsolation", "h0-DR030-BarVeto000-EndVeto000"),
1048  true) and
1050  "puppiIsolationPhotons",
1051  edm::InputTag("egmElectronPUPPIIsolation", "gamma-DR030-BarVeto000-EndVeto008"),
1052  true) and
1054  "puppiNoLeptonsIsolationChargedHadrons",
1055  edm::InputTag("egmElectronPUPPINoLeptonsIsolation", "gamma-DR030-BarVeto000-EndVeto008"),
1056  true) and
1058  "puppiNoLeptonsIsolationNeutralHadrons",
1059  edm::InputTag("egmElectronPUPPINoLeptonsIsolation", "gamma-DR030-BarVeto000-EndVeto008"),
1060  true) and
1062  "puppiNoLeptonsIsolationPhotons",
1063  edm::InputTag("egmElectronPUPPINoLeptonsIsolation", "gamma-DR030-BarVeto000-EndVeto008"),
1064  true)) or
1065  false >> edm::EmptyGroupDescription());
1066 
1067  // embedding
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");
1079 
1080  // pf specific parameters
1081  iDesc.add<edm::InputTag>("pfElectronSource", edm::InputTag("pfElectrons"))
1082  ->setComment("particle flow input collection");
1083  auto&& usePfCandidateMultiMap = edm::ParameterDescription<bool>("usePfCandidateMultiMap", false, true);
1084  usePfCandidateMultiMap.setComment(
1085  "take ParticleFlow candidates from pfCandidateMultiMap instead of matching to pfElectrons by Gsf track "
1086  "reference");
1088  true >> edm::ParameterDescription<edm::InputTag>("pfCandidateMultiMap", true) or
1089  false >> edm::EmptyGroupDescription());
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");
1092 
1093  // MC matching configurables
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;
1097  iDesc
1098  .addNode(edm::ParameterDescription<edm::InputTag>("genParticleMatch", edm::InputTag(), true) xor
1099  edm::ParameterDescription<std::vector<edm::InputTag>>("genParticleMatch", emptySourceVector, true))
1100  ->setComment("input with MC match information");
1101 
1102  // electron ID configurables
1103  iDesc.add<bool>("addElectronID", true)->setComment("add electron ID variables");
1104  edm::ParameterSetDescription electronIDSourcesPSet;
1105  electronIDSourcesPSet.setAllowAnything();
1106  iDesc
1107  .addNode(
1108  edm::ParameterDescription<edm::InputTag>("electronIDSource", edm::InputTag(), true) xor
1109  edm::ParameterDescription<edm::ParameterSetDescription>("electronIDSources", electronIDSourcesPSet, true))
1110  ->setComment("input with electron ID variables");
1111 
1112  // mini-iso
1113  iDesc.add<bool>("computeMiniIso", false)->setComment("whether or not to compute and store electron mini-isolation");
1114  iDesc.add<edm::InputTag>("pfCandsForMiniIso", edm::InputTag("packedPFCandidates"))
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");
1120 
1121  // IsoDeposit configurables
1122  edm::ParameterSetDescription isoDepositsPSet;
1123  isoDepositsPSet.addOptional<edm::InputTag>("tracker");
1124  isoDepositsPSet.addOptional<edm::InputTag>("ecal");
1125  isoDepositsPSet.addOptional<edm::InputTag>("hcal");
1126  isoDepositsPSet.addOptional<edm::InputTag>("pfAllParticles");
1127  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedHadrons");
1128  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedAll");
1129  isoDepositsPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
1130  isoDepositsPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
1131  isoDepositsPSet.addOptional<edm::InputTag>("pfPhotons");
1132  isoDepositsPSet.addOptional<std::vector<edm::InputTag>>("user");
1133  iDesc.addOptional("isoDeposits", isoDepositsPSet);
1134 
1135  // isolation values configurables
1136  edm::ParameterSetDescription isolationValuesPSet;
1137  isolationValuesPSet.addOptional<edm::InputTag>("tracker");
1138  isolationValuesPSet.addOptional<edm::InputTag>("ecal");
1139  isolationValuesPSet.addOptional<edm::InputTag>("hcal");
1140  isolationValuesPSet.addOptional<edm::InputTag>("pfAllParticles");
1141  isolationValuesPSet.addOptional<edm::InputTag>("pfChargedHadrons");
1142  isolationValuesPSet.addOptional<edm::InputTag>("pfChargedAll");
1143  isolationValuesPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
1144  isolationValuesPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
1145  isolationValuesPSet.addOptional<edm::InputTag>("pfPhotons");
1146  isolationValuesPSet.addOptional<std::vector<edm::InputTag>>("user");
1147  iDesc.addOptional("isolationValues", isolationValuesPSet);
1148 
1149  // isolation values configurables
1150  edm::ParameterSetDescription isolationValuesNoPFIdPSet;
1151  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("tracker");
1152  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("ecal");
1153  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("hcal");
1154  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfAllParticles");
1155  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfChargedHadrons");
1156  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfChargedAll");
1157  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
1158  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
1159  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfPhotons");
1160  isolationValuesNoPFIdPSet.addOptional<std::vector<edm::InputTag>>("user");
1161  iDesc.addOptional("isolationValuesNoPFId", isolationValuesNoPFIdPSet);
1162 
1163  // Efficiency configurables
1164  edm::ParameterSetDescription efficienciesPSet;
1165  efficienciesPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
1166  iDesc.add("efficiencies", efficienciesPSet);
1167  iDesc.add<bool>("addEfficiencies", false);
1168 
1169  // Check to see if the user wants to add user data
1170  edm::ParameterSetDescription userDataPSet;
1172  iDesc.addOptional("userData", userDataPSet);
1173 
1174  // electron shapes
1175  iDesc.add<bool>("addMVAVariables", true)->setComment("embed extra variables in pat::Electron : sip3d, sigmaIEtaIPhi");
1176  iDesc.add<edm::InputTag>("reducedBarrelRecHitCollection", edm::InputTag("reducedEcalRecHitsEB"));
1177  iDesc.add<edm::InputTag>("reducedEndcapRecHitCollection", edm::InputTag("reducedEcalRecHitsEE"));
1178 
1179  edm::ParameterSetDescription isolationPSet;
1180  isolationPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
1181  iDesc.add("userIsolation", isolationPSet);
1182 
1183  // Resolution configurables
1185 
1186  iDesc.add<bool>("embedHighLevelSelection", true)->setComment("embed high level selection");
1187  edm::ParameterSetDescription highLevelPSet;
1188  highLevelPSet.setAllowAnything();
1189  iDesc.addNode(edm::ParameterDescription<edm::InputTag>("beamLineSrc", edm::InputTag(), true))
1190  ->setComment("input with high level selection");
1192  ->setComment("input with high level selection");
1193 
1194  descriptions.add("PATElectronProducer", iDesc);
1195 }

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()

void PATElectronProducer::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
private

common electron filling, for both the standard and PF2PAT case

Definition at line 818 of file PATElectronProducer.cc.

825  {
826  //COLIN: might want to use the PFCandidate 4-mom. Which one is in use now?
827  // if (useParticleFlow_)
828  // aMuon.setP4( aMuon.pfCandidateRef()->p4() );
829 
830  //COLIN:
831  //In the embedding case, the reference cannot be used to look into a value map.
832  //therefore, one has to had the PFCandidateRef to this function, which becomes a bit
833  //too much specific.
834 
835  // in fact, this function needs a baseref or ptr for genmatch
836  // and a baseref or ptr for isodeposits and isolationvalues.
837  // baseref is not needed
838  // the ptrForIsolation and ptrForMatching should be defined upstream.
839 
840  // is the concrete elecRef needed for the efficiency loader? what is this loader?
841  // how can we make it compatible with the particle flow electrons?
842 
844  anElectron.embedGsfElectronCore();
845  if (embedGsfTrack_)
846  anElectron.embedGsfTrack();
847  if (embedSuperCluster_)
848  anElectron.embedSuperCluster();
850  anElectron.embedPflowSuperCluster();
851  if (embedSeedCluster_)
852  anElectron.embedSeedCluster();
854  anElectron.embedBasicClusters();
856  anElectron.embedPreshowerClusters();
858  anElectron.embedPflowBasicClusters();
860  anElectron.embedPflowPreshowerClusters();
861  if (embedTrack_)
862  anElectron.embedTrack();
863 
864  // store the match to the generated final state muons
865  if (addGenMatch_) {
866  for (size_t i = 0, n = genMatches.size(); i < n; ++i) {
867  if (useParticleFlow_) {
868  reco::GenParticleRef genElectron = (*genMatches[i])[anElectron.pfCandidateRef()];
869  anElectron.addGenParticleRef(genElectron);
870  } else {
871  reco::GenParticleRef genElectron = (*genMatches[i])[elecRef];
872  anElectron.addGenParticleRef(genElectron);
873  }
874  }
875  if (embedGenMatch_)
876  anElectron.embedGenParticle();
877  }
878 
879  if (efficiencyLoader_.enabled()) {
880  efficiencyLoader_.setEfficiencies(anElectron, elecRef);
881  }
882 
883  if (resolutionLoader_.enabled()) {
884  resolutionLoader_.setResolutions(anElectron);
885  }
886 
887  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
888  if (useParticleFlow_) {
889  reco::PFCandidateRef pfcandref = anElectron.pfCandidateRef();
890  assert(!pfcandref.isNull());
891  reco::CandidatePtr source = pfcandref->sourceCandidatePtr(0);
892  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[source]);
893  } else
894  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[elecRef]);
895  }
896 
897  for (size_t j = 0; j < isolationValues.size(); ++j) {
898  if (useParticleFlow_) {
899  reco::CandidatePtr source = anElectron.pfCandidateRef()->sourceCandidatePtr(0);
900  anElectron.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[source]);
901  } else if (pfId) {
902  anElectron.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[elecRef]);
903  }
904  }
905 
906  //for electrons not identified as PF electrons
907  for (size_t j = 0; j < isolationValuesNoPFId.size(); ++j) {
908  if (!pfId) {
909  anElectron.setIsolation(isolationValueLabelsNoPFId_[j].first, (*isolationValuesNoPFId[j])[elecRef]);
910  }
911  }
912 }

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()

void PATElectronProducer::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
private

Definition at line 914 of file PATElectronProducer.cc.

920  {
921  //COLIN/Florian: use the PFCandidate 4-mom.
922  anElectron.setEcalDrivenMomentum(anElectron.p4());
923  anElectron.setP4(anElectron.pfCandidateRef()->p4());
924 
925  // is the concrete elecRef needed for the efficiency loader? what is this loader?
926  // how can we make it compatible with the particle flow electrons?
927 
929  anElectron.embedGsfElectronCore();
930  if (embedGsfTrack_)
931  anElectron.embedGsfTrack();
932  if (embedSuperCluster_)
933  anElectron.embedSuperCluster();
935  anElectron.embedPflowSuperCluster();
936  if (embedSeedCluster_)
937  anElectron.embedSeedCluster();
939  anElectron.embedBasicClusters();
941  anElectron.embedPreshowerClusters();
943  anElectron.embedPflowBasicClusters();
945  anElectron.embedPflowPreshowerClusters();
946  if (embedTrack_)
947  anElectron.embedTrack();
948 
949  // store the match to the generated final state muons
950 
951  if (addGenMatch_) {
952  for (size_t i = 0, n = genMatches.size(); i < n; ++i) {
953  reco::GenParticleRef genElectron = (*genMatches[i])[candPtrForGenMatch];
954  anElectron.addGenParticleRef(genElectron);
955  }
956  if (embedGenMatch_)
957  anElectron.embedGenParticle();
958  }
959 
960  //COLIN what's this? does it have to be GsfElectron specific?
961  if (efficiencyLoader_.enabled()) {
962  efficiencyLoader_.setEfficiencies(anElectron, candPtrForLoader);
963  }
964 
965  if (resolutionLoader_.enabled()) {
966  resolutionLoader_.setResolutions(anElectron);
967  }
968 
969  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
971  isoDepositLabels_[j].first == pat::HcalIso || deposits[j]->contains(candPtrForGenMatch.id())) {
972  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[candPtrForGenMatch]);
973  } else if (deposits[j]->contains(candPtrForIsolation.id())) {
974  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[candPtrForIsolation]);
975  } else {
976  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[candPtrForIsolation->sourceCandidatePtr(0)]);
977  }
978  }
979 
980  for (size_t j = 0; j < isolationValues.size(); ++j) {
982  isolationValueLabels_[j].first == pat::HcalIso || isolationValues[j]->contains(candPtrForGenMatch.id())) {
983  anElectron.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[candPtrForGenMatch]);
984  } else if (isolationValues[j]->contains(candPtrForIsolation.id())) {
985  anElectron.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[candPtrForIsolation]);
986  } else {
988  (*isolationValues[j])[candPtrForIsolation->sourceCandidatePtr(0)]);
989  }
990  }
991 }

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()

void PATElectronProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 232 of file PATElectronProducer.cc.

232  {
233  // switch off embedding (in unschedules mode)
234  if (iEvent.isRealData()) {
235  addGenMatch_ = false;
236  embedGenMatch_ = false;
237  }
238 
239  edm::ESHandle<CaloTopology> theCaloTopology;
240  iSetup.get<CaloTopologyRecord>().get(theCaloTopology);
241  ecalTopology_ = &(*theCaloTopology);
242 
243  // Get the collection of electrons from the event
245  iEvent.getByToken(electronToken_, electrons);
246 
248  if (computeMiniIso_)
249  iEvent.getByToken(pcToken_, pc);
250 
251  // for additional mva variables
252  edm::InputTag reducedEBRecHitCollection(string("reducedEcalRecHitsEB"));
253  edm::InputTag reducedEERecHitCollection(string("reducedEcalRecHitsEE"));
254  //EcalClusterLazyTools lazyTools(iEvent, iSetup, reducedEBRecHitCollection, reducedEERecHitCollection);
255  EcalClusterLazyTools lazyTools(iEvent,
259 
260  // for conversion veto selection
262  iEvent.getByToken(hConversionsToken_, hConversions);
263 
264  // Get the ESHandle for the transient track builder, if needed for
265  // high level selection embedding
267 
268  if (isolator_.enabled())
269  isolator_.beginEvent(iEvent, iSetup);
270 
275 
277  for (size_t j = 0, nd = isoDepositTokens_.size(); j < nd; ++j) {
278  iEvent.getByToken(isoDepositTokens_[j], deposits[j]);
279  }
280 
282  for (size_t j = 0; j < isolationValueTokens_.size(); ++j) {
284  }
285 
287  for (size_t j = 0; j < isolationValueNoPFIdTokens_.size(); ++j) {
289  }
290 
291  // prepare the MC matching
292  GenAssociations genMatches(genMatchTokens_.size());
293  if (addGenMatch_) {
294  for (size_t j = 0, nd = genMatchTokens_.size(); j < nd; ++j) {
295  iEvent.getByToken(genMatchTokens_[j], genMatches[j]);
296  }
297  }
298 
299  // prepare ID extraction
300  std::vector<edm::Handle<edm::ValueMap<float>>> idhandles;
301  std::vector<pat::Electron::IdPair> ids;
302  if (addElecID_) {
303  idhandles.resize(elecIDSrcs_.size());
304  ids.resize(elecIDSrcs_.size());
305  for (size_t i = 0; i < elecIDSrcs_.size(); ++i) {
306  iEvent.getByToken(elecIDTokens_[i], idhandles[i]);
307  ids[i].first = elecIDSrcs_[i].first;
308  }
309  }
310 
311  // prepare the high level selection:
312  // needs beamline
313  reco::TrackBase::Point beamPoint(0, 0, 0);
316  bool beamSpotIsValid = false;
317  bool primaryVertexIsValid = false;
318 
319  // Get the beamspot
320  edm::Handle<reco::BeamSpot> beamSpotHandle;
321  iEvent.getByToken(beamLineToken_, beamSpotHandle);
322 
324  // Get the primary vertex
326  iEvent.getByToken(pvToken_, pvHandle);
327 
328  // This is needed by the IPTools methods from the tracking group
329  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", trackBuilder);
330 
331  if (pvHandle.isValid() && !pvHandle->empty()) {
332  primaryVertex = pvHandle->at(0);
333  primaryVertexIsValid = true;
334  } else {
335  edm::LogError("DataNotAvailable")
336  << "No primary vertex available from EventSetup, not adding high level selection \n";
337  }
338  }
339  //value maps for puppi isolation
340  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_charged_hadrons;
341  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_neutral_hadrons;
342  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_photons;
343  //value maps for puppiNoLeptons isolation
344  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_charged_hadrons;
345  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_neutral_hadrons;
346  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_photons;
347  if (addPuppiIsolation_) {
348  //puppi
349  iEvent.getByToken(PUPPIIsolation_charged_hadrons_, PUPPIIsolation_charged_hadrons);
350  iEvent.getByToken(PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_neutral_hadrons);
351  iEvent.getByToken(PUPPIIsolation_photons_, PUPPIIsolation_photons);
352  //puppiNoLeptons
353  iEvent.getByToken(PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_charged_hadrons);
354  iEvent.getByToken(PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons);
355  iEvent.getByToken(PUPPINoLeptonsIsolation_photons_, PUPPINoLeptonsIsolation_photons);
356  }
357 
358  std::vector<Electron>* patElectrons = new std::vector<Electron>();
359 
360  if (useParticleFlow_) {
362  iEvent.getByToken(pfElecToken_, pfElectrons);
363  unsigned index = 0;
364 
365  for (reco::PFCandidateConstIterator i = pfElectrons->begin(); i != pfElectrons->end(); ++i, ++index) {
367  reco::PFCandidatePtr ptrToPFElectron(pfElectrons, index);
368  // reco::CandidateBaseRef pfBaseRef( pfRef );
369 
370  reco::GsfTrackRef PfTk = i->gsfTrackRef();
371 
372  bool Matched = false;
373  bool MatchedToAmbiguousGsfTrack = false;
374  for (edm::View<reco::GsfElectron>::const_iterator itElectron = electrons->begin(); itElectron != electrons->end();
375  ++itElectron) {
376  unsigned int idx = itElectron - electrons->begin();
377  auto elePtr = electrons->ptrAt(idx);
378  if (Matched || MatchedToAmbiguousGsfTrack)
379  continue;
380 
381  reco::GsfTrackRef EgTk = itElectron->gsfTrack();
382 
383  if (itElectron->gsfTrack() == i->gsfTrackRef()) {
384  Matched = true;
385  } else {
386  for (reco::GsfTrackRefVector::const_iterator it = itElectron->ambiguousGsfTracksBegin();
387  it != itElectron->ambiguousGsfTracksEnd();
388  it++) {
389  MatchedToAmbiguousGsfTrack |= (bool)(i->gsfTrackRef() == (*it));
390  }
391  }
392 
393  if (Matched || MatchedToAmbiguousGsfTrack) {
394  // ptr needed for finding the matched gen particle
395  reco::CandidatePtr ptrToGsfElectron(electrons, idx);
396 
397  // ref to base needed for the construction of the pat object
398  const edm::RefToBase<reco::GsfElectron>& elecsRef = electrons->refAt(idx);
399  Electron anElectron(elecsRef);
400  anElectron.setPFCandidateRef(pfRef);
401  if (addPuppiIsolation_) {
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]);
408  } else {
409  anElectron.setIsolationPUPPI(-999., -999., -999.);
410  anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
411  }
412 
413  //it should be always true when particleFlow electrons are used.
414  anElectron.setIsPF(true);
415 
416  if (embedPFCandidate_)
417  anElectron.embedPFCandidate();
418 
419  if (useUserData_) {
420  userDataHelper_.add(anElectron, iEvent, iSetup);
421  }
422 
423  double ip3d = -999; // for mva variable
424 
425  // embed high level selection
427  // get the global track
428  const reco::GsfTrackRef& track = PfTk;
429 
430  // Make sure the collection it points to is there
431  if (track.isNonnull() && track.isAvailable()) {
432  reco::TransientTrack tt = trackBuilder->build(track);
433  embedHighLevel(anElectron, track, tt, primaryVertex, primaryVertexIsValid, beamSpot, beamSpotIsValid);
434 
435  std::pair<bool, Measurement1D> ip3dpv = IPTools::absoluteImpactParameter3D(tt, primaryVertex);
436  ip3d = ip3dpv.second.value(); // for mva variable
437  }
438  }
439 
440  //Electron Id
441 
442  if (addElecID_) {
443  //STANDARD EL ID
444  for (size_t i = 0; i < elecIDSrcs_.size(); ++i) {
445  ids[i].second = (*idhandles[i])[elecsRef];
446  }
447  //SPECIFIC PF ID
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);
451  }
452 
453  if (addMVAVariables_) {
454  // add missing mva variables
455  std::vector<float> vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
456  anElectron.setMvaVariables(vCov[1], ip3d);
457  }
458  // PFClusterIso
459  if (addPFClusterIso_) {
460  // Get PFCluster Isolation
461  edm::Handle<edm::ValueMap<float>> ecalPFClusterIsoMapH;
462  iEvent.getByToken(ecalPFClusterIsoT_, ecalPFClusterIsoMapH);
463  edm::Handle<edm::ValueMap<float>> hcalPFClusterIsoMapH;
464  iEvent.getByToken(hcalPFClusterIsoT_, hcalPFClusterIsoMapH);
465  reco::GsfElectron::PflowIsolationVariables newPFIsol = anElectron.pfIsolationVariables();
466  newPFIsol.sumEcalClusterEt = (*ecalPFClusterIsoMapH)[elecsRef];
467  newPFIsol.sumHcalClusterEt = (*hcalPFClusterIsoMapH)[elecsRef];
468  anElectron.setPfIsolationVariables(newPFIsol);
469  }
470 
471  std::vector<DetId> selectedCells;
472  bool barrel = itElectron->isEB();
473  //loop over sub clusters
474  if (embedBasicClusters_) {
475  for (reco::CaloCluster_iterator clusIt = itElectron->superCluster()->clustersBegin();
476  clusIt != itElectron->superCluster()->clustersEnd();
477  ++clusIt) {
478  //get seed (max energy xtal)
479  DetId seed = lazyTools.getMaximum(**clusIt).first;
480  //get all xtals in 5x5 window around the seed
481  std::vector<DetId> dets5x5 =
484  selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
485 
486  //get all xtals belonging to cluster
487  for (const std::pair<DetId, float>& hit : (*clusIt)->hitsAndFractions()) {
488  selectedCells.push_back(hit.first);
489  }
490  }
491  }
492 
493  if (embedPflowBasicClusters_ && itElectron->parentSuperCluster().isNonnull()) {
494  for (reco::CaloCluster_iterator clusIt = itElectron->parentSuperCluster()->clustersBegin();
495  clusIt != itElectron->parentSuperCluster()->clustersEnd();
496  ++clusIt) {
497  //get seed (max energy xtal)
498  DetId seed = lazyTools.getMaximum(**clusIt).first;
499  //get all xtals in 5x5 window around the seed
500  std::vector<DetId> dets5x5 =
503  selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
504 
505  //get all xtals belonging to cluster
506  for (const std::pair<DetId, float>& hit : (*clusIt)->hitsAndFractions()) {
507  selectedCells.push_back(hit.first);
508  }
509  }
510  }
511 
512  //remove duplicates
513  std::sort(selectedCells.begin(), selectedCells.end());
514  std::unique(selectedCells.begin(), selectedCells.end());
515 
516  // Retrieve the corresponding RecHits
517 
519  if (barrel)
520  iEvent.getByToken(reducedBarrelRecHitCollectionToken_, rechitsH);
521  else
522  iEvent.getByToken(reducedEndcapRecHitCollectionToken_, rechitsH);
523 
524  EcalRecHitCollection selectedRecHits;
525  const EcalRecHitCollection* recHits = rechitsH.product();
526 
527  unsigned nSelectedCells = selectedCells.size();
528  for (unsigned icell = 0; icell < nSelectedCells; ++icell) {
529  EcalRecHitCollection::const_iterator it = recHits->find(selectedCells[icell]);
530  if (it != recHits->end()) {
531  selectedRecHits.push_back(*it);
532  }
533  }
534  selectedRecHits.sort();
535  if (embedRecHits_)
536  anElectron.embedRecHits(&selectedRecHits);
537 
538  // set conversion veto selection
539  bool passconversionveto = false;
540  if (hConversions.isValid()) {
541  // this is recommended method
542  passconversionveto =
543  !ConversionTools::hasMatchedConversion(*itElectron, *hConversions, beamSpotHandle->position());
544  } else {
545  // use missing hits without vertex fit method
546  passconversionveto =
547  itElectron->gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS) < 1;
548  }
549 
550  anElectron.setPassConversionVeto(passconversionveto);
551 
552  // fillElectron(anElectron,elecsRef,pfBaseRef,
553  // genMatches, deposits, isolationValues);
554 
555  //COLIN small warning !
556  // we are currently choosing to take the 4-momentum of the PFCandidate;
557  // the momentum of the GsfElectron is saved though
558  // we must therefore match the GsfElectron.
559  // because of this, we should not change the source of the electron matcher
560  // to the collection of PFElectrons in the python configuration
561  // I don't know what to do with the efficiencyLoader, since I don't know
562  // what this class is for.
564  anElectron, ptrToPFElectron, ptrToGsfElectron, ptrToGsfElectron, genMatches, deposits, isolationValues);
565 
566  //COLIN need to use fillElectron2 in the non-pflow case as well, and to test it.
567 
568  if (computeMiniIso_)
569  setElectronMiniIso(anElectron, pc.product());
570 
571  patElectrons->push_back(anElectron);
572  }
573  }
574  //if( !Matched && !MatchedToAmbiguousGsfTrack) std::cout << "!!!!A pf electron could not be matched to a gsf!!!!" << std::endl;
575  }
576  }
577 
578  else {
582  bool pfCandsPresent = false, valMapPresent = false;
584  iEvent.getByToken(pfCandidateMultiMapToken_, ValMultiMapH);
585  } else {
586  pfCandsPresent = iEvent.getByToken(pfElecToken_, pfElectrons);
587  valMapPresent = iEvent.getByToken(pfCandidateMapToken_, ValMapH);
588  }
589 
590  for (edm::View<reco::GsfElectron>::const_iterator itElectron = electrons->begin(); itElectron != electrons->end();
591  ++itElectron) {
592  // construct the Electron from the ref -> save ref to original object
593  //FIXME: looks like a lot of instances could be turned into const refs
594  unsigned int idx = itElectron - electrons->begin();
596  reco::CandidateBaseRef elecBaseRef(elecsRef);
597  Electron anElectron(elecsRef);
598  auto elePtr = electrons->ptrAt(idx);
599 
600  // Is this GsfElectron also identified as an e- in the particle flow?
601  bool pfId = false;
602 
604  for (const reco::PFCandidateRef& pf : (*ValMultiMapH)[elePtr]) {
605  if (pf->particleId() == reco::PFCandidate::e) {
606  pfId = true;
607  anElectron.setPFCandidateRef(pf);
608  break;
609  }
610  }
611  } else if (pfCandsPresent) {
612  // PF electron collection not available.
613  const reco::GsfTrackRef& trkRef = itElectron->gsfTrack();
614  int index = 0;
615  for (reco::PFCandidateConstIterator ie = pfElectrons->begin(); ie != pfElectrons->end(); ++ie, ++index) {
616  if (ie->particleId() != reco::PFCandidate::e)
617  continue;
618  const reco::GsfTrackRef& pfTrkRef = ie->gsfTrackRef();
619  if (trkRef == pfTrkRef) {
620  pfId = true;
622  anElectron.setPFCandidateRef(pfRef);
623  break;
624  }
625  }
626  } else if (valMapPresent) {
627  // use value map if PF collection not available
628  const edm::ValueMap<reco::PFCandidatePtr>& myValMap(*ValMapH);
629  // Get the PFCandidate
630  const reco::PFCandidatePtr& pfElePtr(myValMap[elecsRef]);
631  pfId = pfElePtr.isNonnull();
632  }
633  // set PFId function
634  anElectron.setIsPF(pfId);
635 
636  // add resolution info
637 
638  // Isolation
639  if (isolator_.enabled()) {
641  typedef pat::helper::MultiIsolator::IsolationValuePairs IsolationValuePairs;
642  // better to loop backwards, so the vector is resized less times
643  for (IsolationValuePairs::const_reverse_iterator it = isolatorTmpStorage_.rbegin(),
644  ed = isolatorTmpStorage_.rend();
645  it != ed;
646  ++it) {
647  anElectron.setIsolation(it->first, it->second);
648  }
649  }
650 
651  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
652  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[elecsRef]);
653  }
654 
655  // add electron ID info
656  if (addElecID_) {
657  for (size_t i = 0; i < elecIDSrcs_.size(); ++i) {
658  ids[i].second = (*idhandles[i])[elecsRef];
659  }
660  anElectron.setElectronIDs(ids);
661  }
662 
663  if (useUserData_) {
664  userDataHelper_.add(anElectron, iEvent, iSetup);
665  }
666 
667  double ip3d = -999; //for mva variable
668 
669  // embed high level selection
671  // get the global track
672  reco::GsfTrackRef track = itElectron->gsfTrack();
673 
674  // Make sure the collection it points to is there
675  if (track.isNonnull() && track.isAvailable()) {
676  reco::TransientTrack tt = trackBuilder->build(track);
677  embedHighLevel(anElectron, track, tt, primaryVertex, primaryVertexIsValid, beamSpot, beamSpotIsValid);
678 
679  std::pair<bool, Measurement1D> ip3dpv = IPTools::absoluteImpactParameter3D(tt, primaryVertex);
680  ip3d = ip3dpv.second.value(); // for mva variable
681  }
682  }
683 
684  if (addMVAVariables_) {
685  // add mva variables
686  std::vector<float> vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
687  anElectron.setMvaVariables(vCov[1], ip3d);
688  }
689 
690  // PFCluster Isolation
691  if (addPFClusterIso_) {
692  // Get PFCluster Isolation
693  edm::Handle<edm::ValueMap<float>> ecalPFClusterIsoMapH;
694  iEvent.getByToken(ecalPFClusterIsoT_, ecalPFClusterIsoMapH);
695  edm::Handle<edm::ValueMap<float>> hcalPFClusterIsoMapH;
696  iEvent.getByToken(hcalPFClusterIsoT_, hcalPFClusterIsoMapH);
697  reco::GsfElectron::PflowIsolationVariables newPFIsol = anElectron.pfIsolationVariables();
698  newPFIsol.sumEcalClusterEt = (*ecalPFClusterIsoMapH)[elecsRef];
699  newPFIsol.sumHcalClusterEt = (*hcalPFClusterIsoMapH)[elecsRef];
700  anElectron.setPfIsolationVariables(newPFIsol);
701  }
702 
703  if (addPuppiIsolation_) {
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]);
710  } else {
711  anElectron.setIsolationPUPPI(-999., -999., -999.);
712  anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
713  }
714 
715  std::vector<DetId> selectedCells;
716  bool barrel = itElectron->isEB();
717  //loop over sub clusters
718  if (embedBasicClusters_) {
719  for (reco::CaloCluster_iterator clusIt = itElectron->superCluster()->clustersBegin();
720  clusIt != itElectron->superCluster()->clustersEnd();
721  ++clusIt) {
722  //get seed (max energy xtal)
723  DetId seed = lazyTools.getMaximum(**clusIt).first;
724  //get all xtals in 5x5 window around the seed
725  std::vector<DetId> dets5x5 =
728  selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
729 
730  //get all xtals belonging to cluster
731  for (const std::pair<DetId, float>& hit : (*clusIt)->hitsAndFractions()) {
732  selectedCells.push_back(hit.first);
733  }
734  }
735  }
736 
737  if (embedPflowBasicClusters_ && itElectron->parentSuperCluster().isNonnull()) {
738  for (reco::CaloCluster_iterator clusIt = itElectron->parentSuperCluster()->clustersBegin();
739  clusIt != itElectron->parentSuperCluster()->clustersEnd();
740  ++clusIt) {
741  //get seed (max energy xtal)
742  DetId seed = lazyTools.getMaximum(**clusIt).first;
743  //get all xtals in 5x5 window around the seed
744  std::vector<DetId> dets5x5 =
747  selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
748 
749  //get all xtals belonging to cluster
750  for (const std::pair<DetId, float>& hit : (*clusIt)->hitsAndFractions()) {
751  selectedCells.push_back(hit.first);
752  }
753  }
754  }
755 
756  //remove duplicates
757  std::sort(selectedCells.begin(), selectedCells.end());
758  std::unique(selectedCells.begin(), selectedCells.end());
759 
760  // Retrieve the corresponding RecHits
761 
763  if (barrel)
764  iEvent.getByToken(reducedBarrelRecHitCollectionToken_, rechitsH);
765  else
766  iEvent.getByToken(reducedEndcapRecHitCollectionToken_, rechitsH);
767 
768  EcalRecHitCollection selectedRecHits;
769  const EcalRecHitCollection* recHits = rechitsH.product();
770 
771  unsigned nSelectedCells = selectedCells.size();
772  for (unsigned icell = 0; icell < nSelectedCells; ++icell) {
773  EcalRecHitCollection::const_iterator it = recHits->find(selectedCells[icell]);
774  if (it != recHits->end()) {
775  selectedRecHits.push_back(*it);
776  }
777  }
778  selectedRecHits.sort();
779  if (embedRecHits_)
780  anElectron.embedRecHits(&selectedRecHits);
781 
782  // set conversion veto selection
783  bool passconversionveto = false;
784  if (hConversions.isValid()) {
785  // this is recommended method
786  passconversionveto =
787  !ConversionTools::hasMatchedConversion(*itElectron, *hConversions, beamSpotHandle->position());
788  } else {
789  // use missing hits without vertex fit method
790  passconversionveto =
791  itElectron->gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS) < 1;
792  }
793  anElectron.setPassConversionVeto(passconversionveto);
794 
795  // add sel to selected
796  fillElectron(
797  anElectron, elecsRef, elecBaseRef, genMatches, deposits, pfId, isolationValues, isolationValuesNoPFId);
798 
799  if (computeMiniIso_)
800  setElectronMiniIso(anElectron, pc.product());
801 
802  patElectrons->push_back(anElectron);
803  }
804  }
805 
806  // sort electrons in pt
807  std::sort(patElectrons->begin(), patElectrons->end(), pTComparator_);
808 
809  // add the electrons to the event output
810  std::unique_ptr<std::vector<Electron>> ptr(patElectrons);
811  iEvent.put(std::move(ptr));
812 
813  // clean up
814  if (isolator_.enabled())
816 }

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()

template<typename T >
void pat::PATElectronProducer::readIsolationLabels ( const edm::ParameterSet iConfig,
const char *  psetName,
IsolationLabels labels,
std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &  tokens 
)
private

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.

200  {
201  labels.clear();
202 
203  if (iConfig.exists(psetName)) {
204  edm::ParameterSet depconf = iConfig.getParameter<edm::ParameterSet>(psetName);
205 
206  if (depconf.exists("tracker"))
207  labels.push_back(std::make_pair(pat::TrackIso, depconf.getParameter<edm::InputTag>("tracker")));
208  if (depconf.exists("ecal"))
209  labels.push_back(std::make_pair(pat::EcalIso, depconf.getParameter<edm::InputTag>("ecal")));
210  if (depconf.exists("hcal"))
211  labels.push_back(std::make_pair(pat::HcalIso, depconf.getParameter<edm::InputTag>("hcal")));
212  if (depconf.exists("pfAllParticles")) {
213  labels.push_back(std::make_pair(pat::PfAllParticleIso, depconf.getParameter<edm::InputTag>("pfAllParticles")));
214  }
215  if (depconf.exists("pfChargedHadrons")) {
216  labels.push_back(
217  std::make_pair(pat::PfChargedHadronIso, depconf.getParameter<edm::InputTag>("pfChargedHadrons")));
218  }
219  if (depconf.exists("pfChargedAll")) {
220  labels.push_back(std::make_pair(pat::PfChargedAllIso, depconf.getParameter<edm::InputTag>("pfChargedAll")));
221  }
222  if (depconf.exists("pfPUChargedHadrons")) {
223  labels.push_back(
224  std::make_pair(pat::PfPUChargedHadronIso, depconf.getParameter<edm::InputTag>("pfPUChargedHadrons")));
225  }
226  if (depconf.exists("pfNeutralHadrons")) {
227  labels.push_back(
228  std::make_pair(pat::PfNeutralHadronIso, depconf.getParameter<edm::InputTag>("pfNeutralHadrons")));
229  }
230  if (depconf.exists("pfPhotons")) {
231  labels.push_back(std::make_pair(pat::PfGammaIso, depconf.getParameter<edm::InputTag>("pfPhotons")));
232  }
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) {
238  labels.push_back(std::make_pair(pat::IsolationKeys(key), *it));
239  }
240  }
241  }
242  tokens = edm::vector_transform(
243  labels, [this](IsolationLabel const& label) { return consumes<edm::ValueMap<T> >(label.second); });
244 }

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()

void PATElectronProducer::setElectronMiniIso ( pat::Electron anElectron,
const pat::PackedCandidateCollection pc 
)
private

Definition at line 993 of file PATElectronProducer.cc.

993  {
994  pat::PFIsolation miniiso;
995  if (anElectron.isEE())
996  miniiso = pat::getMiniPFIsolation(pc,
997  anElectron.polarP4(),
998  miniIsoParamsE_[0],
999  miniIsoParamsE_[1],
1000  miniIsoParamsE_[2],
1001  miniIsoParamsE_[3],
1002  miniIsoParamsE_[4],
1003  miniIsoParamsE_[5],
1004  miniIsoParamsE_[6],
1005  miniIsoParamsE_[7],
1006  miniIsoParamsE_[8]);
1007  else
1008  miniiso = pat::getMiniPFIsolation(pc,
1009  anElectron.polarP4(),
1010  miniIsoParamsB_[0],
1011  miniIsoParamsB_[1],
1012  miniIsoParamsB_[2],
1013  miniIsoParamsB_[3],
1014  miniIsoParamsB_[4],
1015  miniIsoParamsB_[5],
1016  miniIsoParamsB_[6],
1017  miniIsoParamsB_[7],
1018  miniIsoParamsB_[8]);
1019  anElectron.setMiniPFIsolation(miniiso);
1020 }

References pat::getMiniPFIsolation(), reco::GsfElectron::isEE(), miniIsoParamsB_, miniIsoParamsE_, reco::LeafCandidate::polarP4(), and pat::Lepton< LeptonType >::setMiniPFIsolation().

Referenced by produce().

Member Data Documentation

◆ addEfficiencies_

const bool pat::PATElectronProducer::addEfficiencies_
private

Definition at line 175 of file PATElectronProducer.h.

◆ addElecID_

const bool pat::PATElectronProducer::addElecID_
private

Definition at line 158 of file PATElectronProducer.h.

Referenced by produce().

◆ addGenMatch_

bool pat::PATElectronProducer::addGenMatch_
private

Definition at line 73 of file PATElectronProducer.h.

Referenced by fillElectron(), fillElectron2(), and produce().

◆ addMVAVariables_

const bool pat::PATElectronProducer::addMVAVariables_
private

mva input variables

Definition at line 95 of file PATElectronProducer.h.

Referenced by produce().

◆ addPFClusterIso_

const bool pat::PATElectronProducer::addPFClusterIso_
private

Definition at line 102 of file PATElectronProducer.h.

Referenced by produce().

◆ addPuppiIsolation_

const bool pat::PATElectronProducer::addPuppiIsolation_
private

Definition at line 103 of file PATElectronProducer.h.

Referenced by produce().

◆ addResolutions_

const bool pat::PATElectronProducer::addResolutions_
private

Definition at line 178 of file PATElectronProducer.h.

◆ beamLineToken_

const edm::EDGetTokenT<reco::BeamSpot> pat::PATElectronProducer::beamLineToken_
private

Definition at line 109 of file PATElectronProducer.h.

Referenced by produce().

◆ computeMiniIso_

bool pat::PATElectronProducer::computeMiniIso_
private

Definition at line 78 of file PATElectronProducer.h.

Referenced by produce().

◆ ecalClusterToolsESGetTokens_

const EcalClusterLazyTools::ESGetTokens pat::PATElectronProducer::ecalClusterToolsESGetTokens_
private

Definition at line 100 of file PATElectronProducer.h.

Referenced by produce().

◆ ecalPFClusterIsoT_

const edm::EDGetTokenT<edm::ValueMap<float> > pat::PATElectronProducer::ecalPFClusterIsoT_
private

Definition at line 104 of file PATElectronProducer.h.

Referenced by produce().

◆ ecalTopology_

const CaloTopology* pat::PATElectronProducer::ecalTopology_
private

Definition at line 192 of file PATElectronProducer.h.

Referenced by produce().

◆ efficiencyLoader_

pat::helper::EfficiencyLoader pat::PATElectronProducer::efficiencyLoader_
private

Definition at line 176 of file PATElectronProducer.h.

Referenced by fillElectron(), fillElectron2(), and produce().

◆ elecIDSrcs_

std::vector<NameTag> pat::PATElectronProducer::elecIDSrcs_
private

Definition at line 160 of file PATElectronProducer.h.

Referenced by produce().

◆ elecIDTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > pat::PATElectronProducer::elecIDTokens_
private

Definition at line 161 of file PATElectronProducer.h.

Referenced by produce().

◆ electronToken_

const edm::EDGetTokenT<edm::View<reco::GsfElectron> > pat::PATElectronProducer::electronToken_
private

Definition at line 61 of file PATElectronProducer.h.

Referenced by produce().

◆ embedBasicClusters_

const bool pat::PATElectronProducer::embedBasicClusters_
private

Definition at line 68 of file PATElectronProducer.h.

Referenced by fillElectron(), fillElectron2(), and produce().

◆ embedGenMatch_

bool pat::PATElectronProducer::embedGenMatch_
private

Definition at line 74 of file PATElectronProducer.h.

Referenced by fillElectron(), fillElectron2(), and produce().

◆ embedGsfElectronCore_

const bool pat::PATElectronProducer::embedGsfElectronCore_
private

Definition at line 63 of file PATElectronProducer.h.

Referenced by fillElectron(), and fillElectron2().

◆ embedGsfTrack_

const bool pat::PATElectronProducer::embedGsfTrack_
private

Definition at line 64 of file PATElectronProducer.h.

Referenced by fillElectron(), and fillElectron2().

◆ embedHighLevelSelection_

const bool pat::PATElectronProducer::embedHighLevelSelection_
private

embed high level selection variables?

Definition at line 108 of file PATElectronProducer.h.

Referenced by produce().

◆ embedPFCandidate_

const bool pat::PATElectronProducer::embedPFCandidate_
private

Definition at line 92 of file PATElectronProducer.h.

Referenced by produce().

◆ embedPflowBasicClusters_

const bool pat::PATElectronProducer::embedPflowBasicClusters_
private

Definition at line 70 of file PATElectronProducer.h.

Referenced by fillElectron(), fillElectron2(), and produce().

◆ embedPflowPreshowerClusters_

const bool pat::PATElectronProducer::embedPflowPreshowerClusters_
private

Definition at line 71 of file PATElectronProducer.h.

Referenced by fillElectron(), and fillElectron2().

◆ embedPflowSuperCluster_

const bool pat::PATElectronProducer::embedPflowSuperCluster_
private

Definition at line 66 of file PATElectronProducer.h.

Referenced by fillElectron(), and fillElectron2().

◆ embedPreshowerClusters_

const bool pat::PATElectronProducer::embedPreshowerClusters_
private

Definition at line 69 of file PATElectronProducer.h.

Referenced by fillElectron(), and fillElectron2().

◆ embedRecHits_

const bool pat::PATElectronProducer::embedRecHits_
private

Definition at line 75 of file PATElectronProducer.h.

Referenced by produce().

◆ embedSeedCluster_

const bool pat::PATElectronProducer::embedSeedCluster_
private

Definition at line 67 of file PATElectronProducer.h.

Referenced by fillElectron(), and fillElectron2().

◆ embedSuperCluster_

const bool pat::PATElectronProducer::embedSuperCluster_
private

Definition at line 65 of file PATElectronProducer.h.

Referenced by fillElectron(), and fillElectron2().

◆ embedTrack_

const bool pat::PATElectronProducer::embedTrack_
private

Definition at line 72 of file PATElectronProducer.h.

Referenced by fillElectron(), and fillElectron2().

◆ genMatchTokens_

std::vector<edm::EDGetTokenT<edm::Association<reco::GenParticleCollection> > > pat::PATElectronProducer::genMatchTokens_
private

Definition at line 84 of file PATElectronProducer.h.

Referenced by produce().

◆ hcalPFClusterIsoT_

const edm::EDGetTokenT<edm::ValueMap<float> > pat::PATElectronProducer::hcalPFClusterIsoT_
private

Definition at line 105 of file PATElectronProducer.h.

Referenced by produce().

◆ hConversionsToken_

const edm::EDGetTokenT<reco::ConversionCollection> pat::PATElectronProducer::hConversionsToken_
private

Definition at line 62 of file PATElectronProducer.h.

Referenced by produce().

◆ isoDepositLabels_

IsolationLabels pat::PATElectronProducer::isoDepositLabels_
private

Definition at line 168 of file PATElectronProducer.h.

Referenced by fillElectron(), fillElectron2(), and produce().

◆ isoDepositTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<IsoDeposit> > > pat::PATElectronProducer::isoDepositTokens_
private

Definition at line 169 of file PATElectronProducer.h.

Referenced by produce().

◆ isolationValueLabels_

IsolationLabels pat::PATElectronProducer::isolationValueLabels_
private

Definition at line 170 of file PATElectronProducer.h.

Referenced by fillElectron(), and fillElectron2().

◆ isolationValueLabelsNoPFId_

IsolationLabels pat::PATElectronProducer::isolationValueLabelsNoPFId_
private

Definition at line 172 of file PATElectronProducer.h.

Referenced by fillElectron().

◆ isolationValueNoPFIdTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<double> > > pat::PATElectronProducer::isolationValueNoPFIdTokens_
private

Definition at line 173 of file PATElectronProducer.h.

Referenced by produce().

◆ isolationValueTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<double> > > pat::PATElectronProducer::isolationValueTokens_
private

Definition at line 171 of file PATElectronProducer.h.

Referenced by produce().

◆ isolator_

pat::helper::MultiIsolator pat::PATElectronProducer::isolator_
private

Definition at line 166 of file PATElectronProducer.h.

Referenced by produce().

◆ isolatorTmpStorage_

pat::helper::MultiIsolator::IsolationValuePairs pat::PATElectronProducer::isolatorTmpStorage_
private

Definition at line 167 of file PATElectronProducer.h.

Referenced by produce().

◆ miniIsoParamsB_

std::vector<double> pat::PATElectronProducer::miniIsoParamsB_
private

Definition at line 80 of file PATElectronProducer.h.

Referenced by setElectronMiniIso().

◆ miniIsoParamsE_

std::vector<double> pat::PATElectronProducer::miniIsoParamsE_
private

Definition at line 79 of file PATElectronProducer.h.

Referenced by setElectronMiniIso().

◆ pcToken_

edm::EDGetTokenT<pat::PackedCandidateCollection> pat::PATElectronProducer::pcToken_
private

Definition at line 77 of file PATElectronProducer.h.

Referenced by produce().

◆ pfCandidateMapToken_

const edm::EDGetTokenT<edm::ValueMap<reco::PFCandidatePtr> > pat::PATElectronProducer::pfCandidateMapToken_
private

Definition at line 90 of file PATElectronProducer.h.

Referenced by produce().

◆ pfCandidateMultiMapToken_

const edm::EDGetTokenT<edm::ValueMap<std::vector<reco::PFCandidateRef> > > pat::PATElectronProducer::pfCandidateMultiMapToken_
private

Definition at line 91 of file PATElectronProducer.h.

Referenced by produce().

◆ pfElecToken_

const edm::EDGetTokenT<reco::PFCandidateCollection> pat::PATElectronProducer::pfElecToken_
private

Definition at line 89 of file PATElectronProducer.h.

Referenced by produce().

◆ pTComparator_

const GreaterByPt<Electron> pat::PATElectronProducer::pTComparator_
private

Definition at line 164 of file PATElectronProducer.h.

Referenced by produce().

◆ PUPPIIsolation_charged_hadrons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATElectronProducer::PUPPIIsolation_charged_hadrons_
private

Definition at line 183 of file PATElectronProducer.h.

Referenced by produce().

◆ PUPPIIsolation_neutral_hadrons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATElectronProducer::PUPPIIsolation_neutral_hadrons_
private

Definition at line 184 of file PATElectronProducer.h.

Referenced by produce().

◆ PUPPIIsolation_photons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATElectronProducer::PUPPIIsolation_photons_
private

Definition at line 185 of file PATElectronProducer.h.

Referenced by produce().

◆ PUPPINoLeptonsIsolation_charged_hadrons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATElectronProducer::PUPPINoLeptonsIsolation_charged_hadrons_
private

Definition at line 187 of file PATElectronProducer.h.

Referenced by produce().

◆ PUPPINoLeptonsIsolation_neutral_hadrons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATElectronProducer::PUPPINoLeptonsIsolation_neutral_hadrons_
private

Definition at line 188 of file PATElectronProducer.h.

Referenced by produce().

◆ PUPPINoLeptonsIsolation_photons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATElectronProducer::PUPPINoLeptonsIsolation_photons_
private

Definition at line 189 of file PATElectronProducer.h.

Referenced by produce().

◆ pvToken_

const edm::EDGetTokenT<std::vector<reco::Vertex> > pat::PATElectronProducer::pvToken_
private

Definition at line 110 of file PATElectronProducer.h.

Referenced by produce().

◆ reducedBarrelRecHitCollection_

const edm::InputTag pat::PATElectronProducer::reducedBarrelRecHitCollection_
private

Definition at line 96 of file PATElectronProducer.h.

◆ reducedBarrelRecHitCollectionToken_

const edm::EDGetTokenT<EcalRecHitCollection> pat::PATElectronProducer::reducedBarrelRecHitCollectionToken_
private

Definition at line 97 of file PATElectronProducer.h.

Referenced by produce().

◆ reducedEndcapRecHitCollection_

const edm::InputTag pat::PATElectronProducer::reducedEndcapRecHitCollection_
private

Definition at line 98 of file PATElectronProducer.h.

◆ reducedEndcapRecHitCollectionToken_

const edm::EDGetTokenT<EcalRecHitCollection> pat::PATElectronProducer::reducedEndcapRecHitCollectionToken_
private

Definition at line 99 of file PATElectronProducer.h.

Referenced by produce().

◆ resolutionLoader_

pat::helper::KinResolutionsLoader pat::PATElectronProducer::resolutionLoader_
private

Definition at line 179 of file PATElectronProducer.h.

Referenced by fillElectron(), fillElectron2(), and produce().

◆ useParticleFlow_

const bool pat::PATElectronProducer::useParticleFlow_
private

pflow specific

Definition at line 87 of file PATElectronProducer.h.

Referenced by fillElectron(), and produce().

◆ usePfCandidateMultiMap_

const bool pat::PATElectronProducer::usePfCandidateMultiMap_
private

Definition at line 88 of file PATElectronProducer.h.

Referenced by produce().

◆ userDataHelper_

pat::PATUserDataHelper<pat::Electron> pat::PATElectronProducer::userDataHelper_
private

Definition at line 190 of file PATElectronProducer.h.

Referenced by produce().

◆ useUserData_

const bool pat::PATElectronProducer::useUserData_
private

Definition at line 181 of file PATElectronProducer.h.

Referenced by produce().

SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
reco::GsfElectron::isEE
bool isEE() const
Definition: GsfElectron.h:337
pat::PATElectronProducer::isolatorTmpStorage_
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
Definition: PATElectronProducer.h:167
pat::Electron::embedTrack
void embedTrack()
method to store the electron's Track internally
pat::PATElectronProducer::isolationValueNoPFIdTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueNoPFIdTokens_
Definition: PATElectronProducer.h:173
electrons_cff.bool
bool
Definition: electrons_cff.py:393
pat::PATUserDataHelper
Assists in assimilating all pat::UserData into pat objects.
Definition: PATUserDataHelper.h:49
edm::SortedCollection::sort
void sort()
Definition: SortedCollection.h:302
mps_fire.i
i
Definition: mps_fire.py:428
pat::EcalIso
Definition: Isolation.h:11
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
pat::PATElectronProducer::embedGsfTrack_
const bool embedGsfTrack_
Definition: PATElectronProducer.h:64
edm::SortedCollection< EcalRecHit >::const_iterator
std::vector< EcalRecHit >::const_iterator const_iterator
Definition: SortedCollection.h:80
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
pat::PATElectronProducer::elecIDSrcs_
std::vector< NameTag > elecIDSrcs_
Definition: PATElectronProducer.h:160
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
pat::PATElectronProducer::genMatchTokens_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
Definition: PATElectronProducer.h:84
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
pat::PATElectronProducer::addPFClusterIso_
const bool addPFClusterIso_
Definition: PATElectronProducer.h:102
pat::Electron::PV2D
Definition: Electron.h:190
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::Handle::product
T const * product() const
Definition: Handle.h:70
electronProducer_cff.isolationValues
isolationValues
Definition: electronProducer_cff.py:26
pat::PATElectronProducer::embedHighLevel
void embedHighLevel(pat::Electron &anElectron, reco::GsfTrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid)
Definition: PATElectronProducer.cc:1199
pat::PATElectronProducer::IsolationLabel
std::pair< pat::IsolationKeys, edm::InputTag > IsolationLabel
Definition: PATElectronProducer.h:147
pat::PATElectronProducer::fillElectron2
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
Definition: PATElectronProducer.cc:914
pat::PATElectronProducer::PUPPINoLeptonsIsolation_photons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
Definition: PATElectronProducer.h:189
reco::PFCandidate::e
Definition: PFCandidate.h:47
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
pat::Electron::embedSeedCluster
void embedSeedCluster()
method to store the electron's seedcluster internally
pat::Electron::embedPreshowerClusters
void embedPreshowerClusters()
method to store the electron's preshower clusters
pat::helper::EfficiencyLoader
Definition: EfficiencyLoader.h:16
pat::PATElectronProducer::setElectronMiniIso
void setElectronMiniIso(pat::Electron &anElectron, const pat::PackedCandidateCollection *pc)
Definition: PATElectronProducer.cc:993
pat::PATElectronProducer::resolutionLoader_
pat::helper::KinResolutionsLoader resolutionLoader_
Definition: PATElectronProducer.h:179
pat::PATElectronProducer::isolationValueLabels_
IsolationLabels isolationValueLabels_
Definition: PATElectronProducer.h:170
edm::EDGetTokenT< reco::PFCandidateCollection >
Electron
Definition: Electron.py:1
edm::Ref::isNull
bool isNull() const
Checks for null.
Definition: Ref.h:235
pat::helper::MultiIsolator::fill
void fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
Definition: MultiIsolator.h:84
pat::PATElectronProducer::embedRecHits_
const bool embedRecHits_
Definition: PATElectronProducer.h:75
IPTools::absoluteImpactParameter3D
std::pair< bool, Measurement1D > absoluteImpactParameter3D(const reco::TransientTrack &transientTrack, const reco::Vertex &vertex)
Definition: IPTools.cc:38
pat::PATUserDataHelper::fillDescription
static void fillDescription(edm::ParameterSetDescription &iDesc)
Definition: PATUserDataHelper.h:135
pat::PATElectronProducer::pvToken_
const edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
Definition: PATElectronProducer.h:110
reco::GsfElectron::PflowIsolationVariables
Definition: GsfElectron.h:606
pat::Electron::embedGsfElectronCore
void embedGsfElectronCore()
method to store the electron's core internally
pat::Electron::setEcalDrivenMomentum
void setEcalDrivenMomentum(const Candidate::LorentzVector &mom)
Definition: Electron.h:204
reco::PFCandidateConstIterator
PFCandidateCollection::const_iterator PFCandidateConstIterator
iterator
Definition: PFCandidateFwd.h:18
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
pat::PATElectronProducer::elecIDTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > elecIDTokens_
Definition: PATElectronProducer.h:161
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
pat::Lepton::setIsolation
void setIsolation(IsolationKeys key, float value)
Definition: Lepton.h:115
pat::helper::EfficiencyLoader::enabled
bool enabled() const
'true' if this there is at least one efficiency configured
Definition: EfficiencyLoader.h:25
pat::Electron::BS2D
Definition: Electron.h:190
cms::cuda::assert
assert(be >=bs)
edm::PtrVectorItr
Definition: PtrVector.h:51
edm::SortedCollection< EcalRecHit >
pat::PATElectronProducer::embedPflowBasicClusters_
const bool embedPflowBasicClusters_
Definition: PATElectronProducer.h:70
electronProducer_cff.isolationValuesNoPFId
isolationValuesNoPFId
Definition: electronProducer_cff.py:34
pat::PATObject::addGenParticleRef
void addGenParticleRef(const reco::GenParticleRef &ref)
Definition: PATObject.h:753
pat::PfAllParticleIso
Definition: Isolation.h:13
pat::PATElectronProducer::embedHighLevelSelection_
const bool embedHighLevelSelection_
embed high level selection variables?
Definition: PATElectronProducer.h:108
pat::PATElectronProducer::IsoDepositMaps
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps
Definition: PATElectronProducer.h:113
CaloTopologyRecord
Definition: CaloTopologyRecord.h:10
pat::PATElectronProducer::userDataHelper_
pat::PATUserDataHelper< pat::Electron > userDataHelper_
Definition: PATElectronProducer.h:190
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
pat::PATElectronProducer::PUPPINoLeptonsIsolation_charged_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_charged_hadrons_
Definition: PATElectronProducer.h:187
pat::PATElectronProducer::addEfficiencies_
const bool addEfficiencies_
Definition: PATElectronProducer.h:175
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
pat::PATElectronProducer::isolationValueLabelsNoPFId_
IsolationLabels isolationValueLabelsNoPFId_
Definition: PATElectronProducer.h:172
pat::Electron::embedPflowBasicClusters
void embedPflowBasicClusters()
method to store the electron's pflow basic clusters
pat::PATElectronProducer::embedGenMatch_
bool embedGenMatch_
Definition: PATElectronProducer.h:74
pat::PATElectronProducer::NameTag
std::pair< std::string, edm::InputTag > NameTag
Definition: PATElectronProducer.h:159
edm::Handle
Definition: AssociativeIterator.h:50
edm::ParameterSetDescription::addOptional
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:105
pat::Electron::pfCandidateRef
reco::PFCandidateRef pfCandidateRef() const
reference to the source PFCandidates; null if this has been built from a standard electron
edm::SortedCollection::push_back
void push_back(T const &t)
Definition: SortedCollection.h:188
dqmdumpme.first
first
Definition: dqmdumpme.py:55
pat::Electron::embedPflowSuperCluster
void embedPflowSuperCluster()
method to store the electron's PflowSuperCluster internally
pat::helper::MultiIsolator::IsolationValuePairs
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
Definition: MultiIsolator.h:17
EcalBarrel
Definition: EcalSubdetector.h:10
pat::helper::KinResolutionsLoader::enabled
bool enabled() const
'true' if this there is at least one efficiency configured
Definition: KinResolutionsLoader.h:27
pat::Electron::embedGsfTrack
void embedGsfTrack()
method to store the electron's GsfTrack internally
pat::PATElectronProducer::useUserData_
const bool useUserData_
Definition: PATElectronProducer.h:181
pat::PATElectronProducer::embedPreshowerClusters_
const bool embedPreshowerClusters_
Definition: PATElectronProducer.h:69
pat::PATElectronProducer::pTComparator_
const GreaterByPt< Electron > pTComparator_
Definition: PATElectronProducer.h:164
pat::Electron::BS3D
Definition: Electron.h:190
pat::PATElectronProducer::pfCandidateMapToken_
const edm::EDGetTokenT< edm::ValueMap< reco::PFCandidatePtr > > pfCandidateMapToken_
Definition: PATElectronProducer.h:90
pat::helper::MultiIsolator::enabled
bool enabled() const
True if it has a non null configuration.
Definition: MultiIsolator.h:55
edm::Ref< GenParticleCollection >
pat::PATElectronProducer::pfElecToken_
const edm::EDGetTokenT< reco::PFCandidateCollection > pfElecToken_
Definition: PATElectronProducer.h:89
pat::PATElectronProducer::embedPflowSuperCluster_
const bool embedPflowSuperCluster_
Definition: PATElectronProducer.h:66
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
pat::helper::MultiIsolator::endEvent
void endEvent()
Definition: MultiIsolator.cc:85
pat::PATElectronProducer::embedSeedCluster_
const bool embedSeedCluster_
Definition: PATElectronProducer.h:67
pat::Electron::setDB
void setDB(double dB, double edB, IPTYPE type)
Set impact parameter of a certain type and its uncertainty.
fileCollector.seed
seed
Definition: fileCollector.py:127
BeamMonitor_cff.primaryVertex
primaryVertex
hltOfflineBeamSpot for HLTMON
Definition: BeamMonitor_cff.py:7
DetId
Definition: DetId.h:17
electronIdMVAProducer_cfi.reducedEBRecHitCollection
reducedEBRecHitCollection
Definition: electronIdMVAProducer_cfi.py:7
reco::GsfElectron::setP4
void setP4(P4Kind kind, const LorentzVector &p4, float p4Error, bool setCandidate)
Definition: GsfElectron.cc:188
pat::PATElectronProducer::usePfCandidateMultiMap_
const bool usePfCandidateMultiMap_
Definition: PATElectronProducer.h:88
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
pat::PATElectronProducer::pfCandidateMultiMapToken_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > pfCandidateMultiMapToken_
Definition: PATElectronProducer.h:91
pat::getMiniPFIsolation
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)
Definition: MiniIsolation.cc:19
pat::PATElectronProducer::isoDepositTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
Definition: PATElectronProducer.h:169
pat::PATElectronProducer::isolationValueTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
Definition: PATElectronProducer.h:171
pat::Electron::embedPflowPreshowerClusters
void embedPflowPreshowerClusters()
method to store the electron's pflow preshower clusters
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
pat::PfChargedHadronIso
Definition: Isolation.h:14
IPTools::signedImpactParameter3D
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:81
pat::PATUserDataHelper::add
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
Definition: PATUserDataHelper.h:114
electronIdMVAProducer_cfi.reducedEERecHitCollection
reducedEERecHitCollection
Definition: electronIdMVAProducer_cfi.py:8
pat::PATElectronProducer::embedBasicClusters_
const bool embedBasicClusters_
Definition: PATElectronProducer.h:68
pat::helper::EfficiencyLoader::newEvent
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
Definition: EfficiencyLoader.cc:21
pat::PATElectronProducer::embedGsfElectronCore_
const bool embedGsfElectronCore_
Definition: PATElectronProducer.h:63
pat::Electron::PV3D
Definition: Electron.h:190
ConversionTools::hasMatchedConversion
static bool hasMatchedConversion(const reco::GsfElectron &ele, const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
Definition: ConversionTools.cc:183
reco::BeamSpot
Definition: BeamSpot.h:21
TransientTrackRecord
Definition: TransientTrackRecord.h:11
source
static const std::string source
Definition: EdmProvDump.cc:47
pat::helper::KinResolutionsLoader
Definition: KinResolutionsLoader.h:18
pat::Lepton::setIsoDeposit
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
Definition: Lepton.h:191
edm::ESHandle< CaloTopology >
pat::PATElectronProducer::reducedEndcapRecHitCollection_
const edm::InputTag reducedEndcapRecHitCollection_
Definition: PATElectronProducer.h:98
beamspot
Definition: BeamSpotWrite2Txt.h:8
pat::Electron::embedBasicClusters
void embedBasicClusters()
method to store the electron's basic clusters
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
EcalClusterLazyTools
pat::Electron::embedSuperCluster
void embedSuperCluster()
method to store the electron's SuperCluster internally
edm::vector_transform
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 >
Definition: transform.h:11
EcalEndcap
Definition: EcalSubdetector.h:10
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
pat::helper::KinResolutionsLoader::setResolutions
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
Definition: KinResolutionsLoader.h:49
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
edm::View
Definition: CaloClusterFwd.h:14
pat::PATElectronProducer::PUPPIIsolation_charged_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
Definition: PATElectronProducer.h:183
pat::PATElectronProducer::hcalPFClusterIsoT_
const edm::EDGetTokenT< edm::ValueMap< float > > hcalPFClusterIsoT_
Definition: PATElectronProducer.h:105
edm::ParameterSet
Definition: ParameterSet.h:47
edm::ParameterSetDescription::setComment
void setComment(std::string const &value)
Definition: ParameterSetDescription.cc:33
edm::Ptr::id
ProductID id() const
Accessor for product ID.
Definition: Ptr.h:158
pat::PfGammaIso
Definition: Isolation.h:16
electronIsolatorFromEffectiveArea_cfi.pfElectrons
pfElectrons
Definition: electronIsolatorFromEffectiveArea_cfi.py:5
pat::helper::KinResolutionsLoader::fillDescription
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
Definition: KinResolutionsLoader.cc:34
CaloTopology::getSubdetectorTopology
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:17
pat::UserBaseIso
Definition: Isolation.h:22
pat::PATElectronProducer::embedSuperCluster_
const bool embedSuperCluster_
Definition: PATElectronProducer.h:65
pat::PATElectronProducer::reducedBarrelRecHitCollection_
const edm::InputTag reducedBarrelRecHitCollection_
Definition: PATElectronProducer.h:96
edm::ParameterSetDescription::ifValue
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases)
Definition: ParameterSetDescription.h:220
pat::TrackIso
Definition: Isolation.h:10
electrons_cff.ip3d
ip3d
Definition: electrons_cff.py:384
pat::PATElectronProducer::reducedEndcapRecHitCollectionToken_
const edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
Definition: PATElectronProducer.h:99
pat::PATElectronProducer::embedPflowPreshowerClusters_
const bool embedPflowPreshowerClusters_
Definition: PATElectronProducer.h:71
edm::ParameterSet::getParameterNamesForType
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Definition: ParameterSet.h:179
iEvent
int iEvent
Definition: GenABIO.cc:224
pat::HcalIso
Definition: Isolation.h:12
pat::PATElectronProducer::addElecID_
const bool addElecID_
Definition: PATElectronProducer.h:158
pat::PATElectronProducer::electronToken_
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
Definition: PATElectronProducer.h:61
pat::PfNeutralHadronIso
Definition: Isolation.h:15
pat::Lepton::setMiniPFIsolation
void setMiniPFIsolation(PFIsolation const &iso)
Definition: Lepton.h:217
pat::PfChargedAllIso
Definition: Isolation.h:25
pat::PATElectronProducer::ecalTopology_
const CaloTopology * ecalTopology_
Definition: PATElectronProducer.h:192
edm::Association
Definition: Association.h:18
edm::ParameterSetDescription::addNode
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
Definition: ParameterSetDescription.cc:41
pat::PATElectronProducer::embedPFCandidate_
const bool embedPFCandidate_
Definition: PATElectronProducer.h:92
edm::contains
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
edm::ParameterSetDescription::setAllowAnything
void setAllowAnything()
allow any parameter label/value pairs
Definition: ParameterSetDescription.cc:37
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
pat::PATElectronProducer::hConversionsToken_
const edm::EDGetTokenT< reco::ConversionCollection > hConversionsToken_
Definition: PATElectronProducer.h:62
get
#define get
pat::PfPUChargedHadronIso
Definition: Isolation.h:24
pat::helper::KinResolutionsLoader::newEvent
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
Definition: KinResolutionsLoader.cc:27
reco::GsfElectron::p4
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:211
EcalClusterLazyToolsBase::ESGetTokens::get
ESData get(edm::EventSetup const &eventSetup) const
Definition: EcalClusterLazyTools.h:62
pat::PATElectronProducer::PUPPIIsolation_photons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
Definition: PATElectronProducer.h:185
pat::PATElectronProducer::addMVAVariables_
const bool addMVAVariables_
mva input variables
Definition: PATElectronProducer.h:95
pat::PATElectronProducer::useParticleFlow_
const bool useParticleFlow_
pflow specific
Definition: PATElectronProducer.h:87
edm::Ptr< Candidate >
pat::PATElectronProducer::addPuppiIsolation_
const bool addPuppiIsolation_
Definition: PATElectronProducer.h:103
pat::PATElectronProducer::isolator_
pat::helper::MultiIsolator isolator_
Definition: PATElectronProducer.h:166
pat::PATElectronProducer::IsolationValueMaps
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
Definition: PATElectronProducer.h:114
reco::TrackBase::Point
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
CaloSubdetectorTopology::getWindow
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
Definition: CaloSubdetectorTopology.cc:4
pat::PFIsolation
Definition: PFIsolation.h:12
pat::PATElectronProducer::embedTrack_
const bool embedTrack_
Definition: PATElectronProducer.h:72
reco::Matched
Definition: TrackInfoEnum.h:16
eostools.move
def move(src, dest)
Definition: eostools.py:511
pat::PATElectronProducer::pcToken_
edm::EDGetTokenT< pat::PackedCandidateCollection > pcToken_
Definition: PATElectronProducer.h:77
pat::IsolationKeys
IsolationKeys
Enum defining isolation keys.
Definition: Isolation.h:9
reco::TransientTrack
Definition: TransientTrack.h:19
pat::helper::MultiIsolator::beginEvent
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
Definition: MultiIsolator.cc:79
tier0.unique
def unique(seq, keepstr=True)
Definition: tier0.py:24
pat::PATElectronProducer::miniIsoParamsB_
std::vector< double > miniIsoParamsB_
Definition: PATElectronProducer.h:80
pwdgSkimBPark_cfi.electrons
electrons
Definition: pwdgSkimBPark_cfi.py:6
pat::helper::EfficiencyLoader::setEfficiencies
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
Definition: EfficiencyLoader.h:41
pat::PATElectronProducer::fillElectron
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
Definition: PATElectronProducer.cc:818
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
pat::PATElectronProducer::addGenMatch_
bool addGenMatch_
Definition: PATElectronProducer.h:73
edm::ValueMap
Definition: ValueMap.h:107
reco::GsfElectron::PflowIsolationVariables::sumHcalClusterEt
float sumHcalClusterEt
Definition: GsfElectron.h:618
Exception
Definition: hltDiff.cc:246
edm::RefVectorIterator
Definition: EDProductfwd.h:33
pat::PATElectronProducer::ecalPFClusterIsoT_
const edm::EDGetTokenT< edm::ValueMap< float > > ecalPFClusterIsoT_
Definition: PATElectronProducer.h:104
reco::HitPattern::MISSING_INNER_HITS
Definition: HitPattern.h:155
or
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
Definition: Activities.doc:12
pat::PATElectronProducer::beamLineToken_
const edm::EDGetTokenT< reco::BeamSpot > beamLineToken_
Definition: PATElectronProducer.h:109
pat::Electron::PVDZ
Definition: Electron.h:190
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::RefToBase
Definition: AssociativeIterator.h:54
pat::PATElectronProducer::PUPPINoLeptonsIsolation_neutral_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_neutral_hadrons_
Definition: PATElectronProducer.h:188
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
patElectronEAIsoCorrectionProducer_cfi.patElectrons
patElectrons
Definition: patElectronEAIsoCorrectionProducer_cfi.py:4
TransientTrackBuilder::build
reco::TransientTrack build(const reco::Track *p) const
Definition: TransientTrackBuilder.cc:20
pat::PATElectronProducer::GenAssociations
std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > GenAssociations
Definition: PATElectronProducer.h:82
electronProducer_cfi.usePfCandidateMultiMap
usePfCandidateMultiMap
Definition: electronProducer_cfi.py:11
mps_fire.result
result
Definition: mps_fire.py:311
pat::PATElectronProducer::ecalClusterToolsESGetTokens_
const EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
Definition: PATElectronProducer.h:100
reco::LeafCandidate::polarP4
const PolarLorentzVector & polarP4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:116
edm::ParameterDescriptionNode::setComment
void setComment(std::string const &value)
Definition: ParameterDescriptionNode.cc:106
pat::PATElectronProducer::isoDepositLabels_
IsolationLabels isoDepositLabels_
Definition: PATElectronProducer.h:168
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
pat::PATObject::embedGenParticle
void embedGenParticle()
Definition: PATObject.h:770
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
crabWrapper.key
key
Definition: crabWrapper.py:19
pat::PATElectronProducer::miniIsoParamsE_
std::vector< double > miniIsoParamsE_
Definition: PATElectronProducer.h:79
edm::EmptyGroupDescription
Definition: EmptyGroupDescription.h:15
edm::ParameterDescription
Definition: ParameterDescription.h:110
CandIsolatorFromDeposits_cfi.deposits
deposits
Definition: CandIsolatorFromDeposits_cfi.py:4
reco::GsfElectron::PflowIsolationVariables::sumEcalClusterEt
float sumEcalClusterEt
Definition: GsfElectron.h:617
pat::PATElectronProducer::addResolutions_
const bool addResolutions_
Definition: PATElectronProducer.h:178
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
pat::PATElectronProducer::efficiencyLoader_
pat::helper::EfficiencyLoader efficiencyLoader_
Definition: PATElectronProducer.h:176
reco::Vertex
Definition: Vertex.h:35
hit
Definition: SiStripHitEffFromCalibTree.cc:88
pat::PATElectronProducer::computeMiniIso_
bool computeMiniIso_
Definition: PATElectronProducer.h:78
pat::PATElectronProducer::readIsolationLabels
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &tokens)
Definition: PATElectronProducer.h:197
pat::PATElectronProducer::reducedBarrelRecHitCollectionToken_
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
Definition: PATElectronProducer.h:97
pat::PATElectronProducer::PUPPIIsolation_neutral_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_
Definition: PATElectronProducer.h:184