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...

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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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_
 
const edm::ESGetToken< CaloTopology, CaloTopologyRecordecalTopologyToken_
 
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 edm::ESGetToken< TransientTrackBuilder, TransientTrackRecordtrackBuilderToken_
 
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<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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 68 of file PATElectronProducer.cc.

Member Typedef Documentation

◆ ElectronBaseRef

Definition at line 130 of file PATElectronProducer.cc.

◆ GenAssociations

Definition at line 100 of file PATElectronProducer.cc.

◆ IsoDepositMaps

Definition at line 131 of file PATElectronProducer.cc.

◆ IsolationLabel

Definition at line 165 of file PATElectronProducer.cc.

◆ IsolationLabels

Definition at line 166 of file PATElectronProducer.cc.

◆ IsolationValueMaps

Definition at line 132 of file PATElectronProducer.cc.

◆ NameTag

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

Definition at line 177 of file PATElectronProducer.cc.

Constructor & Destructor Documentation

◆ PATElectronProducer()

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

Definition at line 270 of file PATElectronProducer.cc.

271  : // general configurables
272  electronToken_(consumes<edm::View<reco::GsfElectron>>(iConfig.getParameter<edm::InputTag>("electronSource"))),
273  hConversionsToken_(consumes<reco::ConversionCollection>(edm::InputTag("allConversions"))),
274  embedGsfElectronCore_(iConfig.getParameter<bool>("embedGsfElectronCore")),
275  embedGsfTrack_(iConfig.getParameter<bool>("embedGsfTrack")),
276  embedSuperCluster_(iConfig.getParameter<bool>("embedSuperCluster")),
277  embedPflowSuperCluster_(iConfig.getParameter<bool>("embedPflowSuperCluster")),
278  embedSeedCluster_(iConfig.getParameter<bool>("embedSeedCluster")),
279  embedBasicClusters_(iConfig.getParameter<bool>("embedBasicClusters")),
280  embedPreshowerClusters_(iConfig.getParameter<bool>("embedPreshowerClusters")),
281  embedPflowBasicClusters_(iConfig.getParameter<bool>("embedPflowBasicClusters")),
282  embedPflowPreshowerClusters_(iConfig.getParameter<bool>("embedPflowPreshowerClusters")),
283  embedTrack_(iConfig.getParameter<bool>("embedTrack")),
284  addGenMatch_(iConfig.getParameter<bool>("addGenMatch")),
285  embedGenMatch_(addGenMatch_ ? iConfig.getParameter<bool>("embedGenMatch") : false),
286  embedRecHits_(iConfig.getParameter<bool>("embedRecHits")),
287  // pflow configurables
288  useParticleFlow_(iConfig.getParameter<bool>("useParticleFlow")),
289  usePfCandidateMultiMap_(iConfig.getParameter<bool>("usePfCandidateMultiMap")),
291  ? consumes<reco::PFCandidateCollection>(iConfig.getParameter<edm::InputTag>("pfElectronSource"))
294  iConfig.getParameter<edm::InputTag>("pfCandidateMap"))
297  ? consumes<edm::ValueMap<std::vector<reco::PFCandidateRef>>>(
298  iConfig.getParameter<edm::InputTag>("pfCandidateMultiMap"))
299  : edm::EDGetTokenT<edm::ValueMap<std::vector<reco::PFCandidateRef>>>()),
300  embedPFCandidate_(iConfig.getParameter<bool>("embedPFCandidate")),
301  // mva input variables
302  addMVAVariables_(iConfig.getParameter<bool>("addMVAVariables")),
303  reducedBarrelRecHitCollection_(iConfig.getParameter<edm::InputTag>("reducedBarrelRecHitCollection")),
304  reducedBarrelRecHitCollectionToken_(mayConsume<EcalRecHitCollection>(reducedBarrelRecHitCollection_)),
305  reducedEndcapRecHitCollection_(iConfig.getParameter<edm::InputTag>("reducedEndcapRecHitCollection")),
306  reducedEndcapRecHitCollectionToken_(mayConsume<EcalRecHitCollection>(reducedEndcapRecHitCollection_)),
307  ecalClusterToolsESGetTokens_{consumesCollector()},
308  // PFCluster Isolation maps
309  addPFClusterIso_(iConfig.getParameter<bool>("addPFClusterIso")),
310  addPuppiIsolation_(iConfig.getParameter<bool>("addPuppiIsolation")),
311  ecalPFClusterIsoT_(consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("ecalPFClusterIsoMap"))),
312  hcalPFClusterIsoT_(consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("hcalPFClusterIsoMap"))),
313  // embed high level selection variables?
314  embedHighLevelSelection_(iConfig.getParameter<bool>("embedHighLevelSelection")),
315  beamLineToken_(consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamLineSrc"))),
316  pvToken_(mayConsume<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("pvSrc"))),
317  addElecID_(iConfig.getParameter<bool>("addElectronID")),
318  pTComparator_(),
319  isolator_(iConfig.exists("userIsolation") ? iConfig.getParameter<edm::ParameterSet>("userIsolation")
320  : edm::ParameterSet(),
321  consumesCollector(),
322  false),
323  addEfficiencies_(iConfig.getParameter<bool>("addEfficiencies")),
324  addResolutions_(iConfig.getParameter<bool>("addResolutions")),
325  useUserData_(iConfig.exists("userData")),
327  trackBuilderToken_{esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))} {
328  // MC matching configurables (scheduled mode)
329 
330  if (addGenMatch_) {
331  if (iConfig.existsAs<edm::InputTag>("genParticleMatch")) {
333  iConfig.getParameter<edm::InputTag>("genParticleMatch")));
334  } else {
336  iConfig.getParameter<std::vector<edm::InputTag>>("genParticleMatch"),
337  [this](edm::InputTag const& tag) { return consumes<edm::Association<reco::GenParticleCollection>>(tag); });
338  }
339  }
340  // resolution configurables
341  if (addResolutions_) {
343  }
344  if (addPuppiIsolation_) {
345  //puppi
347  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationChargedHadrons"));
349  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationNeutralHadrons"));
351  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationPhotons"));
352  //puppiNoLeptons
354  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationChargedHadrons"));
356  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationNeutralHadrons"));
358  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationPhotons"));
359  }
360  // electron ID configurables
361  if (addElecID_) {
362  // it might be a single electron ID
363  if (iConfig.existsAs<edm::InputTag>("electronIDSource")) {
364  elecIDSrcs_.push_back(NameTag("", iConfig.getParameter<edm::InputTag>("electronIDSource")));
365  }
366  // or there might be many of them
367  if (iConfig.existsAs<edm::ParameterSet>("electronIDSources")) {
368  // please don't configure me twice
369  if (!elecIDSrcs_.empty()) {
370  throw cms::Exception("Configuration")
371  << "PATElectronProducer: you can't specify both 'electronIDSource' and 'electronIDSources'\n";
372  }
373  // read the different electron ID names
374  edm::ParameterSet idps = iConfig.getParameter<edm::ParameterSet>("electronIDSources");
375  std::vector<std::string> names = idps.getParameterNamesForType<edm::InputTag>();
376  for (std::vector<std::string>::const_iterator it = names.begin(), ed = names.end(); it != ed; ++it) {
377  elecIDSrcs_.push_back(NameTag(*it, idps.getParameter<edm::InputTag>(*it)));
378  }
379  }
380  // but in any case at least once
381  if (elecIDSrcs_.empty()) {
382  throw cms::Exception("Configuration")
383  << "PATElectronProducer: id addElectronID is true, you must specify either:\n"
384  << "\tInputTag electronIDSource = <someTag>\n"
385  << "or\n"
386  << "\tPSet electronIDSources = { \n"
387  << "\t\tInputTag <someName> = <someTag> // as many as you want \n "
388  << "\t}\n";
389  }
390  }
392  elecIDSrcs_, [this](NameTag const& tag) { return mayConsume<edm::ValueMap<float>>(tag.second); });
393  // construct resolution calculator
394 
395  // // IsoDeposit configurables
396  // if (iConfig.exists("isoDeposits")) {
397  // edm::ParameterSet depconf = iConfig.getParameter<edm::ParameterSet>("isoDeposits");
398  // if (depconf.exists("tracker")) isoDepositLabels_.push_back(std::make_pair(TrackerIso, depconf.getParameter<edm::InputTag>("tracker")));
399  // if (depconf.exists("ecal")) isoDepositLabels_.push_back(std::make_pair(ECalIso, depconf.getParameter<edm::InputTag>("ecal")));
400  // if (depconf.exists("hcal")) isoDepositLabels_.push_back(std::make_pair(HCalIso, depconf.getParameter<edm::InputTag>("hcal")));
401 
402  // if (depconf.exists("user")) {
403  // std::vector<edm::InputTag> userdeps = depconf.getParameter<std::vector<edm::InputTag> >("user");
404  // std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
405  // int key = UserBaseIso;
406  // for ( ; it != ed; ++it, ++key) {
407  // isoDepositLabels_.push_back(std::make_pair(IsolationKeys(key), *it));
408  // }
409  // }
410  // }
411  // isoDepositTokens_ = edm::vector_transform(isoDepositLabels_, [this](std::pair<IsolationKeys,edm::InputTag> const & label){return consumes<edm::ValueMap<IsoDeposit> >(label.second);});
412 
413  // for mini-iso
414  computeMiniIso_ = iConfig.getParameter<bool>("computeMiniIso");
415  miniIsoParamsE_ = iConfig.getParameter<std::vector<double>>("miniIsoParamsE");
416  miniIsoParamsB_ = iConfig.getParameter<std::vector<double>>("miniIsoParamsB");
417  if (computeMiniIso_ && (miniIsoParamsE_.size() != 9 || miniIsoParamsB_.size() != 9)) {
418  throw cms::Exception("ParameterError") << "miniIsoParams must have exactly 9 elements.\n";
419  }
420  if (computeMiniIso_)
421  pcToken_ = consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("pfCandsForMiniIso"));
422 
423  // read isoDeposit labels, for direct embedding
424  readIsolationLabels(iConfig, "isoDeposits", isoDepositLabels_, isoDepositTokens_);
425  // read isolation value labels, for direct embedding
427  // read isolation value labels for non PF identified electron, for direct embedding
429  // Efficiency configurables
430  if (addEfficiencies_) {
432  pat::helper::EfficiencyLoader(iConfig.getParameter<edm::ParameterSet>("efficiencies"), consumesCollector());
433  }
434  // Check to see if the user wants to add user data
435  if (useUserData_) {
437  PATUserDataHelper<Electron>(iConfig.getParameter<edm::ParameterSet>("userData"), consumesCollector());
438  }
439 
440  // consistency check
442  throw cms::Exception("Configuration", "usePfCandidateMultiMap not supported when useParticleFlow is set to true");
443 
444  // produces vector of muons
445  produces<std::vector<Electron>>();
446 }

◆ ~PATElectronProducer()

PATElectronProducer::~PATElectronProducer ( )
override

Definition at line 448 of file PATElectronProducer.cc.

448 {}

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 1413 of file PATElectronProducer.cc.

1419  {
1420  // Correct to PV
1421  // PV2D
1422  anElectron.setDB(track->dxy(primaryVertex.position()),
1423  track->dxyError(primaryVertex.position(), primaryVertex.covariance()),
1425 
1426  // PV3D
1427  std::pair<bool, Measurement1D> result =
1429  double d0_corr = result.second.value();
1430  double d0_err = primaryVertexIsValid ? result.second.error() : -1.0;
1431  anElectron.setDB(d0_corr, d0_err, pat::Electron::PV3D);
1432 
1433  // Correct to beam spot
1434  // BS2D
1435  anElectron.setDB(track->dxy(beamspot), track->dxyError(beamspot), pat::Electron::BS2D);
1436 
1437  // make a fake vertex out of beam spot
1438  reco::Vertex vBeamspot(beamspot.position(), beamspot.covariance3D());
1439 
1440  // BS3D
1441  result = IPTools::signedImpactParameter3D(tt, GlobalVector(track->px(), track->py(), track->pz()), vBeamspot);
1442  d0_corr = result.second.value();
1443  d0_err = beamspotIsValid ? result.second.error() : -1.0;
1444  anElectron.setDB(d0_corr, d0_err, pat::Electron::BS3D);
1445 
1446  // PVDZ
1447  anElectron.setDB(
1448  track->dz(primaryVertex.position()), std::hypot(track->dzError(), primaryVertex.zError()), pat::Electron::PVDZ);
1449 }

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 1237 of file PATElectronProducer.cc.

1237  {
1239  iDesc.setComment("PAT electron producer module");
1240 
1241  // input source
1242  iDesc.add<edm::InputTag>("pfCandidateMap", edm::InputTag("no default"))->setComment("input collection");
1243  iDesc.add<edm::InputTag>("electronSource", edm::InputTag("no default"))->setComment("input collection");
1244 
1245  iDesc.ifValue(
1246  edm::ParameterDescription<bool>("addPFClusterIso", false, true),
1248  "ecalPFClusterIsoMap", edm::InputTag("electronEcalPFClusterIsolationProducer"), true) and
1250  "hcalPFClusterIsoMap", edm::InputTag("electronHcalPFClusterIsolationProducer"), true)) or
1251  false >> (edm::ParameterDescription<edm::InputTag>("ecalPFClusterIsoMap", edm::InputTag(""), true) and
1252  edm::ParameterDescription<edm::InputTag>("hcalPFClusterIsoMap", edm::InputTag(""), true)));
1253 
1254  iDesc.ifValue(edm::ParameterDescription<bool>("addPuppiIsolation", false, true),
1256  "puppiIsolationChargedHadrons",
1257  edm::InputTag("egmElectronPUPPIIsolation", "h+-DR030-BarVeto000-EndVeto001"),
1258  true) and
1260  "puppiIsolationNeutralHadrons",
1261  edm::InputTag("egmElectronPUPPIIsolation", "h0-DR030-BarVeto000-EndVeto000"),
1262  true) and
1264  "puppiIsolationPhotons",
1265  edm::InputTag("egmElectronPUPPIIsolation", "gamma-DR030-BarVeto000-EndVeto008"),
1266  true) and
1268  "puppiNoLeptonsIsolationChargedHadrons",
1269  edm::InputTag("egmElectronPUPPINoLeptonsIsolation", "gamma-DR030-BarVeto000-EndVeto008"),
1270  true) and
1272  "puppiNoLeptonsIsolationNeutralHadrons",
1273  edm::InputTag("egmElectronPUPPINoLeptonsIsolation", "gamma-DR030-BarVeto000-EndVeto008"),
1274  true) and
1276  "puppiNoLeptonsIsolationPhotons",
1277  edm::InputTag("egmElectronPUPPINoLeptonsIsolation", "gamma-DR030-BarVeto000-EndVeto008"),
1278  true)) or
1279  false >> edm::EmptyGroupDescription());
1280 
1281  // embedding
1282  iDesc.add<bool>("embedGsfElectronCore", true)->setComment("embed external gsf electron core");
1283  iDesc.add<bool>("embedGsfTrack", true)->setComment("embed external gsf track");
1284  iDesc.add<bool>("embedSuperCluster", true)->setComment("embed external super cluster");
1285  iDesc.add<bool>("embedPflowSuperCluster", true)->setComment("embed external super cluster");
1286  iDesc.add<bool>("embedSeedCluster", true)->setComment("embed external seed cluster");
1287  iDesc.add<bool>("embedBasicClusters", true)->setComment("embed external basic clusters");
1288  iDesc.add<bool>("embedPreshowerClusters", true)->setComment("embed external preshower clusters");
1289  iDesc.add<bool>("embedPflowBasicClusters", true)->setComment("embed external pflow basic clusters");
1290  iDesc.add<bool>("embedPflowPreshowerClusters", true)->setComment("embed external pflow preshower clusters");
1291  iDesc.add<bool>("embedTrack", false)->setComment("embed external track");
1292  iDesc.add<bool>("embedRecHits", true)->setComment("embed external RecHits");
1293 
1294  // pf specific parameters
1295  iDesc.add<edm::InputTag>("pfElectronSource", edm::InputTag("pfElectrons"))
1296  ->setComment("particle flow input collection");
1297  auto&& usePfCandidateMultiMap = edm::ParameterDescription<bool>("usePfCandidateMultiMap", false, true);
1298  usePfCandidateMultiMap.setComment(
1299  "take ParticleFlow candidates from pfCandidateMultiMap instead of matching to pfElectrons by Gsf track "
1300  "reference");
1302  true >> edm::ParameterDescription<edm::InputTag>("pfCandidateMultiMap", true) or
1303  false >> edm::EmptyGroupDescription());
1304  iDesc.add<bool>("useParticleFlow", false)->setComment("whether to use particle flow or not");
1305  iDesc.add<bool>("embedPFCandidate", false)->setComment("embed external particle flow object");
1306 
1307  // MC matching configurables
1308  iDesc.add<bool>("addGenMatch", true)->setComment("add MC matching");
1309  iDesc.add<bool>("embedGenMatch", false)->setComment("embed MC matched MC information");
1310  std::vector<edm::InputTag> emptySourceVector;
1311  iDesc
1312  .addNode(edm::ParameterDescription<edm::InputTag>("genParticleMatch", edm::InputTag(), true) xor
1313  edm::ParameterDescription<std::vector<edm::InputTag>>("genParticleMatch", emptySourceVector, true))
1314  ->setComment("input with MC match information");
1315 
1316  // electron ID configurables
1317  iDesc.add<bool>("addElectronID", true)->setComment("add electron ID variables");
1318  edm::ParameterSetDescription electronIDSourcesPSet;
1319  electronIDSourcesPSet.setAllowAnything();
1320  iDesc
1321  .addNode(
1322  edm::ParameterDescription<edm::InputTag>("electronIDSource", edm::InputTag(), true) xor
1323  edm::ParameterDescription<edm::ParameterSetDescription>("electronIDSources", electronIDSourcesPSet, true))
1324  ->setComment("input with electron ID variables");
1325 
1326  // mini-iso
1327  iDesc.add<bool>("computeMiniIso", false)->setComment("whether or not to compute and store electron mini-isolation");
1328  iDesc.add<edm::InputTag>("pfCandsForMiniIso", edm::InputTag("packedPFCandidates"))
1329  ->setComment("collection to use to compute mini-iso");
1330  iDesc.add<std::vector<double>>("miniIsoParamsE", std::vector<double>())
1331  ->setComment("mini-iso parameters to use for endcap electrons");
1332  iDesc.add<std::vector<double>>("miniIsoParamsB", std::vector<double>())
1333  ->setComment("mini-iso parameters to use for barrel electrons");
1334 
1335  // IsoDeposit configurables
1336  edm::ParameterSetDescription isoDepositsPSet;
1337  isoDepositsPSet.addOptional<edm::InputTag>("tracker");
1338  isoDepositsPSet.addOptional<edm::InputTag>("ecal");
1339  isoDepositsPSet.addOptional<edm::InputTag>("hcal");
1340  isoDepositsPSet.addOptional<edm::InputTag>("pfAllParticles");
1341  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedHadrons");
1342  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedAll");
1343  isoDepositsPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
1344  isoDepositsPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
1345  isoDepositsPSet.addOptional<edm::InputTag>("pfPhotons");
1346  isoDepositsPSet.addOptional<std::vector<edm::InputTag>>("user");
1347  iDesc.addOptional("isoDeposits", isoDepositsPSet);
1348 
1349  // isolation values configurables
1350  edm::ParameterSetDescription isolationValuesPSet;
1351  isolationValuesPSet.addOptional<edm::InputTag>("tracker");
1352  isolationValuesPSet.addOptional<edm::InputTag>("ecal");
1353  isolationValuesPSet.addOptional<edm::InputTag>("hcal");
1354  isolationValuesPSet.addOptional<edm::InputTag>("pfAllParticles");
1355  isolationValuesPSet.addOptional<edm::InputTag>("pfChargedHadrons");
1356  isolationValuesPSet.addOptional<edm::InputTag>("pfChargedAll");
1357  isolationValuesPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
1358  isolationValuesPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
1359  isolationValuesPSet.addOptional<edm::InputTag>("pfPhotons");
1360  isolationValuesPSet.addOptional<std::vector<edm::InputTag>>("user");
1361  iDesc.addOptional("isolationValues", isolationValuesPSet);
1362 
1363  // isolation values configurables
1364  edm::ParameterSetDescription isolationValuesNoPFIdPSet;
1365  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("tracker");
1366  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("ecal");
1367  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("hcal");
1368  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfAllParticles");
1369  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfChargedHadrons");
1370  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfChargedAll");
1371  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
1372  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
1373  isolationValuesNoPFIdPSet.addOptional<edm::InputTag>("pfPhotons");
1374  isolationValuesNoPFIdPSet.addOptional<std::vector<edm::InputTag>>("user");
1375  iDesc.addOptional("isolationValuesNoPFId", isolationValuesNoPFIdPSet);
1376 
1377  // Efficiency configurables
1378  edm::ParameterSetDescription efficienciesPSet;
1379  efficienciesPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
1380  iDesc.add("efficiencies", efficienciesPSet);
1381  iDesc.add<bool>("addEfficiencies", false);
1382 
1383  // Check to see if the user wants to add user data
1384  edm::ParameterSetDescription userDataPSet;
1386  iDesc.addOptional("userData", userDataPSet);
1387 
1388  // electron shapes
1389  iDesc.add<bool>("addMVAVariables", true)->setComment("embed extra variables in pat::Electron : sip3d, sigmaIEtaIPhi");
1390  iDesc.add<edm::InputTag>("reducedBarrelRecHitCollection", edm::InputTag("reducedEcalRecHitsEB"));
1391  iDesc.add<edm::InputTag>("reducedEndcapRecHitCollection", edm::InputTag("reducedEcalRecHitsEE"));
1392 
1393  edm::ParameterSetDescription isolationPSet;
1394  isolationPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
1395  iDesc.add("userIsolation", isolationPSet);
1396 
1397  // Resolution configurables
1399 
1400  iDesc.add<bool>("embedHighLevelSelection", true)->setComment("embed high level selection");
1401  edm::ParameterSetDescription highLevelPSet;
1402  highLevelPSet.setAllowAnything();
1403  iDesc.addNode(edm::ParameterDescription<edm::InputTag>("beamLineSrc", edm::InputTag(), true))
1404  ->setComment("input with high level selection");
1406  ->setComment("input with high level selection");
1407 
1408  descriptions.add("PATElectronProducer", iDesc);
1409 }

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 1032 of file PATElectronProducer.cc.

1039  {
1040  //COLIN: might want to use the PFCandidate 4-mom. Which one is in use now?
1041  // if (useParticleFlow_)
1042  // aMuon.setP4( aMuon.pfCandidateRef()->p4() );
1043 
1044  //COLIN:
1045  //In the embedding case, the reference cannot be used to look into a value map.
1046  //therefore, one has to had the PFCandidateRef to this function, which becomes a bit
1047  //too much specific.
1048 
1049  // in fact, this function needs a baseref or ptr for genmatch
1050  // and a baseref or ptr for isodeposits and isolationvalues.
1051  // baseref is not needed
1052  // the ptrForIsolation and ptrForMatching should be defined upstream.
1053 
1054  // is the concrete elecRef needed for the efficiency loader? what is this loader?
1055  // how can we make it compatible with the particle flow electrons?
1056 
1058  anElectron.embedGsfElectronCore();
1059  if (embedGsfTrack_)
1060  anElectron.embedGsfTrack();
1061  if (embedSuperCluster_)
1062  anElectron.embedSuperCluster();
1064  anElectron.embedPflowSuperCluster();
1065  if (embedSeedCluster_)
1066  anElectron.embedSeedCluster();
1067  if (embedBasicClusters_)
1068  anElectron.embedBasicClusters();
1070  anElectron.embedPreshowerClusters();
1072  anElectron.embedPflowBasicClusters();
1074  anElectron.embedPflowPreshowerClusters();
1075  if (embedTrack_)
1076  anElectron.embedTrack();
1077 
1078  // store the match to the generated final state muons
1079  if (addGenMatch_) {
1080  for (size_t i = 0, n = genMatches.size(); i < n; ++i) {
1081  if (useParticleFlow_) {
1082  reco::GenParticleRef genElectron = (*genMatches[i])[anElectron.pfCandidateRef()];
1083  anElectron.addGenParticleRef(genElectron);
1084  } else {
1085  reco::GenParticleRef genElectron = (*genMatches[i])[elecRef];
1086  anElectron.addGenParticleRef(genElectron);
1087  }
1088  }
1089  if (embedGenMatch_)
1090  anElectron.embedGenParticle();
1091  }
1092 
1093  if (efficiencyLoader_.enabled()) {
1094  efficiencyLoader_.setEfficiencies(anElectron, elecRef);
1095  }
1096 
1097  if (resolutionLoader_.enabled()) {
1098  resolutionLoader_.setResolutions(anElectron);
1099  }
1100 
1101  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
1102  if (useParticleFlow_) {
1103  reco::PFCandidateRef pfcandref = anElectron.pfCandidateRef();
1104  assert(!pfcandref.isNull());
1105  reco::CandidatePtr source = pfcandref->sourceCandidatePtr(0);
1106  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[source]);
1107  } else
1108  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[elecRef]);
1109  }
1110 
1111  for (size_t j = 0; j < isolationValues.size(); ++j) {
1112  if (useParticleFlow_) {
1113  reco::CandidatePtr source = anElectron.pfCandidateRef()->sourceCandidatePtr(0);
1114  anElectron.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[source]);
1115  } else if (pfId) {
1116  anElectron.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[elecRef]);
1117  }
1118  }
1119 
1120  //for electrons not identified as PF electrons
1121  for (size_t j = 0; j < isolationValuesNoPFId.size(); ++j) {
1122  if (!pfId) {
1123  anElectron.setIsolation(isolationValueLabelsNoPFId_[j].first, (*isolationValuesNoPFId[j])[elecRef]);
1124  }
1125  }
1126 }

References addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), cms::cuda::assert(), CandIsolatorFromDeposits_cfi::deposits, efficiencyLoader_, pat::Electron::embedBasicClusters(), embedBasicClusters_, embedGenMatch_, pat::PATObject< ObjectType >::embedGenParticle(), pat::Electron::embedGsfElectronCore(), embedGsfElectronCore_, pat::Electron::embedGsfTrack(), embedGsfTrack_, pat::Electron::embedPflowBasicClusters(), embedPflowBasicClusters_, pat::Electron::embedPflowPreshowerClusters(), embedPflowPreshowerClusters_, pat::Electron::embedPflowSuperCluster(), embedPflowSuperCluster_, pat::Electron::embedPreshowerClusters(), embedPreshowerClusters_, pat::Electron::embedSeedCluster(), embedSeedCluster_, pat::Electron::embedSuperCluster(), embedSuperCluster_, pat::Electron::embedTrack(), embedTrack_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), first, mps_fire::i, edm::Ref< C, T, F >::isNull(), isoDepositLabels_, isolationValueLabels_, isolationValueLabelsNoPFId_, electronProducer_cff::isolationValues, electronProducer_cff::isolationValuesNoPFId, dqmiolumiharvest::j, dqmiodumpmetadata::n, pat::Electron::pfCandidateRef(), resolutionLoader_, pat::helper::EfficiencyLoader::setEfficiencies(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), pat::helper::KinResolutionsLoader::setResolutions(), source, and useParticleFlow_.

Referenced by produce().

◆ fillElectron2()

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 1128 of file PATElectronProducer.cc.

1134  {
1135  //COLIN/Florian: use the PFCandidate 4-mom.
1136  anElectron.setEcalDrivenMomentum(anElectron.p4());
1137  anElectron.setP4(anElectron.pfCandidateRef()->p4());
1138 
1139  // is the concrete elecRef needed for the efficiency loader? what is this loader?
1140  // how can we make it compatible with the particle flow electrons?
1141 
1143  anElectron.embedGsfElectronCore();
1144  if (embedGsfTrack_)
1145  anElectron.embedGsfTrack();
1146  if (embedSuperCluster_)
1147  anElectron.embedSuperCluster();
1149  anElectron.embedPflowSuperCluster();
1150  if (embedSeedCluster_)
1151  anElectron.embedSeedCluster();
1152  if (embedBasicClusters_)
1153  anElectron.embedBasicClusters();
1155  anElectron.embedPreshowerClusters();
1157  anElectron.embedPflowBasicClusters();
1159  anElectron.embedPflowPreshowerClusters();
1160  if (embedTrack_)
1161  anElectron.embedTrack();
1162 
1163  // store the match to the generated final state muons
1164 
1165  if (addGenMatch_) {
1166  for (size_t i = 0, n = genMatches.size(); i < n; ++i) {
1167  reco::GenParticleRef genElectron = (*genMatches[i])[candPtrForGenMatch];
1168  anElectron.addGenParticleRef(genElectron);
1169  }
1170  if (embedGenMatch_)
1171  anElectron.embedGenParticle();
1172  }
1173 
1174  //COLIN what's this? does it have to be GsfElectron specific?
1175  if (efficiencyLoader_.enabled()) {
1176  efficiencyLoader_.setEfficiencies(anElectron, candPtrForLoader);
1177  }
1178 
1179  if (resolutionLoader_.enabled()) {
1180  resolutionLoader_.setResolutions(anElectron);
1181  }
1182 
1183  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
1185  isoDepositLabels_[j].first == pat::HcalIso || deposits[j]->contains(candPtrForGenMatch.id())) {
1186  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[candPtrForGenMatch]);
1187  } else if (deposits[j]->contains(candPtrForIsolation.id())) {
1188  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[candPtrForIsolation]);
1189  } else {
1190  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[candPtrForIsolation->sourceCandidatePtr(0)]);
1191  }
1192  }
1193 
1194  for (size_t j = 0; j < isolationValues.size(); ++j) {
1196  isolationValueLabels_[j].first == pat::HcalIso || isolationValues[j]->contains(candPtrForGenMatch.id())) {
1197  anElectron.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[candPtrForGenMatch]);
1198  } else if (isolationValues[j]->contains(candPtrForIsolation.id())) {
1199  anElectron.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[candPtrForIsolation]);
1200  } else {
1202  (*isolationValues[j])[candPtrForIsolation->sourceCandidatePtr(0)]);
1203  }
1204  }
1205 }

References addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), edm::contains(), CandIsolatorFromDeposits_cfi::deposits, pat::EcalIso, efficiencyLoader_, pat::Electron::embedBasicClusters(), embedBasicClusters_, embedGenMatch_, pat::PATObject< ObjectType >::embedGenParticle(), pat::Electron::embedGsfElectronCore(), embedGsfElectronCore_, pat::Electron::embedGsfTrack(), embedGsfTrack_, pat::Electron::embedPflowBasicClusters(), embedPflowBasicClusters_, pat::Electron::embedPflowPreshowerClusters(), embedPflowPreshowerClusters_, pat::Electron::embedPflowSuperCluster(), embedPflowSuperCluster_, pat::Electron::embedPreshowerClusters(), embedPreshowerClusters_, pat::Electron::embedSeedCluster(), embedSeedCluster_, pat::Electron::embedSuperCluster(), embedSuperCluster_, pat::Electron::embedTrack(), embedTrack_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), first, pat::HcalIso, mps_fire::i, edm::Ptr< T >::id(), isoDepositLabels_, isolationValueLabels_, electronProducer_cff::isolationValues, dqmiolumiharvest::j, dqmiodumpmetadata::n, reco::GsfElectron::p4(), pat::Electron::pfCandidateRef(), resolutionLoader_, pat::Electron::setEcalDrivenMomentum(), pat::helper::EfficiencyLoader::setEfficiencies(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), reco::GsfElectron::setP4(), pat::helper::KinResolutionsLoader::setResolutions(), and pat::TrackIso.

Referenced by produce().

◆ produce()

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

Definition at line 450 of file PATElectronProducer.cc.

450  {
451  // switch off embedding (in unschedules mode)
452  if (iEvent.isRealData()) {
453  addGenMatch_ = false;
454  embedGenMatch_ = false;
455  }
456 
458 
459  // Get the collection of electrons from the event
461  iEvent.getByToken(electronToken_, electrons);
462 
464  if (computeMiniIso_)
465  iEvent.getByToken(pcToken_, pc);
466 
467  // for additional mva variables
468  edm::InputTag reducedEBRecHitCollection(string("reducedEcalRecHitsEB"));
469  edm::InputTag reducedEERecHitCollection(string("reducedEcalRecHitsEE"));
470  //EcalClusterLazyTools lazyTools(iEvent, iSetup, reducedEBRecHitCollection, reducedEERecHitCollection);
471  EcalClusterLazyTools lazyTools(iEvent,
475 
476  // for conversion veto selection
478  iEvent.getByToken(hConversionsToken_, hConversions);
479 
480  // Get the ESHandle for the transient track builder, if needed for
481  // high level selection embedding
483 
484  if (isolator_.enabled())
485  isolator_.beginEvent(iEvent, iSetup);
486 
491 
493  for (size_t j = 0, nd = isoDepositTokens_.size(); j < nd; ++j) {
494  iEvent.getByToken(isoDepositTokens_[j], deposits[j]);
495  }
496 
498  for (size_t j = 0; j < isolationValueTokens_.size(); ++j) {
500  }
501 
503  for (size_t j = 0; j < isolationValueNoPFIdTokens_.size(); ++j) {
505  }
506 
507  // prepare the MC matching
508  GenAssociations genMatches(genMatchTokens_.size());
509  if (addGenMatch_) {
510  for (size_t j = 0, nd = genMatchTokens_.size(); j < nd; ++j) {
511  iEvent.getByToken(genMatchTokens_[j], genMatches[j]);
512  }
513  }
514 
515  // prepare ID extraction
516  std::vector<edm::Handle<edm::ValueMap<float>>> idhandles;
517  std::vector<pat::Electron::IdPair> ids;
518  if (addElecID_) {
519  idhandles.resize(elecIDSrcs_.size());
520  ids.resize(elecIDSrcs_.size());
521  for (size_t i = 0; i < elecIDSrcs_.size(); ++i) {
522  iEvent.getByToken(elecIDTokens_[i], idhandles[i]);
523  ids[i].first = elecIDSrcs_[i].first;
524  }
525  }
526 
527  // prepare the high level selection:
528  // needs beamline
529  reco::TrackBase::Point beamPoint(0, 0, 0);
532  bool beamSpotIsValid = false;
533  bool primaryVertexIsValid = false;
534 
535  // Get the beamspot
536  edm::Handle<reco::BeamSpot> beamSpotHandle;
537  iEvent.getByToken(beamLineToken_, beamSpotHandle);
538 
540  // Get the primary vertex
542  iEvent.getByToken(pvToken_, pvHandle);
543 
544  // This is needed by the IPTools methods from the tracking group
545  trackBuilder = iSetup.getHandle(trackBuilderToken_);
546 
547  if (pvHandle.isValid() && !pvHandle->empty()) {
548  primaryVertex = pvHandle->at(0);
549  primaryVertexIsValid = true;
550  } else {
551  edm::LogError("DataNotAvailable")
552  << "No primary vertex available from EventSetup, not adding high level selection \n";
553  }
554  }
555  //value maps for puppi isolation
556  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_charged_hadrons;
557  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_neutral_hadrons;
558  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_photons;
559  //value maps for puppiNoLeptons isolation
560  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_charged_hadrons;
561  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_neutral_hadrons;
562  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_photons;
563  if (addPuppiIsolation_) {
564  //puppi
565  iEvent.getByToken(PUPPIIsolation_charged_hadrons_, PUPPIIsolation_charged_hadrons);
566  iEvent.getByToken(PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_neutral_hadrons);
567  iEvent.getByToken(PUPPIIsolation_photons_, PUPPIIsolation_photons);
568  //puppiNoLeptons
569  iEvent.getByToken(PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_charged_hadrons);
570  iEvent.getByToken(PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons);
571  iEvent.getByToken(PUPPINoLeptonsIsolation_photons_, PUPPINoLeptonsIsolation_photons);
572  }
573 
574  std::vector<Electron>* patElectrons = new std::vector<Electron>();
575 
576  if (useParticleFlow_) {
578  iEvent.getByToken(pfElecToken_, pfElectrons);
579  unsigned index = 0;
580 
581  for (reco::PFCandidateConstIterator i = pfElectrons->begin(); i != pfElectrons->end(); ++i, ++index) {
583  reco::PFCandidatePtr ptrToPFElectron(pfElectrons, index);
584  // reco::CandidateBaseRef pfBaseRef( pfRef );
585 
586  reco::GsfTrackRef PfTk = i->gsfTrackRef();
587 
588  bool Matched = false;
589  bool MatchedToAmbiguousGsfTrack = false;
590  for (edm::View<reco::GsfElectron>::const_iterator itElectron = electrons->begin(); itElectron != electrons->end();
591  ++itElectron) {
592  unsigned int idx = itElectron - electrons->begin();
593  auto elePtr = electrons->ptrAt(idx);
594  if (Matched || MatchedToAmbiguousGsfTrack)
595  continue;
596 
597  reco::GsfTrackRef EgTk = itElectron->gsfTrack();
598 
599  if (itElectron->gsfTrack() == i->gsfTrackRef()) {
600  Matched = true;
601  } else {
602  for (auto const& it : itElectron->ambiguousGsfTracks()) {
603  MatchedToAmbiguousGsfTrack |= (bool)(i->gsfTrackRef() == it);
604  }
605  }
606 
607  if (Matched || MatchedToAmbiguousGsfTrack) {
608  // ptr needed for finding the matched gen particle
609  reco::CandidatePtr ptrToGsfElectron(electrons, idx);
610 
611  // ref to base needed for the construction of the pat object
612  const edm::RefToBase<reco::GsfElectron>& elecsRef = electrons->refAt(idx);
613  Electron anElectron(elecsRef);
614  anElectron.setPFCandidateRef(pfRef);
615  if (addPuppiIsolation_) {
616  anElectron.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[elePtr],
617  (*PUPPIIsolation_neutral_hadrons)[elePtr],
618  (*PUPPIIsolation_photons)[elePtr]);
619  anElectron.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[elePtr],
620  (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
621  (*PUPPINoLeptonsIsolation_photons)[elePtr]);
622  } else {
623  anElectron.setIsolationPUPPI(-999., -999., -999.);
624  anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
625  }
626 
627  //it should be always true when particleFlow electrons are used.
628  anElectron.setIsPF(true);
629 
630  if (embedPFCandidate_)
631  anElectron.embedPFCandidate();
632 
633  if (useUserData_) {
634  userDataHelper_.add(anElectron, iEvent, iSetup);
635  }
636 
637  double ip3d = -999; // for mva variable
638 
639  // embed high level selection
641  // get the global track
642  const reco::GsfTrackRef& track = PfTk;
643 
644  // Make sure the collection it points to is there
645  if (track.isNonnull() && track.isAvailable()) {
646  reco::TransientTrack tt = trackBuilder->build(track);
647  embedHighLevel(anElectron, track, tt, primaryVertex, primaryVertexIsValid, beamSpot, beamSpotIsValid);
648 
649  std::pair<bool, Measurement1D> ip3dpv = IPTools::absoluteImpactParameter3D(tt, primaryVertex);
650  ip3d = ip3dpv.second.value(); // for mva variable
651  }
652  }
653 
654  //Electron Id
655 
656  if (addElecID_) {
657  //STANDARD EL ID
658  for (size_t i = 0; i < elecIDSrcs_.size(); ++i) {
659  ids[i].second = (*idhandles[i])[elecsRef];
660  }
661  //SPECIFIC PF ID
662  ids.push_back(std::make_pair("pf_evspi", pfRef->mva_e_pi()));
663  ids.push_back(std::make_pair("pf_evsmu", pfRef->mva_e_mu()));
664  anElectron.setElectronIDs(ids);
665  }
666 
667  if (addMVAVariables_) {
668  // add missing mva variables
669  const auto& vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
670  anElectron.setMvaVariables(vCov[1], ip3d);
671  }
672  // PFClusterIso
673  if (addPFClusterIso_) {
674  // Get PFCluster Isolation
675  edm::Handle<edm::ValueMap<float>> ecalPFClusterIsoMapH;
676  iEvent.getByToken(ecalPFClusterIsoT_, ecalPFClusterIsoMapH);
677  edm::Handle<edm::ValueMap<float>> hcalPFClusterIsoMapH;
678  iEvent.getByToken(hcalPFClusterIsoT_, hcalPFClusterIsoMapH);
679  reco::GsfElectron::PflowIsolationVariables newPFIsol = anElectron.pfIsolationVariables();
680  newPFIsol.sumEcalClusterEt = (*ecalPFClusterIsoMapH)[elecsRef];
681  newPFIsol.sumHcalClusterEt = (*hcalPFClusterIsoMapH)[elecsRef];
682  anElectron.setPfIsolationVariables(newPFIsol);
683  }
684 
685  std::vector<DetId> selectedCells;
686  bool barrel = itElectron->isEB();
687  //loop over sub clusters
688  if (embedBasicClusters_) {
689  for (reco::CaloCluster_iterator clusIt = itElectron->superCluster()->clustersBegin();
690  clusIt != itElectron->superCluster()->clustersEnd();
691  ++clusIt) {
692  //get seed (max energy xtal)
693  DetId seed = lazyTools.getMaximum(**clusIt).first;
694  //get all xtals in 5x5 window around the seed
695  std::vector<DetId> dets5x5 =
698  selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
699 
700  //get all xtals belonging to cluster
701  for (const std::pair<DetId, float>& hit : (*clusIt)->hitsAndFractions()) {
702  selectedCells.push_back(hit.first);
703  }
704  }
705  }
706 
707  if (embedPflowBasicClusters_ && itElectron->parentSuperCluster().isNonnull()) {
708  for (reco::CaloCluster_iterator clusIt = itElectron->parentSuperCluster()->clustersBegin();
709  clusIt != itElectron->parentSuperCluster()->clustersEnd();
710  ++clusIt) {
711  //get seed (max energy xtal)
712  DetId seed = lazyTools.getMaximum(**clusIt).first;
713  //get all xtals in 5x5 window around the seed
714  std::vector<DetId> dets5x5 =
717  selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
718 
719  //get all xtals belonging to cluster
720  for (const std::pair<DetId, float>& hit : (*clusIt)->hitsAndFractions()) {
721  selectedCells.push_back(hit.first);
722  }
723  }
724  }
725 
726  //remove duplicates
727  std::sort(selectedCells.begin(), selectedCells.end());
728  std::unique(selectedCells.begin(), selectedCells.end());
729 
730  // Retrieve the corresponding RecHits
731 
733  if (barrel)
734  iEvent.getByToken(reducedBarrelRecHitCollectionToken_, rechitsH);
735  else
736  iEvent.getByToken(reducedEndcapRecHitCollectionToken_, rechitsH);
737 
738  EcalRecHitCollection selectedRecHits;
739  const EcalRecHitCollection* recHits = rechitsH.product();
740 
741  unsigned nSelectedCells = selectedCells.size();
742  for (unsigned icell = 0; icell < nSelectedCells; ++icell) {
743  EcalRecHitCollection::const_iterator it = recHits->find(selectedCells[icell]);
744  if (it != recHits->end()) {
745  selectedRecHits.push_back(*it);
746  }
747  }
748  selectedRecHits.sort();
749  if (embedRecHits_)
750  anElectron.embedRecHits(&selectedRecHits);
751 
752  // set conversion veto selection
753  bool passconversionveto = false;
754  if (hConversions.isValid()) {
755  // this is recommended method
756  passconversionveto =
757  !ConversionTools::hasMatchedConversion(*itElectron, *hConversions, beamSpotHandle->position());
758  } else {
759  // use missing hits without vertex fit method
760  passconversionveto =
761  itElectron->gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS) < 1;
762  }
763 
764  anElectron.setPassConversionVeto(passconversionveto);
765 
766  // fillElectron(anElectron,elecsRef,pfBaseRef,
767  // genMatches, deposits, isolationValues);
768 
769  //COLIN small warning !
770  // we are currently choosing to take the 4-momentum of the PFCandidate;
771  // the momentum of the GsfElectron is saved though
772  // we must therefore match the GsfElectron.
773  // because of this, we should not change the source of the electron matcher
774  // to the collection of PFElectrons in the python configuration
775  // I don't know what to do with the efficiencyLoader, since I don't know
776  // what this class is for.
778  anElectron, ptrToPFElectron, ptrToGsfElectron, ptrToGsfElectron, genMatches, deposits, isolationValues);
779 
780  //COLIN need to use fillElectron2 in the non-pflow case as well, and to test it.
781 
782  if (computeMiniIso_)
783  setElectronMiniIso(anElectron, pc.product());
784 
785  patElectrons->push_back(anElectron);
786  }
787  }
788  //if( !Matched && !MatchedToAmbiguousGsfTrack) std::cout << "!!!!A pf electron could not be matched to a gsf!!!!" << std::endl;
789  }
790  }
791 
792  else {
796  bool pfCandsPresent = false, valMapPresent = false;
798  iEvent.getByToken(pfCandidateMultiMapToken_, ValMultiMapH);
799  } else {
800  pfCandsPresent = iEvent.getByToken(pfElecToken_, pfElectrons);
801  valMapPresent = iEvent.getByToken(pfCandidateMapToken_, ValMapH);
802  }
803 
804  for (edm::View<reco::GsfElectron>::const_iterator itElectron = electrons->begin(); itElectron != electrons->end();
805  ++itElectron) {
806  // construct the Electron from the ref -> save ref to original object
807  //FIXME: looks like a lot of instances could be turned into const refs
808  unsigned int idx = itElectron - electrons->begin();
810  reco::CandidateBaseRef elecBaseRef(elecsRef);
811  Electron anElectron(elecsRef);
812  auto elePtr = electrons->ptrAt(idx);
813 
814  // Is this GsfElectron also identified as an e- in the particle flow?
815  bool pfId = false;
816 
818  for (const reco::PFCandidateRef& pf : (*ValMultiMapH)[elePtr]) {
819  if (pf->particleId() == reco::PFCandidate::e) {
820  pfId = true;
821  anElectron.setPFCandidateRef(pf);
822  break;
823  }
824  }
825  } else if (pfCandsPresent) {
826  // PF electron collection not available.
827  const reco::GsfTrackRef& trkRef = itElectron->gsfTrack();
828  int index = 0;
829  for (reco::PFCandidateConstIterator ie = pfElectrons->begin(); ie != pfElectrons->end(); ++ie, ++index) {
830  if (ie->particleId() != reco::PFCandidate::e)
831  continue;
832  const reco::GsfTrackRef& pfTrkRef = ie->gsfTrackRef();
833  if (trkRef == pfTrkRef) {
834  pfId = true;
836  anElectron.setPFCandidateRef(pfRef);
837  break;
838  }
839  }
840  } else if (valMapPresent) {
841  // use value map if PF collection not available
842  const edm::ValueMap<reco::PFCandidatePtr>& myValMap(*ValMapH);
843  // Get the PFCandidate
844  const reco::PFCandidatePtr& pfElePtr(myValMap[elecsRef]);
845  pfId = pfElePtr.isNonnull();
846  }
847  // set PFId function
848  anElectron.setIsPF(pfId);
849 
850  // add resolution info
851 
852  // Isolation
853  if (isolator_.enabled()) {
855  typedef pat::helper::MultiIsolator::IsolationValuePairs IsolationValuePairs;
856  // better to loop backwards, so the vector is resized less times
857  for (IsolationValuePairs::const_reverse_iterator it = isolatorTmpStorage_.rbegin(),
858  ed = isolatorTmpStorage_.rend();
859  it != ed;
860  ++it) {
861  anElectron.setIsolation(it->first, it->second);
862  }
863  }
864 
865  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
866  anElectron.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[elecsRef]);
867  }
868 
869  // add electron ID info
870  if (addElecID_) {
871  for (size_t i = 0; i < elecIDSrcs_.size(); ++i) {
872  ids[i].second = (*idhandles[i])[elecsRef];
873  }
874  anElectron.setElectronIDs(ids);
875  }
876 
877  if (useUserData_) {
878  userDataHelper_.add(anElectron, iEvent, iSetup);
879  }
880 
881  double ip3d = -999; //for mva variable
882 
883  // embed high level selection
885  // get the global track
886  reco::GsfTrackRef track = itElectron->gsfTrack();
887 
888  // Make sure the collection it points to is there
889  if (track.isNonnull() && track.isAvailable()) {
890  reco::TransientTrack tt = trackBuilder->build(track);
891  embedHighLevel(anElectron, track, tt, primaryVertex, primaryVertexIsValid, beamSpot, beamSpotIsValid);
892 
893  std::pair<bool, Measurement1D> ip3dpv = IPTools::absoluteImpactParameter3D(tt, primaryVertex);
894  ip3d = ip3dpv.second.value(); // for mva variable
895  }
896  }
897 
898  if (addMVAVariables_) {
899  // add mva variables
900  const auto& vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
901  anElectron.setMvaVariables(vCov[1], ip3d);
902  }
903 
904  // PFCluster Isolation
905  if (addPFClusterIso_) {
906  // Get PFCluster Isolation
907  edm::Handle<edm::ValueMap<float>> ecalPFClusterIsoMapH;
908  iEvent.getByToken(ecalPFClusterIsoT_, ecalPFClusterIsoMapH);
909  edm::Handle<edm::ValueMap<float>> hcalPFClusterIsoMapH;
910  iEvent.getByToken(hcalPFClusterIsoT_, hcalPFClusterIsoMapH);
911  reco::GsfElectron::PflowIsolationVariables newPFIsol = anElectron.pfIsolationVariables();
912  newPFIsol.sumEcalClusterEt = (*ecalPFClusterIsoMapH)[elecsRef];
913  newPFIsol.sumHcalClusterEt = (*hcalPFClusterIsoMapH)[elecsRef];
914  anElectron.setPfIsolationVariables(newPFIsol);
915  }
916 
917  if (addPuppiIsolation_) {
918  anElectron.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[elePtr],
919  (*PUPPIIsolation_neutral_hadrons)[elePtr],
920  (*PUPPIIsolation_photons)[elePtr]);
921  anElectron.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[elePtr],
922  (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
923  (*PUPPINoLeptonsIsolation_photons)[elePtr]);
924  } else {
925  anElectron.setIsolationPUPPI(-999., -999., -999.);
926  anElectron.setIsolationPUPPINoLeptons(-999., -999., -999.);
927  }
928 
929  std::vector<DetId> selectedCells;
930  bool barrel = itElectron->isEB();
931  //loop over sub clusters
932  if (embedBasicClusters_) {
933  for (reco::CaloCluster_iterator clusIt = itElectron->superCluster()->clustersBegin();
934  clusIt != itElectron->superCluster()->clustersEnd();
935  ++clusIt) {
936  //get seed (max energy xtal)
937  DetId seed = lazyTools.getMaximum(**clusIt).first;
938  //get all xtals in 5x5 window around the seed
939  std::vector<DetId> dets5x5 =
942  selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
943 
944  //get all xtals belonging to cluster
945  for (const std::pair<DetId, float>& hit : (*clusIt)->hitsAndFractions()) {
946  selectedCells.push_back(hit.first);
947  }
948  }
949  }
950 
951  if (embedPflowBasicClusters_ && itElectron->parentSuperCluster().isNonnull()) {
952  for (reco::CaloCluster_iterator clusIt = itElectron->parentSuperCluster()->clustersBegin();
953  clusIt != itElectron->parentSuperCluster()->clustersEnd();
954  ++clusIt) {
955  //get seed (max energy xtal)
956  DetId seed = lazyTools.getMaximum(**clusIt).first;
957  //get all xtals in 5x5 window around the seed
958  std::vector<DetId> dets5x5 =
961  selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
962 
963  //get all xtals belonging to cluster
964  for (const std::pair<DetId, float>& hit : (*clusIt)->hitsAndFractions()) {
965  selectedCells.push_back(hit.first);
966  }
967  }
968  }
969 
970  //remove duplicates
971  std::sort(selectedCells.begin(), selectedCells.end());
972  std::unique(selectedCells.begin(), selectedCells.end());
973 
974  // Retrieve the corresponding RecHits
975 
977  if (barrel)
978  iEvent.getByToken(reducedBarrelRecHitCollectionToken_, rechitsH);
979  else
980  iEvent.getByToken(reducedEndcapRecHitCollectionToken_, rechitsH);
981 
982  EcalRecHitCollection selectedRecHits;
983  const EcalRecHitCollection* recHits = rechitsH.product();
984 
985  unsigned nSelectedCells = selectedCells.size();
986  for (unsigned icell = 0; icell < nSelectedCells; ++icell) {
987  EcalRecHitCollection::const_iterator it = recHits->find(selectedCells[icell]);
988  if (it != recHits->end()) {
989  selectedRecHits.push_back(*it);
990  }
991  }
992  selectedRecHits.sort();
993  if (embedRecHits_)
994  anElectron.embedRecHits(&selectedRecHits);
995 
996  // set conversion veto selection
997  bool passconversionveto = false;
998  if (hConversions.isValid()) {
999  // this is recommended method
1000  passconversionveto =
1001  !ConversionTools::hasMatchedConversion(*itElectron, *hConversions, beamSpotHandle->position());
1002  } else {
1003  // use missing hits without vertex fit method
1004  passconversionveto =
1005  itElectron->gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS) < 1;
1006  }
1007  anElectron.setPassConversionVeto(passconversionveto);
1008 
1009  // add sel to selected
1010  fillElectron(
1011  anElectron, elecsRef, elecBaseRef, genMatches, deposits, pfId, isolationValues, isolationValuesNoPFId);
1012 
1013  if (computeMiniIso_)
1014  setElectronMiniIso(anElectron, pc.product());
1015 
1016  patElectrons->push_back(anElectron);
1017  }
1018  }
1019 
1020  // sort electrons in pt
1021  std::sort(patElectrons->begin(), patElectrons->end(), pTComparator_);
1022 
1023  // add the electrons to the event output
1024  std::unique_ptr<std::vector<Electron>> ptr(patElectrons);
1025  iEvent.put(std::move(ptr));
1026 
1027  // clean up
1028  if (isolator_.enabled())
1029  isolator_.endEvent();
1030 }

References IPTools::absoluteImpactParameter3D(), pat::PATUserDataHelper< ObjectType >::add(), addElecID_, addGenMatch_, addMVAVariables_, addPFClusterIso_, addPuppiIsolation_, Reference_intrackfit_cff::barrel, beamLineToken_, pwdgSkimBPark_cfi::beamSpot, pat::helper::MultiIsolator::beginEvent(), electrons_cff::bool, TransientTrackBuilder::build(), computeMiniIso_, CandIsolatorFromDeposits_cfi::deposits, reco::PFCandidate::e, DetId::Ecal, EcalBarrel, ecalClusterToolsESGetTokens_, EcalEndcap, ecalPFClusterIsoT_, ecalTopology_, ecalTopologyToken_, efficiencyLoader_, elecIDSrcs_, elecIDTokens_, pwdgSkimBPark_cfi::electrons, electronToken_, embedBasicClusters_, embedGenMatch_, embedHighLevel(), embedHighLevelSelection_, pat::Electron::embedPFCandidate(), embedPFCandidate_, embedPflowBasicClusters_, pat::Electron::embedRecHits(), embedRecHits_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), pat::helper::MultiIsolator::enabled(), pat::helper::MultiIsolator::endEvent(), pat::helper::MultiIsolator::fill(), fillElectron(), fillElectron2(), first, genMatchTokens_, EcalClusterLazyToolsBase::ESGetTokens::get(), edm::EventSetup::getData(), edm::EventSetup::getHandle(), CaloTopology::getSubdetectorTopology(), CaloSubdetectorTopology::getWindow(), ConversionTools::hasMatchedConversion(), hcalPFClusterIsoT_, hConversionsToken_, mps_fire::i, heavyIonCSV_trainingSettings::idx, iEvent, electrons_cff::ip3d, edm::Ptr< T >::isNonnull(), isoDepositLabels_, isoDepositTokens_, isolationValueNoPFIdTokens_, electronProducer_cff::isolationValues, electronProducer_cff::isolationValuesNoPFId, isolationValueTokens_, isolator_, isolatorTmpStorage_, edm::HandleBase::isValid(), dqmiolumiharvest::j, reco::Matched, reco::HitPattern::MISSING_INNER_HITS, eostools::move(), pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), patElectronEAIsoCorrectionProducer_cfi::patElectrons, pcToken_, packedPFCandidateRefMixer_cfi::pf, pfCandidateMapToken_, pfCandidateMultiMapToken_, pfElecToken_, electronIsolatorFromEffectiveArea_cfi::pfElectrons, reco::GsfElectron::pfIsolationVariables(), reco::BeamSpot::position(), BeamMonitor_cff::primaryVertex, edm::Handle< T >::product(), pTComparator_, PUPPIIsolation_charged_hadrons_, PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_photons_, PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_photons_, edm::SortedCollection< T, SORT >::push_back(), pvToken_, FastTrackerRecHitMaskProducer_cfi::recHits, reducedBarrelRecHitCollectionToken_, electronIdMVAProducer_cfi::reducedEBRecHitCollection, electronIdMVAProducer_cfi::reducedEERecHitCollection, reducedEndcapRecHitCollectionToken_, resolutionLoader_, fileCollector::seed, pat::Electron::setElectronIDs(), setElectronMiniIso(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), pat::Electron::setIsolationPUPPI(), pat::Electron::setIsolationPUPPINoLeptons(), pat::Electron::setIsPF(), pat::Electron::setMvaVariables(), pat::Electron::setPassConversionVeto(), pat::Electron::setPFCandidateRef(), reco::GsfElectron::setPfIsolationVariables(), jetUpdater_cfi::sort, edm::SortedCollection< T, SORT >::sort(), reco::GsfElectron::PflowIsolationVariables::sumEcalClusterEt, reco::GsfElectron::PflowIsolationVariables::sumHcalClusterEt, HLT_FULL_cff::track, trackBuilderToken_, groupFilesInBlocks::tt, tier0::unique(), useParticleFlow_, usePfCandidateMultiMap_, userDataHelper_, and useUserData_.

◆ readIsolationLabels()

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 218 of file PATElectronProducer.cc.

221  {
222  labels.clear();
223 
224  if (iConfig.exists(psetName)) {
225  edm::ParameterSet depconf = iConfig.getParameter<edm::ParameterSet>(psetName);
226 
227  if (depconf.exists("tracker"))
228  labels.push_back(std::make_pair(pat::TrackIso, depconf.getParameter<edm::InputTag>("tracker")));
229  if (depconf.exists("ecal"))
230  labels.push_back(std::make_pair(pat::EcalIso, depconf.getParameter<edm::InputTag>("ecal")));
231  if (depconf.exists("hcal"))
232  labels.push_back(std::make_pair(pat::HcalIso, depconf.getParameter<edm::InputTag>("hcal")));
233  if (depconf.exists("pfAllParticles")) {
234  labels.push_back(std::make_pair(pat::PfAllParticleIso, depconf.getParameter<edm::InputTag>("pfAllParticles")));
235  }
236  if (depconf.exists("pfChargedHadrons")) {
237  labels.push_back(
238  std::make_pair(pat::PfChargedHadronIso, depconf.getParameter<edm::InputTag>("pfChargedHadrons")));
239  }
240  if (depconf.exists("pfChargedAll")) {
241  labels.push_back(std::make_pair(pat::PfChargedAllIso, depconf.getParameter<edm::InputTag>("pfChargedAll")));
242  }
243  if (depconf.exists("pfPUChargedHadrons")) {
244  labels.push_back(
245  std::make_pair(pat::PfPUChargedHadronIso, depconf.getParameter<edm::InputTag>("pfPUChargedHadrons")));
246  }
247  if (depconf.exists("pfNeutralHadrons")) {
248  labels.push_back(
249  std::make_pair(pat::PfNeutralHadronIso, depconf.getParameter<edm::InputTag>("pfNeutralHadrons")));
250  }
251  if (depconf.exists("pfPhotons")) {
252  labels.push_back(std::make_pair(pat::PfGammaIso, depconf.getParameter<edm::InputTag>("pfPhotons")));
253  }
254  if (depconf.exists("user")) {
255  std::vector<edm::InputTag> userdeps = depconf.getParameter<std::vector<edm::InputTag>>("user");
256  std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
258  for (; it != ed; ++it, ++key) {
259  labels.push_back(std::make_pair(pat::IsolationKeys(key), *it));
260  }
261  }
262  }
263  tokens = edm::vector_transform(
264  labels, [this](IsolationLabel const& label) { return consumes<edm::ValueMap<T>>(label.second); });
265 }

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 1207 of file PATElectronProducer.cc.

1207  {
1208  pat::PFIsolation miniiso;
1209  if (anElectron.isEE())
1210  miniiso = pat::getMiniPFIsolation(pc,
1211  anElectron.polarP4(),
1212  miniIsoParamsE_[0],
1213  miniIsoParamsE_[1],
1214  miniIsoParamsE_[2],
1215  miniIsoParamsE_[3],
1216  miniIsoParamsE_[4],
1217  miniIsoParamsE_[5],
1218  miniIsoParamsE_[6],
1219  miniIsoParamsE_[7],
1220  miniIsoParamsE_[8]);
1221  else
1222  miniiso = pat::getMiniPFIsolation(pc,
1223  anElectron.polarP4(),
1224  miniIsoParamsB_[0],
1225  miniIsoParamsB_[1],
1226  miniIsoParamsB_[2],
1227  miniIsoParamsB_[3],
1228  miniIsoParamsB_[4],
1229  miniIsoParamsB_[5],
1230  miniIsoParamsB_[6],
1231  miniIsoParamsB_[7],
1232  miniIsoParamsB_[8]);
1233  anElectron.setMiniPFIsolation(miniiso);
1234 }

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 193 of file PATElectronProducer.cc.

◆ addElecID_

const bool pat::PATElectronProducer::addElecID_
private

Definition at line 176 of file PATElectronProducer.cc.

Referenced by produce().

◆ addGenMatch_

bool pat::PATElectronProducer::addGenMatch_
private

Definition at line 91 of file PATElectronProducer.cc.

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

◆ addMVAVariables_

const bool pat::PATElectronProducer::addMVAVariables_
private

mva input variables

Definition at line 113 of file PATElectronProducer.cc.

Referenced by produce().

◆ addPFClusterIso_

const bool pat::PATElectronProducer::addPFClusterIso_
private

Definition at line 120 of file PATElectronProducer.cc.

Referenced by produce().

◆ addPuppiIsolation_

const bool pat::PATElectronProducer::addPuppiIsolation_
private

Definition at line 121 of file PATElectronProducer.cc.

Referenced by produce().

◆ addResolutions_

const bool pat::PATElectronProducer::addResolutions_
private

Definition at line 196 of file PATElectronProducer.cc.

◆ beamLineToken_

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

Definition at line 127 of file PATElectronProducer.cc.

Referenced by produce().

◆ computeMiniIso_

bool pat::PATElectronProducer::computeMiniIso_
private

Definition at line 96 of file PATElectronProducer.cc.

Referenced by produce().

◆ ecalClusterToolsESGetTokens_

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

Definition at line 118 of file PATElectronProducer.cc.

Referenced by produce().

◆ ecalPFClusterIsoT_

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

Definition at line 122 of file PATElectronProducer.cc.

Referenced by produce().

◆ ecalTopology_

const CaloTopology* pat::PATElectronProducer::ecalTopology_
private

Definition at line 213 of file PATElectronProducer.cc.

Referenced by produce().

◆ ecalTopologyToken_

const edm::ESGetToken<CaloTopology, CaloTopologyRecord> pat::PATElectronProducer::ecalTopologyToken_
private

Definition at line 210 of file PATElectronProducer.cc.

Referenced by produce().

◆ efficiencyLoader_

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

Definition at line 194 of file PATElectronProducer.cc.

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

◆ elecIDSrcs_

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

Definition at line 178 of file PATElectronProducer.cc.

Referenced by produce().

◆ elecIDTokens_

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

Definition at line 179 of file PATElectronProducer.cc.

Referenced by produce().

◆ electronToken_

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

Definition at line 79 of file PATElectronProducer.cc.

Referenced by produce().

◆ embedBasicClusters_

const bool pat::PATElectronProducer::embedBasicClusters_
private

Definition at line 86 of file PATElectronProducer.cc.

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

◆ embedGenMatch_

bool pat::PATElectronProducer::embedGenMatch_
private

Definition at line 92 of file PATElectronProducer.cc.

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

◆ embedGsfElectronCore_

const bool pat::PATElectronProducer::embedGsfElectronCore_
private

Definition at line 81 of file PATElectronProducer.cc.

Referenced by fillElectron(), and fillElectron2().

◆ embedGsfTrack_

const bool pat::PATElectronProducer::embedGsfTrack_
private

Definition at line 82 of file PATElectronProducer.cc.

Referenced by fillElectron(), and fillElectron2().

◆ embedHighLevelSelection_

const bool pat::PATElectronProducer::embedHighLevelSelection_
private

embed high level selection variables?

Definition at line 126 of file PATElectronProducer.cc.

Referenced by produce().

◆ embedPFCandidate_

const bool pat::PATElectronProducer::embedPFCandidate_
private

Definition at line 110 of file PATElectronProducer.cc.

Referenced by produce().

◆ embedPflowBasicClusters_

const bool pat::PATElectronProducer::embedPflowBasicClusters_
private

Definition at line 88 of file PATElectronProducer.cc.

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

◆ embedPflowPreshowerClusters_

const bool pat::PATElectronProducer::embedPflowPreshowerClusters_
private

Definition at line 89 of file PATElectronProducer.cc.

Referenced by fillElectron(), and fillElectron2().

◆ embedPflowSuperCluster_

const bool pat::PATElectronProducer::embedPflowSuperCluster_
private

Definition at line 84 of file PATElectronProducer.cc.

Referenced by fillElectron(), and fillElectron2().

◆ embedPreshowerClusters_

const bool pat::PATElectronProducer::embedPreshowerClusters_
private

Definition at line 87 of file PATElectronProducer.cc.

Referenced by fillElectron(), and fillElectron2().

◆ embedRecHits_

const bool pat::PATElectronProducer::embedRecHits_
private

Definition at line 93 of file PATElectronProducer.cc.

Referenced by produce().

◆ embedSeedCluster_

const bool pat::PATElectronProducer::embedSeedCluster_
private

Definition at line 85 of file PATElectronProducer.cc.

Referenced by fillElectron(), and fillElectron2().

◆ embedSuperCluster_

const bool pat::PATElectronProducer::embedSuperCluster_
private

Definition at line 83 of file PATElectronProducer.cc.

Referenced by fillElectron(), and fillElectron2().

◆ embedTrack_

const bool pat::PATElectronProducer::embedTrack_
private

Definition at line 90 of file PATElectronProducer.cc.

Referenced by fillElectron(), and fillElectron2().

◆ genMatchTokens_

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

Definition at line 102 of file PATElectronProducer.cc.

Referenced by produce().

◆ hcalPFClusterIsoT_

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

Definition at line 123 of file PATElectronProducer.cc.

Referenced by produce().

◆ hConversionsToken_

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

Definition at line 80 of file PATElectronProducer.cc.

Referenced by produce().

◆ isoDepositLabels_

IsolationLabels pat::PATElectronProducer::isoDepositLabels_
private

Definition at line 186 of file PATElectronProducer.cc.

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

◆ isoDepositTokens_

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

Definition at line 187 of file PATElectronProducer.cc.

Referenced by produce().

◆ isolationValueLabels_

IsolationLabels pat::PATElectronProducer::isolationValueLabels_
private

Definition at line 188 of file PATElectronProducer.cc.

Referenced by fillElectron(), and fillElectron2().

◆ isolationValueLabelsNoPFId_

IsolationLabels pat::PATElectronProducer::isolationValueLabelsNoPFId_
private

Definition at line 190 of file PATElectronProducer.cc.

Referenced by fillElectron().

◆ isolationValueNoPFIdTokens_

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

Definition at line 191 of file PATElectronProducer.cc.

Referenced by produce().

◆ isolationValueTokens_

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

Definition at line 189 of file PATElectronProducer.cc.

Referenced by produce().

◆ isolator_

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

Definition at line 184 of file PATElectronProducer.cc.

Referenced by produce().

◆ isolatorTmpStorage_

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

Definition at line 185 of file PATElectronProducer.cc.

Referenced by produce().

◆ miniIsoParamsB_

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

Definition at line 98 of file PATElectronProducer.cc.

Referenced by setElectronMiniIso().

◆ miniIsoParamsE_

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

Definition at line 97 of file PATElectronProducer.cc.

Referenced by setElectronMiniIso().

◆ pcToken_

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

Definition at line 95 of file PATElectronProducer.cc.

Referenced by produce().

◆ pfCandidateMapToken_

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

Definition at line 108 of file PATElectronProducer.cc.

Referenced by produce().

◆ pfCandidateMultiMapToken_

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

Definition at line 109 of file PATElectronProducer.cc.

Referenced by produce().

◆ pfElecToken_

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

Definition at line 107 of file PATElectronProducer.cc.

Referenced by produce().

◆ pTComparator_

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

Definition at line 182 of file PATElectronProducer.cc.

Referenced by produce().

◆ PUPPIIsolation_charged_hadrons_

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

Definition at line 201 of file PATElectronProducer.cc.

Referenced by produce().

◆ PUPPIIsolation_neutral_hadrons_

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

Definition at line 202 of file PATElectronProducer.cc.

Referenced by produce().

◆ PUPPIIsolation_photons_

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

Definition at line 203 of file PATElectronProducer.cc.

Referenced by produce().

◆ PUPPINoLeptonsIsolation_charged_hadrons_

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

Definition at line 205 of file PATElectronProducer.cc.

Referenced by produce().

◆ PUPPINoLeptonsIsolation_neutral_hadrons_

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

Definition at line 206 of file PATElectronProducer.cc.

Referenced by produce().

◆ PUPPINoLeptonsIsolation_photons_

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

Definition at line 207 of file PATElectronProducer.cc.

Referenced by produce().

◆ pvToken_

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

Definition at line 128 of file PATElectronProducer.cc.

Referenced by produce().

◆ reducedBarrelRecHitCollection_

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

Definition at line 114 of file PATElectronProducer.cc.

◆ reducedBarrelRecHitCollectionToken_

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

Definition at line 115 of file PATElectronProducer.cc.

Referenced by produce().

◆ reducedEndcapRecHitCollection_

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

Definition at line 116 of file PATElectronProducer.cc.

◆ reducedEndcapRecHitCollectionToken_

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

Definition at line 117 of file PATElectronProducer.cc.

Referenced by produce().

◆ resolutionLoader_

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

Definition at line 197 of file PATElectronProducer.cc.

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

◆ trackBuilderToken_

const edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> pat::PATElectronProducer::trackBuilderToken_
private

Definition at line 211 of file PATElectronProducer.cc.

Referenced by produce().

◆ useParticleFlow_

const bool pat::PATElectronProducer::useParticleFlow_
private

pflow specific

Definition at line 105 of file PATElectronProducer.cc.

Referenced by fillElectron(), and produce().

◆ usePfCandidateMultiMap_

const bool pat::PATElectronProducer::usePfCandidateMultiMap_
private

Definition at line 106 of file PATElectronProducer.cc.

Referenced by produce().

◆ userDataHelper_

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

Definition at line 208 of file PATElectronProducer.cc.

Referenced by produce().

◆ useUserData_

const bool pat::PATElectronProducer::useUserData_
private

Definition at line 199 of file PATElectronProducer.cc.

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.cc:185
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.cc:191
electrons_cff.bool
bool
Definition: electrons_cff.py:366
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::ESInputTag
Definition: ESInputTag.h:87
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
pat::PATElectronProducer::embedGsfTrack_
const bool embedGsfTrack_
Definition: PATElectronProducer.cc:82
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.cc:178
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
pat::PATElectronProducer::genMatchTokens_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
Definition: PATElectronProducer.cc:102
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
pat::PATElectronProducer::addPFClusterIso_
const bool addPFClusterIso_
Definition: PATElectronProducer.cc:120
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:1413
pat::PATElectronProducer::IsolationLabel
std::pair< pat::IsolationKeys, edm::InputTag > IsolationLabel
Definition: PATElectronProducer.cc:165
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:1128
pat::PATElectronProducer::PUPPINoLeptonsIsolation_photons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
Definition: PATElectronProducer.cc:207
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:1207
pat::PATElectronProducer::resolutionLoader_
pat::helper::KinResolutionsLoader resolutionLoader_
Definition: PATElectronProducer.cc:197
pat::PATElectronProducer::isolationValueLabels_
IsolationLabels isolationValueLabels_
Definition: PATElectronProducer.cc:188
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.cc:93
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.cc:128
reco::GsfElectron::PflowIsolationVariables
Definition: GsfElectron.h:669
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:89301
pat::PATElectronProducer::elecIDTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > elecIDTokens_
Definition: PATElectronProducer.cc:179
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.cc:88
electronProducer_cff.isolationValuesNoPFId
isolationValuesNoPFId
Definition: electronProducer_cff.py:34
pat::PATObject::addGenParticleRef
void addGenParticleRef(const reco::GenParticleRef &ref)
Definition: PATObject.h:751
pat::PfAllParticleIso
Definition: Isolation.h:13
pat::PATElectronProducer::embedHighLevelSelection_
const bool embedHighLevelSelection_
embed high level selection variables?
Definition: PATElectronProducer.cc:126
pat::PATElectronProducer::IsoDepositMaps
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps
Definition: PATElectronProducer.cc:131
pat::PATElectronProducer::userDataHelper_
pat::PATUserDataHelper< pat::Electron > userDataHelper_
Definition: PATElectronProducer.cc:208
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.cc:205
pat::PATElectronProducer::addEfficiencies_
const bool addEfficiencies_
Definition: PATElectronProducer.cc:193
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
pat::PATElectronProducer::isolationValueLabelsNoPFId_
IsolationLabels isolationValueLabelsNoPFId_
Definition: PATElectronProducer.cc:190
pat::Electron::embedPflowBasicClusters
void embedPflowBasicClusters()
method to store the electron's pflow basic clusters
pat::PATElectronProducer::embedGenMatch_
bool embedGenMatch_
Definition: PATElectronProducer.cc:92
pat::PATElectronProducer::NameTag
std::pair< std::string, edm::InputTag > NameTag
Definition: PATElectronProducer.cc:177
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
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
pat::PATElectronProducer::trackBuilderToken_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > trackBuilderToken_
Definition: PATElectronProducer.cc:211
pat::PATElectronProducer::readIsolationLabels
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T >>> &tokens)
Definition: PATElectronProducer.cc:218
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.cc:199
pat::PATElectronProducer::embedPreshowerClusters_
const bool embedPreshowerClusters_
Definition: PATElectronProducer.cc:87
pat::PATElectronProducer::pTComparator_
const GreaterByPt< Electron > pTComparator_
Definition: PATElectronProducer.cc:182
pat::Electron::BS3D
Definition: Electron.h:190
pat::PATElectronProducer::pfCandidateMapToken_
const edm::EDGetTokenT< edm::ValueMap< reco::PFCandidatePtr > > pfCandidateMapToken_
Definition: PATElectronProducer.cc:108
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.cc:107
pat::PATElectronProducer::embedPflowSuperCluster_
const bool embedPflowSuperCluster_
Definition: PATElectronProducer.cc:84
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.cc:85
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:194
pat::PATElectronProducer::usePfCandidateMultiMap_
const bool usePfCandidateMultiMap_
Definition: PATElectronProducer.cc:106
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.cc:109
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.cc:187
pat::PATElectronProducer::isolationValueTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
Definition: PATElectronProducer.cc:189
pat::Electron::embedPflowPreshowerClusters
void embedPflowPreshowerClusters()
method to store the electron's pflow preshower clusters
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
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.cc:86
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.cc:81
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:181
reco::BeamSpot
Definition: BeamSpot.h:21
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< TransientTrackBuilder >
pat::PATElectronProducer::reducedEndcapRecHitCollection_
const edm::InputTag reducedEndcapRecHitCollection_
Definition: PATElectronProducer.cc:116
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
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
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.cc:201
pat::PATElectronProducer::hcalPFClusterIsoT_
const edm::EDGetTokenT< edm::ValueMap< float > > hcalPFClusterIsoT_
Definition: PATElectronProducer.cc:123
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
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
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
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
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.cc:83
pat::PATElectronProducer::reducedBarrelRecHitCollection_
const edm::InputTag reducedBarrelRecHitCollection_
Definition: PATElectronProducer.cc:114
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:357
pat::PATElectronProducer::reducedEndcapRecHitCollectionToken_
const edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
Definition: PATElectronProducer.cc:117
pat::PATElectronProducer::embedPflowPreshowerClusters_
const bool embedPflowPreshowerClusters_
Definition: PATElectronProducer.cc:89
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.cc:176
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
pat::PATElectronProducer::electronToken_
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
Definition: PATElectronProducer.cc:79
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::ecalTopologyToken_
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > ecalTopologyToken_
Definition: PATElectronProducer.cc:210
pat::PATElectronProducer::ecalTopology_
const CaloTopology * ecalTopology_
Definition: PATElectronProducer.cc:213
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.cc:110
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.cc:80
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:217
EcalClusterLazyToolsBase::ESGetTokens::get
ESData get(edm::EventSetup const &eventSetup) const
Definition: EcalClusterLazyTools.h:64
pat::PATElectronProducer::PUPPIIsolation_photons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
Definition: PATElectronProducer.cc:203
pat::PATElectronProducer::addMVAVariables_
const bool addMVAVariables_
mva input variables
Definition: PATElectronProducer.cc:113
pat::PATElectronProducer::useParticleFlow_
const bool useParticleFlow_
pflow specific
Definition: PATElectronProducer.cc:105
edm::Ptr< Candidate >
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
pat::PATElectronProducer::addPuppiIsolation_
const bool addPuppiIsolation_
Definition: PATElectronProducer.cc:121
pat::PATElectronProducer::isolator_
pat::helper::MultiIsolator isolator_
Definition: PATElectronProducer.cc:184
pat::PATElectronProducer::IsolationValueMaps
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
Definition: PATElectronProducer.cc:132
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.cc:90
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.cc:95
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.cc:98
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:1032
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
pat::PATElectronProducer::addGenMatch_
bool addGenMatch_
Definition: PATElectronProducer.cc:91
edm::ValueMap
Definition: ValueMap.h:107
reco::GsfElectron::PflowIsolationVariables::sumHcalClusterEt
float sumHcalClusterEt
Definition: GsfElectron.h:681
Exception
Definition: hltDiff.cc:245
pat::PATElectronProducer::ecalPFClusterIsoT_
const edm::EDGetTokenT< edm::ValueMap< float > > ecalPFClusterIsoT_
Definition: PATElectronProducer.cc:122
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.cc:127
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.cc:206
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.cc:100
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.cc:118
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.cc:186
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
pat::PATObject::embedGenParticle
void embedGenParticle()
Definition: PATObject.h:768
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
crabWrapper.key
key
Definition: crabWrapper.py:19
pat::PATElectronProducer::miniIsoParamsE_
std::vector< double > miniIsoParamsE_
Definition: PATElectronProducer.cc:97
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:680
pat::PATElectronProducer::addResolutions_
const bool addResolutions_
Definition: PATElectronProducer.cc:196
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
pat::PATElectronProducer::efficiencyLoader_
pat::helper::EfficiencyLoader efficiencyLoader_
Definition: PATElectronProducer.cc:194
reco::Vertex
Definition: Vertex.h:35
hit
Definition: SiStripHitEffFromCalibTree.cc:88
pat::PATElectronProducer::computeMiniIso_
bool computeMiniIso_
Definition: PATElectronProducer.cc:96
pat::PATElectronProducer::reducedBarrelRecHitCollectionToken_
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
Definition: PATElectronProducer.cc:115
pat::PATElectronProducer::PUPPIIsolation_neutral_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_
Definition: PATElectronProducer.cc:202