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 beginRun (const edm::Run &, const edm::EventSetup &) override
 
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 235 of file GEDPhotonProducer.cc.

◆ PhotonHcalPFClusterIsolation

Definition at line 253 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 282 of file GEDPhotonProducer.cc.

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

◆ beginRun()

void GEDPhotonProducer::beginRun ( const edm::Run run,
const edm::EventSetup eventSetup 
)
override

Definition at line 488 of file GEDPhotonProducer.cc.

References cutsFromDB, options_cfi::eventSetup, hcalCuts, and hcalCutsToken_.

488  {
489  if (cutsFromDB) {
490  hcalCuts = &eventSetup.getData(hcalCutsToken_);
491  }
492 }
edm::ESGetToken< HcalPFCuts, HcalPFCutsRcd > hcalCutsToken_
HcalPFCuts const * hcalCuts

◆ endStream()

void GEDPhotonProducer::endStream ( )
override

Definition at line 499 of file GEDPhotonProducer.cc.

References tensorflow::closeSession(), and tfSessions_.

499  {
500  for (auto session : tfSessions_) {
501  tensorflow::closeSession(session);
502  }
503 }
bool closeSession(Session *&session)
Definition: TensorFlow.cc:234
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 702 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(), EcalClusterToolsT< noZS >::e2x2(), reco::Photon::ShowerShape::e2x2, EgHLTOffHistBins_cfi::e2x5, reco::Photon::ShowerShape::e2x5, EcalClusterToolsT< noZS >::e2x5Bottom(), reco::Photon::ShowerShape::e2x5Bottom, EcalClusterToolsT< noZS >::e2x5Left(), reco::Photon::ShowerShape::e2x5Left, EcalClusterToolsT< noZS >::e2x5Max(), reco::Photon::ShowerShape::e2x5Max, EcalClusterToolsT< noZS >::e2x5Right(), reco::Photon::ShowerShape::e2x5Right, EcalClusterToolsT< noZS >::e2x5Top(), reco::Photon::ShowerShape::e2x5Top, EcalClusterToolsT< noZS >::e3x3(), reco::Photon::ShowerShape::e3x3, EcalClusterToolsT< noZS >::e5x5(), reco::Photon::ShowerShape::e5x5, EcalClusterToolsT< noZS >::eBottom(), reco::Photon::ShowerShape::eBottom, reco::Photon::ecal_photons, EcalBarrel, ecalClusterESGetTokens_, EcalEndcap, ecalisoAlgo, ecalRecHit_cfi::ecalRecHit, reco::Photon::ShowerShape::effSigmaRR, EcalClusterToolsT< noZS >::eLeft(), reco::Photon::ShowerShape::eLeft, cosmicPhotonAnalyzer_cfi::eMax, EcalClusterToolsT< noZS >::eMax(), endcapEcalHits_, EcalClusterToolsT< noZS >::eRight(), reco::Photon::ShowerShape::eRight, EcalClusterToolsT< noZS >::eTop(), reco::Photon::ShowerShape::eTop, flagsexclEB_, flagsexclEE_, HLT_2023v12_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, 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_2023v12_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, pfClusterHBHEAlpaka_cff::topology, parallelization::uint, useHF_, contentValuesCheck::values, spclusmultinvestigator_cfi::vertexCollection, and L1BJetProducer_cff::vtx.

Referenced by produce().

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

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

96 {};

◆ initializeGlobalCache()

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

Definition at line 494 of file GEDPhotonProducer.cc.

References DiMuonV_cfg::config.

494  {
495  // this method is supposed to create, initialize and return a CacheData instance
496  return std::make_unique<CacheData>(config);
497 }
dictionary config
Read in AllInOne config in JSON format.
Definition: DiMuonV_cfg.py:29

◆ produce()

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

PF ECAL cluster based isolations

Definition at line 505 of file GEDPhotonProducer.cc.

References barrelEcalHits_, HLT_2023v12_cff::barrelRecHits, caloGeom_, caloGeometryToken_, caloTopologyToken_, ecaldrMax_, ecaldrVetoBarrel_, ecaldrVetoEndcap_, ecalenergyBarrel_, ecalenergyEndcap_, ecaletaStripBarrel_, ecaletaStripEndcap_, ecalisoAlgo, ecalPFRechitThresholdsToken_, endcapEcalHits_, HLT_2023v12_cff::endcapRecHits, options_cfi::eventSetup, Exception, trigObjTnPSource_cfi::filler, fillPhotonCollection(), edm::Event::get(), edm::Event::getByToken(), 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, pfClusterHBHEAlpaka_cff::topology, usePrimaryVertex_, valueMapPFCandPhoton_, contentValuesCheck::values, spclusmultinvestigator_cfi::vertexCollection, and vertexProducer_.

505  {
506  using namespace edm;
507 
508  auto outputPhotonCollection_p = std::make_unique<reco::PhotonCollection>();
509  edm::ValueMap<reco::PhotonRef> pfEGCandToPhotonMap;
510 
511  // Get the PhotonCore collection
512  bool validPhotonCoreHandle = false;
513  Handle<reco::PhotonCoreCollection> photonCoreHandle;
514  bool validPhotonHandle = false;
515  Handle<reco::PhotonCollection> photonHandle;
516  //value maps for isolation
517  edm::Handle<edm::ValueMap<float>> phoChargedIsolationMap;
518  edm::Handle<edm::ValueMap<float>> phoNeutralHadronIsolationMap;
519  edm::Handle<edm::ValueMap<float>> phoPhotonIsolationMap;
520  edm::Handle<edm::ValueMap<float>> phoChargedWorstVtxIsoMap;
521  edm::Handle<edm::ValueMap<float>> phoChargedWorstVtxGeomVetoIsoMap;
522  edm::Handle<edm::ValueMap<float>> phoChargedPFPVIsoMap;
523 
524  edm::Handle<edm::ValueMap<float>> phoPFECALClusIsolationMap;
525  edm::Handle<edm::ValueMap<float>> phoPFHCALClusIsolationMap;
526 
527  if (recoStep_.isFinal()) {
528  theEvent.getByToken(photonProducerT_, photonHandle);
529  //get isolation objects
530  theEvent.getByToken(phoChargedIsolationToken_, phoChargedIsolationMap);
531  theEvent.getByToken(phoNeutralHadronIsolationToken_, phoNeutralHadronIsolationMap);
532  theEvent.getByToken(phoPhotonIsolationToken_, phoPhotonIsolationMap);
533  theEvent.getByToken(phoChargedWorstVtxIsoToken_, phoChargedWorstVtxIsoMap);
534  theEvent.getByToken(phoChargedWorstVtxGeomVetoIsoToken_, phoChargedWorstVtxGeomVetoIsoMap);
535  theEvent.getByToken(phoChargedPFPVIsoToken_, phoChargedPFPVIsoMap);
536 
537  //OOT photons in legacy 80X re-miniAOD workflow dont have cluster isolation embed in them
539  theEvent.getByToken(phoPFECALClusIsolationToken_, phoPFECALClusIsolationMap);
540  }
542  theEvent.getByToken(phoPFHCALClusIsolationToken_, phoPFHCALClusIsolationMap);
543  }
544 
545  if (photonHandle.isValid()) {
546  validPhotonHandle = true;
547  } else {
548  throw cms::Exception("GEDPhotonProducer") << "Error! Can't get the product " << photonProducer_.label() << "\n";
549  }
550  } else {
551  theEvent.getByToken(photonCoreProducerT_, photonCoreHandle);
552  if (photonCoreHandle.isValid()) {
553  validPhotonCoreHandle = true;
554  } else {
555  throw cms::Exception("GEDPhotonProducer")
556  << "Error! Can't get the photonCoreProducer " << photonProducer_.label() << "\n";
557  }
558  }
559 
560  // Get EcalRecHits
561  auto const& barrelRecHits = theEvent.get(barrelEcalHits_);
562  auto const& endcapRecHits = theEvent.get(endcapEcalHits_);
563  auto const& preshowerRecHits = theEvent.get(preshowerHits_);
564 
565  Handle<reco::PFCandidateCollection> pfEGCandidateHandle;
566  // Get the PF refined cluster collection
568  theEvent.getByToken(pfEgammaCandidates_, pfEGCandidateHandle);
569  if (!pfEGCandidateHandle.isValid()) {
570  throw cms::Exception("GEDPhotonProducer") << "Error! Can't get the pfEgammaCandidates";
571  }
572  }
573 
574  Handle<reco::PFCandidateCollection> pfCandidateHandle;
575 
576  if (recoStep_.isFinal()) {
577  // Get the PF candidates collection
578  theEvent.getByToken(pfCandidates_, pfCandidateHandle);
579  //OOT photons have no PF candidates so its not an error in this case
580  if (!pfCandidateHandle.isValid() && !recoStep_.isOOT()) {
581  throw cms::Exception("GEDPhotonProducer") << "Error! Can't get the pfCandidates";
582  }
583  }
584 
585  // get the geometry from the event setup:
587 
588  // prepare access to hcal data
589  if (hcalHelperCone_ != nullptr and hcalHelperBc_ != nullptr) {
590  hcalHelperCone_->beginEvent(theEvent, eventSetup);
591  hcalHelperBc_->beginEvent(theEvent, eventSetup);
592  }
593 
594  auto const& topology = eventSetup.getData(caloTopologyToken_);
595  auto const& thresholds = eventSetup.getData(ecalPFRechitThresholdsToken_);
596 
597  // Get the primary event vertex
598  const reco::VertexCollection dummyVC;
599  auto const& vertexCollection{usePrimaryVertex_ ? theEvent.get(vertexProducer_) : dummyVC};
600 
601  // math::XYZPoint vtx(0.,0.,0.);
602  //if (vertexCollection.size()>0) vtx = vertexCollection.begin()->position();
603 
604  // get the regression calculator ready
606  if (photonEnergyCorrector_->gedRegression()) {
607  photonEnergyCorrector_->gedRegression()->setEvent(theEvent);
608  photonEnergyCorrector_->gedRegression()->setEventContent(eventSetup);
609  }
610 
612  ecalisoAlgo = std::make_unique<PhotonEcalPFClusterIsolation>(ecaldrMax_,
619 
620  hcalisoAlgo = std::make_unique<PhotonHcalPFClusterIsolation>(hcaldrMax_,
627  hcaluseEt_);
628 
629  int iSC = 0; // index in photon collection
630  // Loop over barrel and endcap SC collections and fill the photon collection
631  if (validPhotonCoreHandle)
632  fillPhotonCollection(theEvent,
633  eventSetup,
634  photonCoreHandle,
635  &topology,
636  &barrelRecHits,
637  &endcapRecHits,
638  &preshowerRecHits,
639  hcalHelperCone_.get(),
640  hcalHelperBc_.get(),
641  //vtx,
643  *outputPhotonCollection_p,
644  iSC,
645  thresholds);
646 
647  iSC = 0;
648  if (validPhotonHandle && recoStep_.isFinal())
649  fillPhotonCollection(theEvent,
650  eventSetup,
651  photonHandle,
652  pfCandidateHandle,
653  pfEGCandidateHandle,
654  theEvent.get(vertexProducer_),
655  *outputPhotonCollection_p,
656  iSC,
657  phoChargedIsolationMap,
658  phoNeutralHadronIsolationMap,
659  phoPhotonIsolationMap,
660  phoChargedWorstVtxIsoMap,
661  phoChargedWorstVtxGeomVetoIsoMap,
662  phoChargedPFPVIsoMap,
663  phoPFECALClusIsolationMap,
664  phoPFHCALClusIsolationMap);
665 
666  // put the product in the event
667  edm::LogInfo("GEDPhotonProducer") << " Put in the event " << iSC << " Photon Candidates \n";
668 
669  // 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
670  if (hcalRun2EffDepth_) {
671  for (auto& pho : *outputPhotonCollection_p)
672  pho.hcalToRun2EffDepth();
673  }
674  const auto photonOrphHandle = theEvent.put(std::move(outputPhotonCollection_p), photonCollection_);
675 
678  auto pfEGCandToPhotonMap_p = std::make_unique<edm::ValueMap<reco::PhotonRef>>();
679  edm::ValueMap<reco::PhotonRef>::Filler filler(*pfEGCandToPhotonMap_p);
680  unsigned nObj = pfEGCandidateHandle->size();
681  std::vector<reco::PhotonRef> values(nObj);
683  for (unsigned int lCand = 0; lCand < nObj; lCand++) {
684  reco::PFCandidateRef pfCandRef(reco::PFCandidateRef(pfEGCandidateHandle, lCand));
685  reco::SuperClusterRef pfScRef = pfCandRef->superClusterRef();
686 
687  for (unsigned int lSC = 0; lSC < photonOrphHandle->size(); lSC++) {
688  reco::PhotonRef photonRef(reco::PhotonRef(photonOrphHandle, lSC));
689  reco::SuperClusterRef scRef = photonRef->superCluster();
690  if (pfScRef != scRef)
691  continue;
692  values[lCand] = photonRef;
693  }
694  }
695 
696  filler.insert(pfEGCandidateHandle, values.begin(), values.end());
697  filler.fill();
698  theEvent.put(std::move(pfEGCandToPhotonMap_p), valueMapPFCandPhoton_);
699  }
700 }
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:104
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_
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 154 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ caloGeom_

CaloGeometry const* GEDPhotonProducer::caloGeom_ = nullptr
private

Definition at line 202 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ caloGeometryToken_

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

Definition at line 216 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ caloTopologyToken_

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

Definition at line 215 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ candidateP4type_

std::string GEDPhotonProducer::candidateP4type_
private

Definition at line 213 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ checkHcalStatus_

bool GEDPhotonProducer::checkHcalStatus_
private

Definition at line 191 of file GEDPhotonProducer.cc.

◆ cutsFromDB

bool GEDPhotonProducer::cutsFromDB
private

Definition at line 102 of file GEDPhotonProducer.cc.

Referenced by beginRun().

◆ dnnPFidEnabled_

bool GEDPhotonProducer::dnnPFidEnabled_
private

Definition at line 225 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ ecalClusterESGetTokens_

const EcalClusterLazyTools::ESGetTokens GEDPhotonProducer::ecalClusterESGetTokens_
private

Definition at line 174 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ ecaldrMax_

double GEDPhotonProducer::ecaldrMax_
private

Definition at line 228 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecaldrVetoBarrel_

double GEDPhotonProducer::ecaldrVetoBarrel_
private

Definition at line 229 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecaldrVetoEndcap_

double GEDPhotonProducer::ecaldrVetoEndcap_
private

Definition at line 230 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecalenergyBarrel_

double GEDPhotonProducer::ecalenergyBarrel_
private

Definition at line 233 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecalenergyEndcap_

double GEDPhotonProducer::ecalenergyEndcap_
private

Definition at line 234 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecaletaStripBarrel_

double GEDPhotonProducer::ecaletaStripBarrel_
private

Definition at line 231 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecaletaStripEndcap_

double GEDPhotonProducer::ecaletaStripEndcap_
private

Definition at line 232 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ ecalisoAlgo

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

Definition at line 236 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ ecalPFRechitThresholdsToken_

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

Definition at line 217 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ endcapEcalHits_

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

Definition at line 155 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ flagsexclEB_

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

Definition at line 183 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ flagsexclEE_

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

Definition at line 184 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ hbheRecHits_

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

Definition at line 159 of file GEDPhotonProducer.cc.

◆ hcalCuts

HcalPFCuts const* GEDPhotonProducer::hcalCuts = nullptr
private

Definition at line 103 of file GEDPhotonProducer.cc.

Referenced by beginRun(), and fillPhotonCollection().

◆ hcalCutsToken_

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

Definition at line 101 of file GEDPhotonProducer.cc.

Referenced by beginRun().

◆ hcaldrMax_

double GEDPhotonProducer::hcaldrMax_
private

Definition at line 240 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaldrVetoBarrel_

double GEDPhotonProducer::hcaldrVetoBarrel_
private

Definition at line 241 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaldrVetoEndcap_

double GEDPhotonProducer::hcaldrVetoEndcap_
private

Definition at line 242 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcalenergyBarrel_

double GEDPhotonProducer::hcalenergyBarrel_
private

Definition at line 245 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcalenergyEndcap_

double GEDPhotonProducer::hcalenergyEndcap_
private

Definition at line 246 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaletaStripBarrel_

double GEDPhotonProducer::hcaletaStripBarrel_
private

Definition at line 243 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaletaStripEndcap_

double GEDPhotonProducer::hcaletaStripEndcap_
private

Definition at line 244 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcalHelperBc_

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

Definition at line 221 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcalHelperCone_

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

Definition at line 220 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcalisoAlgo

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

Definition at line 254 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ hcalRun2EffDepth_

bool GEDPhotonProducer::hcalRun2EffDepth_
private

Definition at line 222 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ hcaluseEt_

double GEDPhotonProducer::hcaluseEt_
private

Definition at line 247 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ highEt_

double GEDPhotonProducer::highEt_
private

Definition at line 192 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ hOverEConeSize_

double GEDPhotonProducer::hOverEConeSize_
private

Definition at line 190 of file GEDPhotonProducer.cc.

◆ minR9Barrel_

double GEDPhotonProducer::minR9Barrel_
private

Definition at line 193 of file GEDPhotonProducer.cc.

◆ minR9Endcap_

double GEDPhotonProducer::minR9Endcap_
private

Definition at line 194 of file GEDPhotonProducer.cc.

◆ multThresEB_

double GEDPhotonProducer::multThresEB_
private

Definition at line 188 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ multThresEE_

double GEDPhotonProducer::multThresEE_
private

Definition at line 189 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ particleBasedIsolationToken

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

Definition at line 162 of file GEDPhotonProducer.cc.

◆ pfCandidates_

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

Definition at line 158 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ pfClusterProducer_

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

Definition at line 237 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ pfClusterProducerHCAL_

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

Definition at line 249 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ pfClusterProducerHFEM_

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

Definition at line 250 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ pfClusterProducerHFHAD_

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

Definition at line 251 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ pfEgammaCandidates_

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

Definition at line 157 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoChargedIsolationToken_

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

Definition at line 164 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoChargedPFPVIsoToken_

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

Definition at line 169 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoChargedWorstVtxGeomVetoIsoToken_

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

Definition at line 168 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoChargedWorstVtxIsoToken_

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

Definition at line 167 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoNeutralHadronIsolationToken_

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

Definition at line 165 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ phoPFECALClusIsolationToken_

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

Definition at line 171 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ phoPFHCALClusIsolationToken_

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

Definition at line 172 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ phoPhotonIsolationToken_

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

Definition at line 166 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ photonCollection_

std::string GEDPhotonProducer::photonCollection_
private

Definition at line 149 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ photonCoreProducerT_

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

Definition at line 152 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ photonEnergyCorrector_

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

Definition at line 212 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ photonIsoCalculator_

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

Definition at line 178 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ photonMIPHaloTagger_

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

Definition at line 205 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ photonMVABasedHaloTagger_

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

Definition at line 207 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ photonProducer_

const edm::InputTag GEDPhotonProducer::photonProducer_
private

Definition at line 150 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ photonProducerT_

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

Definition at line 153 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ preselCutValuesBarrel_

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

Definition at line 209 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ preselCutValuesEndcap_

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

Definition at line 210 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ preshowerHits_

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

Definition at line 156 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ recoStep_

RecoStepInfo GEDPhotonProducer::recoStep_
private

Definition at line 198 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection(), and produce().

◆ runMIPTagger_

bool GEDPhotonProducer::runMIPTagger_
private

Definition at line 195 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ runMVABasedHaloTagger_

bool GEDPhotonProducer::runMVABasedHaloTagger_
private

Definition at line 196 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ severitiesexclEB_

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

Definition at line 185 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ severitiesexclEE_

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

Definition at line 186 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ tfSessions_

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

Definition at line 226 of file GEDPhotonProducer.cc.

Referenced by endStream(), and fillPhotonCollection().

◆ useHF_

bool GEDPhotonProducer::useHF_
private

Definition at line 239 of file GEDPhotonProducer.cc.

Referenced by fillPhotonCollection().

◆ usePrimaryVertex_

bool GEDPhotonProducer::usePrimaryVertex_
private

Definition at line 200 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ valueMapPFCandPhoton_

std::string GEDPhotonProducer::valueMapPFCandPhoton_
private

Definition at line 176 of file GEDPhotonProducer.cc.

Referenced by produce().

◆ vertexProducer_

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

Definition at line 160 of file GEDPhotonProducer.cc.

Referenced by produce().