CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
GEDPhotonProducer Class Reference

#include <GEDPhotonProducer.h>

Inheritance diagram for GEDPhotonProducer:
edm::stream::EDProducer<>

Classes

class  RecoStepInfo
 

Public Member Functions

void beginRun (edm::Run const &r, edm::EventSetup const &es) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
 GEDPhotonProducer (const edm::ParameterSet &ps)
 
void produce (edm::Event &evt, const edm::EventSetup &es) override
 
 ~GEDPhotonProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

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 edm::Handle< CaloTowerCollection > &hcalTowersHandle, const reco::VertexCollection &pvVertices, reco::PhotonCollection &outputCollection, int &iSC)
 
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, edm::ValueMap< reco::PhotonRef > pfEGCandToPhotonMap, edm::Handle< reco::VertexCollection > &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 >> &pfEcalClusters, const edm::Handle< edm::ValueMap< float >> &pfHcalClusters)
 

Private Attributes

edm::EDGetTokenT< EcalRecHitCollectionbarrelEcalHits_
 
std::string candidateP4type_
 
bool checkHcalStatus_
 
edm::ParameterSet conf_
 
std::string conversionCollection_
 
std::string conversionProducer_
 
edm::EDGetTokenT< EcalRecHitCollectionendcapEcalHits_
 
EcalClusterFunctionBaseClassenergyCorrectionF
 
std::vector< int > flagsexclEB_
 
std::vector< int > flagsexclEE_
 
edm::EDGetTokenT< CaloTowerCollectionhcalTowers_
 
double highEt_
 
double hOverEConeSize_
 
double maxHOverE_
 
double minR9Barrel_
 
double minR9Endcap_
 
double minSCEt_
 
edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > particleBasedIsolationToken
 
edm::EDGetTokenT< reco::PFCandidateCollectionpfCandidates_
 
edm::EDGetTokenT< reco::PFCandidateCollectionpfEgammaCandidates_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedIsolationTokenCITK_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoNeutralHadronIsolationTokenCITK_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoPFECALClusIsolationToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoPFHCALClusIsolationToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > phoPhotonIsolationTokenCITK_
 
std::string photonCollection_
 
edm::EDGetTokenT< reco::PhotonCoreCollectionphotonCoreProducerT_
 
edm::InputTag photonProducer_
 
edm::EDGetTokenT< reco::PhotonCollectionphotonProducerT_
 
PositionCalc posCalculator_
 
std::vector< double > preselCutValuesBarrel_
 
std::vector< double > preselCutValuesEndcap_
 
edm::EDGetTokenT< EcalRecHitCollectionpreshowerHits_
 
RecoStepInfo recoStep_
 
bool runMIPTagger_
 
std::vector< int > severitiesexclEB_
 
std::vector< int > severitiesexclEE_
 
edm::ESHandle< CaloGeometrytheCaloGeom_
 
edm::ESHandle< CaloTopologytheCaloTopo_
 
PhotonEnergyCorrectorthePhotonEnergyCorrector_
 
PhotonIsolationCalculatorthePhotonIsolationCalculator_
 
PhotonMIPHaloTaggerthePhotonMIPHaloTagger_
 
bool usePrimaryVertex_
 
bool validConversions_
 
bool validPixelSeeds_
 
std::string valueMapPFCandPhoton_
 
edm::EDGetTokenT< reco::VertexCollectionvertexProducer_
 

Additional Inherited Members

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

Detailed Description

Author
Nancy Marinelli, U. of Notre Dame, US

Definition at line 42 of file GEDPhotonProducer.h.

Constructor & Destructor Documentation

GEDPhotonProducer::GEDPhotonProducer ( const edm::ParameterSet ps)

Definition at line 71 of file GEDPhotonProducer.cc.

References barrelEcalHits_, candidateP4type_, checkHcalStatus_, conf_, endcapEcalHits_, edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), flagsexclEB_, flagsexclEE_, edm::ParameterSet::getParameter(), hcalTowers_, highEt_, hOverEConeSize_, GEDPhotonProducer::RecoStepInfo::isFinal(), gedPhotons_cfi::isolationSumsCalculatorSet, edm::EDGetTokenT< T >::isUninitialized(), minR9Barrel_, minR9Endcap_, gedPhotons_cfi::mipVariableSet, pfCandidates_, pfEgammaCandidates_, phoChargedIsolationTokenCITK_, phoNeutralHadronIsolationTokenCITK_, phoPFECALClusIsolationToken_, phoPFHCALClusIsolationToken_, phoPhotonIsolationTokenCITK_, photonCollection_, photonCoreProducerT_, photonProducer_, photonProducerT_, cleanAndMergeSuperClusters_cfi::posCalcParameters, posCalculator_, preselCutValuesBarrel_, preselCutValuesEndcap_, preshowerHits_, recoStep_, runMIPTagger_, PhotonIsolationCalculator::setup(), PhotonMIPHaloTagger::setup(), severitiesexclEB_, severitiesexclEE_, AlCaHLTBitMon_QueryRunRegistry::string, thePhotonEnergyCorrector_, thePhotonIsolationCalculator_, thePhotonMIPHaloTagger_, usePrimaryVertex_, valueMapPFCandPhoton_, and vertexProducer_.

71  :
72  recoStep_(config.getParameter<std::string>("reconstructionStep")),
73  conf_(config)
74 {
75 
76  // use configuration file to setup input/output collection names
77  //
78  photonProducer_ = conf_.getParameter<edm::InputTag>("photonProducer");
79 
80  if ( recoStep_.isFinal() ) {
82  consumes<reco::PhotonCollection>(photonProducer_);
83  pfCandidates_ =
84  consumes<reco::PFCandidateCollection>(conf_.getParameter<edm::InputTag>("pfCandidates"));
85 
87  consumes<edm::ValueMap<float>>(conf_.getParameter<edm::InputTag>("chargedHadronIsolation"));
89  consumes<edm::ValueMap<float>>(conf_.getParameter<edm::InputTag>("neutralHadronIsolation"));
91  consumes<edm::ValueMap<float>>(conf_.getParameter<edm::InputTag>("photonIsolation"));
92  //OOT photons in legacy 80X re-miniAOD do not have PF cluster embeded into the reco object
93  //to preserve 80X behaviour
94  if(conf_.exists("pfECALClusIsolation")){
96  consumes<edm::ValueMap<float>>(conf_.getParameter<edm::InputTag>("pfECALClusIsolation"));
97  }
98  if(conf_.exists("pfHCALClusIsolation")){
100  consumes<edm::ValueMap<float>>(conf_.getParameter<edm::InputTag>("pfHCALClusIsolation"));
101  }
102  } else {
103 
105  consumes<reco::PhotonCoreCollection>(photonProducer_);
106 
107  }
108 
109  auto pfEg = conf_.getParameter<edm::InputTag>("pfEgammaCandidates");
110  if (not pfEg.label().empty())
112  consumes<reco::PFCandidateCollection>(pfEg);
113  barrelEcalHits_ =
114  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("barrelEcalHits"));
115  endcapEcalHits_ =
116  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("endcapEcalHits"));
117  preshowerHits_ =
118  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("preshowerHits"));
119  vertexProducer_ =
120  consumes<reco::VertexCollection>(conf_.getParameter<edm::InputTag>("primaryVertexProducer"));
121 
122  auto hcTow = conf_.getParameter<edm::InputTag>("hcalTowers");
123  if (not hcTow.label().empty())
124  hcalTowers_ =
125  consumes<CaloTowerCollection>(hcTow);
126  //
127  photonCollection_ = conf_.getParameter<std::string>("outputPhotonCollection");
128  hOverEConeSize_ = conf_.getParameter<double>("hOverEConeSize");
129  highEt_ = conf_.getParameter<double>("highEt");
130  // R9 value to decide converted/unconverted
131  minR9Barrel_ = conf_.getParameter<double>("minR9Barrel");
132  minR9Endcap_ = conf_.getParameter<double>("minR9Endcap");
133  usePrimaryVertex_ = conf_.getParameter<bool>("usePrimaryVertex");
134  runMIPTagger_ = conf_.getParameter<bool>("runMIPTagger");
135 
136  candidateP4type_ = config.getParameter<std::string>("candidateP4type") ;
137  valueMapPFCandPhoton_ = config.getParameter<std::string>("valueMapPhotons");
138 
139 
141  config.getParameter<edm::ParameterSet>("posCalcParameters");
142  posCalculator_ = PositionCalc(posCalcParameters);
143 
144 
145  //AA
146  //Flags and Severities to be excluded from photon calculations
147  const std::vector<std::string> flagnamesEB =
148  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEB");
149 
150  const std::vector<std::string> flagnamesEE =
151  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEE");
152 
153  flagsexclEB_=
154  StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
155 
156  flagsexclEE_=
157  StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
158 
159  const std::vector<std::string> severitynamesEB =
160  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEB");
161 
163  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
164 
165  const std::vector<std::string> severitynamesEE =
166  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEE");
167 
169  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
170 
172  new PhotonEnergyCorrector(conf_, consumesCollector());
173  if( conf_.existsAs<edm::ParameterSet>("regressionConfig") ) {
174  auto sumes = consumesCollector();
175  thePhotonEnergyCorrector_->gedRegression()->setConsumes(sumes);
176  }
177 
178  //AA
179 
180  //
181 
182  // Parameters for the position calculation:
183  // std::map<std::string,double> providedParameters;
184  // providedParameters.insert(std::make_pair("LogWeighted",conf_.getParameter<bool>("posCalc_logweight")));
185  //providedParameters.insert(std::make_pair("T0_barl",conf_.getParameter<double>("posCalc_t0_barl")));
186  //providedParameters.insert(std::make_pair("T0_endc",conf_.getParameter<double>("posCalc_t0_endc")));
187  //providedParameters.insert(std::make_pair("T0_endcPresh",conf_.getParameter<double>("posCalc_t0_endcPresh")));
188  //providedParameters.insert(std::make_pair("W0",conf_.getParameter<double>("posCalc_w0")));
189  //providedParameters.insert(std::make_pair("X0",conf_.getParameter<double>("posCalc_x0")));
190  //posCalculator_ = PositionCalc(providedParameters);
191  // cut values for pre-selection
192  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("minSCEtBarrel"));
193  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("maxHoverEBarrel"));
194  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetBarrel"));
195  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeBarrel"));
196  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetBarrel"));
197  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeBarrel"));
198  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackSolidConeBarrel"));
199  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackHollowConeBarrel"));
200  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumSolidConeBarrel"));
201  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumHollowConeBarrel"));
202  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutBarrel"));
203  //
204  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("minSCEtEndcap"));
205  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("maxHoverEEndcap"));
206  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetEndcap"));
207  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeEndcap"));
208  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetEndcap"));
209  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeEndcap"));
210  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackSolidConeEndcap"));
211  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackHollowConeEndcap"));
212  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumSolidConeEndcap"));
213  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumHollowConeEndcap"));
214  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutEndcap"));
215  //
216 
217  //moved from beginRun to here, I dont see how this could cause harm as its just reading in the exactly same parameters each run
218  if ( !recoStep_.isFinal()){
221  thePhotonIsolationCalculator_->setup(isolationSumsCalculatorSet, flagsexclEB_, flagsexclEE_, severitiesexclEB_, severitiesexclEE_,consumesCollector());
224  thePhotonMIPHaloTagger_->setup(mipVariableSet,consumesCollector());
225 
226  }else{
228  thePhotonMIPHaloTagger_=nullptr;
229  }
230 
231  checkHcalStatus_ = conf_.getParameter<bool>("checkHcalStatus");
232 
233  // Register the product
234  produces< reco::PhotonCollection >(photonCollection_);
236  produces< edm::ValueMap<reco::PhotonRef> > (valueMapPFCandPhoton_);
237 
238 
239 }
edm::EDGetTokenT< edm::ValueMap< float > > phoNeutralHadronIsolationTokenCITK_
edm::InputTag photonProducer_
T getParameter(std::string const &) const
PhotonEnergyCorrector * thePhotonEnergyCorrector_
PhotonMIPHaloTagger * thePhotonMIPHaloTagger_
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
RecoStepInfo recoStep_
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::vector< int > flagsexclEB_
Definition: config.py:1
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
PhotonIsolationCalculator * thePhotonIsolationCalculator_
std::vector< int > severitiesexclEE_
std::string photonCollection_
edm::EDGetTokenT< edm::ValueMap< float > > phoPhotonIsolationTokenCITK_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
PositionCalc posCalculator_
void setup(const edm::ParameterSet &conf, std::vector< int > const &flagsEB_, std::vector< int > const &flagsEE_, std::vector< int > const &severitiesEB_, std::vector< int > const &severitiesEE_, edm::ConsumesCollector &&iC)
std::vector< int > flagsexclEE_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
edm::EDGetTokenT< edm::ValueMap< float > > phoPFHCALClusIsolationToken_
void setup(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_
std::vector< int > severitiesexclEB_
std::vector< double > preselCutValuesBarrel_
edm::EDGetTokenT< reco::PhotonCollection > photonProducerT_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedIsolationTokenCITK_
std::vector< double > preselCutValuesEndcap_
std::string candidateP4type_
edm::EDGetTokenT< edm::ValueMap< float > > phoPFECALClusIsolationToken_
edm::ParameterSet conf_
bool isUninitialized() const
Definition: EDGetToken.h:73
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
edm::EDGetTokenT< EcalRecHitCollection > preshowerHits_
std::string valueMapPFCandPhoton_
GEDPhotonProducer::~GEDPhotonProducer ( )
override

Definition at line 241 of file GEDPhotonProducer.cc.

References thePhotonEnergyCorrector_, thePhotonIsolationCalculator_, and thePhotonMIPHaloTagger_.

242 {
246  //delete energyCorrectionF;
247 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
PhotonMIPHaloTagger * thePhotonMIPHaloTagger_
PhotonIsolationCalculator * thePhotonIsolationCalculator_

Member Function Documentation

void GEDPhotonProducer::beginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
final

Definition at line 251 of file GEDPhotonProducer.cc.

References init, GEDPhotonProducer::RecoStepInfo::isFinal(), recoStep_, and thePhotonEnergyCorrector_.

251  {
252 
253  if ( !recoStep_.isFinal() ) {
254  thePhotonEnergyCorrector_ -> init(theEventSetup);
255  }
256 
257 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
int init
Definition: HydjetWrapper.h:67
RecoStepInfo recoStep_
void GEDPhotonProducer::endRun ( edm::Run const &  r,
edm::EventSetup const &  theEventSetup 
)
final

Definition at line 259 of file GEDPhotonProducer.cc.

259  {
260 }
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 edm::Handle< CaloTowerCollection > &  hcalTowersHandle,
const reco::VertexCollection pvVertices,
reco::PhotonCollection outputCollection,
int &  iSC 
)
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 492 of file GEDPhotonProducer.cc.

References barrelEcalHits_, PhotonIsolationCalculator::calculate(), PhotonEnergyCorrector::calculate(), candidateP4type_, checkHcalStatus_, EcalClusterToolsT< noZS >::covariances(), EcalClusterToolsT< noZS >::e1x3(), reco::Photon::ShowerShape::e1x3, heepElectronID_HEEPV50_CSA14_25ns_cff::e1x5, EcalClusterToolsT< noZS >::e1x5(), reco::Photon::ShowerShape::e1x5, EcalClusterToolsT< noZS >::e2nd(), reco::Photon::ShowerShape::e2nd, EcalClusterToolsT< noZS >::e2x2(), reco::Photon::ShowerShape::e2x2, heepElectronID_HEEPV50_CSA14_25ns_cff::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, heepElectronID_HEEPV50_CSA14_25ns_cff::e5x5, EcalClusterToolsT< noZS >::e5x5(), reco::Photon::ShowerShape::e5x5, EcalClusterToolsT< noZS >::eBottom(), reco::Photon::ShowerShape::eBottom, reco::Photon::ecal_photons, EcalBarrel, EcalEndcap, ecalRecalibRecHit_cfi::ecalRecHit, reco::Photon::ShowerShape::effSigmaRR, EcalClusterToolsT< noZS >::eLeft(), reco::Photon::ShowerShape::eLeft, photonPostprocessing_cfi::eMax, EcalClusterToolsT< noZS >::eMax(), edm::SortedCollection< T, SORT >::end(), endcapEcalHits_, EcalClusterToolsT< noZS >::eRight(), reco::Photon::ShowerShape::eRight, EcalClusterToolsT< noZS >::eTop(), reco::Photon::ShowerShape::eTop, f, edm::SortedCollection< T, SORT >::find(), flagsexclEB_, flagsexclEE_, particleFlow_cfi::full5x5_sigmaIetaIeta, geometry, EgammaHadTower::getDepth1HcalESum(), EgammaHadTower::getDepth2HcalESum(), EgammaTowerIsolation::getTowerESum(), EgammaHadTower::hasActiveHcal(), reco::Photon::ShowerShape::hcalDepth1OverEcal, reco::Photon::ShowerShape::hcalDepth1OverEcalBc, reco::Photon::ShowerShape::hcalDepth2OverEcal, reco::Photon::ShowerShape::hcalDepth2OverEcalBc, hcalTowers_, reco::Photon::ShowerShape::hcalTowersBehindClusters, highEt_, hfClusterShapes_cfi::hits, hOverEConeSize_, createfilelist::int, reco::Photon::ShowerShape::invalidHcal, reco::Photon::FiducialFlags::isEE, edm::isFinite(), edm::Ref< C, T, F >::isNonnull(), reco::Photon::SaturationInfo::isSeedSaturated, EcalClusterToolsT< noZS >::localCovariances(), reco::Photon::ShowerShape::maxEnergyXtal, reco::Photon::SaturationInfo::nSaturatedXtals, nullptr, p4, preselCutValuesBarrel_, preselCutValuesEndcap_, preshowerHits_, edm::Handle< T >::product(), edm::ESHandle< T >::product(), ptFast(), reco::Photon::regression1, reco::Photon::regression2, runMIPTagger_, reco::CaloCluster::seed(), EgammaHadTower::setTowerCollection(), severitiesexclEB_, severitiesexclEE_, electronIdCutBased_cfi::sigmaEtaEta, reco::Photon::ShowerShape::sigmaEtaEta, reco::Photon::ShowerShape::sigmaIetaIeta, reco::Photon::ShowerShape::sigmaIetaIphi, reco::Photon::ShowerShape::sigmaIphiIphi, mathSSE::sqrt(), theCaloGeom_, thePhotonEnergyCorrector_, thePhotonIsolationCalculator_, thePhotonMIPHaloTagger_, EgammaHadTower::towersOf(), and badGlobalMuonTaggersAOD_cff::vtx.

Referenced by produce().

501  {
502 
503 
506  std::vector<double> preselCutValues;
507  std::vector<int> flags_, severitiesexcl_;
508 
509  for(unsigned int lSC=0; lSC < photonCoreHandle->size(); lSC++) {
510 
511  reco::PhotonCoreRef coreRef(reco::PhotonCoreRef(photonCoreHandle, lSC));
512  reco::SuperClusterRef parentSCRef = coreRef->parentSuperCluster();
513  reco::SuperClusterRef scRef=coreRef->superCluster();
514 
515 
516 
517  // const reco::SuperCluster* pClus=&(*scRef);
518  iSC++;
519 
520  DetId::Detector thedet = scRef->seed()->hitsAndFractions()[0].first.det();
521  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
522  if (subdet==EcalBarrel) {
523  preselCutValues = preselCutValuesBarrel_;
524  hits = ecalBarrelHits;
525  flags_ = flagsexclEB_;
526  severitiesexcl_ = severitiesexclEB_;
527  } else if (subdet==EcalEndcap) {
528  preselCutValues = preselCutValuesEndcap_;
529  hits = ecalEndcapHits;
530  flags_ = flagsexclEE_;
531  severitiesexcl_ = severitiesexclEE_;
532  } else if ( isHGCalDet(thedet) ) {
533  preselCutValues = preselCutValuesEndcap_;
534  hits = nullptr;
535  flags_ = flagsexclEE_;
536  severitiesexcl_ = severitiesexclEE_;
537  } else {
538  edm::LogWarning("")<<"GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster: " << thedet << ' ' << subdet;
539  }
540 
541 
542 
543 
544  // SC energy preselection
545  if (parentSCRef.isNonnull() &&
546  ptFast(parentSCRef->energy(),parentSCRef->position(),math::XYZPoint(0,0,0)) <= preselCutValues[0] ) continue;
547  // calculate HoE
548 
549  double HoE1,HoE2;
550  HoE1=HoE2=0.;
551 
552  std::vector<CaloTowerDetId> TowersBehindClus;
553  float hcalDepth1OverEcalBc,hcalDepth2OverEcalBc;
554  hcalDepth1OverEcalBc=hcalDepth2OverEcalBc=0.f;
555  bool invalidHcal = false;
556 
557  if (not hcalTowers_.isUninitialized()) {
558  const CaloTowerCollection* hcalTowersColl = hcalTowersHandle.product();
559  EgammaTowerIsolation towerIso1(hOverEConeSize_,0.,0.,1,hcalTowersColl) ;
560  EgammaTowerIsolation towerIso2(hOverEConeSize_,0.,0.,2,hcalTowersColl) ;
561  HoE1=towerIso1.getTowerESum(&(*scRef))/scRef->energy();
562  HoE2=towerIso2.getTowerESum(&(*scRef))/scRef->energy();
563 
564  EgammaHadTower towerIsoBehindClus(es);
565  towerIsoBehindClus.setTowerCollection(hcalTowersHandle.product());
566  TowersBehindClus = towerIsoBehindClus.towersOf(*scRef);
567  hcalDepth1OverEcalBc = towerIsoBehindClus.getDepth1HcalESum(TowersBehindClus)/scRef->energy();
568  hcalDepth2OverEcalBc = towerIsoBehindClus.getDepth2HcalESum(TowersBehindClus)/scRef->energy();
569 
570  if (checkHcalStatus_ && hcalDepth1OverEcalBc == 0 && hcalDepth2OverEcalBc == 0) {
571  invalidHcal = !towerIsoBehindClus.hasActiveHcal(TowersBehindClus);
572  }
573  }
574 
575  // std::cout << " GEDPhotonProducer calculation of HoE with towers in a cone " << HoE1 << " " << HoE2 << std::endl;
576  //std::cout << " GEDPhotonProducer calcualtion of HoE with towers behind the BCs " << hcalDepth1OverEcalBc << " " << hcalDepth2OverEcalBc << std::endl;
577 
578  float maxXtal = ( hits != nullptr ? EcalClusterTools::eMax( *(scRef->seed()), &(*hits) ) : 0.f );
579  //AA
580  //Change these to consider severity level of hits
581  float e1x5 = ( hits != nullptr ? EcalClusterTools::e1x5( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
582  float e2x5 = ( hits != nullptr ? EcalClusterTools::e2x5Max( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
583  float e3x3 = ( hits != nullptr ? EcalClusterTools::e3x3( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
584  float e5x5 = ( hits != nullptr ? EcalClusterTools::e5x5( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
585  std::vector<float> cov = ( hits != nullptr ? EcalClusterTools::covariances( *(scRef->seed()), &(*hits), &(*topology), geometry) : std::vector<float>( {0.f,0.f,0.f} ) );
586  std::vector<float> locCov = ( hits != nullptr ? EcalClusterTools::localCovariances( *(scRef->seed()), &(*hits), &(*topology)) : std::vector<float>( {0.f,0.f,0.f} ) );
587 
588  float sigmaEtaEta = sqrt(cov[0]);
589  float sigmaIetaIeta = sqrt(locCov[0]);
590 
591  float full5x5_maxXtal = ( hits != nullptr ? noZS::EcalClusterTools::eMax( *(scRef->seed()), &(*hits) ) : 0.f );
592  //AA
593  //Change these to consider severity level of hits
594  float full5x5_e1x5 = ( hits != nullptr ? noZS::EcalClusterTools::e1x5( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
595  float full5x5_e2x5 = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Max( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
596  float full5x5_e3x3 = ( hits != nullptr ? noZS::EcalClusterTools::e3x3( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
597  float full5x5_e5x5 = ( hits != nullptr ? noZS::EcalClusterTools::e5x5( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
598  std::vector<float> full5x5_cov = ( hits != nullptr ? noZS::EcalClusterTools::covariances( *(scRef->seed()), &(*hits), &(*topology), geometry) : std::vector<float>( {0.f,0.f,0.f} ) );
599  std::vector<float> full5x5_locCov = ( hits != nullptr ? noZS::EcalClusterTools::localCovariances( *(scRef->seed()), &(*hits), &(*topology)) : std::vector<float>( {0.f,0.f,0.f} ) );
600 
601  float full5x5_sigmaEtaEta = sqrt(full5x5_cov[0]);
602  float full5x5_sigmaIetaIeta = sqrt(full5x5_locCov[0]);
603 
604  // compute position of ECAL shower
605  math::XYZPoint caloPosition = scRef->position();
606 
607 
609  double photonEnergy=1.;
610  math::XYZPoint vtx(0.,0.,0.);
611  if (!vertexCollection.empty()) vtx = vertexCollection.begin()->position();
612  // compute momentum vector of photon from primary vertex and cluster position
613  math::XYZVector direction = caloPosition - vtx;
614  //math::XYZVector momentum = direction.unit() * photonEnergy ;
615  math::XYZVector momentum = direction.unit() ;
616 
617  // Create dummy candidate with unit momentum and zero energy to allow setting of all variables. The energy is set for last.
618  math::XYZTLorentzVectorD p4(momentum.x(), momentum.y(), momentum.z(), photonEnergy );
619  reco::Photon newCandidate(p4, caloPosition, coreRef, vtx);
620 
621  //std::cout << " standard p4 before " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
622  //std::cout << " type " <<newCandidate.getCandidateP4type() << " standard p4 after " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
623 
624  // Calculate fiducial flags and isolation variable. Blocked are filled from the isolationCalculator
625  reco::Photon::FiducialFlags fiducialFlags;
626  reco::Photon::IsolationVariables isolVarR03, isolVarR04;
627  if( !isHGCalDet(thedet) ) {
628  thePhotonIsolationCalculator_->calculate( &newCandidate,evt,es,fiducialFlags,isolVarR04, isolVarR03);
629  }
630  newCandidate.setFiducialVolumeFlags( fiducialFlags );
631  newCandidate.setIsolationVariables(isolVarR04, isolVarR03 );
632 
633 
635  reco::Photon::ShowerShape showerShape;
636  showerShape.e1x5= e1x5;
637  showerShape.e2x5= e2x5;
638  showerShape.e3x3= e3x3;
639  showerShape.e5x5= e5x5;
640  showerShape.maxEnergyXtal = maxXtal;
641  showerShape.sigmaEtaEta = sigmaEtaEta;
642  showerShape.sigmaIetaIeta = sigmaIetaIeta;
643  showerShape.hcalDepth1OverEcal = HoE1;
644  showerShape.hcalDepth2OverEcal = HoE2;
645  showerShape.hcalDepth1OverEcalBc = hcalDepth1OverEcalBc;
646  showerShape.hcalDepth2OverEcalBc = hcalDepth2OverEcalBc;
647  showerShape.hcalTowersBehindClusters = TowersBehindClus;
648  showerShape.invalidHcal = invalidHcal;
650  const float spp = (!edm::isFinite(locCov[2]) ? 0. : sqrt(locCov[2]));
651  const float sep = locCov[1];
652  showerShape.sigmaIetaIphi = sep;
653  showerShape.sigmaIphiIphi = spp;
654  showerShape.e2nd = ( hits != nullptr ? EcalClusterTools::e2nd(*(scRef->seed()),&(*hits)) : 0.f );
655  showerShape.eTop = ( hits != nullptr ? EcalClusterTools::eTop(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
656  showerShape.eLeft = ( hits != nullptr ? EcalClusterTools::eLeft(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
657  showerShape.eRight = ( hits != nullptr ? EcalClusterTools::eRight(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
658  showerShape.eBottom = ( hits != nullptr ? EcalClusterTools::eBottom(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
659  showerShape.e1x3 = ( hits != nullptr ? EcalClusterTools::e1x3(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
660  showerShape.e2x2 = ( hits != nullptr ? EcalClusterTools::e2x2(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
661  showerShape.e2x5Max = ( hits != nullptr ? EcalClusterTools::e2x5Max(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
662  showerShape.e2x5Left = ( hits != nullptr ? EcalClusterTools::e2x5Left(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
663  showerShape.e2x5Right = ( hits != nullptr ? EcalClusterTools::e2x5Right(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
664  showerShape.e2x5Top = ( hits != nullptr ? EcalClusterTools::e2x5Top(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
665  showerShape.e2x5Bottom = ( hits != nullptr ? EcalClusterTools::e2x5Bottom(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
666  // fill preshower shapes
668  const float sigmaRR = toolsforES.eseffsirir( *scRef );
669  showerShape.effSigmaRR = sigmaRR;
670  newCandidate.setShowerShapeVariables ( showerShape );
671 
672  reco::Photon::SaturationInfo saturationInfo;
673  const reco::CaloCluster& seedCluster = *(scRef->seed()) ;
674  DetId seedXtalId = seedCluster.seed();
675  int nSaturatedXtals = 0;
676  bool isSeedSaturated = false;
677  if (hits != nullptr) {
678  const auto hitsAndFractions = scRef->hitsAndFractions();
679  for (auto&& hitFractionPair : hitsAndFractions) {
680  auto&& ecalRecHit = hits->find(hitFractionPair.first);
681  if (ecalRecHit == hits->end()) continue;
682  if (ecalRecHit->checkFlag(EcalRecHit::Flags::kSaturated)) {
683  nSaturatedXtals++;
684  if (seedXtalId == ecalRecHit->detid())
685  isSeedSaturated = true;
686  }
687  }
688  }
689  saturationInfo.nSaturatedXtals = nSaturatedXtals;
690  saturationInfo.isSeedSaturated = isSeedSaturated;
691  newCandidate.setSaturationInfo(saturationInfo);
692 
694  reco::Photon::ShowerShape full5x5_showerShape;
695  full5x5_showerShape.e1x5= full5x5_e1x5;
696  full5x5_showerShape.e2x5= full5x5_e2x5;
697  full5x5_showerShape.e3x3= full5x5_e3x3;
698  full5x5_showerShape.e5x5= full5x5_e5x5;
699  full5x5_showerShape.maxEnergyXtal = full5x5_maxXtal;
700  full5x5_showerShape.sigmaEtaEta = full5x5_sigmaEtaEta;
701  full5x5_showerShape.sigmaIetaIeta = full5x5_sigmaIetaIeta;
703  const float full5x5_spp = (!edm::isFinite(full5x5_locCov[2]) ? 0. : sqrt(full5x5_locCov[2]));
704  const float full5x5_sep = full5x5_locCov[1];
705  full5x5_showerShape.sigmaIetaIphi = full5x5_sep;
706  full5x5_showerShape.sigmaIphiIphi = full5x5_spp;
707  full5x5_showerShape.e2nd = ( hits != nullptr ? noZS::EcalClusterTools::e2nd(*(scRef->seed()),&(*hits)) : 0.f );
708  full5x5_showerShape.eTop = ( hits != nullptr ? noZS::EcalClusterTools::eTop(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
709  full5x5_showerShape.eLeft = ( hits != nullptr ? noZS::EcalClusterTools::eLeft(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
710  full5x5_showerShape.eRight = ( hits != nullptr ? noZS::EcalClusterTools::eRight(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
711  full5x5_showerShape.eBottom = ( hits != nullptr ? noZS::EcalClusterTools::eBottom(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
712  full5x5_showerShape.e1x3 = ( hits != nullptr ? noZS::EcalClusterTools::e1x3(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
713  full5x5_showerShape.e2x2 = ( hits != nullptr ? noZS::EcalClusterTools::e2x2(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
714  full5x5_showerShape.e2x5Max = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Max(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
715  full5x5_showerShape.e2x5Left = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Left(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
716  full5x5_showerShape.e2x5Right = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Right(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
717  full5x5_showerShape.e2x5Top = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Top(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
718  full5x5_showerShape.e2x5Bottom = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Bottom(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
719  // fill preshower shapes
720  full5x5_showerShape.effSigmaRR = sigmaRR;
721  newCandidate.full5x5_setShowerShapeVariables ( full5x5_showerShape );
722 
723 
724 
727  // Photon candidate takes by default (set in photons_cfi.py)
728  // a 4-momentum derived from the ecal photon-specific corrections.
729  if( !isHGCalDet(thedet) ) {
730  thePhotonEnergyCorrector_->calculate(evt, newCandidate, subdet, vertexCollection, es);
731  if ( candidateP4type_ == "fromEcalEnergy") {
732  newCandidate.setP4( newCandidate.p4(reco::Photon::ecal_photons) );
733  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
734  } else if ( candidateP4type_ == "fromRegression1") {
735  newCandidate.setP4( newCandidate.p4(reco::Photon::regression1) );
736  newCandidate.setCandidateP4type(reco::Photon::regression1);
737  } else if ( candidateP4type_ == "fromRegression2") {
738  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
739  newCandidate.setCandidateP4type(reco::Photon::regression2);
740  } else if ( candidateP4type_ == "fromRefinedSCRegression" ) {
741  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
742  newCandidate.setCandidateP4type(reco::Photon::regression2);
743  }
744  } else {
745  math::XYZVector gamma_momentum = direction.unit() * scRef->energy();
746  math::XYZTLorentzVectorD p4(gamma_momentum.x(),
747  gamma_momentum.y(),
748  gamma_momentum.z(),
749  scRef->energy());
750  newCandidate.setP4(p4);
751  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
752  // Make it an EE photon
753  reco::Photon::FiducialFlags fiducialFlags;
754  fiducialFlags.isEE = true;
755  newCandidate.setFiducialVolumeFlags(fiducialFlags);
756  }
757 
758  // std::cout << " final p4 " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
759 
760 
761  // std::cout << " GEDPhotonProducer from candidate HoE with towers in a cone " << newCandidate.hadronicOverEm() << " " << newCandidate.hadronicDepth1OverEm() << " " << newCandidate.hadronicDepth2OverEm() << std::endl;
762  // std::cout << " GEDPhotonProducer from candidate of HoE with towers behind the BCs " << newCandidate.hadTowOverEm() << " " << newCandidate.hadTowDepth1OverEm() << " " << newCandidate.hadTowDepth2OverEm() << std::endl;
763 
764 
765  // fill MIP Vairables for Halo: Block for MIP are filled from PhotonMIPHaloTagger
767  if(subdet==EcalBarrel && runMIPTagger_ )
768  {
769 
770  thePhotonMIPHaloTagger_-> MIPcalculate( &newCandidate,evt,es,mipVar);
771  newCandidate.setMIPVariables(mipVar);
772  }
773 
774 
775 
777  bool isLooseEM=true;
778  if ( newCandidate.pt() < highEt_) {
779  if ( newCandidate.hadronicOverEm() >= preselCutValues[1] ) isLooseEM=false;
780  if ( newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2]+ preselCutValues[3]*newCandidate.pt() ) isLooseEM=false;
781  if ( newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4]+ preselCutValues[5]*newCandidate.pt() ) isLooseEM=false;
782  if ( newCandidate.nTrkSolidConeDR04() > int(preselCutValues[6]) ) isLooseEM=false;
783  if ( newCandidate.nTrkHollowConeDR04() > int(preselCutValues[7]) ) isLooseEM=false;
784  if ( newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8] ) isLooseEM=false;
785  if ( newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9] ) isLooseEM=false;
786  if ( newCandidate.sigmaIetaIeta() > preselCutValues[10] ) isLooseEM=false;
787  }
788 
789 
790 
791  if ( isLooseEM)
792  outputPhotonCollection.push_back(newCandidate);
793 
794 
795  }
796 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
PhotonMIPHaloTagger * thePhotonMIPHaloTagger_
void calculate(const reco::Photon *, const edm::Event &, const edm::EventSetup &es, reco::Photon::FiducialFlags &phofid, reco::Photon::IsolationVariables &phoisolR03, reco::Photon::IsolationVariables &phoisolR04) const
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
edm::ESHandle< CaloGeometry > theCaloGeom_
static float e2x5Bottom(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
std::vector< CaloTowerDetId > hcalTowersBehindClusters
Definition: Photon.h:152
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
static std::vector< float > covariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry, float w0=4.7)
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
static float eMax(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
std::vector< int > flagsexclEB_
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
#define nullptr
PhotonIsolationCalculator * thePhotonIsolationCalculator_
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)
bool isFinite(T x)
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
static float e2x2(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
T sqrt(T t)
Definition: SSEVec.h:18
double p4[4]
Definition: TauolaWrapper.h:92
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_
const_iterator end() const
static float eTop(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Definition: DetId.h:18
void calculate(edm::Event &evt, reco::Photon &, int subdet, const reco::VertexCollection &vtxcol, const edm::EventSetup &iSetup)
DetId seed() const
return DetId of seed
Definition: CaloCluster.h:207
T const * product() const
Definition: Handle.h:81
std::vector< double > preselCutValuesBarrel_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Detector
Definition: DetId.h:26
std::vector< double > preselCutValuesEndcap_
static float e2x5Left(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
std::string candidateP4type_
ESHandle< TrackerGeometry > geometry
iterator find(key_type k)
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)
T const * product() const
Definition: ESHandle.h:86
static float eLeft(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static std::vector< float > localCovariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, float w0=4.7)
edm::EDGetTokenT< EcalRecHitCollection > preshowerHits_
static float e1x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e5x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
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,
edm::ValueMap< reco::PhotonRef pfEGCandToPhotonMap,
edm::Handle< reco::VertexCollection > &  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 >> &  pfEcalClusters,
const edm::Handle< edm::ValueMap< float >> &  pfHcalClusters 
)
private

Definition at line 801 of file GEDPhotonProducer.cc.

References PhotonEnergyCorrector::calculate(), candidateP4type_, reco::Photon::PflowIsolationVariables::chargedHadronIso, reco::Photon::ecal_photons, EcalBarrel, EcalEndcap, edm::Ref< C, T, F >::isNonnull(), GEDPhotonProducer::RecoStepInfo::isOOT(), edm::EDGetTokenT< T >::isUninitialized(), reco::Photon::PflowIsolationVariables::neutralHadronIso, reco::Photon::p4(), phoPFECALClusIsolationToken_, phoPFHCALClusIsolationToken_, reco::Photon::PflowIsolationVariables::photonIso, preselCutValuesBarrel_, preselCutValuesEndcap_, ptFast(), recoStep_, reco::Photon::regression1, reco::Photon::regression2, reco::Photon::setCandidateP4type(), reco::Photon::setP4(), reco::Photon::setPflowIDVariables(), reco::Photon::setPflowIsolationVariables(), reco::Photon::PflowIsolationVariables::sumEcalClusterEt, reco::Photon::PflowIsolationVariables::sumHcalClusterEt, and thePhotonEnergyCorrector_.

813  {
814 
815 
816 
817  std::vector<double> preselCutValues;
818 
819 
820  for(unsigned int lSC=0; lSC < photonHandle->size(); lSC++) {
821  reco::PhotonRef phoRef(reco::PhotonRef(photonHandle, lSC));
822  reco::SuperClusterRef parentSCRef = phoRef->parentSuperCluster();
823  reco::SuperClusterRef scRef=phoRef->superCluster();
824  DetId::Detector thedet = scRef->seed()->hitsAndFractions()[0].first.det();
825  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
826  if (subdet==EcalBarrel) {
827  preselCutValues = preselCutValuesBarrel_;
828  } else if (subdet==EcalEndcap) {
829  preselCutValues = preselCutValuesEndcap_;
830  } else if (isHGCalDet(thedet)) {
831  preselCutValues = preselCutValuesEndcap_;
832  } else {
833  edm::LogWarning("")<<"GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster" << thedet << ' ' << subdet;
834  }
835 
836 
837 
838  // SC energy preselection
839  if (parentSCRef.isNonnull() &&
840  ptFast(parentSCRef->energy(),parentSCRef->position(),math::XYZPoint(0,0,0)) <= preselCutValues[0] ) continue;
841  reco::Photon newCandidate(*phoRef);
842  iSC++;
843 
844 
845  // Calculate the PF isolation and ID - for the time being there is no calculation. Only the setting
848 
849  //get the pointer for the photon object
850  edm::Ptr<reco::Photon> photonPtr(photonHandle, lSC);
851 
852  if(!recoStep_.isOOT()){ //out of time photons do not have PF info so skip in this case
853  pfIso.chargedHadronIso = (*chargedHadrons)[photonPtr] ;
854  pfIso.neutralHadronIso = (*neutralHadrons)[photonPtr];
855  pfIso.photonIso = (*photons)[photonPtr];
856  }
857 
858  //OOT photons in legacy 80X reminiAOD workflow dont have pf cluster isolation embeded into them at this stage
860  pfIso.sumEcalClusterEt = (*pfEcalClusters)[photonPtr];
861  }else pfIso.sumEcalClusterEt = 0.;
862 
864  pfIso.sumHcalClusterEt = (*pfHcalClusters)[photonPtr];
865  }else pfIso.sumHcalClusterEt = 0.;
866 
867  newCandidate.setPflowIsolationVariables(pfIso);
868  newCandidate.setPflowIDVariables(pfID);
869 
870  // do the regression
871  thePhotonEnergyCorrector_->calculate(evt, newCandidate, subdet, *vertexHandle, es);
872  if ( candidateP4type_ == "fromEcalEnergy") {
873  newCandidate.setP4( newCandidate.p4(reco::Photon::ecal_photons) );
874  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
875  } else if ( candidateP4type_ == "fromRegression1") {
876  newCandidate.setP4( newCandidate.p4(reco::Photon::regression1) );
877  newCandidate.setCandidateP4type(reco::Photon::regression1);
878  } else if ( candidateP4type_ == "fromRegression2") {
879  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
880  newCandidate.setCandidateP4type(reco::Photon::regression2);
881  } else if ( candidateP4type_ == "fromRefinedSCRegression" ) {
882  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
883  newCandidate.setCandidateP4type(reco::Photon::regression2);
884  }
885 
886  // std::cout << " GEDPhotonProducer pf based isolation chargedHadron " << newCandidate.chargedHadronIso() << " neutralHadron " << newCandidate.neutralHadronIso() << " Photon " << newCandidate.photonIso() << std::endl;
887  //std::cout << " GEDPhotonProducer from candidate HoE with towers in a cone " << newCandidate.hadronicOverEm() << " " << newCandidate.hadronicDepth1OverEm() << " " << newCandidate.hadronicDepth2OverEm() << std::endl;
888  //std::cout << " GEDPhotonProducer from candidate of HoE with towers behind the BCs " << newCandidate.hadTowOverEm() << " " << newCandidate.hadTowDepth1OverEm() << " " << newCandidate.hadTowDepth2OverEm() << std::endl;
889  //std::cout << " standard p4 before " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
890  //std::cout << " type " <<newCandidate.getCandidateP4type() << " standard p4 after " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
891  //std::cout << " final p4 " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
892 
893  outputPhotonCollection.push_back(newCandidate);
894 
895  }
896 
897 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
RecoStepInfo recoStep_
double ptFast(const double energy, const math::XYZPoint &position, const math::XYZPoint &origin)
edm::EDGetTokenT< edm::ValueMap< float > > phoPFHCALClusIsolationToken_
void calculate(edm::Event &evt, reco::Photon &, int subdet, const reco::VertexCollection &vtxcol, const edm::EventSetup &iSetup)
std::vector< double > preselCutValuesBarrel_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Detector
Definition: DetId.h:26
std::vector< double > preselCutValuesEndcap_
std::string candidateP4type_
edm::EDGetTokenT< edm::ValueMap< float > > phoPFECALClusIsolationToken_
bool isUninitialized() const
Definition: EDGetToken.h:73
void GEDPhotonProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
override

Definition at line 263 of file GEDPhotonProducer.cc.

References barrelEcalHits_, particleFlowSuperClusterOOTECAL_cff::barrelRecHits, endcapEcalHits_, particleFlowSuperClusterOOTECAL_cff::endcapRecHits, Exception, objects.autophobj::filler, fillPhotonCollection(), PhotonEnergyCorrector::gedRegression(), edm::EventSetup::get(), edm::Event::getByToken(), hcalTowers_, PhotonEnergyCorrector::init(), GEDPhotonProducer::RecoStepInfo::isFinal(), GEDPhotonProducer::RecoStepInfo::isOOT(), edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), edm::InputTag::label(), eostools::move(), gedPhotons_cfi::outputPhotonCollection, pfCandidates_, pfEgammaCandidates_, phoChargedIsolationTokenCITK_, phoNeutralHadronIsolationTokenCITK_, phoPFECALClusIsolationToken_, phoPFHCALClusIsolationToken_, phoPhotonIsolationTokenCITK_, photonCollection_, photonCoreProducerT_, photonProducer_, photonProducerT_, preshowerHits_, edm::Handle< T >::product(), edm::ESHandle< T >::product(), edm::Event::put(), recoStep_, theCaloGeom_, theCaloTopo_, thePhotonEnergyCorrector_, ecaldqm::topology(), usePrimaryVertex_, valueMapPFCandPhoton_, MuonErrorMatrixValues_cff::values, particleFlowSuperClusterECAL_cfi::vertexCollection, and vertexProducer_.

263  {
264 
265  using namespace edm;
266  // nEvt_++;
267 
269  auto outputPhotonCollection_p = std::make_unique<reco::PhotonCollection>();
270  edm::ValueMap<reco::PhotonRef> pfEGCandToPhotonMap;
271 
272 
273  // Get the PhotonCore collection
274  bool validPhotonCoreHandle=false;
275  Handle<reco::PhotonCoreCollection> photonCoreHandle;
276  bool validPhotonHandle= false;
277  Handle<reco::PhotonCollection> photonHandle;
278  //value maps for isolation
279  edm::Handle<edm::ValueMap<float> > phoChargedIsolationMapCITK;
280  edm::Handle<edm::ValueMap<float> > phoNeutralHadronIsolationMapCITK;
281  edm::Handle<edm::ValueMap<float> > phoPhotonIsolationMapCITK;
282  edm::Handle<edm::ValueMap<float> > phoPFECALClusIsolationMap;
283  edm::Handle<edm::ValueMap<float> > phoPFHCALClusIsolationMap;
284 
285  if ( recoStep_.isFinal() ) {
286  theEvent.getByToken(photonProducerT_,photonHandle);
287  //get isolation objects
288  theEvent.getByToken(phoChargedIsolationTokenCITK_,phoChargedIsolationMapCITK);
289  theEvent.getByToken(phoNeutralHadronIsolationTokenCITK_,phoNeutralHadronIsolationMapCITK);
290  theEvent.getByToken(phoPhotonIsolationTokenCITK_,phoPhotonIsolationMapCITK);
291  //OOT photons in legacy 80X re-miniAOD workflow dont have cluster isolation embed in them
293  theEvent.getByToken(phoPFECALClusIsolationToken_,phoPFECALClusIsolationMap);
294  }
296  theEvent.getByToken(phoPFHCALClusIsolationToken_,phoPFHCALClusIsolationMap);
297  }
298 
299  if ( photonHandle.isValid()) {
300  validPhotonHandle=true;
301  } else {
302  throw cms::Exception("GEDPhotonProducer") << "Error! Can't get the product " << photonProducer_.label() << "\n";
303  }
304  } else {
305 
306  theEvent.getByToken(photonCoreProducerT_,photonCoreHandle);
307  if (photonCoreHandle.isValid()) {
308  validPhotonCoreHandle=true;
309  } else {
310  throw cms::Exception("GEDPhotonProducer")
311  << "Error! Can't get the photonCoreProducer " << photonProducer_.label() << "\n";
312  }
313  }
314 
315  // Get EcalRecHits
316  bool validEcalRecHits=true;
317  Handle<EcalRecHitCollection> barrelHitHandle;
318  const EcalRecHitCollection dummyEB;
319  theEvent.getByToken(barrelEcalHits_, barrelHitHandle);
320  if (!barrelHitHandle.isValid()) {
321  throw cms::Exception("GEDPhotonProducer")
322  << "Error! Can't get the barrelEcalHits";
323  }
324  const EcalRecHitCollection& barrelRecHits(validEcalRecHits ? *(barrelHitHandle.product()) : dummyEB);
325 
326  Handle<EcalRecHitCollection> endcapHitHandle;
327  theEvent.getByToken(endcapEcalHits_, endcapHitHandle);
328  const EcalRecHitCollection dummyEE;
329  if (!endcapHitHandle.isValid()) {
330  throw cms::Exception("GEDPhotonProducer")
331  << "Error! Can't get the endcapEcalHits";
332  }
333  const EcalRecHitCollection& endcapRecHits(validEcalRecHits ? *(endcapHitHandle.product()) : dummyEE);
334 
335  bool validPreshowerRecHits=true;
336  Handle<EcalRecHitCollection> preshowerHitHandle;
337  theEvent.getByToken(preshowerHits_, preshowerHitHandle);
338  EcalRecHitCollection preshowerRecHits;
339  if (!preshowerHitHandle.isValid()) {
340  throw cms::Exception("GEDPhotonProducer")
341  << "Error! Can't get the preshowerEcalHits";
342  }
343  if( validPreshowerRecHits ) preshowerRecHits = *(preshowerHitHandle.product());
344 
345 
346 
347  Handle<reco::PFCandidateCollection> pfEGCandidateHandle;
348  // Get the PF refined cluster collection
350  theEvent.getByToken(pfEgammaCandidates_,pfEGCandidateHandle);
351  if (!pfEGCandidateHandle.isValid()) {
352  throw cms::Exception("GEDPhotonProducer")
353  << "Error! Can't get the pfEgammaCandidates";
354  }
355  }
356 
357  Handle<reco::PFCandidateCollection> pfCandidateHandle;
358 
359  if ( recoStep_.isFinal() ) {
360  // Get the PF candidates collection
361  theEvent.getByToken(pfCandidates_,pfCandidateHandle);
362  //OOT photons have no PF candidates so its not an error in this case
363  if (!pfCandidateHandle.isValid() && !recoStep_.isOOT()) {
364  throw cms::Exception("GEDPhotonProducer")
365  << "Error! Can't get the pfCandidates";
366  }
367  }
368 
369  //AA
370  //Get the severity level object
372  theEventSetup.get<EcalSeverityLevelAlgoRcd>().get(sevLv);
373  //
374 
375 
376 // get Hcal towers collection
377  Handle<CaloTowerCollection> hcalTowersHandle;
378  if (not hcalTowers_.isUninitialized()){
379  theEvent.getByToken(hcalTowers_, hcalTowersHandle);
380  }
381 
382  // get the geometry from the event setup:
383  theEventSetup.get<CaloGeometryRecord>().get(theCaloGeom_);
384 
385  //
386  // update energy correction function
387  // energyCorrectionF->init(theEventSetup);
388 
389  edm::ESHandle<CaloTopology> pTopology;
390  theEventSetup.get<CaloTopologyRecord>().get(theCaloTopo_);
392 
393  // Get the primary event vertex
394  Handle<reco::VertexCollection> vertexHandle;
395  const reco::VertexCollection dummyVC;
396  bool validVertex=true;
397  if ( usePrimaryVertex_ ) {
398  theEvent.getByToken(vertexProducer_, vertexHandle);
399  if (!vertexHandle.isValid()) {
400  throw cms::Exception("GEDPhotonProducer")
401  << "Error! Can't get the product primary Vertex Collection";
402  }
403  }
404  const reco::VertexCollection& vertexCollection(usePrimaryVertex_ && validVertex ? *(vertexHandle.product()) : dummyVC);
405 
406  // math::XYZPoint vtx(0.,0.,0.);
407  //if (vertexCollection.size()>0) vtx = vertexCollection.begin()->position();
408 
409  // get the regression calculator ready
410  thePhotonEnergyCorrector_->init(theEventSetup);
412  thePhotonEnergyCorrector_->gedRegression()->setEvent(theEvent);
413  thePhotonEnergyCorrector_->gedRegression()->setEventContent(theEventSetup);
414  }
415 
416 
417  int iSC=0; // index in photon collection
418  // Loop over barrel and endcap SC collections and fill the photon collection
419  if ( validPhotonCoreHandle)
420  fillPhotonCollection(theEvent,
421  theEventSetup,
422  photonCoreHandle,
423  topology,
424  &barrelRecHits,
425  &endcapRecHits,
426  &preshowerRecHits,
427  hcalTowersHandle,
428  //vtx,
430  outputPhotonCollection,
431  iSC);
432 
433  iSC=0;
434  if ( validPhotonHandle && recoStep_.isFinal() )
435  fillPhotonCollection(theEvent,
436  theEventSetup,
437  photonHandle,
438  pfCandidateHandle,
439  pfEGCandidateHandle,
440  pfEGCandToPhotonMap,
441  vertexHandle,
442  outputPhotonCollection,
443  iSC,
444  phoChargedIsolationMapCITK,
445  phoNeutralHadronIsolationMapCITK,
446  phoPhotonIsolationMapCITK,
447  phoPFECALClusIsolationMap,
448  phoPFHCALClusIsolationMap);
449 
450 
451 
452  // put the product in the event
453  edm::LogInfo("GEDPhotonProducer") << " Put in the event " << iSC << " Photon Candidates \n";
454  outputPhotonCollection_p->assign(outputPhotonCollection.begin(),outputPhotonCollection.end());
455  const edm::OrphanHandle<reco::PhotonCollection> photonOrphHandle = theEvent.put(std::move(outputPhotonCollection_p), photonCollection_);
456 
457 
460  auto pfEGCandToPhotonMap_p = std::make_unique<edm::ValueMap<reco::PhotonRef>>();
461  edm::ValueMap<reco::PhotonRef>::Filler filler(*pfEGCandToPhotonMap_p);
462  unsigned nObj = pfEGCandidateHandle->size();
463  std::vector<reco::PhotonRef> values(nObj);
465  for(unsigned int lCand=0; lCand < nObj; lCand++) {
466  reco::PFCandidateRef pfCandRef (reco::PFCandidateRef(pfEGCandidateHandle,lCand));
467  reco::SuperClusterRef pfScRef = pfCandRef -> superClusterRef();
468 
469  for(unsigned int lSC=0; lSC < photonOrphHandle->size(); lSC++) {
470  reco::PhotonRef photonRef(reco::PhotonRef(photonOrphHandle, lSC));
471  reco::SuperClusterRef scRef=photonRef->superCluster();
472  if ( pfScRef != scRef ) continue;
473  values[lCand] = photonRef;
474  }
475  }
476 
477 
478  filler.insert(pfEGCandidateHandle,values.begin(),values.end());
479  filler.fill();
480  theEvent.put(std::move(pfEGCandToPhotonMap_p),valueMapPFCandPhoton_);
481 
482 
483  }
484 
485 
486 
487 
488 
489 
490 }
edm::EDGetTokenT< edm::ValueMap< float > > phoNeutralHadronIsolationTokenCITK_
edm::InputTag photonProducer_
PhotonEnergyCorrector * thePhotonEnergyCorrector_
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
edm::ESHandle< CaloGeometry > theCaloGeom_
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
CaloTopology const * topology(0)
RecoStepInfo recoStep_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::unique_ptr< ModifyObjectValueBase > & gedRegression()
std::string photonCollection_
edm::EDGetTokenT< edm::ValueMap< float > > phoPhotonIsolationTokenCITK_
edm::ESHandle< CaloTopology > theCaloTopo_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
edm::EDGetTokenT< edm::ValueMap< float > > phoPFHCALClusIsolationToken_
void init(const edm::EventSetup &theEventSetup)
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_
T const * product() const
Definition: Handle.h:81
edm::EDGetTokenT< reco::PhotonCollection > photonProducerT_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedIsolationTokenCITK_
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
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 edm::Handle< CaloTowerCollection > &hcalTowersHandle, const reco::VertexCollection &pvVertices, reco::PhotonCollection &outputCollection, int &iSC)
std::string const & label() const
Definition: InputTag.h:36
HLT enums.
edm::EDGetTokenT< edm::ValueMap< float > > phoPFECALClusIsolationToken_
bool isUninitialized() const
Definition: EDGetToken.h:73
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
T const * product() const
Definition: ESHandle.h:86
edm::EDGetTokenT< EcalRecHitCollection > preshowerHits_
def move(src, dest)
Definition: eostools.py:510
std::string valueMapPFCandPhoton_

Member Data Documentation

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

Definition at line 102 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), GEDPhotonProducer(), and produce().

std::string GEDPhotonProducer::candidateP4type_
private

Definition at line 161 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

bool GEDPhotonProducer::checkHcalStatus_
private

Definition at line 163 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

edm::ParameterSet GEDPhotonProducer::conf_
private

Definition at line 145 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

std::string GEDPhotonProducer::conversionCollection_
private

Definition at line 119 of file GEDPhotonProducer.h.

std::string GEDPhotonProducer::conversionProducer_
private

Definition at line 118 of file GEDPhotonProducer.h.

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

Definition at line 103 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), GEDPhotonProducer(), and produce().

EcalClusterFunctionBaseClass* GEDPhotonProducer::energyCorrectionF
private

Definition at line 159 of file GEDPhotonProducer.h.

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

Definition at line 127 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 128 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

edm::EDGetTokenT<CaloTowerCollection> GEDPhotonProducer::hcalTowers_
private

Definition at line 107 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), GEDPhotonProducer(), and produce().

double GEDPhotonProducer::highEt_
private

Definition at line 136 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

double GEDPhotonProducer::hOverEConeSize_
private

Definition at line 133 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

double GEDPhotonProducer::maxHOverE_
private

Definition at line 134 of file GEDPhotonProducer.h.

double GEDPhotonProducer::minR9Barrel_
private

Definition at line 137 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

double GEDPhotonProducer::minR9Endcap_
private

Definition at line 138 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

double GEDPhotonProducer::minSCEt_
private

Definition at line 135 of file GEDPhotonProducer.h.

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

Definition at line 110 of file GEDPhotonProducer.h.

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

Definition at line 106 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 105 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 112 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 113 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 115 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), GEDPhotonProducer(), and produce().

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

Definition at line 116 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), GEDPhotonProducer(), and produce().

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

Definition at line 114 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

std::string GEDPhotonProducer::photonCollection_
private

Definition at line 97 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 100 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

edm::InputTag GEDPhotonProducer::photonProducer_
private

Definition at line 98 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 101 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

PositionCalc GEDPhotonProducer::posCalculator_
private

Definition at line 146 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

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

Definition at line 156 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 157 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 104 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), GEDPhotonProducer(), and produce().

RecoStepInfo GEDPhotonProducer::recoStep_
private

Definition at line 142 of file GEDPhotonProducer.h.

Referenced by beginRun(), fillPhotonCollection(), GEDPhotonProducer(), and produce().

bool GEDPhotonProducer::runMIPTagger_
private

Definition at line 139 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 129 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 130 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

edm::ESHandle<CaloGeometry> GEDPhotonProducer::theCaloGeom_
private

Definition at line 148 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and produce().

edm::ESHandle<CaloTopology> GEDPhotonProducer::theCaloTopo_
private

Definition at line 149 of file GEDPhotonProducer.h.

Referenced by produce().

PhotonEnergyCorrector* GEDPhotonProducer::thePhotonEnergyCorrector_
private
PhotonIsolationCalculator* GEDPhotonProducer::thePhotonIsolationCalculator_
private
PhotonMIPHaloTagger* GEDPhotonProducer::thePhotonMIPHaloTagger_
private
bool GEDPhotonProducer::usePrimaryVertex_
private

Definition at line 144 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

bool GEDPhotonProducer::validConversions_
private

Definition at line 141 of file GEDPhotonProducer.h.

bool GEDPhotonProducer::validPixelSeeds_
private

Definition at line 151 of file GEDPhotonProducer.h.

std::string GEDPhotonProducer::valueMapPFCandPhoton_
private

Definition at line 120 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 108 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().