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

virtual void beginRun (edm::Run const &r, edm::EventSetup const &es) override final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &) override final
 
 GEDPhotonProducer (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &evt, const edm::EventSetup &es) override
 
 ~GEDPhotonProducer ()
 
- 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
 
 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  hcalTowers_ =
99  consumes<CaloTowerCollection>(conf_.getParameter<edm::InputTag>("hcalTowers"));
100  //
101  photonCollection_ = conf_.getParameter<std::string>("outputPhotonCollection");
102  hOverEConeSize_ = conf_.getParameter<double>("hOverEConeSize");
103  highEt_ = conf_.getParameter<double>("highEt");
104  // R9 value to decide converted/unconverted
105  minR9Barrel_ = conf_.getParameter<double>("minR9Barrel");
106  minR9Endcap_ = conf_.getParameter<double>("minR9Endcap");
107  usePrimaryVertex_ = conf_.getParameter<bool>("usePrimaryVertex");
108  runMIPTagger_ = conf_.getParameter<bool>("runMIPTagger");
109 
110  candidateP4type_ = config.getParameter<std::string>("candidateP4type") ;
111  valueMapPFCandPhoton_ = config.getParameter<std::string>("valueMapPhotons");
112 
113 
115  config.getParameter<edm::ParameterSet>("posCalcParameters");
117 
118 
119  //AA
120  //Flags and Severities to be excluded from photon calculations
121  const std::vector<std::string> flagnamesEB =
122  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEB");
123 
124  const std::vector<std::string> flagnamesEE =
125  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEE");
126 
127  flagsexclEB_=
128  StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
129 
130  flagsexclEE_=
131  StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
132 
133  const std::vector<std::string> severitynamesEB =
134  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEB");
135 
137  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
138 
139  const std::vector<std::string> severitynamesEE =
140  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEE");
141 
143  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
144 
147  if( conf_.existsAs<edm::ParameterSet>("regressionConfig") ) {
148  auto sumes = consumesCollector();
149  thePhotonEnergyCorrector_->gedRegression()->setConsumes(sumes);
150  }
151 
152  //AA
153 
154  //
155 
156  // Parameters for the position calculation:
157  // std::map<std::string,double> providedParameters;
158  // providedParameters.insert(std::make_pair("LogWeighted",conf_.getParameter<bool>("posCalc_logweight")));
159  //providedParameters.insert(std::make_pair("T0_barl",conf_.getParameter<double>("posCalc_t0_barl")));
160  //providedParameters.insert(std::make_pair("T0_endc",conf_.getParameter<double>("posCalc_t0_endc")));
161  //providedParameters.insert(std::make_pair("T0_endcPresh",conf_.getParameter<double>("posCalc_t0_endcPresh")));
162  //providedParameters.insert(std::make_pair("W0",conf_.getParameter<double>("posCalc_w0")));
163  //providedParameters.insert(std::make_pair("X0",conf_.getParameter<double>("posCalc_x0")));
164  //posCalculator_ = PositionCalc(providedParameters);
165  // cut values for pre-selection
166  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("minSCEtBarrel"));
167  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("maxHoverEBarrel"));
168  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetBarrel"));
169  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeBarrel"));
170  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetBarrel"));
171  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeBarrel"));
172  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackSolidConeBarrel"));
173  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackHollowConeBarrel"));
174  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumSolidConeBarrel"));
175  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumHollowConeBarrel"));
176  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutBarrel"));
177  //
178  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("minSCEtEndcap"));
179  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("maxHoverEEndcap"));
180  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetEndcap"));
181  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeEndcap"));
182  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetEndcap"));
183  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeEndcap"));
184  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackSolidConeEndcap"));
185  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackHollowConeEndcap"));
186  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumSolidConeEndcap"));
187  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumHollowConeEndcap"));
188  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutEndcap"));
189  //
190 
191  //moved from beginRun to here, I dont see how this could cause harm as its just reading in the exactly same parameters each run
192  if ( reconstructionStep_ != "final"){
199 
200  }else{
203  }
204  // Register the product
205  produces< reco::PhotonCollection >(photonCollection_);
208 
209 
210 }
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::unique_ptr< ModifyObjectValueBase > & gedRegression()
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 ( )

Definition at line 212 of file GEDPhotonProducer.cc.

References thePhotonEnergyCorrector_, thePhotonIsolationCalculator_, and thePhotonMIPHaloTagger_.

213 {
217  //delete energyCorrectionF;
218 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
PhotonMIPHaloTagger * thePhotonMIPHaloTagger_
PhotonIsolationCalculator * thePhotonIsolationCalculator_

Member Function Documentation

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

Reimplemented from edm::stream::EDProducerBase.

Definition at line 222 of file GEDPhotonProducer.cc.

References StGenEvtProducer_cfi::init, reconstructionStep_, and thePhotonEnergyCorrector_.

222  {
223 
224  if ( reconstructionStep_ != "final" ) {
225  thePhotonEnergyCorrector_ -> init(theEventSetup);
226  }
227 
228 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
std::string reconstructionStep_
void GEDPhotonProducer::endRun ( edm::Run const &  r,
edm::EventSetup const &  theEventSetup 
)
finaloverridevirtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 230 of file GEDPhotonProducer.cc.

230  {
231 }
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 449 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, reco::Photon::ShowerShape::hcalTowersBehindClusters, highEt_, hfClusterShapes_cfi::hits, hOverEConeSize_, createfilelist::int, 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().

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

737  {
738 
739 
740 
741  std::vector<double> preselCutValues;
742 
743 
744  for(unsigned int lSC=0; lSC < photonHandle->size(); lSC++) {
745  reco::PhotonRef phoRef(reco::PhotonRef(photonHandle, lSC));
746  reco::SuperClusterRef parentSCRef = phoRef->parentSuperCluster();
747  reco::SuperClusterRef scRef=phoRef->superCluster();
748  int thedet = scRef->seed()->hitsAndFractions()[0].first.det();
749  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
750  if (subdet==EcalBarrel) {
751  preselCutValues = preselCutValuesBarrel_;
752  } else if (subdet==EcalEndcap) {
753  preselCutValues = preselCutValuesEndcap_;
754  } else if ( thedet == DetId::Forward || thedet == DetId::Hcal) {
755  preselCutValues = preselCutValuesEndcap_;
756  } else {
757  edm::LogWarning("")<<"GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster" << thedet << ' ' << subdet;
758  }
759 
760 
761 
762  // SC energy preselection
763  if (parentSCRef.isNonnull() &&
764  ptFast(parentSCRef->energy(),parentSCRef->position(),math::XYZPoint(0,0,0)) <= preselCutValues[0] ) continue;
765  reco::Photon newCandidate(*phoRef);
766  iSC++;
767 
768 
769  // Calculate the PF isolation and ID - for the time being there is no calculation. Only the setting
772 
773  //get the pointer for the photon object
774  edm::Ptr<reco::Photon> photonPtr(photonHandle, lSC);
775 
776  pfIso.chargedHadronIso = (*chargedHadrons_)[photonPtr] ;
777  pfIso.neutralHadronIso = (*neutralHadrons_)[photonPtr];
778  pfIso.photonIso = (*photons_)[photonPtr];
779  newCandidate.setPflowIsolationVariables(pfIso);
780  newCandidate.setPflowIDVariables(pfID);
781 
782 
783  // do the regression
784  thePhotonEnergyCorrector_->calculate(evt, newCandidate, subdet, *vertexHandle, es);
785  if ( candidateP4type_ == "fromEcalEnergy") {
786  newCandidate.setP4( newCandidate.p4(reco::Photon::ecal_photons) );
787  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
788  } else if ( candidateP4type_ == "fromRegression1") {
789  newCandidate.setP4( newCandidate.p4(reco::Photon::regression1) );
790  newCandidate.setCandidateP4type(reco::Photon::regression1);
791  } else if ( candidateP4type_ == "fromRegression2") {
792  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
793  newCandidate.setCandidateP4type(reco::Photon::regression2);
794  } else if ( candidateP4type_ == "fromRefinedSCRegression" ) {
795  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
796  newCandidate.setCandidateP4type(reco::Photon::regression2);
797  }
798 
799  // std::cout << " GEDPhotonProducer pf based isolation chargedHadron " << newCandidate.chargedHadronIso() << " neutralHadron " << newCandidate.neutralHadronIso() << " Photon " << newCandidate.photonIso() << std::endl;
800  //std::cout << " GEDPhotonProducer from candidate HoE with towers in a cone " << newCandidate.hadronicOverEm() << " " << newCandidate.hadronicDepth1OverEm() << " " << newCandidate.hadronicDepth2OverEm() << std::endl;
801  //std::cout << " GEDPhotonProducer from candidate of HoE with towers behind the BCs " << newCandidate.hadTowOverEm() << " " << newCandidate.hadTowDepth1OverEm() << " " << newCandidate.hadTowDepth2OverEm() << std::endl;
802  //std::cout << " standard p4 before " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
803  //std::cout << " type " <<newCandidate.getCandidateP4type() << " standard p4 after " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
804  //std::cout << " final p4 " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
805 
806  outputPhotonCollection.push_back(newCandidate);
807 
808  }
809 
810 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
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 
)
overridevirtual

Definition at line 234 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_.

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