CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
GEDPhotonProducer Class Reference
Inheritance diagram for GEDPhotonProducer:
edm::stream::EDProducer< edm::GlobalCache< CacheData > >

Classes

class  RecoStepInfo
 

Public Member Functions

void endStream () override
 
 GEDPhotonProducer (const edm::ParameterSet &ps, const CacheData *gcache)
 
void produce (edm::Event &evt, const edm::EventSetup &es) override
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< CacheData > >
 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 globalEndJob (const CacheData *)
 
static std::unique_ptr< CacheDatainitializeGlobalCache (const edm::ParameterSet &)
 

Private Types

typedef EcalPFClusterIsolation< reco::PhotonPhotonEcalPFClusterIsolation
 
typedef HcalPFClusterIsolation< reco::PhotonPhotonHcalPFClusterIsolation
 

Private Member Functions

void fillPhotonCollection (edm::Event &evt, edm::EventSetup const &es, const edm::Handle< reco::PhotonCoreCollection > &photonCoreHandle, const CaloTopology *topology, const EcalRecHitCollection *ecalBarrelHits, const EcalRecHitCollection *ecalEndcapHits, const EcalRecHitCollection *preshowerHits, const ElectronHcalHelper *hcalHelperCone, const ElectronHcalHelper *hcalHelperBc, const reco::VertexCollection &pvVertices, reco::PhotonCollection &outputCollection, int &iSC, EcalPFRecHitThresholds const &thresholds)
 
void fillPhotonCollection (edm::Event &evt, edm::EventSetup const &es, const edm::Handle< reco::PhotonCollection > &photonHandle, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, const edm::Handle< reco::PFCandidateCollection > pfEGCandidateHandle, reco::VertexCollection const &pvVertices, reco::PhotonCollection &outputCollection, int &iSC, const edm::Handle< edm::ValueMap< float >> &chargedHadrons, const edm::Handle< edm::ValueMap< float >> &neutralHadrons, const edm::Handle< edm::ValueMap< float >> &photons, const edm::Handle< edm::ValueMap< float >> &chargedHadronsWorstVtx, const edm::Handle< edm::ValueMap< float >> &chargedHadronsWorstVtxGeomVeto, const edm::Handle< edm::ValueMap< float >> &chargedHadronsPFPV, const edm::Handle< edm::ValueMap< float >> &pfEcalClusters, const edm::Handle< edm::ValueMap< float >> &pfHcalClusters)
 

Private Attributes

edm::EDGetTokenT< EcalRecHitCollectionbarrelEcalHits_
 
CaloGeometry const * caloGeom_ = nullptr
 
const edm::ESGetToken< CaloGeometry, CaloGeometryRecordcaloGeometryToken_
 
const edm::ESGetToken< CaloTopology, CaloTopologyRecordcaloTopologyToken_
 
std::string candidateP4type_
 
bool checkHcalStatus_
 
bool cutsFromDB_
 
bool dnnPFidEnabled_
 
const EcalClusterLazyTools::ESGetTokens ecalClusterESGetTokens_
 
double ecaldrMax_
 
double ecaldrVetoBarrel_
 
double ecaldrVetoEndcap_
 
double ecalenergyBarrel_
 
double ecalenergyEndcap_
 
double ecaletaStripBarrel_
 
double ecaletaStripEndcap_
 
std::unique_ptr< PhotonEcalPFClusterIsolationecalisoAlgo = nullptr
 
const edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcdecalPFRechitThresholdsToken_
 
edm::EDGetTokenT< EcalRecHitCollectionendcapEcalHits_
 
std::vector< int > flagsexclEB_
 
std::vector< int > flagsexclEE_
 
edm::EDGetTokenT< HBHERecHitCollectionhbheRecHits_
 
HcalPFCuts const * hcalCuts_ = nullptr
 
edm::ESGetToken< HcalPFCuts, HcalPFCutsRcdhcalCutsToken_
 
double hcaldrMax_
 
double hcaldrVetoBarrel_
 
double hcaldrVetoEndcap_
 
double hcalenergyBarrel_
 
double hcalenergyEndcap_
 
double hcaletaStripBarrel_
 
double hcaletaStripEndcap_
 
std::unique_ptr< ElectronHcalHelperhcalHelperBc_
 
std::unique_ptr< ElectronHcalHelperhcalHelperCone_
 
std::unique_ptr< PhotonHcalPFClusterIsolationhcalisoAlgo = nullptr
 
bool hcalRun2EffDepth_
 
double hcaluseEt_
 
double highEt_
 
double hOverEConeSize_
 
double minR9Barrel_
 
double minR9Endcap_
 
double multThresEB_
 
double multThresEE_
 
edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > particleBasedIsolationToken
 
edm::EDGetTokenT< reco::PFCandidateCollectionpfCandidates_
 
edm::EDGetTokenT< reco::PFClusterCollectionpfClusterProducer_
 
edm::EDGetTokenT< reco::PFClusterCollectionpfClusterProducerHCAL_
 
edm::EDGetTokenT< reco::PFClusterCollectionpfClusterProducerHFEM_
 
edm::EDGetTokenT< reco::PFClusterCollectionpfClusterProducerHFHAD_
 
edm::EDGetTokenT< reco::PFCandidateCollectionpfEgammaCandidates_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedIsolationToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedPFPVIsoToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedWorstVtxGeomVetoIsoToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedWorstVtxIsoToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoNeutralHadronIsolationToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoPFECALClusIsolationToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoPFHCALClusIsolationToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoPhotonIsolationToken_
 
std::string photonCollection_
 
edm::EDGetTokenT< reco::PhotonCoreCollectionphotonCoreProducerT_
 
std::unique_ptr< PhotonEnergyCorrectorphotonEnergyCorrector_ = nullptr
 
std::unique_ptr< PhotonIsolationCalculatorphotonIsoCalculator_ = nullptr
 
std::unique_ptr< PhotonMIPHaloTaggerphotonMIPHaloTagger_ = nullptr
 
std::unique_ptr< PhotonMVABasedHaloTaggerphotonMVABasedHaloTagger_ = nullptr
 
const edm::InputTag photonProducer_
 
edm::EDGetTokenT< reco::PhotonCollectionphotonProducerT_
 
std::vector< double > preselCutValuesBarrel_
 
std::vector< double > preselCutValuesEndcap_
 
edm::EDGetTokenT< EcalRecHitCollectionpreshowerHits_
 
RecoStepInfo recoStep_
 
bool runMIPTagger_
 
bool runMVABasedHaloTagger_
 
std::vector< int > severitiesexclEB_
 
std::vector< int > severitiesexclEE_
 
std::vector< tensorflow::Session * > tfSessions_
 
bool useHF_
 
bool usePrimaryVertex_
 
std::string valueMapPFCandPhoton_
 
edm::EDGetTokenT< reco::VertexCollectionvertexProducer_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< CacheData > >
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

Author
Nancy Marinelli, U. of Notre Dame, US

Definition at line 88 of file GEDPhotonProducer.cc.

Member Typedef Documentation

◆ PhotonEcalPFClusterIsolation

Definition at line 234 of file GEDPhotonProducer.cc.

◆ PhotonHcalPFClusterIsolation

Definition at line 252 of file GEDPhotonProducer.cc.

Constructor & Destructor Documentation

◆ GEDPhotonProducer()

GEDPhotonProducer::GEDPhotonProducer ( const edm::ParameterSet ps,
const CacheData gcache 
)

Get the set for PF cluster isolation calculator

Definition at line 281 of file GEDPhotonProducer.cc.

282  : photonProducer_{config.getParameter<edm::InputTag>("photonProducer")},
283  ecalClusterESGetTokens_{consumesCollector()},
284  recoStep_(config.getParameter<std::string>("reconstructionStep")),
288  hcalHelperCone_(nullptr),
289  hcalHelperBc_(nullptr) {
290  //Retrieve HCAL PF thresholds - from config or from DB
291  cutsFromDB_ = config.getParameter<bool>("usePFThresholdsFromDB");
292  if (cutsFromDB_) {
293  hcalCutsToken_ = esConsumes<HcalPFCuts, HcalPFCutsRcd>(edm::ESInputTag("", "withTopo"));
294  }
295 
296  if (recoStep_.isFinal()) {
297  photonProducerT_ = consumes(photonProducer_);
298  pfCandidates_ = consumes(config.getParameter<edm::InputTag>("pfCandidates"));
299 
300  const edm::ParameterSet& pfIsolCfg = config.getParameter<edm::ParameterSet>("pfIsolCfg");
301  auto getVMToken = [&pfIsolCfg, this](const std::string& name) {
302  return consumes(pfIsolCfg.getParameter<edm::InputTag>(name));
303  };
304  phoChargedIsolationToken_ = getVMToken("chargedHadronIso");
305  phoNeutralHadronIsolationToken_ = getVMToken("neutralHadronIso");
306  phoPhotonIsolationToken_ = getVMToken("photonIso");
307  phoChargedWorstVtxIsoToken_ = getVMToken("chargedHadronWorstVtxIso");
308  phoChargedWorstVtxGeomVetoIsoToken_ = getVMToken("chargedHadronWorstVtxGeomVetoIso");
309  phoChargedPFPVIsoToken_ = getVMToken("chargedHadronPFPVIso");
310 
311  //OOT photons in legacy 80X re-miniAOD do not have PF cluster embeded into the reco object
312  //to preserve 80X behaviour
313  if (config.exists("pfECALClusIsolation")) {
314  phoPFECALClusIsolationToken_ = consumes(config.getParameter<edm::InputTag>("pfECALClusIsolation"));
315  }
316  if (config.exists("pfHCALClusIsolation")) {
317  phoPFHCALClusIsolationToken_ = consumes(config.getParameter<edm::InputTag>("pfHCALClusIsolation"));
318  }
319 
320  } else {
322  }
323 
324  auto pfEg = config.getParameter<edm::InputTag>("pfEgammaCandidates");
325  if (not pfEg.label().empty()) {
326  pfEgammaCandidates_ = consumes(pfEg);
327  }
328  barrelEcalHits_ = consumes(config.getParameter<edm::InputTag>("barrelEcalHits"));
329  endcapEcalHits_ = consumes(config.getParameter<edm::InputTag>("endcapEcalHits"));
330  preshowerHits_ = consumes(config.getParameter<edm::InputTag>("preshowerHits"));
331  vertexProducer_ = consumes(config.getParameter<edm::InputTag>("primaryVertexProducer"));
332 
333  auto hbhetag = config.getParameter<edm::InputTag>("hbheRecHits");
334  if (not hbhetag.label().empty())
335  hbheRecHits_ = consumes<HBHERecHitCollection>(hbhetag);
336 
337  //
338  photonCollection_ = config.getParameter<std::string>("outputPhotonCollection");
339  multThresEB_ = config.getParameter<double>("multThresEB");
340  multThresEE_ = config.getParameter<double>("multThresEE");
341  hOverEConeSize_ = config.getParameter<double>("hOverEConeSize");
342  highEt_ = config.getParameter<double>("highEt");
343  // R9 value to decide converted/unconverted
344  minR9Barrel_ = config.getParameter<double>("minR9Barrel");
345  minR9Endcap_ = config.getParameter<double>("minR9Endcap");
346  usePrimaryVertex_ = config.getParameter<bool>("usePrimaryVertex");
347  runMIPTagger_ = config.getParameter<bool>("runMIPTagger");
348  runMVABasedHaloTagger_ = config.getParameter<bool>("runMVABasedHaloTagger");
349 
350  candidateP4type_ = config.getParameter<std::string>("candidateP4type");
351  valueMapPFCandPhoton_ = config.getParameter<std::string>("valueMapPhotons");
352 
353  //AA
354  //Flags and Severities to be excluded from photon calculations
355  auto const& flagnamesEB = config.getParameter<std::vector<std::string>>("RecHitFlagToBeExcludedEB");
356  auto const& flagnamesEE = config.getParameter<std::vector<std::string>>("RecHitFlagToBeExcludedEE");
357 
358  flagsexclEB_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
359  flagsexclEE_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
360 
361  auto const& severitynamesEB = config.getParameter<std::vector<std::string>>("RecHitSeverityToBeExcludedEB");
362  auto const& severitynamesEE = config.getParameter<std::vector<std::string>>("RecHitSeverityToBeExcludedEE");
363 
364  severitiesexclEB_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
365  severitiesexclEE_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
366 
367  photonEnergyCorrector_ = std::make_unique<PhotonEnergyCorrector>(config, consumesCollector());
368 
369  checkHcalStatus_ = config.getParameter<bool>("checkHcalStatus");
370  if (not hbheRecHits_.isUninitialized()) {
371  ElectronHcalHelper::Configuration cfgCone, cfgBc;
373  if (cfgCone.hOverEConeSize > 0) {
374  cfgCone.onlyBehindCluster = false;
376 
377  cfgCone.hbheRecHits = hbheRecHits_;
378 
379  cfgCone.eThresHB = config.getParameter<EgammaHcalIsolation::arrayHB>("recHitEThresholdHB");
380  cfgCone.maxSeverityHB = config.getParameter<int>("maxHcalRecHitSeverity");
381  cfgCone.eThresHE = config.getParameter<EgammaHcalIsolation::arrayHE>("recHitEThresholdHE");
382  cfgCone.maxSeverityHE = cfgCone.maxSeverityHB;
383  }
384  cfgBc.hOverEConeSize = 0.;
385  cfgBc.onlyBehindCluster = true;
387 
388  cfgBc.hbheRecHits = hbheRecHits_;
389 
390  cfgBc.eThresHB = config.getParameter<EgammaHcalIsolation::arrayHB>("recHitEThresholdHB");
391  cfgBc.maxSeverityHB = config.getParameter<int>("maxHcalRecHitSeverity");
392  cfgBc.eThresHE = config.getParameter<EgammaHcalIsolation::arrayHE>("recHitEThresholdHE");
393  cfgBc.maxSeverityHE = cfgBc.maxSeverityHB;
394 
395  hcalHelperCone_ = std::make_unique<ElectronHcalHelper>(cfgCone, consumesCollector());
396  hcalHelperBc_ = std::make_unique<ElectronHcalHelper>(cfgBc, consumesCollector());
397  }
398 
399  hcalRun2EffDepth_ = config.getParameter<bool>("hcalRun2EffDepth");
400 
401  // cut values for pre-selection
402  preselCutValuesBarrel_ = {config.getParameter<double>("minSCEtBarrel"),
403  config.getParameter<double>("maxHoverEBarrel"),
404  config.getParameter<double>("ecalRecHitSumEtOffsetBarrel"),
405  config.getParameter<double>("ecalRecHitSumEtSlopeBarrel"),
406  config.getParameter<double>("hcalRecHitSumEtOffsetBarrel"),
407  config.getParameter<double>("hcalRecHitSumEtSlopeBarrel"),
408  config.getParameter<double>("nTrackSolidConeBarrel"),
409  config.getParameter<double>("nTrackHollowConeBarrel"),
410  config.getParameter<double>("trackPtSumSolidConeBarrel"),
411  config.getParameter<double>("trackPtSumHollowConeBarrel"),
412  config.getParameter<double>("sigmaIetaIetaCutBarrel")};
413  //
414  preselCutValuesEndcap_ = {config.getParameter<double>("minSCEtEndcap"),
415  config.getParameter<double>("maxHoverEEndcap"),
416  config.getParameter<double>("ecalRecHitSumEtOffsetEndcap"),
417  config.getParameter<double>("ecalRecHitSumEtSlopeEndcap"),
418  config.getParameter<double>("hcalRecHitSumEtOffsetEndcap"),
419  config.getParameter<double>("hcalRecHitSumEtSlopeEndcap"),
420  config.getParameter<double>("nTrackSolidConeEndcap"),
421  config.getParameter<double>("nTrackHollowConeEndcap"),
422  config.getParameter<double>("trackPtSumSolidConeEndcap"),
423  config.getParameter<double>("trackPtSumHollowConeEndcap"),
424  config.getParameter<double>("sigmaIetaIetaCutEndcap")};
425  //
426 
427  //moved from beginRun to here, I dont see how this could cause harm as its just reading in the exactly same parameters each run
428  if (!recoStep_.isFinal()) {
429  photonIsoCalculator_ = std::make_unique<PhotonIsolationCalculator>();
430  edm::ParameterSet isolationSumsCalculatorSet = config.getParameter<edm::ParameterSet>("isolationSumsCalculatorSet");
432  flagsexclEB_,
433  flagsexclEE_,
436  consumesCollector());
437  photonMIPHaloTagger_ = std::make_unique<PhotonMIPHaloTagger>();
438  edm::ParameterSet mipVariableSet = config.getParameter<edm::ParameterSet>("mipVariableSet");
439  photonMIPHaloTagger_->setup(mipVariableSet, consumesCollector());
440  }
441 
443  edm::ParameterSet mvaBasedHaloVariableSet = config.getParameter<edm::ParameterSet>("mvaBasedHaloVariableSet");
445  std::make_unique<PhotonMVABasedHaloTagger>(mvaBasedHaloVariableSet, consumesCollector());
446  }
447 
449  const edm::ParameterSet& pfECALClusIsolCfg = config.getParameter<edm::ParameterSet>("pfECALClusIsolCfg");
451  consumes<reco::PFClusterCollection>(pfECALClusIsolCfg.getParameter<edm::InputTag>("pfClusterProducer"));
452  ecaldrMax_ = pfECALClusIsolCfg.getParameter<double>("drMax");
453  ecaldrVetoBarrel_ = pfECALClusIsolCfg.getParameter<double>("drVetoBarrel");
454  ecaldrVetoEndcap_ = pfECALClusIsolCfg.getParameter<double>("drVetoEndcap");
455  ecaletaStripBarrel_ = pfECALClusIsolCfg.getParameter<double>("etaStripBarrel");
456  ecaletaStripEndcap_ = pfECALClusIsolCfg.getParameter<double>("etaStripEndcap");
457  ecalenergyBarrel_ = pfECALClusIsolCfg.getParameter<double>("energyBarrel");
458  ecalenergyEndcap_ = pfECALClusIsolCfg.getParameter<double>("energyEndcap");
459 
460  const edm::ParameterSet& pfHCALClusIsolCfg = config.getParameter<edm::ParameterSet>("pfHCALClusIsolCfg");
461  pfClusterProducerHCAL_ = consumes(pfHCALClusIsolCfg.getParameter<edm::InputTag>("pfClusterProducerHCAL"));
462  pfClusterProducerHFEM_ = consumes(pfHCALClusIsolCfg.getParameter<edm::InputTag>("pfClusterProducerHFEM"));
463  pfClusterProducerHFHAD_ = consumes(pfHCALClusIsolCfg.getParameter<edm::InputTag>("pfClusterProducerHFHAD"));
464  useHF_ = pfHCALClusIsolCfg.getParameter<bool>("useHF");
465  hcaldrMax_ = pfHCALClusIsolCfg.getParameter<double>("drMax");
466  hcaldrVetoBarrel_ = pfHCALClusIsolCfg.getParameter<double>("drVetoBarrel");
467  hcaldrVetoEndcap_ = pfHCALClusIsolCfg.getParameter<double>("drVetoEndcap");
468  hcaletaStripBarrel_ = pfHCALClusIsolCfg.getParameter<double>("etaStripBarrel");
469  hcaletaStripEndcap_ = pfHCALClusIsolCfg.getParameter<double>("etaStripEndcap");
470  hcalenergyBarrel_ = pfHCALClusIsolCfg.getParameter<double>("energyBarrel");
471  hcalenergyEndcap_ = pfHCALClusIsolCfg.getParameter<double>("energyEndcap");
472  hcaluseEt_ = pfHCALClusIsolCfg.getParameter<bool>("useEt");
473 
474  // Register the product
475  produces<reco::PhotonCollection>(photonCollection_);
477  produces<edm::ValueMap<reco::PhotonRef>>(valueMapPFCandPhoton_);
478  }
479 
480  const auto& pset_dnn = config.getParameter<edm::ParameterSet>("PhotonDNNPFid");
481  dnnPFidEnabled_ = pset_dnn.getParameter<bool>("enabled");
482  if (dnnPFidEnabled_) {
483  tfSessions_ = gcache->photonDNNEstimator->getSessions();
484  }
485 }
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
const edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > ecalPFRechitThresholdsToken_
std::unique_ptr< PhotonMVABasedHaloTagger > photonMVABasedHaloTagger_
std::unique_ptr< PhotonEnergyCorrector > photonEnergyCorrector_
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:98
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHFEM_
std::vector< int > flagsexclEB_
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
Definition: config.py:1
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::vector< int > severitiesexclEE_
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHits
std::string photonCollection_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedPFPVIsoToken_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedWorstVtxGeomVetoIsoToken_
std::unique_ptr< ElectronHcalHelper > hcalHelperCone_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedIsolationToken_
std::unique_ptr< PhotonIsolationCalculator > photonIsoCalculator_
std::vector< int > flagsexclEE_
std::unique_ptr< const PhotonDNNEstimator > photonDNNEstimator
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
std::vector< tensorflow::Session * > tfSessions_
edm::EDGetTokenT< edm::ValueMap< float > > phoPFHCALClusIsolationToken_
edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_
std::vector< int > severitiesexclEB_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHFHAD_
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHits_
edm::EDGetTokenT< edm::ValueMap< float > > phoNeutralHadronIsolationToken_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedWorstVtxIsoToken_
std::vector< double > preselCutValuesBarrel_
edm::EDGetTokenT< reco::PhotonCollection > photonProducerT_
std::vector< double > preselCutValuesEndcap_
const EcalClusterLazyTools::ESGetTokens ecalClusterESGetTokens_
const edm::InputTag photonProducer_
std::unique_ptr< ElectronHcalHelper > hcalHelperBc_
std::string candidateP4type_
edm::EDGetTokenT< edm::ValueMap< float > > phoPhotonIsolationToken_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducer_
edm::EDGetTokenT< edm::ValueMap< float > > phoPFECALClusIsolationToken_
dictionary config
Read in AllInOne config in JSON format.
Definition: DiMuonV_cfg.py:30
EgammaHcalIsolation::arrayHB eThresHB
EgammaHcalIsolation::arrayHE eThresHE
edm::ESGetToken< HcalPFCuts, HcalPFCutsRcd > hcalCutsToken_
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
std::array< double, 4 > arrayHB
std::unique_ptr< PhotonMIPHaloTagger > photonMIPHaloTagger_
edm::EDGetTokenT< EcalRecHitCollection > preshowerHits_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHCAL_
std::string valueMapPFCandPhoton_
std::array< double, 7 > arrayHE

Member Function Documentation

◆ endStream()

void GEDPhotonProducer::endStream ( )
override

Definition at line 492 of file GEDPhotonProducer.cc.

References tensorflow::closeSession(), and tfSessions_.

492  {
493  for (auto session : tfSessions_) {
494  tensorflow::closeSession(session);
495  }
496 }
bool closeSession(Session *&session)
Definition: TensorFlow.cc:233
std::vector< tensorflow::Session * > tfSessions_

◆ fillPhotonCollection() [1/2]

void GEDPhotonProducer::fillPhotonCollection ( edm::Event evt,
edm::EventSetup const &  es,
const edm::Handle< reco::PhotonCoreCollection > &  photonCoreHandle,
const CaloTopology topology,
const EcalRecHitCollection ecalBarrelHits,
const EcalRecHitCollection ecalEndcapHits,
const EcalRecHitCollection preshowerHits,
const ElectronHcalHelper hcalHelperCone,
const ElectronHcalHelper hcalHelperBc,
const reco::VertexCollection pvVertices,
reco::PhotonCollection outputCollection,
int &  iSC,
EcalPFRecHitThresholds const &  thresholds 
)
private

fill shower shape block

fill extra shower shapes

fill full5x5 shower shape block

fill extra full5x5 shower shapes

get ecal photon specific corrected energy plus values from regressions and store them in the Photon
Pre-selection loose isolation cuts

Definition at line 699 of file GEDPhotonProducer.cc.

References Cluster2ndMoments::alpha, barrelEcalHits_, caloGeom_, candidateP4type_, EcalClusterToolsT< noZS >::cluster2ndMoments(), EcalClusterToolsT< noZS >::covariances(), reco::Photon::PflowIDVariables::dnn, dnnPFidEnabled_, EcalClusterToolsT< noZS >::e1x3(), reco::Photon::ShowerShape::e1x3, EgHLTOffHistBins_cfi::e1x5, EcalClusterToolsT< noZS >::e1x5(), reco::Photon::ShowerShape::e1x5, reco::Photon::ShowerShape::e2nd, EcalClusterToolsT< noZS >::e2nd(), electrons_cff::e2nd, EcalClusterToolsT< noZS >::e2x2(), reco::Photon::ShowerShape::e2x2, EgHLTOffHistBins_cfi::e2x5, reco::Photon::ShowerShape::e2x5, EcalClusterToolsT< noZS >::e2x5Bottom(), reco::Photon::ShowerShape::e2x5Bottom, electrons_cff::e2x5Bottom, EcalClusterToolsT< noZS >::e2x5Left(), reco::Photon::ShowerShape::e2x5Left, electrons_cff::e2x5Left, EcalClusterToolsT< noZS >::e2x5Max(), reco::Photon::ShowerShape::e2x5Max, EcalClusterToolsT< noZS >::e2x5Right(), reco::Photon::ShowerShape::e2x5Right, electrons_cff::e2x5Right, EcalClusterToolsT< noZS >::e2x5Top(), reco::Photon::ShowerShape::e2x5Top, electrons_cff::e2x5Top, EcalClusterToolsT< noZS >::e3x3(), reco::Photon::ShowerShape::e3x3, EcalClusterToolsT< noZS >::e5x5(), reco::Photon::ShowerShape::e5x5, electrons_cff::e5x5, EcalClusterToolsT< noZS >::eBottom(), reco::Photon::ShowerShape::eBottom, electrons_cff::eBottom, reco::Photon::ecal_photons, EcalBarrel, ecalClusterESGetTokens_, EcalEndcap, ecalisoAlgo, RandomNumberGeneratorService_cfi::ecalRecHit, reco::Photon::ShowerShape::effSigmaRR, EcalClusterToolsT< noZS >::eLeft(), reco::Photon::ShowerShape::eLeft, electrons_cff::eLeft, cosmicPhotonAnalyzer_cfi::eMax, EcalClusterToolsT< noZS >::eMax(), endcapEcalHits_, EcalClusterToolsT< noZS >::eRight(), reco::Photon::ShowerShape::eRight, electrons_cff::eRight, EcalClusterToolsT< noZS >::eTop(), reco::Photon::ShowerShape::eTop, electrons_cff::eTop, flagsexclEB_, flagsexclEE_, HLT_2024v14_cff::full5x5_sigmaIetaIeta, EcalClusterLazyToolsBase::ESGetTokens::get(), edm::Event::getHandle(), ElectronHcalHelper::hasActiveHcal(), hcalCuts_, ElectronHcalHelper::hcalESum(), hcalisoAlgo, reco::Photon::ShowerShape::hcalOverEcal, reco::Photon::ShowerShape::hcalOverEcalBc, ElectronHcalHelper::hcalTowersBehindClusters(), reco::Photon::ShowerShape::hcalTowersBehindClusters, highEt_, hfClusterShapes_cfi::hits, l1ctLayer2EG_cff::id, createfilelist::int, reco::Photon::ShowerShape::invalidHcal, reco::Photon::FiducialFlags::isEE, edm::isFinite(), EcalTools::isHGCalDet(), edm::Ref< C, T, F >::isNonnull(), reco::Photon::SaturationInfo::isSeedSaturated, EgammaLocalCovParamDefaults::kRelEnCut, EcalClusterToolsT< noZS >::localCovariances(), LogDebug, reco::Photon::ShowerShape::maxEnergyXtal, multThresEB_, multThresEE_, reco::Photon::SaturationInfo::nSaturatedXtals, electrons_cff::nSaturatedXtals, gedPhotons_cfi::outputPhotonCollection, pfClusterProducer_, pfClusterProducerHCAL_, pfClusterProducerHFEM_, pfClusterProducerHFHAD_, displacedMuons_cfi::photon, MaterialEffects_cfi::photonEnergy, photonEnergyCorrector_, photonIsoCalculator_, photonMIPHaloTagger_, reco::Photon::ShowerShape::pre7DepthHcal, preselCutValuesBarrel_, preselCutValuesEndcap_, preshowerHits_, ptFast(), reco::Photon::regression1, reco::Photon::regression2, runMIPTagger_, reco::CaloCluster::seed(), severitiesexclEB_, severitiesexclEE_, reco::Photon::ShowerShape::sigmaEtaEta, HLT_2024v14_cff::sigmaEtaEta, run3scouting_cff::sigmaIetaIeta, reco::Photon::ShowerShape::sigmaIetaIeta, reco::Photon::ShowerShape::sigmaIetaIphi, reco::Photon::ShowerShape::sigmaIphiIphi, Cluster2ndMoments::sMaj, reco::Photon::ShowerShape::smAlpha, Cluster2ndMoments::sMin, reco::Photon::ShowerShape::smMajor, reco::Photon::ShowerShape::smMinor, mathSSE::sqrt(), reco::Photon::PflowIsolationVariables::sumEcalClusterEt, reco::Photon::PflowIsolationVariables::sumHcalClusterEt, tfSessions_, particleFlowZeroSuppressionECAL_cff::thresholds, HLT_2024v14_cff::topology, parallelization::uint, useHF_, contentValuesCheck::values, spclusmultinvestigator_cfi::vertexCollection, and L1BJetProducer_cff::vtx.

Referenced by produce().

711  {
712  const EcalRecHitCollection* hits = nullptr;
713  std::vector<double> preselCutValues;
714  std::vector<int> flags_, severitiesexcl_;
715 
716  for (unsigned int lSC = 0; lSC < photonCoreHandle->size(); lSC++) {
717  reco::PhotonCoreRef coreRef(reco::PhotonCoreRef(photonCoreHandle, lSC));
718  reco::SuperClusterRef parentSCRef = coreRef->parentSuperCluster();
719  reco::SuperClusterRef scRef = coreRef->superCluster();
720 
721  // const reco::SuperCluster* pClus=&(*scRef);
722  iSC++;
723 
724  DetId::Detector thedet = scRef->seed()->hitsAndFractions()[0].first.det();
725  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
726  if (subdet == EcalBarrel) {
727  preselCutValues = preselCutValuesBarrel_;
728  hits = ecalBarrelHits;
729  flags_ = flagsexclEB_;
730  severitiesexcl_ = severitiesexclEB_;
731  } else if (subdet == EcalEndcap) {
732  preselCutValues = preselCutValuesEndcap_;
733  hits = ecalEndcapHits;
734  flags_ = flagsexclEE_;
735  severitiesexcl_ = severitiesexclEE_;
736  } else if (EcalTools::isHGCalDet(thedet)) {
737  preselCutValues = preselCutValuesEndcap_;
738  hits = nullptr;
739  flags_ = flagsexclEE_;
740  severitiesexcl_ = severitiesexclEE_;
741  } else {
742  edm::LogWarning("") << "GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster: " << thedet
743  << ' ' << subdet;
744  }
745 
746  // SC energy preselection
747  if (parentSCRef.isNonnull() &&
748  ptFast(parentSCRef->energy(), parentSCRef->position(), {0, 0, 0}) <= preselCutValues[0])
749  continue;
750 
751  float maxXtal = (hits != nullptr ? EcalClusterTools::eMax(*(scRef->seed()), hits) : 0.f);
752 
753  //AA
754  //Change these to consider severity level of hits
755  float e1x5 = (hits != nullptr ? EcalClusterTools::e1x5(*(scRef->seed()), hits, topology) : 0.f);
756  float e2x5 = (hits != nullptr ? EcalClusterTools::e2x5Max(*(scRef->seed()), hits, topology) : 0.f);
757  float e3x3 = (hits != nullptr ? EcalClusterTools::e3x3(*(scRef->seed()), hits, topology) : 0.f);
758  float e5x5 = (hits != nullptr ? EcalClusterTools::e5x5(*(scRef->seed()), hits, topology) : 0.f);
759  const auto& cov = (hits != nullptr ? EcalClusterTools::covariances(*(scRef->seed()), hits, topology, caloGeom_)
760  : std::array<float, 3>({{0.f, 0.f, 0.f}}));
761  // fractional local covariances
762  const auto& locCov = (hits != nullptr ? EcalClusterTools::localCovariances(*(scRef->seed()), hits, topology)
763  : std::array<float, 3>({{0.f, 0.f, 0.f}}));
764 
765  float sigmaEtaEta = std::sqrt(cov[0]);
766  float sigmaIetaIeta = std::sqrt(locCov[0]);
767 
768  float full5x5_maxXtal = (hits != nullptr ? noZS::EcalClusterTools::eMax(*(scRef->seed()), hits) : 0.f);
769  //AA
770  //Change these to consider severity level of hits
771  float full5x5_e1x5 = (hits != nullptr ? noZS::EcalClusterTools::e1x5(*(scRef->seed()), hits, topology) : 0.f);
772  float full5x5_e2x5 = (hits != nullptr ? noZS::EcalClusterTools::e2x5Max(*(scRef->seed()), hits, topology) : 0.f);
773  float full5x5_e3x3 = (hits != nullptr ? noZS::EcalClusterTools::e3x3(*(scRef->seed()), hits, topology) : 0.f);
774  float full5x5_e5x5 = (hits != nullptr ? noZS::EcalClusterTools::e5x5(*(scRef->seed()), hits, topology) : 0.f);
775  const auto& full5x5_cov =
776  (hits != nullptr ? noZS::EcalClusterTools::covariances(*(scRef->seed()), hits, topology, caloGeom_)
777  : std::array<float, 3>({{0.f, 0.f, 0.f}}));
778  // for full5x5 local covariances, do noise-cleaning
779  // by passing per crystal PF recHit thresholds and mult values.
780  // mult values for EB and EE were obtained by dedicated studies.
781  const auto& full5x5_locCov =
782  (hits != nullptr ? noZS::EcalClusterTools::localCovariances(*(scRef->seed()),
783  hits,
784  topology,
786  &thresholds,
787  multThresEB_,
788  multThresEE_)
789  : std::array<float, 3>({{0.f, 0.f, 0.f}}));
790 
791  float full5x5_sigmaEtaEta = sqrt(full5x5_cov[0]);
792  float full5x5_sigmaIetaIeta = sqrt(full5x5_locCov[0]);
793  float full5x5_sigmaIetaIphi = full5x5_locCov[1];
794 
795  // compute position of ECAL shower
796  math::XYZPoint caloPosition = scRef->position();
797 
799  double photonEnergy = 1.;
800  math::XYZPoint vtx(0., 0., 0.);
801  if (!vertexCollection.empty())
802  vtx = vertexCollection.begin()->position();
803  // compute momentum vector of photon from primary vertex and cluster position
804  math::XYZVector direction = caloPosition - vtx;
805  //math::XYZVector momentum = direction.unit() * photonEnergy ;
806  math::XYZVector momentum = direction.unit();
807 
808  // Create dummy candidate with unit momentum and zero energy to allow setting of all variables. The energy is set for last.
809  math::XYZTLorentzVectorD p4(momentum.x(), momentum.y(), momentum.z(), photonEnergy);
810  reco::Photon newCandidate(p4, caloPosition, coreRef, vtx);
811 
812  //std::cout << " standard p4 before " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
813  //std::cout << " type " <<newCandidate.getCandidateP4type() << " standard p4 after " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
814 
815  // Calculate fiducial flags and isolation variable. Blocked are filled from the isolationCalculator
816  reco::Photon::FiducialFlags fiducialFlags;
817  reco::Photon::IsolationVariables isolVarR03, isolVarR04;
818  if (!EcalTools::isHGCalDet(thedet)) {
819  photonIsoCalculator_->calculate(&newCandidate, evt, es, fiducialFlags, isolVarR04, isolVarR03, hcalCuts_);
820  }
821  newCandidate.setFiducialVolumeFlags(fiducialFlags);
822  newCandidate.setIsolationVariables(isolVarR04, isolVarR03);
823 
825  reco::Photon::ShowerShape showerShape;
826  showerShape.e1x5 = e1x5;
827  showerShape.e2x5 = e2x5;
828  showerShape.e3x3 = e3x3;
829  showerShape.e5x5 = e5x5;
830  showerShape.maxEnergyXtal = maxXtal;
831  showerShape.sigmaEtaEta = sigmaEtaEta;
832  showerShape.sigmaIetaIeta = sigmaIetaIeta;
833  for (uint id = 0; id < showerShape.hcalOverEcal.size(); ++id) {
834  showerShape.hcalOverEcal[id] =
835  (hcalHelperCone != nullptr) ? hcalHelperCone->hcalESum(*scRef, id + 1, hcalCuts_) / scRef->energy() : 0.f;
836 
837  showerShape.hcalOverEcalBc[id] =
838  (hcalHelperBc != nullptr) ? hcalHelperBc->hcalESum(*scRef, id + 1, hcalCuts_) / scRef->energy() : 0.f;
839  }
840  showerShape.invalidHcal = (hcalHelperBc != nullptr) ? !hcalHelperBc->hasActiveHcal(*scRef) : false;
841  if (hcalHelperBc != nullptr)
842  showerShape.hcalTowersBehindClusters = hcalHelperBc->hcalTowersBehindClusters(*scRef);
843  showerShape.pre7DepthHcal = false;
844 
846  const float spp = (!edm::isFinite(locCov[2]) ? 0. : sqrt(locCov[2]));
847  const float sep = locCov[1];
848  showerShape.sigmaIetaIphi = sep;
849  showerShape.sigmaIphiIphi = spp;
850  showerShape.e2nd = (hits != nullptr ? EcalClusterTools::e2nd(*(scRef->seed()), hits) : 0.f);
851  showerShape.eTop = (hits != nullptr ? EcalClusterTools::eTop(*(scRef->seed()), hits, topology) : 0.f);
852  showerShape.eLeft = (hits != nullptr ? EcalClusterTools::eLeft(*(scRef->seed()), hits, topology) : 0.f);
853  showerShape.eRight = (hits != nullptr ? EcalClusterTools::eRight(*(scRef->seed()), hits, topology) : 0.f);
854  showerShape.eBottom = (hits != nullptr ? EcalClusterTools::eBottom(*(scRef->seed()), hits, topology) : 0.f);
855  showerShape.e1x3 = (hits != nullptr ? EcalClusterTools::e1x3(*(scRef->seed()), hits, topology) : 0.f);
856  showerShape.e2x2 = (hits != nullptr ? EcalClusterTools::e2x2(*(scRef->seed()), hits, topology) : 0.f);
857  showerShape.e2x5Max = (hits != nullptr ? EcalClusterTools::e2x5Max(*(scRef->seed()), hits, topology) : 0.f);
858  showerShape.e2x5Left = (hits != nullptr ? EcalClusterTools::e2x5Left(*(scRef->seed()), hits, topology) : 0.f);
859  showerShape.e2x5Right = (hits != nullptr ? EcalClusterTools::e2x5Right(*(scRef->seed()), hits, topology) : 0.f);
860  showerShape.e2x5Top = (hits != nullptr ? EcalClusterTools::e2x5Top(*(scRef->seed()), hits, topology) : 0.f);
861  showerShape.e2x5Bottom = (hits != nullptr ? EcalClusterTools::e2x5Bottom(*(scRef->seed()), hits, topology) : 0.f);
862  if (hits) {
863  Cluster2ndMoments clus2ndMoments = EcalClusterTools::cluster2ndMoments(*(scRef->seed()), *hits);
864  showerShape.smMajor = clus2ndMoments.sMaj;
865  showerShape.smMinor = clus2ndMoments.sMin;
866  showerShape.smAlpha = clus2ndMoments.alpha;
867  } else {
868  showerShape.smMajor = 0.f;
869  showerShape.smMinor = 0.f;
870  showerShape.smAlpha = 0.f;
871  }
872 
873  // fill preshower shapes
874  EcalClusterLazyTools toolsforES(
875  evt, ecalClusterESGetTokens_.get(es), barrelEcalHits_, endcapEcalHits_, preshowerHits_);
876  const float sigmaRR = toolsforES.eseffsirir(*scRef);
877  showerShape.effSigmaRR = sigmaRR;
878  newCandidate.setShowerShapeVariables(showerShape);
879 
880  const reco::CaloCluster& seedCluster = *(scRef->seed());
881  DetId seedXtalId = seedCluster.seed();
882  int nSaturatedXtals = 0;
883  bool isSeedSaturated = false;
884  if (hits != nullptr) {
885  const auto hitsAndFractions = scRef->hitsAndFractions();
886  for (auto const& hitFractionPair : hitsAndFractions) {
887  auto&& ecalRecHit = hits->find(hitFractionPair.first);
888  if (ecalRecHit == hits->end())
889  continue;
890  if (ecalRecHit->checkFlag(EcalRecHit::Flags::kSaturated)) {
891  nSaturatedXtals++;
892  if (seedXtalId == ecalRecHit->detid())
893  isSeedSaturated = true;
894  }
895  }
896  }
897  reco::Photon::SaturationInfo saturationInfo;
898  saturationInfo.nSaturatedXtals = nSaturatedXtals;
899  saturationInfo.isSeedSaturated = isSeedSaturated;
900  newCandidate.setSaturationInfo(saturationInfo);
901 
903  reco::Photon::ShowerShape full5x5_showerShape;
904  full5x5_showerShape.e1x5 = full5x5_e1x5;
905  full5x5_showerShape.e2x5 = full5x5_e2x5;
906  full5x5_showerShape.e3x3 = full5x5_e3x3;
907  full5x5_showerShape.e5x5 = full5x5_e5x5;
908  full5x5_showerShape.maxEnergyXtal = full5x5_maxXtal;
909  full5x5_showerShape.sigmaEtaEta = full5x5_sigmaEtaEta;
910  full5x5_showerShape.sigmaIetaIeta = full5x5_sigmaIetaIeta;
912  const float full5x5_spp = (!edm::isFinite(full5x5_locCov[2]) ? 0. : std::sqrt(full5x5_locCov[2]));
913  const float full5x5_sep = full5x5_sigmaIetaIphi;
914  full5x5_showerShape.sigmaIetaIphi = full5x5_sep;
915  full5x5_showerShape.sigmaIphiIphi = full5x5_spp;
916  full5x5_showerShape.e2nd = (hits != nullptr ? noZS::EcalClusterTools::e2nd(*(scRef->seed()), hits) : 0.f);
917  full5x5_showerShape.eTop = (hits != nullptr ? noZS::EcalClusterTools::eTop(*(scRef->seed()), hits, topology) : 0.f);
918  full5x5_showerShape.eLeft =
919  (hits != nullptr ? noZS::EcalClusterTools::eLeft(*(scRef->seed()), hits, topology) : 0.f);
920  full5x5_showerShape.eRight =
921  (hits != nullptr ? noZS::EcalClusterTools::eRight(*(scRef->seed()), hits, topology) : 0.f);
922  full5x5_showerShape.eBottom =
923  (hits != nullptr ? noZS::EcalClusterTools::eBottom(*(scRef->seed()), hits, topology) : 0.f);
924  full5x5_showerShape.e1x3 = (hits != nullptr ? noZS::EcalClusterTools::e1x3(*(scRef->seed()), hits, topology) : 0.f);
925  full5x5_showerShape.e2x2 = (hits != nullptr ? noZS::EcalClusterTools::e2x2(*(scRef->seed()), hits, topology) : 0.f);
926  full5x5_showerShape.e2x5Max =
927  (hits != nullptr ? noZS::EcalClusterTools::e2x5Max(*(scRef->seed()), hits, topology) : 0.f);
928  full5x5_showerShape.e2x5Left =
929  (hits != nullptr ? noZS::EcalClusterTools::e2x5Left(*(scRef->seed()), hits, topology) : 0.f);
930  full5x5_showerShape.e2x5Right =
931  (hits != nullptr ? noZS::EcalClusterTools::e2x5Right(*(scRef->seed()), hits, topology) : 0.f);
932  full5x5_showerShape.e2x5Top =
933  (hits != nullptr ? noZS::EcalClusterTools::e2x5Top(*(scRef->seed()), hits, topology) : 0.f);
934  full5x5_showerShape.e2x5Bottom =
935  (hits != nullptr ? noZS::EcalClusterTools::e2x5Bottom(*(scRef->seed()), hits, topology) : 0.f);
936  if (hits) {
937  Cluster2ndMoments clus2ndMoments = noZS::EcalClusterTools::cluster2ndMoments(*(scRef->seed()), *hits);
938  full5x5_showerShape.smMajor = clus2ndMoments.sMaj;
939  full5x5_showerShape.smMinor = clus2ndMoments.sMin;
940  full5x5_showerShape.smAlpha = clus2ndMoments.alpha;
941  } else {
942  full5x5_showerShape.smMajor = 0.f;
943  full5x5_showerShape.smMinor = 0.f;
944  full5x5_showerShape.smAlpha = 0.f;
945  }
946  // fill preshower shapes
947  full5x5_showerShape.effSigmaRR = sigmaRR;
948  for (uint id = 0; id < full5x5_showerShape.hcalOverEcal.size(); ++id) {
949  full5x5_showerShape.hcalOverEcal[id] =
950  (hcalHelperCone != nullptr) ? hcalHelperCone->hcalESum(*scRef, id + 1, hcalCuts_) / full5x5_e5x5 : 0.f;
951  full5x5_showerShape.hcalOverEcalBc[id] =
952  (hcalHelperBc != nullptr) ? hcalHelperBc->hcalESum(*scRef, id + 1, hcalCuts_) / full5x5_e5x5 : 0.f;
953  }
954  full5x5_showerShape.pre7DepthHcal = false;
955  newCandidate.full5x5_setShowerShapeVariables(full5x5_showerShape);
956 
957  //get the pointer for the photon object
958  edm::Ptr<reco::PhotonCore> photonPtr(photonCoreHandle, lSC);
959 
960  // New in CMSSW_12_1_0 for PFID with DNNs
961  // The PFIso values are computed in the first loop on gedPhotonsTmp to make them available as DNN inputs.
962  // They are computed with the same inputs and algo as the final PFiso variables computed in the second loop after PF.
963  // Get PFClusters for PFID only if the PFID DNN evaluation is enabled
964  if (dnnPFidEnabled_) {
965  auto clusterHandle = evt.getHandle(pfClusterProducer_);
966  std::vector<edm::Handle<reco::PFClusterCollection>> clusterHandles{evt.getHandle(pfClusterProducerHCAL_)};
967  if (useHF_) {
968  clusterHandles.push_back(evt.getHandle(pfClusterProducerHFEM_));
969  clusterHandles.push_back(evt.getHandle(pfClusterProducerHFHAD_));
970  }
972  pfIso.sumEcalClusterEt = ecalisoAlgo->getSum(newCandidate, clusterHandle);
973  pfIso.sumHcalClusterEt = hcalisoAlgo->getSum(newCandidate, clusterHandles);
974 
975  newCandidate.setPflowIsolationVariables(pfIso);
976  }
977 
980  // Photon candidate takes by default (set in photons_cfi.py)
981  // a 4-momentum derived from the ecal photon-specific corrections.
982  if (!EcalTools::isHGCalDet(thedet)) {
983  photonEnergyCorrector_->calculate(evt, newCandidate, subdet, vertexCollection, es);
984  if (candidateP4type_ == "fromEcalEnergy") {
985  newCandidate.setP4(newCandidate.p4(reco::Photon::ecal_photons));
986  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
987  newCandidate.setMass(0.0);
988  } else if (candidateP4type_ == "fromRegression1") {
989  newCandidate.setP4(newCandidate.p4(reco::Photon::regression1));
990  newCandidate.setCandidateP4type(reco::Photon::regression1);
991  newCandidate.setMass(0.0);
992  } else if (candidateP4type_ == "fromRegression2") {
993  newCandidate.setP4(newCandidate.p4(reco::Photon::regression2));
994  newCandidate.setCandidateP4type(reco::Photon::regression2);
995  newCandidate.setMass(0.0);
996  } else if (candidateP4type_ == "fromRefinedSCRegression") {
997  newCandidate.setP4(newCandidate.p4(reco::Photon::regression2));
998  newCandidate.setCandidateP4type(reco::Photon::regression2);
999  newCandidate.setMass(0.0);
1000  }
1001  } else {
1002  math::XYZVector gamma_momentum = direction.unit() * scRef->energy();
1003  math::PtEtaPhiMLorentzVector p4(gamma_momentum.rho(), gamma_momentum.eta(), gamma_momentum.phi(), 0.0);
1004  newCandidate.setP4(p4);
1005  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
1006  // Make it an EE photon
1007  reco::Photon::FiducialFlags fiducialFlags;
1008  fiducialFlags.isEE = true;
1009  newCandidate.setFiducialVolumeFlags(fiducialFlags);
1010  }
1011 
1012  // fill MIP Vairables for Halo: Block for MIP are filled from PhotonMIPHaloTagger
1014  if (subdet == EcalBarrel && runMIPTagger_) {
1015  photonMIPHaloTagger_->MIPcalculate(&newCandidate, evt, es, mipVar);
1016  newCandidate.setMIPVariables(mipVar);
1017  }
1018 
1020  bool isLooseEM = true;
1021  if (newCandidate.pt() < highEt_) {
1022  if (newCandidate.hadronicOverEm() >= preselCutValues[1])
1023  isLooseEM = false;
1024  if (newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2] + preselCutValues[3] * newCandidate.pt())
1025  isLooseEM = false;
1026  if (newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4] + preselCutValues[5] * newCandidate.pt())
1027  isLooseEM = false;
1028  if (newCandidate.nTrkSolidConeDR04() > int(preselCutValues[6]))
1029  isLooseEM = false;
1030  if (newCandidate.nTrkHollowConeDR04() > int(preselCutValues[7]))
1031  isLooseEM = false;
1032  if (newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8])
1033  isLooseEM = false;
1034  if (newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9])
1035  isLooseEM = false;
1036  if (newCandidate.sigmaIetaIeta() > preselCutValues[10])
1037  isLooseEM = false;
1038  }
1039 
1040  if (isLooseEM)
1041  outputPhotonCollection.push_back(newCandidate);
1042  }
1043 
1044  if (dnnPFidEnabled_) {
1045  // Here send the list of photons to the PhotonDNNEstimator and get back the values for all the photons in one go
1046  LogDebug("GEDPhotonProducer") << "Getting DNN PFId for photons";
1047  const auto& dnn_photon_pfid = globalCache()->photonDNNEstimator->evaluate(outputPhotonCollection, tfSessions_);
1048  size_t ipho = 0;
1049  for (auto& photon : outputPhotonCollection) {
1050  const auto& [iModel, values] = dnn_photon_pfid[ipho];
1052  // The model index it is not useful for the moment
1053  pfID.dnn = values[0];
1054  photon.setPflowIDVariables(pfID);
1055  ipho++;
1056  }
1057  }
1058 }
static bool isHGCalDet(DetId::Detector thedet)
identify HGCal cells
Definition: EcalTools.h:49
static float e2x5Bottom(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
std::vector< CaloTowerDetId > hcalTowersBehindClusters
Definition: Photon.h:159
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
bool hasActiveHcal(const reco::SuperCluster &sc) const
static float eMax(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
DetId seed() const
return DetId of seed
Definition: CaloCluster.h:219
CaloGeometry const * caloGeom_
std::vector< int > flagsexclEB_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
std::array< float, 7 > hcalOverEcalBc
Definition: Photon.h:158
constexpr bool isFinite(T x)
std::vector< int > severitiesexclEE_
double ptFast(const double energy, const math::XYZPoint &position, const math::XYZPoint &origin)
static float e2x5Top(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
static std::array< float, 3 > covariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry, float w0=4.7)
static std::array< float, 3 > localCovariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, float w0=EgammaLocalCovParamDefaults::kRelEnCut, const EcalPFRecHitThresholds *thresholds=nullptr, float multEB=0.0, float multEE=0.0)
static float e2x2(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
T sqrt(T t)
Definition: SSEVec.h:23
static float e2nd(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
std::vector< int > flagsexclEE_
static float e2x5Max(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
double f[11][100]
static float eBottom(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e2x5Right(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
std::vector< int > severitiesexclEB_
static Cluster2ndMoments cluster2ndMoments(const reco::BasicCluster &basicCluster, const EcalRecHitCollection &recHits, double phiCorrectionFactor=0.8, double w0=4.7, bool useLogWeights=true)
static float eTop(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Definition: DetId.h:17
std::vector< double > preselCutValuesBarrel_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::array< float, 7 > hcalOverEcal
Definition: Photon.h:156
Detector
Definition: DetId.h:24
std::vector< double > preselCutValuesEndcap_
static float e2x5Left(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
auto hcalTowersBehindClusters(const reco::SuperCluster &sc) const
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:550
static float eRight(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e1x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Log< level::Warning, false > LogWarning
double hcalESum(const reco::SuperCluster &, int depth, const HcalPFCuts *hcalCuts) const
static float eLeft(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e1x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
#define LogDebug(id)
static float e5x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)

◆ fillPhotonCollection() [2/2]

void GEDPhotonProducer::fillPhotonCollection ( edm::Event evt,
edm::EventSetup const &  es,
const edm::Handle< reco::PhotonCollection > &  photonHandle,
const edm::Handle< reco::PFCandidateCollection pfCandidateHandle,
const edm::Handle< reco::PFCandidateCollection pfEGCandidateHandle,
reco::VertexCollection const &  pvVertices,
reco::PhotonCollection outputCollection,
int &  iSC,
const edm::Handle< edm::ValueMap< float >> &  chargedHadrons,
const edm::Handle< edm::ValueMap< float >> &  neutralHadrons,
const edm::Handle< edm::ValueMap< float >> &  photons,
const edm::Handle< edm::ValueMap< float >> &  chargedHadronsWorstVtx,
const edm::Handle< edm::ValueMap< float >> &  chargedHadronsWorstVtxGeomVeto,
const edm::Handle< edm::ValueMap< float >> &  chargedHadronsPFPV,
const edm::Handle< edm::ValueMap< float >> &  pfEcalClusters,
const edm::Handle< edm::ValueMap< float >> &  pfHcalClusters 
)
private

sets values only for EE, for EB it always returns 1

Definition at line 1060 of file GEDPhotonProducer.cc.

References candidateP4type_, reco::Photon::PflowIsolationVariables::chargedHadronIso, reco::Photon::PflowIsolationVariables::chargedHadronPFPVIso, reco::Photon::PflowIsolationVariables::chargedHadronWorstVtxGeomVetoIso, reco::Photon::PflowIsolationVariables::chargedHadronWorstVtxIso, reco::Photon::ecal_photons, EcalBarrel, EcalEndcap, reco::LeafCandidate::get(), EcalTools::isHGCalDet(), edm::Ref< C, T, F >::isNonnull(), GEDPhotonProducer::RecoStepInfo::isOOT(), edm::EDGetTokenT< T >::isUninitialized(), reco::Photon::PflowIsolationVariables::neutralHadronIso, gedPhotons_cfi::outputPhotonCollection, reco::Photon::p4(), phoPFECALClusIsolationToken_, phoPFHCALClusIsolationToken_, photonEnergyCorrector_, reco::Photon::PflowIsolationVariables::photonIso, photonMVABasedHaloTagger_, preselCutValuesBarrel_, preselCutValuesEndcap_, ptFast(), recoStep_, reco::Photon::regression1, reco::Photon::regression2, runMVABasedHaloTagger_, reco::Photon::setCandidateP4type(), reco::Photon::setHaloTaggerMVAVal(), reco::LeafCandidate::setMass(), reco::Photon::setP4(), reco::Photon::setPflowIsolationVariables(), reco::Photon::PflowIsolationVariables::sumEcalClusterEt, reco::Photon::PflowIsolationVariables::sumHcalClusterEt, and spclusmultinvestigator_cfi::vertexCollection.

1075  {
1076  std::vector<double> preselCutValues;
1077 
1078  for (unsigned int lSC = 0; lSC < photonHandle->size(); lSC++) {
1079  reco::PhotonRef phoRef(reco::PhotonRef(photonHandle, lSC));
1080  reco::SuperClusterRef parentSCRef = phoRef->parentSuperCluster();
1081  reco::SuperClusterRef scRef = phoRef->superCluster();
1082  DetId::Detector thedet = scRef->seed()->hitsAndFractions()[0].first.det();
1083  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
1084  if (subdet == EcalBarrel) {
1085  preselCutValues = preselCutValuesBarrel_;
1086  } else if (subdet == EcalEndcap) {
1087  preselCutValues = preselCutValuesEndcap_;
1088  } else if (EcalTools::isHGCalDet(thedet)) {
1089  preselCutValues = preselCutValuesEndcap_;
1090  } else {
1091  edm::LogWarning("") << "GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster" << thedet << ' '
1092  << subdet;
1093  }
1094 
1095  // SC energy preselection
1096  if (parentSCRef.isNonnull() &&
1097  ptFast(parentSCRef->energy(), parentSCRef->position(), {0, 0, 0}) <= preselCutValues[0])
1098  continue;
1099 
1100  reco::Photon newCandidate(*phoRef);
1101  iSC++;
1102 
1103  if (runMVABasedHaloTagger_) {
1104  float BHmva = photonMVABasedHaloTagger_->calculateMVA(&newCandidate, globalCache()->haloTaggerGBR.get(), evt, es);
1105  newCandidate.setHaloTaggerMVAVal(BHmva);
1106  }
1107 
1108  // Calculate the PF isolation
1110  // The PFID are not recomputed since they have been already computed in the first loop with the DNN
1111 
1112  //get the pointer for the photon object
1113  edm::Ptr<reco::Photon> photonPtr(photonHandle, lSC);
1114 
1115  if (!recoStep_.isOOT()) { //out of time photons do not have PF info so skip in this case
1116  pfIso.chargedHadronIso = (*chargedHadrons)[photonPtr];
1117  pfIso.neutralHadronIso = (*neutralHadrons)[photonPtr];
1118  pfIso.photonIso = (*photons)[photonPtr];
1119  pfIso.chargedHadronWorstVtxIso = (*chargedHadronsWorstVtx)[photonPtr];
1120  pfIso.chargedHadronWorstVtxGeomVetoIso = (*chargedHadronsWorstVtxGeomVeto)[photonPtr];
1121  pfIso.chargedHadronPFPVIso = (*chargedHadronsPFPV)[photonPtr];
1122  }
1123 
1124  //OOT photons in legacy 80X reminiAOD workflow dont have pf cluster isolation embeded into them at this stage
1125  // They have been already computed in the first loop on gedPhotonsTmp but better to compute them again here.
1126  pfIso.sumEcalClusterEt = !phoPFECALClusIsolationToken_.isUninitialized() ? (*pfEcalClusters)[photonPtr] : 0.;
1127  pfIso.sumHcalClusterEt = !phoPFHCALClusIsolationToken_.isUninitialized() ? (*pfHcalClusters)[photonPtr] : 0.;
1128  newCandidate.setPflowIsolationVariables(pfIso);
1129 
1130  // do the regression
1131  photonEnergyCorrector_->calculate(evt, newCandidate, subdet, vertexCollection, es);
1132  if (candidateP4type_ == "fromEcalEnergy") {
1133  newCandidate.setP4(newCandidate.p4(reco::Photon::ecal_photons));
1134  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
1135  newCandidate.setMass(0.0);
1136  } else if (candidateP4type_ == "fromRegression1") {
1137  newCandidate.setP4(newCandidate.p4(reco::Photon::regression1));
1138  newCandidate.setCandidateP4type(reco::Photon::regression1);
1139  newCandidate.setMass(0.0);
1140  } else if (candidateP4type_ == "fromRegression2") {
1141  newCandidate.setP4(newCandidate.p4(reco::Photon::regression2));
1142  newCandidate.setCandidateP4type(reco::Photon::regression2);
1143  newCandidate.setMass(0.0);
1144  } else if (candidateP4type_ == "fromRefinedSCRegression") {
1145  newCandidate.setP4(newCandidate.p4(reco::Photon::regression2));
1146  newCandidate.setCandidateP4type(reco::Photon::regression2);
1147  newCandidate.setMass(0.0);
1148  }
1149 
1150  outputPhotonCollection.push_back(newCandidate);
1151  }
1152 }
static bool isHGCalDet(DetId::Detector thedet)
identify HGCal cells
Definition: EcalTools.h:49
std::unique_ptr< PhotonMVABasedHaloTagger > photonMVABasedHaloTagger_
std::unique_ptr< PhotonEnergyCorrector > photonEnergyCorrector_
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:98
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
double ptFast(const double energy, const math::XYZPoint &position, const math::XYZPoint &origin)
edm::EDGetTokenT< edm::ValueMap< float > > phoPFHCALClusIsolationToken_
std::vector< double > preselCutValuesBarrel_
Detector
Definition: DetId.h:24
std::vector< double > preselCutValuesEndcap_
std::string candidateP4type_
edm::EDGetTokenT< edm::ValueMap< float > > phoPFECALClusIsolationToken_
Log< level::Warning, false > LogWarning

◆ globalEndJob()

static void GEDPhotonProducer::globalEndJob ( const CacheData )
inlinestatic

Definition at line 95 of file GEDPhotonProducer.cc.

95 {};

◆ initializeGlobalCache()

std::unique_ptr< CacheData > GEDPhotonProducer::initializeGlobalCache ( const edm::ParameterSet config)
static

Definition at line 487 of file GEDPhotonProducer.cc.

References DiMuonV_cfg::config.

487  {
488  // this method is supposed to create, initialize and return a CacheData instance
489  return std::make_unique<CacheData>(config);
490 }
dictionary config
Read in AllInOne config in JSON format.
Definition: DiMuonV_cfg.py:30

◆ produce()

void GEDPhotonProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
override

PF ECAL cluster based isolations

Definition at line 498 of file GEDPhotonProducer.cc.

References barrelEcalHits_, HLT_2024v14_cff::barrelRecHits, caloGeom_, caloGeometryToken_, caloTopologyToken_, cutsFromDB_, ecaldrMax_, ecaldrVetoBarrel_, ecaldrVetoEndcap_, ecalenergyBarrel_, ecalenergyEndcap_, ecaletaStripBarrel_, ecaletaStripEndcap_, ecalisoAlgo, ecalPFRechitThresholdsToken_, endcapEcalHits_, HLT_2024v14_cff::endcapRecHits, options_cfi::eventSetup, Exception, trigObjTnPSource_cfi::filler, fillPhotonCollection(), edm::Event::get(), edm::Event::getByToken(), hcalCuts_, hcalCutsToken_, hcaldrMax_, hcaldrVetoBarrel_, hcaldrVetoEndcap_, hcalenergyBarrel_, hcalenergyEndcap_, hcaletaStripBarrel_, hcaletaStripEndcap_, hcalHelperBc_, hcalHelperCone_, hcalisoAlgo, hcalRun2EffDepth_, hcaluseEt_, GEDPhotonProducer::RecoStepInfo::isFinal(), GEDPhotonProducer::RecoStepInfo::isOOT(), edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), edm::InputTag::label(), eostools::move(), pfCandidates_, pfEgammaCandidates_, phoChargedIsolationToken_, phoChargedPFPVIsoToken_, phoChargedWorstVtxGeomVetoIsoToken_, phoChargedWorstVtxIsoToken_, phoNeutralHadronIsolationToken_, phoPFECALClusIsolationToken_, phoPFHCALClusIsolationToken_, phoPhotonIsolationToken_, photonCollection_, photonCoreProducerT_, photonEnergyCorrector_, photonProducer_, photonProducerT_, preshowerHits_, edm::Event::put(), recoStep_, particleFlowZeroSuppressionECAL_cff::thresholds, HLT_2024v14_cff::topology, usePrimaryVertex_, valueMapPFCandPhoton_, contentValuesCheck::values, spclusmultinvestigator_cfi::vertexCollection, and vertexProducer_.

498  {
499  using namespace edm;
500 
501  if (cutsFromDB_) {
502  hcalCuts_ = &eventSetup.getData(hcalCutsToken_);
503  }
504 
505  auto outputPhotonCollection_p = std::make_unique<reco::PhotonCollection>();
506  edm::ValueMap<reco::PhotonRef> pfEGCandToPhotonMap;
507 
508  // Get the PhotonCore collection
509  bool validPhotonCoreHandle = false;
510  Handle<reco::PhotonCoreCollection> photonCoreHandle;
511  bool validPhotonHandle = false;
512  Handle<reco::PhotonCollection> photonHandle;
513  //value maps for isolation
514  edm::Handle<edm::ValueMap<float>> phoChargedIsolationMap;
515  edm::Handle<edm::ValueMap<float>> phoNeutralHadronIsolationMap;
516  edm::Handle<edm::ValueMap<float>> phoPhotonIsolationMap;
517  edm::Handle<edm::ValueMap<float>> phoChargedWorstVtxIsoMap;
518  edm::Handle<edm::ValueMap<float>> phoChargedWorstVtxGeomVetoIsoMap;
519  edm::Handle<edm::ValueMap<float>> phoChargedPFPVIsoMap;
520 
521  edm::Handle<edm::ValueMap<float>> phoPFECALClusIsolationMap;
522  edm::Handle<edm::ValueMap<float>> phoPFHCALClusIsolationMap;
523 
524  if (recoStep_.isFinal()) {
525  theEvent.getByToken(photonProducerT_, photonHandle);
526  //get isolation objects
527  theEvent.getByToken(phoChargedIsolationToken_, phoChargedIsolationMap);
528  theEvent.getByToken(phoNeutralHadronIsolationToken_, phoNeutralHadronIsolationMap);
529  theEvent.getByToken(phoPhotonIsolationToken_, phoPhotonIsolationMap);
530  theEvent.getByToken(phoChargedWorstVtxIsoToken_, phoChargedWorstVtxIsoMap);
531  theEvent.getByToken(phoChargedWorstVtxGeomVetoIsoToken_, phoChargedWorstVtxGeomVetoIsoMap);
532  theEvent.getByToken(phoChargedPFPVIsoToken_, phoChargedPFPVIsoMap);
533 
534  //OOT photons in legacy 80X re-miniAOD workflow dont have cluster isolation embed in them
536  theEvent.getByToken(phoPFECALClusIsolationToken_, phoPFECALClusIsolationMap);
537  }
539  theEvent.getByToken(phoPFHCALClusIsolationToken_, phoPFHCALClusIsolationMap);
540  }
541 
542  if (photonHandle.isValid()) {
543  validPhotonHandle = true;
544  } else {
545  throw cms::Exception("GEDPhotonProducer") << "Error! Can't get the product " << photonProducer_.label() << "\n";
546  }
547  } else {
548  theEvent.getByToken(photonCoreProducerT_, photonCoreHandle);
549  if (photonCoreHandle.isValid()) {
550  validPhotonCoreHandle = true;
551  } else {
552  throw cms::Exception("GEDPhotonProducer")
553  << "Error! Can't get the photonCoreProducer " << photonProducer_.label() << "\n";
554  }
555  }
556 
557  // Get EcalRecHits
558  auto const& barrelRecHits = theEvent.get(barrelEcalHits_);
559  auto const& endcapRecHits = theEvent.get(endcapEcalHits_);
560  auto const& preshowerRecHits = theEvent.get(preshowerHits_);
561 
562  Handle<reco::PFCandidateCollection> pfEGCandidateHandle;
563  // Get the PF refined cluster collection
565  theEvent.getByToken(pfEgammaCandidates_, pfEGCandidateHandle);
566  if (!pfEGCandidateHandle.isValid()) {
567  throw cms::Exception("GEDPhotonProducer") << "Error! Can't get the pfEgammaCandidates";
568  }
569  }
570 
571  Handle<reco::PFCandidateCollection> pfCandidateHandle;
572 
573  if (recoStep_.isFinal()) {
574  // Get the PF candidates collection
575  theEvent.getByToken(pfCandidates_, pfCandidateHandle);
576  //OOT photons have no PF candidates so its not an error in this case
577  if (!pfCandidateHandle.isValid() && !recoStep_.isOOT()) {
578  throw cms::Exception("GEDPhotonProducer") << "Error! Can't get the pfCandidates";
579  }
580  }
581 
582  // get the geometry from the event setup:
584 
585  // prepare access to hcal data
586  if (hcalHelperCone_ != nullptr and hcalHelperBc_ != nullptr) {
587  hcalHelperCone_->beginEvent(theEvent, eventSetup);
588  hcalHelperBc_->beginEvent(theEvent, eventSetup);
589  }
590 
591  auto const& topology = eventSetup.getData(caloTopologyToken_);
592  auto const& thresholds = eventSetup.getData(ecalPFRechitThresholdsToken_);
593 
594  // Get the primary event vertex
595  const reco::VertexCollection dummyVC;
596  auto const& vertexCollection{usePrimaryVertex_ ? theEvent.get(vertexProducer_) : dummyVC};
597 
598  // math::XYZPoint vtx(0.,0.,0.);
599  //if (vertexCollection.size()>0) vtx = vertexCollection.begin()->position();
600 
601  // get the regression calculator ready
603  if (photonEnergyCorrector_->gedRegression()) {
604  photonEnergyCorrector_->gedRegression()->setEvent(theEvent);
605  photonEnergyCorrector_->gedRegression()->setEventContent(eventSetup);
606  }
607 
609  ecalisoAlgo = std::make_unique<PhotonEcalPFClusterIsolation>(ecaldrMax_,
616 
617  hcalisoAlgo = std::make_unique<PhotonHcalPFClusterIsolation>(hcaldrMax_,
624  hcaluseEt_);
625 
626  int iSC = 0; // index in photon collection
627  // Loop over barrel and endcap SC collections and fill the photon collection
628  if (validPhotonCoreHandle)
629  fillPhotonCollection(theEvent,
630  eventSetup,
631  photonCoreHandle,
632  &topology,
633  &barrelRecHits,
634  &endcapRecHits,
635  &preshowerRecHits,
636  hcalHelperCone_.get(),
637  hcalHelperBc_.get(),
638  //vtx,
640  *outputPhotonCollection_p,
641  iSC,
642  thresholds);
643 
644  iSC = 0;
645  if (validPhotonHandle && recoStep_.isFinal())
646  fillPhotonCollection(theEvent,
647  eventSetup,
648  photonHandle,
649  pfCandidateHandle,
650  pfEGCandidateHandle,
651  theEvent.get(vertexProducer_),
652  *outputPhotonCollection_p,
653  iSC,
654  phoChargedIsolationMap,
655  phoNeutralHadronIsolationMap,
656  phoPhotonIsolationMap,
657  phoChargedWorstVtxIsoMap,
658  phoChargedWorstVtxGeomVetoIsoMap,
659  phoChargedPFPVIsoMap,
660  phoPFECALClusIsolationMap,
661  phoPFHCALClusIsolationMap);
662 
663  // put the product in the event
664  edm::LogInfo("GEDPhotonProducer") << " Put in the event " << iSC << " Photon Candidates \n";
665 
666  // go back to run2-like 2 effective depths if desired - depth 1 is the normal depth 1, depth 2 is the sum over the rest
667  if (hcalRun2EffDepth_) {
668  for (auto& pho : *outputPhotonCollection_p)
669  pho.hcalToRun2EffDepth();
670  }
671  const auto photonOrphHandle = theEvent.put(std::move(outputPhotonCollection_p), photonCollection_);
672 
675  auto pfEGCandToPhotonMap_p = std::make_unique<edm::ValueMap<reco::PhotonRef>>();
676  edm::ValueMap<reco::PhotonRef>::Filler filler(*pfEGCandToPhotonMap_p);
677  unsigned nObj = pfEGCandidateHandle->size();
678  std::vector<reco::PhotonRef> values(nObj);
680  for (unsigned int lCand = 0; lCand < nObj; lCand++) {
681  reco::PFCandidateRef pfCandRef(reco::PFCandidateRef(pfEGCandidateHandle, lCand));
682  reco::SuperClusterRef pfScRef = pfCandRef->superClusterRef();
683 
684  for (unsigned int lSC = 0; lSC < photonOrphHandle->size(); lSC++) {
685  reco::PhotonRef photonRef(reco::PhotonRef(photonOrphHandle, lSC));
686  reco::SuperClusterRef scRef = photonRef->superCluster();
687  if (pfScRef != scRef)
688  continue;
689  values[lCand] = photonRef;
690  }
691  }
692 
693  filler.insert(pfEGCandidateHandle, values.begin(), values.end());
694  filler.fill();
695  theEvent.put(std::move(pfEGCandToPhotonMap_p), valueMapPFCandPhoton_);
696  }
697 }
std::unique_ptr< PhotonHcalPFClusterIsolation > hcalisoAlgo
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
void fillPhotonCollection(edm::Event &evt, edm::EventSetup const &es, const edm::Handle< reco::PhotonCoreCollection > &photonCoreHandle, const CaloTopology *topology, const EcalRecHitCollection *ecalBarrelHits, const EcalRecHitCollection *ecalEndcapHits, const EcalRecHitCollection *preshowerHits, const ElectronHcalHelper *hcalHelperCone, const ElectronHcalHelper *hcalHelperBc, const reco::VertexCollection &pvVertices, reco::PhotonCollection &outputCollection, int &iSC, EcalPFRecHitThresholds const &thresholds)
const edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > ecalPFRechitThresholdsToken_
std::unique_ptr< PhotonEnergyCorrector > photonEnergyCorrector_
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:98
CaloGeometry const * caloGeom_
std::unique_ptr< PhotonEcalPFClusterIsolation > ecalisoAlgo
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::string const & label() const
Definition: InputTag.h:36
std::string photonCollection_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedPFPVIsoToken_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedWorstVtxGeomVetoIsoToken_
std::unique_ptr< ElectronHcalHelper > hcalHelperCone_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedIsolationToken_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
edm::EDGetTokenT< edm::ValueMap< float > > phoPFHCALClusIsolationToken_
edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< edm::ValueMap< float > > phoNeutralHadronIsolationToken_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedWorstVtxIsoToken_
edm::EDGetTokenT< reco::PhotonCollection > photonProducerT_
const edm::InputTag photonProducer_
std::unique_ptr< ElectronHcalHelper > hcalHelperBc_
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< edm::ValueMap< float > > phoPhotonIsolationToken_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
HLT enums.
edm::EDGetTokenT< edm::ValueMap< float > > phoPFECALClusIsolationToken_
HcalPFCuts const * hcalCuts_
edm::ESGetToken< HcalPFCuts, HcalPFCutsRcd > hcalCutsToken_
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
edm::EDGetTokenT< EcalRecHitCollection > preshowerHits_
def move(src, dest)
Definition: eostools.py:511
std::string valueMapPFCandPhoton_

Member Data Documentation

◆ barrelEcalHits_

edm::EDGetTokenT<EcalRecHitCollection> GEDPhotonProducer::barrelEcalHits_
private

Definition at line 153 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ caloGeom_

CaloGeometry const* GEDPhotonProducer::caloGeom_ = nullptr
private

Definition at line 201 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ caloGeometryToken_

const edm::ESGetToken<CaloGeometry, CaloGeometryRecord> GEDPhotonProducer::caloGeometryToken_
private

Definition at line 215 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ caloTopologyToken_

const edm::ESGetToken<CaloTopology, CaloTopologyRecord> GEDPhotonProducer::caloTopologyToken_
private

Definition at line 214 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ candidateP4type_

std::string GEDPhotonProducer::candidateP4type_
private

Definition at line 212 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ checkHcalStatus_

bool GEDPhotonProducer::checkHcalStatus_
private

Definition at line 190 of file GEDPhotonProducer.cc.

◆ cutsFromDB_

bool GEDPhotonProducer::cutsFromDB_
private

Definition at line 101 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ dnnPFidEnabled_

bool GEDPhotonProducer::dnnPFidEnabled_
private

Definition at line 224 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ ecalClusterESGetTokens_

const EcalClusterLazyTools::ESGetTokens GEDPhotonProducer::ecalClusterESGetTokens_
private

Definition at line 173 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ ecaldrMax_

double GEDPhotonProducer::ecaldrMax_
private

Definition at line 227 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecaldrVetoBarrel_

double GEDPhotonProducer::ecaldrVetoBarrel_
private

Definition at line 228 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecaldrVetoEndcap_

double GEDPhotonProducer::ecaldrVetoEndcap_
private

Definition at line 229 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecalenergyBarrel_

double GEDPhotonProducer::ecalenergyBarrel_
private

Definition at line 232 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecalenergyEndcap_

double GEDPhotonProducer::ecalenergyEndcap_
private

Definition at line 233 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecaletaStripBarrel_

double GEDPhotonProducer::ecaletaStripBarrel_
private

Definition at line 230 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecaletaStripEndcap_

double GEDPhotonProducer::ecaletaStripEndcap_
private

Definition at line 231 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecalisoAlgo

std::unique_ptr<PhotonEcalPFClusterIsolation> GEDPhotonProducer::ecalisoAlgo = nullptr
private

Definition at line 235 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ ecalPFRechitThresholdsToken_

const edm::ESGetToken<EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd> GEDPhotonProducer::ecalPFRechitThresholdsToken_
private

Definition at line 216 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ endcapEcalHits_

edm::EDGetTokenT<EcalRecHitCollection> GEDPhotonProducer::endcapEcalHits_
private

Definition at line 154 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ flagsexclEB_

std::vector<int> GEDPhotonProducer::flagsexclEB_
private

Definition at line 182 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ flagsexclEE_

std::vector<int> GEDPhotonProducer::flagsexclEE_
private

Definition at line 183 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ hbheRecHits_

edm::EDGetTokenT<HBHERecHitCollection> GEDPhotonProducer::hbheRecHits_
private

Definition at line 158 of file GEDPhotonProducer.cc.

◆ hcalCuts_

HcalPFCuts const* GEDPhotonProducer::hcalCuts_ = nullptr
private

Definition at line 102 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ hcalCutsToken_

edm::ESGetToken<HcalPFCuts, HcalPFCutsRcd> GEDPhotonProducer::hcalCutsToken_
private

Definition at line 100 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaldrMax_

double GEDPhotonProducer::hcaldrMax_
private

Definition at line 239 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaldrVetoBarrel_

double GEDPhotonProducer::hcaldrVetoBarrel_
private

Definition at line 240 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaldrVetoEndcap_

double GEDPhotonProducer::hcaldrVetoEndcap_
private

Definition at line 241 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcalenergyBarrel_

double GEDPhotonProducer::hcalenergyBarrel_
private

Definition at line 244 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcalenergyEndcap_

double GEDPhotonProducer::hcalenergyEndcap_
private

Definition at line 245 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaletaStripBarrel_

double GEDPhotonProducer::hcaletaStripBarrel_
private

Definition at line 242 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaletaStripEndcap_

double GEDPhotonProducer::hcaletaStripEndcap_
private

Definition at line 243 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcalHelperBc_

std::unique_ptr<ElectronHcalHelper> GEDPhotonProducer::hcalHelperBc_
private

Definition at line 220 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcalHelperCone_

std::unique_ptr<ElectronHcalHelper> GEDPhotonProducer::hcalHelperCone_
private

Definition at line 219 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcalisoAlgo

std::unique_ptr<PhotonHcalPFClusterIsolation> GEDPhotonProducer::hcalisoAlgo = nullptr
private

Definition at line 253 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ hcalRun2EffDepth_

bool GEDPhotonProducer::hcalRun2EffDepth_
private

Definition at line 221 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaluseEt_

double GEDPhotonProducer::hcaluseEt_
private

Definition at line 246 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ highEt_

double GEDPhotonProducer::highEt_
private

Definition at line 191 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ hOverEConeSize_

double GEDPhotonProducer::hOverEConeSize_
private

Definition at line 189 of file GEDPhotonProducer.cc.

◆ minR9Barrel_

double GEDPhotonProducer::minR9Barrel_
private

Definition at line 192 of file GEDPhotonProducer.cc.

◆ minR9Endcap_

double GEDPhotonProducer::minR9Endcap_
private

Definition at line 193 of file GEDPhotonProducer.cc.

◆ multThresEB_

double GEDPhotonProducer::multThresEB_
private

Definition at line 187 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ multThresEE_

double GEDPhotonProducer::multThresEE_
private

Definition at line 188 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ particleBasedIsolationToken

edm::EDGetTokenT<edm::ValueMap<std::vector<reco::PFCandidateRef> > > GEDPhotonProducer::particleBasedIsolationToken
private

Definition at line 161 of file GEDPhotonProducer.cc.

◆ pfCandidates_

edm::EDGetTokenT<reco::PFCandidateCollection> GEDPhotonProducer::pfCandidates_
private

Definition at line 157 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ pfClusterProducer_

edm::EDGetTokenT<reco::PFClusterCollection> GEDPhotonProducer::pfClusterProducer_
private

Definition at line 236 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ pfClusterProducerHCAL_

edm::EDGetTokenT<reco::PFClusterCollection> GEDPhotonProducer::pfClusterProducerHCAL_
private

Definition at line 248 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ pfClusterProducerHFEM_

edm::EDGetTokenT<reco::PFClusterCollection> GEDPhotonProducer::pfClusterProducerHFEM_
private

Definition at line 249 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ pfClusterProducerHFHAD_

edm::EDGetTokenT<reco::PFClusterCollection> GEDPhotonProducer::pfClusterProducerHFHAD_
private

Definition at line 250 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ pfEgammaCandidates_

edm::EDGetTokenT<reco::PFCandidateCollection> GEDPhotonProducer::pfEgammaCandidates_
private

Definition at line 156 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoChargedIsolationToken_

edm::EDGetTokenT<edm::ValueMap<float> > GEDPhotonProducer::phoChargedIsolationToken_
private

Definition at line 163 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoChargedPFPVIsoToken_

edm::EDGetTokenT<edm::ValueMap<float> > GEDPhotonProducer::phoChargedPFPVIsoToken_
private

Definition at line 168 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoChargedWorstVtxGeomVetoIsoToken_

edm::EDGetTokenT<edm::ValueMap<float> > GEDPhotonProducer::phoChargedWorstVtxGeomVetoIsoToken_
private

Definition at line 167 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoChargedWorstVtxIsoToken_

edm::EDGetTokenT<edm::ValueMap<float> > GEDPhotonProducer::phoChargedWorstVtxIsoToken_
private

Definition at line 166 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoNeutralHadronIsolationToken_

edm::EDGetTokenT<edm::ValueMap<float> > GEDPhotonProducer::phoNeutralHadronIsolationToken_
private

Definition at line 164 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoPFECALClusIsolationToken_

edm::EDGetTokenT<edm::ValueMap<float> > GEDPhotonProducer::phoPFECALClusIsolationToken_
private

Definition at line 170 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ phoPFHCALClusIsolationToken_

edm::EDGetTokenT<edm::ValueMap<float> > GEDPhotonProducer::phoPFHCALClusIsolationToken_
private

Definition at line 171 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ phoPhotonIsolationToken_

edm::EDGetTokenT<edm::ValueMap<float> > GEDPhotonProducer::phoPhotonIsolationToken_
private

Definition at line 165 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ photonCollection_

std::string GEDPhotonProducer::photonCollection_
private

Definition at line 148 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ photonCoreProducerT_

edm::EDGetTokenT<reco::PhotonCoreCollection> GEDPhotonProducer::photonCoreProducerT_
private

Definition at line 151 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ photonEnergyCorrector_

std::unique_ptr<PhotonEnergyCorrector> GEDPhotonProducer::photonEnergyCorrector_ = nullptr
private

Definition at line 211 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ photonIsoCalculator_

std::unique_ptr<PhotonIsolationCalculator> GEDPhotonProducer::photonIsoCalculator_ = nullptr
private

Definition at line 177 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ photonMIPHaloTagger_

std::unique_ptr<PhotonMIPHaloTagger> GEDPhotonProducer::photonMIPHaloTagger_ = nullptr
private

Definition at line 204 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ photonMVABasedHaloTagger_

std::unique_ptr<PhotonMVABasedHaloTagger> GEDPhotonProducer::photonMVABasedHaloTagger_ = nullptr
private

Definition at line 206 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ photonProducer_

const edm::InputTag GEDPhotonProducer::photonProducer_
private

Definition at line 149 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ photonProducerT_

edm::EDGetTokenT<reco::PhotonCollection> GEDPhotonProducer::photonProducerT_
private

Definition at line 152 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ preselCutValuesBarrel_

std::vector<double> GEDPhotonProducer::preselCutValuesBarrel_
private

Definition at line 208 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ preselCutValuesEndcap_

std::vector<double> GEDPhotonProducer::preselCutValuesEndcap_
private

Definition at line 209 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ preshowerHits_

edm::EDGetTokenT<EcalRecHitCollection> GEDPhotonProducer::preshowerHits_
private

Definition at line 155 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ recoStep_

RecoStepInfo GEDPhotonProducer::recoStep_
private

Definition at line 197 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ runMIPTagger_

bool GEDPhotonProducer::runMIPTagger_
private

Definition at line 194 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ runMVABasedHaloTagger_

bool GEDPhotonProducer::runMVABasedHaloTagger_
private

Definition at line 195 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ severitiesexclEB_

std::vector<int> GEDPhotonProducer::severitiesexclEB_
private

Definition at line 184 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ severitiesexclEE_

std::vector<int> GEDPhotonProducer::severitiesexclEE_
private

Definition at line 185 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ tfSessions_

std::vector<tensorflow::Session*> GEDPhotonProducer::tfSessions_
private

Definition at line 225 of file GEDPhotonProducer.cc.

Referenced by endStream(), and fillPhotonCollection().

◆ useHF_

bool GEDPhotonProducer::useHF_
private

Definition at line 238 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ usePrimaryVertex_

bool GEDPhotonProducer::usePrimaryVertex_
private

Definition at line 199 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ valueMapPFCandPhoton_

std::string GEDPhotonProducer::valueMapPFCandPhoton_
private

Definition at line 175 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ vertexProducer_

edm::EDGetTokenT<reco::VertexCollection> GEDPhotonProducer::vertexProducer_
private

Definition at line 159 of file GEDPhotonProducer.cc.

Referenced by produce().