CMS 3D CMS Logo

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

#include <GEDPhotonProducer.h>

Inheritance diagram for GEDPhotonProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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

Private Attributes

edm::EDGetTokenT< EcalRecHitCollectionbarrelEcalHits_
 
std::string candidateP4type_
 
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 > > phoChargedIsolationToken_CITK
 
edm::EDGetTokenT< edm::ValueMap< float > > phoNeutralHadronIsolationToken_CITK
 
edm::EDGetTokenT< edm::ValueMap< float > > phoPhotonIsolationToken_CITK
 
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_
 
std::string reconstructionStep_
 
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
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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 55 of file GEDPhotonProducer.cc.

References barrelEcalHits_, candidateP4type_, conf_, edm::EDConsumerBase::consumesCollector(), endcapEcalHits_, edm::ParameterSet::existsAs(), flagsexclEB_, flagsexclEE_, edm::ParameterSet::getParameter(), hcalTowers_, highEt_, hOverEConeSize_, gedPhotons_cfi::isolationSumsCalculatorSet, edm::EDGetTokenT< T >::isUninitialized(), minR9Barrel_, minR9Endcap_, gedPhotons_cfi::mipVariableSet, pfCandidates_, pfEgammaCandidates_, phoChargedIsolationToken_CITK, phoNeutralHadronIsolationToken_CITK, phoPhotonIsolationToken_CITK, photonCollection_, photonCoreProducerT_, photonProducer_, photonProducerT_, cleanAndMergeSuperClusters_cfi::posCalcParameters, posCalculator_, preselCutValuesBarrel_, preselCutValuesEndcap_, preshowerHits_, edm::ProductRegistryHelper::produces(), reconstructionStep_, runMIPTagger_, PhotonMIPHaloTagger::setup(), PhotonIsolationCalculator::setup(), severitiesexclEB_, severitiesexclEE_, AlCaHLTBitMon_QueryRunRegistry::string, thePhotonEnergyCorrector_, thePhotonIsolationCalculator_, thePhotonMIPHaloTagger_, usePrimaryVertex_, valueMapPFCandPhoton_, and vertexProducer_.

55  :
56 
57  conf_(config)
58 {
59 
60  // use configuration file to setup input/output collection names
61  //
62  photonProducer_ = conf_.getParameter<edm::InputTag>("photonProducer");
63  reconstructionStep_ = conf_.getParameter<std::string>("reconstructionStep");
64 
65  if ( reconstructionStep_ == "final" ) {
67  consumes<reco::PhotonCollection>(photonProducer_);
68  pfCandidates_ =
69  consumes<reco::PFCandidateCollection>(conf_.getParameter<edm::InputTag>("pfCandidates"));
70 
72  consumes<edm::ValueMap<float>>(conf_.getParameter<edm::InputTag>("chargedHadronIsolation"));
74  consumes<edm::ValueMap<float>>(conf_.getParameter<edm::InputTag>("neutralHadronIsolation"));
76  consumes<edm::ValueMap<float>>(conf_.getParameter<edm::InputTag>("photonIsolation"));
77 
78  } else {
79 
81  consumes<reco::PhotonCoreCollection>(photonProducer_);
82 
83  }
84 
85  auto pfEg = conf_.getParameter<edm::InputTag>("pfEgammaCandidates");
86  if (not pfEg.label().empty())
88  consumes<reco::PFCandidateCollection>(pfEg);
90  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("barrelEcalHits"));
92  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("endcapEcalHits"));
94  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("preshowerHits"));
96  consumes<reco::VertexCollection>(conf_.getParameter<edm::InputTag>("primaryVertexProducer"));
97 
98  auto hcTow = conf_.getParameter<edm::InputTag>("hcalTowers");
99  if (not hcTow.label().empty())
100  hcalTowers_ =
101  consumes<CaloTowerCollection>(hcTow);
102  //
103  photonCollection_ = conf_.getParameter<std::string>("outputPhotonCollection");
104  hOverEConeSize_ = conf_.getParameter<double>("hOverEConeSize");
105  highEt_ = conf_.getParameter<double>("highEt");
106  // R9 value to decide converted/unconverted
107  minR9Barrel_ = conf_.getParameter<double>("minR9Barrel");
108  minR9Endcap_ = conf_.getParameter<double>("minR9Endcap");
109  usePrimaryVertex_ = conf_.getParameter<bool>("usePrimaryVertex");
110  runMIPTagger_ = conf_.getParameter<bool>("runMIPTagger");
111 
112  candidateP4type_ = config.getParameter<std::string>("candidateP4type") ;
113  valueMapPFCandPhoton_ = config.getParameter<std::string>("valueMapPhotons");
114 
115 
117  config.getParameter<edm::ParameterSet>("posCalcParameters");
118  posCalculator_ = PositionCalc(posCalcParameters);
119 
120 
121  //AA
122  //Flags and Severities to be excluded from photon calculations
123  const std::vector<std::string> flagnamesEB =
124  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEB");
125 
126  const std::vector<std::string> flagnamesEE =
127  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEE");
128 
129  flagsexclEB_=
130  StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
131 
132  flagsexclEE_=
133  StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
134 
135  const std::vector<std::string> severitynamesEB =
136  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEB");
137 
139  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
140 
141  const std::vector<std::string> severitynamesEE =
142  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEE");
143 
145  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
146 
149  if( conf_.existsAs<edm::ParameterSet>("regressionConfig") ) {
150  auto sumes = consumesCollector();
151  thePhotonEnergyCorrector_->gedRegression()->setConsumes(sumes);
152  }
153 
154  //AA
155 
156  //
157 
158  // Parameters for the position calculation:
159  // std::map<std::string,double> providedParameters;
160  // providedParameters.insert(std::make_pair("LogWeighted",conf_.getParameter<bool>("posCalc_logweight")));
161  //providedParameters.insert(std::make_pair("T0_barl",conf_.getParameter<double>("posCalc_t0_barl")));
162  //providedParameters.insert(std::make_pair("T0_endc",conf_.getParameter<double>("posCalc_t0_endc")));
163  //providedParameters.insert(std::make_pair("T0_endcPresh",conf_.getParameter<double>("posCalc_t0_endcPresh")));
164  //providedParameters.insert(std::make_pair("W0",conf_.getParameter<double>("posCalc_w0")));
165  //providedParameters.insert(std::make_pair("X0",conf_.getParameter<double>("posCalc_x0")));
166  //posCalculator_ = PositionCalc(providedParameters);
167  // cut values for pre-selection
168  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("minSCEtBarrel"));
169  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("maxHoverEBarrel"));
170  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetBarrel"));
171  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeBarrel"));
172  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetBarrel"));
173  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeBarrel"));
174  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackSolidConeBarrel"));
175  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackHollowConeBarrel"));
176  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumSolidConeBarrel"));
177  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumHollowConeBarrel"));
178  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutBarrel"));
179  //
180  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("minSCEtEndcap"));
181  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("maxHoverEEndcap"));
182  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetEndcap"));
183  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeEndcap"));
184  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetEndcap"));
185  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeEndcap"));
186  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackSolidConeEndcap"));
187  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackHollowConeEndcap"));
188  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumSolidConeEndcap"));
189  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumHollowConeEndcap"));
190  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutEndcap"));
191  //
192 
193  //moved from beginRun to here, I dont see how this could cause harm as its just reading in the exactly same parameters each run
194  if ( reconstructionStep_ != "final"){
197  thePhotonIsolationCalculator_->setup(isolationSumsCalculatorSet, flagsexclEB_, flagsexclEE_, severitiesexclEB_, severitiesexclEE_,consumesCollector());
201 
202  }else{
204  thePhotonMIPHaloTagger_=nullptr;
205  }
206  // Register the product
207  produces< reco::PhotonCollection >(photonCollection_);
209  produces< edm::ValueMap<reco::PhotonRef> > (valueMapPFCandPhoton_);
210 
211 
212 }
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_
edm::EDGetTokenT< edm::ValueMap< float > > phoPhotonIsolationToken_CITK
std::vector< int > flagsexclEB_
Definition: config.py:1
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::string reconstructionStep_
PhotonIsolationCalculator * thePhotonIsolationCalculator_
std::vector< int > severitiesexclEE_
std::string photonCollection_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
PositionCalc posCalculator_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
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)
TypeLabelItem const & produces()
declare what type of product will make and with which optional label
std::vector< int > flagsexclEE_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedIsolationToken_CITK
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_
std::vector< double > preselCutValuesEndcap_
std::string candidateP4type_
edm::EDGetTokenT< edm::ValueMap< float > > phoNeutralHadronIsolationToken_CITK
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 214 of file GEDPhotonProducer.cc.

References thePhotonEnergyCorrector_, thePhotonIsolationCalculator_, and thePhotonMIPHaloTagger_.

215 {
219  //delete energyCorrectionF;
220 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
PhotonMIPHaloTagger * thePhotonMIPHaloTagger_
PhotonIsolationCalculator * thePhotonIsolationCalculator_

Member Function Documentation

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

Reimplemented from edm::stream::EDProducerBase.

Definition at line 224 of file GEDPhotonProducer.cc.

References init, reconstructionStep_, and thePhotonEnergyCorrector_.

224  {
225 
226  if ( reconstructionStep_ != "final" ) {
227  thePhotonEnergyCorrector_ -> init(theEventSetup);
228  }
229 
230 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
int init
Definition: HydjetWrapper.h:67
std::string reconstructionStep_
void GEDPhotonProducer::endRun ( edm::Run const &  r,
edm::EventSetup const &  theEventSetup 
)
finalvirtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 232 of file GEDPhotonProducer.cc.

232  {
233 }
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 452 of file GEDPhotonProducer.cc.

References barrelEcalHits_, PhotonIsolationCalculator::calculate(), PhotonEnergyCorrector::calculate(), candidateP4type_, 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_, DetId::Forward, geometry, EgammaHadTower::getDepth1HcalESum(), EgammaHadTower::getDepth2HcalESum(), EgammaTowerIsolation::getTowerESum(), DetId::Hcal, 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::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().

461  {
462 
463 
466  std::vector<double> preselCutValues;
467  std::vector<int> flags_, severitiesexcl_;
468 
469  for(unsigned int lSC=0; lSC < photonCoreHandle->size(); lSC++) {
470 
471  reco::PhotonCoreRef coreRef(reco::PhotonCoreRef(photonCoreHandle, lSC));
472  reco::SuperClusterRef parentSCRef = coreRef->parentSuperCluster();
473  reco::SuperClusterRef scRef=coreRef->superCluster();
474 
475 
476 
477  // const reco::SuperCluster* pClus=&(*scRef);
478  iSC++;
479 
480  int thedet = scRef->seed()->hitsAndFractions()[0].first.det();
481  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
482  if (subdet==EcalBarrel) {
483  preselCutValues = preselCutValuesBarrel_;
484  hits = ecalBarrelHits;
485  flags_ = flagsexclEB_;
486  severitiesexcl_ = severitiesexclEB_;
487  } else if (subdet==EcalEndcap) {
488  preselCutValues = preselCutValuesEndcap_;
489  hits = ecalEndcapHits;
490  flags_ = flagsexclEE_;
491  severitiesexcl_ = severitiesexclEE_;
492  } else if ( thedet == DetId::Forward || thedet == DetId::Hcal) {
493  preselCutValues = preselCutValuesEndcap_;
494  hits = nullptr;
495  flags_ = flagsexclEE_;
496  severitiesexcl_ = severitiesexclEE_;
497  } else {
498  edm::LogWarning("")<<"GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster" << thedet << ' ' << subdet;
499  }
500 
501 
502 
503 
504  // SC energy preselection
505  if (parentSCRef.isNonnull() &&
506  ptFast(parentSCRef->energy(),parentSCRef->position(),math::XYZPoint(0,0,0)) <= preselCutValues[0] ) continue;
507  // calculate HoE
508 
509  double HoE1,HoE2;
510  HoE1=HoE2=0.;
511 
512  std::vector<CaloTowerDetId> TowersBehindClus;
513  float hcalDepth1OverEcalBc,hcalDepth2OverEcalBc;
514  hcalDepth1OverEcalBc=hcalDepth2OverEcalBc=0.f;
515 
516  if (not hcalTowers_.isUninitialized()) {
517  const CaloTowerCollection* hcalTowersColl = hcalTowersHandle.product();
518  EgammaTowerIsolation towerIso1(hOverEConeSize_,0.,0.,1,hcalTowersColl) ;
519  EgammaTowerIsolation towerIso2(hOverEConeSize_,0.,0.,2,hcalTowersColl) ;
520  HoE1=towerIso1.getTowerESum(&(*scRef))/scRef->energy();
521  HoE2=towerIso2.getTowerESum(&(*scRef))/scRef->energy();
522 
523  EgammaHadTower towerIsoBehindClus(es);
524  towerIsoBehindClus.setTowerCollection(hcalTowersHandle.product());
525  TowersBehindClus = towerIsoBehindClus.towersOf(*scRef);
526  hcalDepth1OverEcalBc = towerIsoBehindClus.getDepth1HcalESum(TowersBehindClus)/scRef->energy();
527  hcalDepth2OverEcalBc = towerIsoBehindClus.getDepth2HcalESum(TowersBehindClus)/scRef->energy();
528  }
529 
530  // std::cout << " GEDPhotonProducer calculation of HoE with towers in a cone " << HoE1 << " " << HoE2 << std::endl;
531  //std::cout << " GEDPhotonProducer calcualtion of HoE with towers behind the BCs " << hcalDepth1OverEcalBc << " " << hcalDepth2OverEcalBc << std::endl;
532 
533  float maxXtal = ( hits != nullptr ? EcalClusterTools::eMax( *(scRef->seed()), &(*hits) ) : 0.f );
534  //AA
535  //Change these to consider severity level of hits
536  float e1x5 = ( hits != nullptr ? EcalClusterTools::e1x5( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
537  float e2x5 = ( hits != nullptr ? EcalClusterTools::e2x5Max( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
538  float e3x3 = ( hits != nullptr ? EcalClusterTools::e3x3( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
539  float e5x5 = ( hits != nullptr ? EcalClusterTools::e5x5( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
540  std::vector<float> cov = ( hits != nullptr ? EcalClusterTools::covariances( *(scRef->seed()), &(*hits), &(*topology), geometry) : std::vector<float>( {0.f,0.f,0.f} ) );
541  std::vector<float> locCov = ( hits != nullptr ? EcalClusterTools::localCovariances( *(scRef->seed()), &(*hits), &(*topology)) : std::vector<float>( {0.f,0.f,0.f} ) );
542 
543  float sigmaEtaEta = sqrt(cov[0]);
544  float sigmaIetaIeta = sqrt(locCov[0]);
545 
546  float full5x5_maxXtal = ( hits != nullptr ? noZS::EcalClusterTools::eMax( *(scRef->seed()), &(*hits) ) : 0.f );
547  //AA
548  //Change these to consider severity level of hits
549  float full5x5_e1x5 = ( hits != nullptr ? noZS::EcalClusterTools::e1x5( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
550  float full5x5_e2x5 = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Max( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
551  float full5x5_e3x3 = ( hits != nullptr ? noZS::EcalClusterTools::e3x3( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
552  float full5x5_e5x5 = ( hits != nullptr ? noZS::EcalClusterTools::e5x5( *(scRef->seed()), &(*hits), &(*topology)) : 0.f );
553  std::vector<float> full5x5_cov = ( hits != nullptr ? noZS::EcalClusterTools::covariances( *(scRef->seed()), &(*hits), &(*topology), geometry) : std::vector<float>( {0.f,0.f,0.f} ) );
554  std::vector<float> full5x5_locCov = ( hits != nullptr ? noZS::EcalClusterTools::localCovariances( *(scRef->seed()), &(*hits), &(*topology)) : std::vector<float>( {0.f,0.f,0.f} ) );
555 
556  float full5x5_sigmaEtaEta = sqrt(full5x5_cov[0]);
557  float full5x5_sigmaIetaIeta = sqrt(full5x5_locCov[0]);
558 
559  // compute position of ECAL shower
560  math::XYZPoint caloPosition = scRef->position();
561 
562 
564  double photonEnergy=1.;
565  math::XYZPoint vtx(0.,0.,0.);
566  if (!vertexCollection.empty()) vtx = vertexCollection.begin()->position();
567  // compute momentum vector of photon from primary vertex and cluster position
568  math::XYZVector direction = caloPosition - vtx;
569  //math::XYZVector momentum = direction.unit() * photonEnergy ;
570  math::XYZVector momentum = direction.unit() ;
571 
572  // Create dummy candidate with unit momentum and zero energy to allow setting of all variables. The energy is set for last.
573  math::XYZTLorentzVectorD p4(momentum.x(), momentum.y(), momentum.z(), photonEnergy );
574  reco::Photon newCandidate(p4, caloPosition, coreRef, vtx);
575 
576  //std::cout << " standard p4 before " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
577  //std::cout << " type " <<newCandidate.getCandidateP4type() << " standard p4 after " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
578 
579  // Calculate fiducial flags and isolation variable. Blocked are filled from the isolationCalculator
580  reco::Photon::FiducialFlags fiducialFlags;
581  reco::Photon::IsolationVariables isolVarR03, isolVarR04;
582  if( thedet != DetId::Forward && thedet != DetId::Hcal) {
583  thePhotonIsolationCalculator_->calculate( &newCandidate,evt,es,fiducialFlags,isolVarR04, isolVarR03);
584  }
585  newCandidate.setFiducialVolumeFlags( fiducialFlags );
586  newCandidate.setIsolationVariables(isolVarR04, isolVarR03 );
587 
588 
590  reco::Photon::ShowerShape showerShape;
591  showerShape.e1x5= e1x5;
592  showerShape.e2x5= e2x5;
593  showerShape.e3x3= e3x3;
594  showerShape.e5x5= e5x5;
595  showerShape.maxEnergyXtal = maxXtal;
596  showerShape.sigmaEtaEta = sigmaEtaEta;
597  showerShape.sigmaIetaIeta = sigmaIetaIeta;
598  showerShape.hcalDepth1OverEcal = HoE1;
599  showerShape.hcalDepth2OverEcal = HoE2;
600  showerShape.hcalDepth1OverEcalBc = hcalDepth1OverEcalBc;
601  showerShape.hcalDepth2OverEcalBc = hcalDepth2OverEcalBc;
602  showerShape.hcalTowersBehindClusters = TowersBehindClus;
604  const float spp = (!edm::isFinite(locCov[2]) ? 0. : sqrt(locCov[2]));
605  const float sep = locCov[1];
606  showerShape.sigmaIetaIphi = sep;
607  showerShape.sigmaIphiIphi = spp;
608  showerShape.e2nd = ( hits != nullptr ? EcalClusterTools::e2nd(*(scRef->seed()),&(*hits)) : 0.f );
609  showerShape.eTop = ( hits != nullptr ? EcalClusterTools::eTop(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
610  showerShape.eLeft = ( hits != nullptr ? EcalClusterTools::eLeft(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
611  showerShape.eRight = ( hits != nullptr ? EcalClusterTools::eRight(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
612  showerShape.eBottom = ( hits != nullptr ? EcalClusterTools::eBottom(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
613  showerShape.e1x3 = ( hits != nullptr ? EcalClusterTools::e1x3(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
614  showerShape.e2x2 = ( hits != nullptr ? EcalClusterTools::e2x2(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
615  showerShape.e2x5Max = ( hits != nullptr ? EcalClusterTools::e2x5Max(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
616  showerShape.e2x5Left = ( hits != nullptr ? EcalClusterTools::e2x5Left(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
617  showerShape.e2x5Right = ( hits != nullptr ? EcalClusterTools::e2x5Right(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
618  showerShape.e2x5Top = ( hits != nullptr ? EcalClusterTools::e2x5Top(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
619  showerShape.e2x5Bottom = ( hits != nullptr ? EcalClusterTools::e2x5Bottom(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
620  // fill preshower shapes
622  const float sigmaRR = toolsforES.eseffsirir( *scRef );
623  showerShape.effSigmaRR = sigmaRR;
624  newCandidate.setShowerShapeVariables ( showerShape );
625 
626  reco::Photon::SaturationInfo saturationInfo;
627  const reco::CaloCluster& seedCluster = *(scRef->seed()) ;
628  DetId seedXtalId = seedCluster.seed();
629  int nSaturatedXtals = 0;
630  bool isSeedSaturated = false;
631  if (hits != nullptr) {
632  const auto hitsAndFractions = scRef->hitsAndFractions();
633  for (auto&& hitFractionPair : hitsAndFractions) {
634  auto&& ecalRecHit = hits->find(hitFractionPair.first);
635  if (ecalRecHit == hits->end()) continue;
636  if (ecalRecHit->checkFlag(EcalRecHit::Flags::kSaturated)) {
637  nSaturatedXtals++;
638  if (seedXtalId == ecalRecHit->detid())
639  isSeedSaturated = true;
640  }
641  }
642  }
643  saturationInfo.nSaturatedXtals = nSaturatedXtals;
644  saturationInfo.isSeedSaturated = isSeedSaturated;
645  newCandidate.setSaturationInfo(saturationInfo);
646 
648  reco::Photon::ShowerShape full5x5_showerShape;
649  full5x5_showerShape.e1x5= full5x5_e1x5;
650  full5x5_showerShape.e2x5= full5x5_e2x5;
651  full5x5_showerShape.e3x3= full5x5_e3x3;
652  full5x5_showerShape.e5x5= full5x5_e5x5;
653  full5x5_showerShape.maxEnergyXtal = full5x5_maxXtal;
654  full5x5_showerShape.sigmaEtaEta = full5x5_sigmaEtaEta;
655  full5x5_showerShape.sigmaIetaIeta = full5x5_sigmaIetaIeta;
657  const float full5x5_spp = (!edm::isFinite(full5x5_locCov[2]) ? 0. : sqrt(full5x5_locCov[2]));
658  const float full5x5_sep = full5x5_locCov[1];
659  full5x5_showerShape.sigmaIetaIphi = full5x5_sep;
660  full5x5_showerShape.sigmaIphiIphi = full5x5_spp;
661  full5x5_showerShape.e2nd = ( hits != nullptr ? noZS::EcalClusterTools::e2nd(*(scRef->seed()),&(*hits)) : 0.f );
662  full5x5_showerShape.eTop = ( hits != nullptr ? noZS::EcalClusterTools::eTop(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
663  full5x5_showerShape.eLeft = ( hits != nullptr ? noZS::EcalClusterTools::eLeft(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
664  full5x5_showerShape.eRight = ( hits != nullptr ? noZS::EcalClusterTools::eRight(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
665  full5x5_showerShape.eBottom = ( hits != nullptr ? noZS::EcalClusterTools::eBottom(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
666  full5x5_showerShape.e1x3 = ( hits != nullptr ? noZS::EcalClusterTools::e1x3(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
667  full5x5_showerShape.e2x2 = ( hits != nullptr ? noZS::EcalClusterTools::e2x2(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
668  full5x5_showerShape.e2x5Max = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Max(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
669  full5x5_showerShape.e2x5Left = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Left(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
670  full5x5_showerShape.e2x5Right = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Right(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
671  full5x5_showerShape.e2x5Top = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Top(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
672  full5x5_showerShape.e2x5Bottom = ( hits != nullptr ? noZS::EcalClusterTools::e2x5Bottom(*(scRef->seed()), &(*hits), &(*topology)) : 0.f );
673  // fill preshower shapes
674  full5x5_showerShape.effSigmaRR = sigmaRR;
675  newCandidate.full5x5_setShowerShapeVariables ( full5x5_showerShape );
676 
677 
678 
681  // Photon candidate takes by default (set in photons_cfi.py)
682  // a 4-momentum derived from the ecal photon-specific corrections.
683  if( thedet != DetId::Forward && thedet != DetId::Hcal) {
684  thePhotonEnergyCorrector_->calculate(evt, newCandidate, subdet, vertexCollection, es);
685  if ( candidateP4type_ == "fromEcalEnergy") {
686  newCandidate.setP4( newCandidate.p4(reco::Photon::ecal_photons) );
687  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
688  } else if ( candidateP4type_ == "fromRegression1") {
689  newCandidate.setP4( newCandidate.p4(reco::Photon::regression1) );
690  newCandidate.setCandidateP4type(reco::Photon::regression1);
691  } else if ( candidateP4type_ == "fromRegression2") {
692  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
693  newCandidate.setCandidateP4type(reco::Photon::regression2);
694  } else if ( candidateP4type_ == "fromRefinedSCRegression" ) {
695  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
696  newCandidate.setCandidateP4type(reco::Photon::regression2);
697  }
698  } else {
699  math::XYZVector gamma_momentum = direction.unit() * scRef->energy();
700  math::XYZTLorentzVectorD p4(gamma_momentum.x(),
701  gamma_momentum.y(),
702  gamma_momentum.z(),
703  scRef->energy());
704  newCandidate.setP4(p4);
705  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
706  // Make it an EE photon
707  reco::Photon::FiducialFlags fiducialFlags;
708  fiducialFlags.isEE = true;
709  newCandidate.setFiducialVolumeFlags(fiducialFlags);
710  }
711 
712  // std::cout << " final p4 " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
713 
714 
715  // std::cout << " GEDPhotonProducer from candidate HoE with towers in a cone " << newCandidate.hadronicOverEm() << " " << newCandidate.hadronicDepth1OverEm() << " " << newCandidate.hadronicDepth2OverEm() << std::endl;
716  // std::cout << " GEDPhotonProducer from candidate of HoE with towers behind the BCs " << newCandidate.hadTowOverEm() << " " << newCandidate.hadTowDepth1OverEm() << " " << newCandidate.hadTowDepth2OverEm() << std::endl;
717 
718 
719  // fill MIP Vairables for Halo: Block for MIP are filled from PhotonMIPHaloTagger
721  if(subdet==EcalBarrel && runMIPTagger_ )
722  {
723 
724  thePhotonMIPHaloTagger_-> MIPcalculate( &newCandidate,evt,es,mipVar);
725  newCandidate.setMIPVariables(mipVar);
726  }
727 
728 
729 
731  bool isLooseEM=true;
732  if ( newCandidate.pt() < highEt_) {
733  if ( newCandidate.hadronicOverEm() >= preselCutValues[1] ) isLooseEM=false;
734  if ( newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2]+ preselCutValues[3]*newCandidate.pt() ) isLooseEM=false;
735  if ( newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4]+ preselCutValues[5]*newCandidate.pt() ) isLooseEM=false;
736  if ( newCandidate.nTrkSolidConeDR04() > int(preselCutValues[6]) ) isLooseEM=false;
737  if ( newCandidate.nTrkHollowConeDR04() > int(preselCutValues[7]) ) isLooseEM=false;
738  if ( newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8] ) isLooseEM=false;
739  if ( newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9] ) isLooseEM=false;
740  if ( newCandidate.sigmaIetaIeta() > preselCutValues[10] ) isLooseEM=false;
741  }
742 
743 
744 
745  if ( isLooseEM)
746  outputPhotonCollection.push_back(newCandidate);
747 
748 
749  }
750 }
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:205
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
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_ 
)
private

Definition at line 755 of file GEDPhotonProducer.cc.

References PhotonEnergyCorrector::calculate(), candidateP4type_, reco::Photon::PflowIsolationVariables::chargedHadronIso, reco::Photon::ecal_photons, EcalBarrel, EcalEndcap, DetId::Forward, DetId::Hcal, edm::Ref< C, T, F >::isNonnull(), reco::Photon::PflowIsolationVariables::neutralHadronIso, reco::Photon::p4(), reco::Photon::PflowIsolationVariables::photonIso, preselCutValuesBarrel_, preselCutValuesEndcap_, ptFast(), reco::Photon::regression1, reco::Photon::regression2, reco::Photon::setCandidateP4type(), reco::Photon::setP4(), reco::Photon::setPflowIDVariables(), reco::Photon::setPflowIsolationVariables(), and thePhotonEnergyCorrector_.

762  {
763 
764 
765 
766  std::vector<double> preselCutValues;
767 
768 
769  for(unsigned int lSC=0; lSC < photonHandle->size(); lSC++) {
770  reco::PhotonRef phoRef(reco::PhotonRef(photonHandle, lSC));
771  reco::SuperClusterRef parentSCRef = phoRef->parentSuperCluster();
772  reco::SuperClusterRef scRef=phoRef->superCluster();
773  int thedet = scRef->seed()->hitsAndFractions()[0].first.det();
774  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
775  if (subdet==EcalBarrel) {
776  preselCutValues = preselCutValuesBarrel_;
777  } else if (subdet==EcalEndcap) {
778  preselCutValues = preselCutValuesEndcap_;
779  } else if ( thedet == DetId::Forward || thedet == DetId::Hcal) {
780  preselCutValues = preselCutValuesEndcap_;
781  } else {
782  edm::LogWarning("")<<"GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster" << thedet << ' ' << subdet;
783  }
784 
785 
786 
787  // SC energy preselection
788  if (parentSCRef.isNonnull() &&
789  ptFast(parentSCRef->energy(),parentSCRef->position(),math::XYZPoint(0,0,0)) <= preselCutValues[0] ) continue;
790  reco::Photon newCandidate(*phoRef);
791  iSC++;
792 
793 
794  // Calculate the PF isolation and ID - for the time being there is no calculation. Only the setting
797 
798  //get the pointer for the photon object
799  edm::Ptr<reco::Photon> photonPtr(photonHandle, lSC);
800 
801  pfIso.chargedHadronIso = (*chargedHadrons_)[photonPtr] ;
802  pfIso.neutralHadronIso = (*neutralHadrons_)[photonPtr];
803  pfIso.photonIso = (*photons_)[photonPtr];
804  newCandidate.setPflowIsolationVariables(pfIso);
805  newCandidate.setPflowIDVariables(pfID);
806 
807 
808  // do the regression
809  thePhotonEnergyCorrector_->calculate(evt, newCandidate, subdet, *vertexHandle, es);
810  if ( candidateP4type_ == "fromEcalEnergy") {
811  newCandidate.setP4( newCandidate.p4(reco::Photon::ecal_photons) );
812  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
813  } else if ( candidateP4type_ == "fromRegression1") {
814  newCandidate.setP4( newCandidate.p4(reco::Photon::regression1) );
815  newCandidate.setCandidateP4type(reco::Photon::regression1);
816  } else if ( candidateP4type_ == "fromRegression2") {
817  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
818  newCandidate.setCandidateP4type(reco::Photon::regression2);
819  } else if ( candidateP4type_ == "fromRefinedSCRegression" ) {
820  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
821  newCandidate.setCandidateP4type(reco::Photon::regression2);
822  }
823 
824  // std::cout << " GEDPhotonProducer pf based isolation chargedHadron " << newCandidate.chargedHadronIso() << " neutralHadron " << newCandidate.neutralHadronIso() << " Photon " << newCandidate.photonIso() << std::endl;
825  //std::cout << " GEDPhotonProducer from candidate HoE with towers in a cone " << newCandidate.hadronicOverEm() << " " << newCandidate.hadronicDepth1OverEm() << " " << newCandidate.hadronicDepth2OverEm() << std::endl;
826  //std::cout << " GEDPhotonProducer from candidate of HoE with towers behind the BCs " << newCandidate.hadTowOverEm() << " " << newCandidate.hadTowDepth1OverEm() << " " << newCandidate.hadTowDepth2OverEm() << std::endl;
827  //std::cout << " standard p4 before " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
828  //std::cout << " type " <<newCandidate.getCandidateP4type() << " standard p4 after " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
829  //std::cout << " final p4 " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
830 
831  outputPhotonCollection.push_back(newCandidate);
832 
833  }
834 
835 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
double ptFast(const double energy, const math::XYZPoint &position, const math::XYZPoint &origin)
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
std::vector< double > preselCutValuesEndcap_
std::string candidateP4type_
void GEDPhotonProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
override

Definition at line 236 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(), edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), edm::InputTag::label(), eostools::move(), gedPhotons_cfi::outputPhotonCollection, pfCandidates_, pfEgammaCandidates_, phoChargedIsolationToken_CITK, phoNeutralHadronIsolationToken_CITK, phoPhotonIsolationToken_CITK, photonCollection_, photonCoreProducerT_, photonProducer_, photonProducerT_, preshowerHits_, edm::Handle< T >::product(), edm::ESHandle< T >::product(), edm::Event::put(), reconstructionStep_, theCaloGeom_, theCaloTopo_, thePhotonEnergyCorrector_, ecaldqm::topology(), usePrimaryVertex_, valueMapPFCandPhoton_, MuonErrorMatrixValues_cff::values, particleFlowSuperClusterECAL_cfi::vertexCollection, and vertexProducer_.

236  {
237 
238  using namespace edm;
239  // nEvt_++;
240 
242  auto outputPhotonCollection_p = std::make_unique<reco::PhotonCollection>();
243  edm::ValueMap<reco::PhotonRef> pfEGCandToPhotonMap;
244 
245 
246  // Get the PhotonCore collection
247  bool validPhotonCoreHandle=false;
248  Handle<reco::PhotonCoreCollection> photonCoreHandle;
249  bool validPhotonHandle= false;
250  Handle<reco::PhotonCollection> photonHandle;
251  //value maps for isolation
252  edm::Handle<edm::ValueMap<float> > phoChargedIsolationMap_CITK;
253  edm::Handle<edm::ValueMap<float> > phoNeutralHadronIsolationMap_CITK;
254  edm::Handle<edm::ValueMap<float> > phoPhotonIsolationMap_CITK;
255 
256  if ( reconstructionStep_ == "final" ) {
257  theEvent.getByToken(photonProducerT_,photonHandle);
258  //get isolation objects
259  theEvent.getByToken(phoChargedIsolationToken_CITK,phoChargedIsolationMap_CITK);
260  theEvent.getByToken(phoNeutralHadronIsolationToken_CITK,phoNeutralHadronIsolationMap_CITK);
261  theEvent.getByToken(phoPhotonIsolationToken_CITK,phoPhotonIsolationMap_CITK);
262  if ( photonHandle.isValid()) {
263  validPhotonHandle=true;
264  } else {
265  throw cms::Exception("GEDPhotonProducer") << "Error! Can't get the product " << photonProducer_.label() << "\n";
266  }
267  } else {
268 
269  theEvent.getByToken(photonCoreProducerT_,photonCoreHandle);
270  if (photonCoreHandle.isValid()) {
271  validPhotonCoreHandle=true;
272  } else {
273  throw cms::Exception("GEDPhotonProducer")
274  << "Error! Can't get the photonCoreProducer" << photonProducer_.label() << "\n";
275  }
276  }
277 
278  // Get EcalRecHits
279  bool validEcalRecHits=true;
280  Handle<EcalRecHitCollection> barrelHitHandle;
281  const EcalRecHitCollection dummyEB;
282  theEvent.getByToken(barrelEcalHits_, barrelHitHandle);
283  if (!barrelHitHandle.isValid()) {
284  throw cms::Exception("GEDPhotonProducer")
285  << "Error! Can't get the barrelEcalHits";
286  }
287  const EcalRecHitCollection& barrelRecHits(validEcalRecHits ? *(barrelHitHandle.product()) : dummyEB);
288 
289  Handle<EcalRecHitCollection> endcapHitHandle;
290  theEvent.getByToken(endcapEcalHits_, endcapHitHandle);
291  const EcalRecHitCollection dummyEE;
292  if (!endcapHitHandle.isValid()) {
293  throw cms::Exception("GEDPhotonProducer")
294  << "Error! Can't get the endcapEcalHits";
295  }
296  const EcalRecHitCollection& endcapRecHits(validEcalRecHits ? *(endcapHitHandle.product()) : dummyEE);
297 
298  bool validPreshowerRecHits=true;
299  Handle<EcalRecHitCollection> preshowerHitHandle;
300  theEvent.getByToken(preshowerHits_, preshowerHitHandle);
301  EcalRecHitCollection preshowerRecHits;
302  if (!preshowerHitHandle.isValid()) {
303  throw cms::Exception("GEDPhotonProducer")
304  << "Error! Can't get the preshowerEcalHits";
305  }
306  if( validPreshowerRecHits ) preshowerRecHits = *(preshowerHitHandle.product());
307 
308 
309 
310  Handle<reco::PFCandidateCollection> pfEGCandidateHandle;
311  // Get the PF refined cluster collection
313  theEvent.getByToken(pfEgammaCandidates_,pfEGCandidateHandle);
314  if (!pfEGCandidateHandle.isValid()) {
315  throw cms::Exception("GEDPhotonProducer")
316  << "Error! Can't get the pfEgammaCandidates";
317  }
318  }
319 
320  Handle<reco::PFCandidateCollection> pfCandidateHandle;
321 
322  if ( reconstructionStep_ == "final" ) {
323  // Get the PF candidates collection
324  theEvent.getByToken(pfCandidates_,pfCandidateHandle);
325  if (!pfCandidateHandle.isValid()) {
326  throw cms::Exception("GEDPhotonProducer")
327  << "Error! Can't get the pfCandidates";
328  }
329  }
330 
331  //AA
332  //Get the severity level object
334  theEventSetup.get<EcalSeverityLevelAlgoRcd>().get(sevLv);
335  //
336 
337 
338 // get Hcal towers collection
339  Handle<CaloTowerCollection> hcalTowersHandle;
340  if (not hcalTowers_.isUninitialized()){
341  theEvent.getByToken(hcalTowers_, hcalTowersHandle);
342  }
343 
344  // get the geometry from the event setup:
345  theEventSetup.get<CaloGeometryRecord>().get(theCaloGeom_);
346 
347  //
348  // update energy correction function
349  // energyCorrectionF->init(theEventSetup);
350 
351  edm::ESHandle<CaloTopology> pTopology;
352  theEventSetup.get<CaloTopologyRecord>().get(theCaloTopo_);
354 
355  // Get the primary event vertex
356  Handle<reco::VertexCollection> vertexHandle;
357  const reco::VertexCollection dummyVC;
358  bool validVertex=true;
359  if ( usePrimaryVertex_ ) {
360  theEvent.getByToken(vertexProducer_, vertexHandle);
361  if (!vertexHandle.isValid()) {
362  throw cms::Exception("GEDPhotonProducer")
363  << "Error! Can't get the product primary Vertex Collection";
364  }
365  }
366  const reco::VertexCollection& vertexCollection(usePrimaryVertex_ && validVertex ? *(vertexHandle.product()) : dummyVC);
367 
368  // math::XYZPoint vtx(0.,0.,0.);
369  //if (vertexCollection.size()>0) vtx = vertexCollection.begin()->position();
370 
371  // get the regression calculator ready
372  thePhotonEnergyCorrector_->init(theEventSetup);
374  thePhotonEnergyCorrector_->gedRegression()->setEvent(theEvent);
375  thePhotonEnergyCorrector_->gedRegression()->setEventContent(theEventSetup);
376  }
377 
378 
379  int iSC=0; // index in photon collection
380  // Loop over barrel and endcap SC collections and fill the photon collection
381  if ( validPhotonCoreHandle)
382  fillPhotonCollection(theEvent,
383  theEventSetup,
384  photonCoreHandle,
385  topology,
386  &barrelRecHits,
387  &endcapRecHits,
388  &preshowerRecHits,
389  hcalTowersHandle,
390  //vtx,
392  outputPhotonCollection,
393  iSC);
394 
395  iSC=0;
396  if ( validPhotonHandle && reconstructionStep_ == "final" )
397  fillPhotonCollection(theEvent,
398  theEventSetup,
399  photonHandle,
400  pfCandidateHandle,
401  pfEGCandidateHandle,
402  pfEGCandToPhotonMap,
403  vertexHandle,
404  outputPhotonCollection,
405  iSC,
406  phoChargedIsolationMap_CITK,
407  phoNeutralHadronIsolationMap_CITK,
408  phoPhotonIsolationMap_CITK);
409 
410 
411 
412  // put the product in the event
413  edm::LogInfo("GEDPhotonProducer") << " Put in the event " << iSC << " Photon Candidates \n";
414  outputPhotonCollection_p->assign(outputPhotonCollection.begin(),outputPhotonCollection.end());
415  const edm::OrphanHandle<reco::PhotonCollection> photonOrphHandle = theEvent.put(std::move(outputPhotonCollection_p), photonCollection_);
416 
417 
418  if ( reconstructionStep_ != "final" && not pfEgammaCandidates_.isUninitialized()) {
420  auto pfEGCandToPhotonMap_p = std::make_unique<edm::ValueMap<reco::PhotonRef>>();
421  edm::ValueMap<reco::PhotonRef>::Filler filler(*pfEGCandToPhotonMap_p);
422  unsigned nObj = pfEGCandidateHandle->size();
423  std::vector<reco::PhotonRef> values(nObj);
425  for(unsigned int lCand=0; lCand < nObj; lCand++) {
426  reco::PFCandidateRef pfCandRef (reco::PFCandidateRef(pfEGCandidateHandle,lCand));
427  reco::SuperClusterRef pfScRef = pfCandRef -> superClusterRef();
428 
429  for(unsigned int lSC=0; lSC < photonOrphHandle->size(); lSC++) {
430  reco::PhotonRef photonRef(reco::PhotonRef(photonOrphHandle, lSC));
431  reco::SuperClusterRef scRef=photonRef->superCluster();
432  if ( pfScRef != scRef ) continue;
433  values[lCand] = photonRef;
434  }
435  }
436 
437 
438  filler.insert(pfEGCandidateHandle,values.begin(),values.end());
439  filler.fill();
440  theEvent.put(std::move(pfEGCandToPhotonMap_p),valueMapPFCandPhoton_);
441 
442 
443  }
444 
445 
446 
447 
448 
449 
450 }
edm::InputTag photonProducer_
PhotonEnergyCorrector * thePhotonEnergyCorrector_
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
edm::ESHandle< CaloGeometry > theCaloGeom_
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
CaloTopology const * topology(0)
edm::EDGetTokenT< edm::ValueMap< float > > phoPhotonIsolationToken_CITK
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::string reconstructionStep_
std::unique_ptr< ModifyObjectValueBase > & gedRegression()
std::string photonCollection_
edm::ESHandle< CaloTopology > theCaloTopo_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedIsolationToken_CITK
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_
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
edm::EDGetTokenT< edm::ValueMap< float > > phoNeutralHadronIsolationToken_CITK
HLT enums.
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 85 of file GEDPhotonProducer.h.

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

std::string GEDPhotonProducer::candidateP4type_
private

Definition at line 142 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

edm::ParameterSet GEDPhotonProducer::conf_
private

Definition at line 126 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

std::string GEDPhotonProducer::conversionCollection_
private

Definition at line 100 of file GEDPhotonProducer.h.

std::string GEDPhotonProducer::conversionProducer_
private

Definition at line 99 of file GEDPhotonProducer.h.

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

Definition at line 86 of file GEDPhotonProducer.h.

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

EcalClusterFunctionBaseClass* GEDPhotonProducer::energyCorrectionF
private

Definition at line 140 of file GEDPhotonProducer.h.

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

Definition at line 108 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 109 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 90 of file GEDPhotonProducer.h.

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

double GEDPhotonProducer::highEt_
private

Definition at line 117 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

double GEDPhotonProducer::hOverEConeSize_
private

Definition at line 114 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

double GEDPhotonProducer::maxHOverE_
private

Definition at line 115 of file GEDPhotonProducer.h.

double GEDPhotonProducer::minR9Barrel_
private

Definition at line 118 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

double GEDPhotonProducer::minR9Endcap_
private

Definition at line 119 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

double GEDPhotonProducer::minSCEt_
private

Definition at line 116 of file GEDPhotonProducer.h.

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

Definition at line 93 of file GEDPhotonProducer.h.

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

Definition at line 89 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 88 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 95 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 96 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 97 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

std::string GEDPhotonProducer::photonCollection_
private

Definition at line 80 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 83 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

edm::InputTag GEDPhotonProducer::photonProducer_
private

Definition at line 81 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 84 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

PositionCalc GEDPhotonProducer::posCalculator_
private

Definition at line 127 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

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

Definition at line 137 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 138 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 87 of file GEDPhotonProducer.h.

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

std::string GEDPhotonProducer::reconstructionStep_
private

Definition at line 123 of file GEDPhotonProducer.h.

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

bool GEDPhotonProducer::runMIPTagger_
private

Definition at line 120 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 110 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 111 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 129 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and produce().

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

Definition at line 130 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 125 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

bool GEDPhotonProducer::validConversions_
private

Definition at line 122 of file GEDPhotonProducer.h.

bool GEDPhotonProducer::validPixelSeeds_
private

Definition at line 132 of file GEDPhotonProducer.h.

std::string GEDPhotonProducer::valueMapPFCandPhoton_
private

Definition at line 101 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

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

Definition at line 91 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().