CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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) overridefinal
 
virtual void endRun (edm::Run const &, edm::EventSetup const &) overridefinal
 
 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 & 
itemsToGetFromEvent () 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
< EcalRecHitCollection
barrelEcalHits_
 
std::string candidateP4type_
 
edm::ParameterSet conf_
 
std::string conversionCollection_
 
std::string conversionProducer_
 
edm::EDGetTokenT
< EcalRecHitCollection
endcapEcalHits_
 
EcalClusterFunctionBaseClassenergyCorrectionF
 
std::vector< int > flagsexclEB_
 
std::vector< int > flagsexclEE_
 
edm::EDGetTokenT
< CaloTowerCollection
hcalTowers_
 
double highEt_
 
double hOverEConeSize_
 
double maxHOverE_
 
double minR9Barrel_
 
double minR9Endcap_
 
double minSCEt_
 
edm::EDGetTokenT
< edm::ValueMap< std::vector
< reco::PFCandidateRef > > > 
particleBasedIsolationToken
 
edm::EDGetTokenT
< reco::PFCandidateCollection
pfCandidates_
 
edm::EDGetTokenT
< reco::PFCandidateCollection
pfEgammaCandidates_
 
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::PhotonCoreCollection
photonCoreProducerT_
 
edm::InputTag photonProducer_
 
edm::EDGetTokenT
< reco::PhotonCollection
photonProducerT_
 
PositionCalc posCalculator_
 
std::vector< double > preselCutValuesBarrel_
 
std::vector< double > preselCutValuesEndcap_
 
edm::EDGetTokenT
< EcalRecHitCollection
preshowerHits_
 
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::VertexCollection
vertexProducer_
 

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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
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_, minR9Barrel_, minR9Endcap_, pfCandidates_, pfEgammaCandidates_, phoChargedIsolationToken_CITK, phoNeutralHadronIsolationToken_CITK, phoPhotonIsolationToken_CITK, photonCollection_, photonCoreProducerT_, photonProducer_, photonProducerT_, HLT_FULL_cff::posCalcParameters, posCalculator_, preselCutValuesBarrel_, preselCutValuesEndcap_, preshowerHits_, 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 
86  consumes<reco::PFCandidateCollection>(conf_.getParameter<edm::InputTag>("pfEgammaCandidates"));
88  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("barrelEcalHits"));
90  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("endcapEcalHits"));
92  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("preshowerHits"));
94  consumes<reco::VertexCollection>(conf_.getParameter<edm::InputTag>("primaryVertexProducer"));
95 
96  hcalTowers_ =
97  consumes<CaloTowerCollection>(conf_.getParameter<edm::InputTag>("hcalTowers"));
98  //
99  photonCollection_ = conf_.getParameter<std::string>("outputPhotonCollection");
100  hOverEConeSize_ = conf_.getParameter<double>("hOverEConeSize");
101  highEt_ = conf_.getParameter<double>("highEt");
102  // R9 value to decide converted/unconverted
103  minR9Barrel_ = conf_.getParameter<double>("minR9Barrel");
104  minR9Endcap_ = conf_.getParameter<double>("minR9Endcap");
105  usePrimaryVertex_ = conf_.getParameter<bool>("usePrimaryVertex");
106  runMIPTagger_ = conf_.getParameter<bool>("runMIPTagger");
107 
108  candidateP4type_ = config.getParameter<std::string>("candidateP4type") ;
109  valueMapPFCandPhoton_ = config.getParameter<std::string>("valueMapPhotons");
110 
111 
113  config.getParameter<edm::ParameterSet>("posCalcParameters");
115 
116 
117  //AA
118  //Flags and Severities to be excluded from photon calculations
119  const std::vector<std::string> flagnamesEB =
120  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEB");
121 
122  const std::vector<std::string> flagnamesEE =
123  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEE");
124 
125  flagsexclEB_=
126  StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
127 
128  flagsexclEE_=
129  StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
130 
131  const std::vector<std::string> severitynamesEB =
132  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEB");
133 
135  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
136 
137  const std::vector<std::string> severitynamesEE =
138  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEE");
139 
141  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
142 
145  if( conf_.existsAs<edm::ParameterSet>("regressionConfig") ) {
146  auto sumes = consumesCollector();
147  thePhotonEnergyCorrector_->gedRegression()->setConsumes(sumes);
148  }
149 
150  //AA
151 
152  //
153 
154  // Parameters for the position calculation:
155  // std::map<std::string,double> providedParameters;
156  // providedParameters.insert(std::make_pair("LogWeighted",conf_.getParameter<bool>("posCalc_logweight")));
157  //providedParameters.insert(std::make_pair("T0_barl",conf_.getParameter<double>("posCalc_t0_barl")));
158  //providedParameters.insert(std::make_pair("T0_endc",conf_.getParameter<double>("posCalc_t0_endc")));
159  //providedParameters.insert(std::make_pair("T0_endcPresh",conf_.getParameter<double>("posCalc_t0_endcPresh")));
160  //providedParameters.insert(std::make_pair("W0",conf_.getParameter<double>("posCalc_w0")));
161  //providedParameters.insert(std::make_pair("X0",conf_.getParameter<double>("posCalc_x0")));
162  //posCalculator_ = PositionCalc(providedParameters);
163  // cut values for pre-selection
164  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("minSCEtBarrel"));
165  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("maxHoverEBarrel"));
166  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetBarrel"));
167  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeBarrel"));
168  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetBarrel"));
169  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeBarrel"));
170  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackSolidConeBarrel"));
171  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackHollowConeBarrel"));
172  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumSolidConeBarrel"));
173  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumHollowConeBarrel"));
174  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutBarrel"));
175  //
176  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("minSCEtEndcap"));
177  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("maxHoverEEndcap"));
178  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetEndcap"));
179  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeEndcap"));
180  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetEndcap"));
181  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeEndcap"));
182  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackSolidConeEndcap"));
183  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackHollowConeEndcap"));
184  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumSolidConeEndcap"));
185  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumHollowConeEndcap"));
186  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutEndcap"));
187  //
188 
189  //moved from beginRun to here, I dont see how this could cause harm as its just reading in the exactly same parameters each run
190  if ( reconstructionStep_ != "final"){
192  edm::ParameterSet isolationSumsCalculatorSet = conf_.getParameter<edm::ParameterSet>("isolationSumsCalculatorSet");
195  edm::ParameterSet mipVariableSet = conf_.getParameter<edm::ParameterSet>("mipVariableSet");
197 
198  }else{
201  }
202  // Register the product
203  produces< reco::PhotonCollection >(photonCollection_);
204  produces< edm::ValueMap<reco::PhotonRef> > (valueMapPFCandPhoton_);
205 
206 
207 }
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_
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)
std::vector< int > flagsexclEE_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
edm::EDGetTokenT< edm::ValueMap< float > > phoChargedIsolationToken_CITK
tuple posCalcParameters
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_
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
edm::EDGetTokenT< EcalRecHitCollection > preshowerHits_
std::string valueMapPFCandPhoton_
GEDPhotonProducer::~GEDPhotonProducer ( )

Definition at line 209 of file GEDPhotonProducer.cc.

References thePhotonEnergyCorrector_, thePhotonIsolationCalculator_, and thePhotonMIPHaloTagger_.

210 {
214  //delete energyCorrectionF;
215 }
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 219 of file GEDPhotonProducer.cc.

References reconstructionStep_, and thePhotonEnergyCorrector_.

219  {
220 
221  if ( reconstructionStep_ != "final" ) {
222  thePhotonEnergyCorrector_ -> init(theEventSetup);
223  }
224 
225 }
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 227 of file GEDPhotonProducer.cc.

227  {
228 }
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 444 of file GEDPhotonProducer.cc.

References barrelEcalHits_, PhotonIsolationCalculator::calculate(), PhotonEnergyCorrector::calculate(), candidateP4type_, EcalClusterToolsT< noZS >::covariances(), EcalClusterToolsT< noZS >::e1x3(), reco::Photon::ShowerShape::e1x3, EcalClusterToolsT< noZS >::e1x5(), reco::Photon::ShowerShape::e1x5, EcalClusterToolsT< noZS >::e2nd(), reco::Photon::ShowerShape::e2nd, EcalClusterToolsT< noZS >::e2x2(), reco::Photon::ShowerShape::e2x2, reco::Photon::ShowerShape::e2x5, EcalClusterToolsT< noZS >::e2x5Bottom(), reco::Photon::ShowerShape::e2x5Bottom, EcalClusterToolsT< noZS >::e2x5Left(), reco::Photon::ShowerShape::e2x5Left, EcalClusterToolsT< noZS >::e2x5Max(), reco::Photon::ShowerShape::e2x5Max, EcalClusterToolsT< noZS >::e2x5Right(), reco::Photon::ShowerShape::e2x5Right, EcalClusterToolsT< noZS >::e2x5Top(), reco::Photon::ShowerShape::e2x5Top, EcalClusterToolsT< noZS >::e3x3(), reco::Photon::ShowerShape::e3x3, EcalClusterToolsT< noZS >::e5x5(), reco::Photon::ShowerShape::e5x5, EcalClusterToolsT< noZS >::eBottom(), reco::Photon::ShowerShape::eBottom, reco::Photon::ecal_photons, EcalBarrel, EcalEndcap, reco::Photon::ShowerShape::effSigmaRR, EcalClusterToolsT< noZS >::eLeft(), reco::Photon::ShowerShape::eLeft, EcalClusterToolsT< noZS >::eMax(), endcapEcalHits_, EcalClusterToolsT< noZS >::eRight(), reco::Photon::ShowerShape::eRight, EcalClusterToolsT< noZS >::eTop(), reco::Photon::ShowerShape::eTop, f, 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_, hOverEConeSize_, edm::isFinite(), edm::Ref< C, T, F >::isNonnull(), EcalClusterToolsT< noZS >::localCovariances(), reco::Photon::ShowerShape::maxEnergyXtal, nullptr, p4, preselCutValuesBarrel_, preselCutValuesEndcap_, preshowerHits_, edm::Handle< T >::product(), edm::ESHandle< class >::product(), ptFast(), reco::Photon::regression1, reco::Photon::regression2, runMIPTagger_, cmsHarvester::sep, EgammaHadTower::setTowerCollection(), severitiesexclEB_, severitiesexclEE_, reco::Photon::ShowerShape::sigmaEtaEta, reco::Photon::ShowerShape::sigmaIetaIeta, reco::Photon::ShowerShape::sigmaIetaIphi, reco::Photon::ShowerShape::sigmaIphiIphi, mathSSE::sqrt(), theCaloGeom_, thePhotonEnergyCorrector_, thePhotonIsolationCalculator_, thePhotonMIPHaloTagger_, and EgammaHadTower::towersOf().

Referenced by produce().

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

711  {
712 
713 
714 
715  std::vector<double> preselCutValues;
716 
717 
718  for(unsigned int lSC=0; lSC < photonHandle->size(); lSC++) {
719  reco::PhotonRef phoRef(reco::PhotonRef(photonHandle, lSC));
720  reco::SuperClusterRef parentSCRef = phoRef->parentSuperCluster();
721  reco::SuperClusterRef scRef=phoRef->superCluster();
722  int thedet = scRef->seed()->hitsAndFractions()[0].first.det();
723  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
724  if (subdet==EcalBarrel) {
725  preselCutValues = preselCutValuesBarrel_;
726  } else if (subdet==EcalEndcap) {
727  preselCutValues = preselCutValuesEndcap_;
728  } else if ( thedet == DetId::Forward || thedet == DetId::Hcal) {
729  preselCutValues = preselCutValuesEndcap_;
730  } else {
731  edm::LogWarning("")<<"GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster" << thedet << ' ' << subdet;
732  }
733 
734 
735 
736  // SC energy preselection
737  if (parentSCRef.isNonnull() &&
738  ptFast(parentSCRef->energy(),parentSCRef->position(),math::XYZPoint(0,0,0)) <= preselCutValues[0] ) continue;
739  reco::Photon newCandidate(*phoRef);
740  iSC++;
741 
742 
743  // Calculate the PF isolation and ID - for the time being there is no calculation. Only the setting
746 
747  //get the pointer for the photon object
748  edm::Ptr<reco::Photon> photonPtr(photonHandle, lSC);
749 
750  pfIso.chargedHadronIso = (*chargedHadrons_)[photonPtr] ;
751  pfIso.neutralHadronIso = (*neutralHadrons_)[photonPtr];
752  pfIso.photonIso = (*photons_)[photonPtr];
753  newCandidate.setPflowIsolationVariables(pfIso);
754  newCandidate.setPflowIDVariables(pfID);
755 
756 
757  // do the regression
758  thePhotonEnergyCorrector_->calculate(evt, newCandidate, subdet, *vertexHandle, es);
759  if ( candidateP4type_ == "fromEcalEnergy") {
760  newCandidate.setP4( newCandidate.p4(reco::Photon::ecal_photons) );
761  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
762  } else if ( candidateP4type_ == "fromRegression1") {
763  newCandidate.setP4( newCandidate.p4(reco::Photon::regression1) );
764  newCandidate.setCandidateP4type(reco::Photon::regression1);
765  } else if ( candidateP4type_ == "fromRegression2") {
766  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
767  newCandidate.setCandidateP4type(reco::Photon::regression2);
768  } else if ( candidateP4type_ == "fromRefinedSCRegression" ) {
769  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
770  newCandidate.setCandidateP4type(reco::Photon::regression2);
771  }
772 
773  // std::cout << " GEDPhotonProducer pf based isolation chargedHadron " << newCandidate.chargedHadronIso() << " neutralHadron " << newCandidate.neutralHadronIso() << " Photon " << newCandidate.photonIso() << std::endl;
774  //std::cout << " GEDPhotonProducer from candidate HoE with towers in a cone " << newCandidate.hadronicOverEm() << " " << newCandidate.hadronicDepth1OverEm() << " " << newCandidate.hadronicDepth2OverEm() << std::endl;
775  //std::cout << " GEDPhotonProducer from candidate of HoE with towers behind the BCs " << newCandidate.hadTowOverEm() << " " << newCandidate.hadTowDepth1OverEm() << " " << newCandidate.hadTowDepth2OverEm() << std::endl;
776  //std::cout << " standard p4 before " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
777  //std::cout << " type " <<newCandidate.getCandidateP4type() << " standard p4 after " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
778  //std::cout << " final p4 " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
779 
780  outputPhotonCollection.push_back(newCandidate);
781 
782  }
783 
784 }
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

Implements edm::stream::EDProducerBase.

Definition at line 231 of file GEDPhotonProducer.cc.

References barrelEcalHits_, endcapEcalHits_, Exception, fillPhotonCollection(), PhotonEnergyCorrector::gedRegression(), edm::EventSetup::get(), edm::Event::getByToken(), hcalTowers_, PhotonEnergyCorrector::init(), edm::InputTag::label(), eostools::move(), pfCandidates_, pfEgammaCandidates_, phoChargedIsolationToken_CITK, phoNeutralHadronIsolationToken_CITK, phoPhotonIsolationToken_CITK, photonCollection_, photonCoreProducerT_, photonProducer_, photonProducerT_, preshowerHits_, edm::ESHandle< class >::product(), edm::Event::put(), reconstructionStep_, theCaloGeom_, theCaloTopo_, thePhotonEnergyCorrector_, ecaldqm::topology(), usePrimaryVertex_, valueMapPFCandPhoton_, makeHLTPrescaleTable::values, GoodVertex_cfg::vertexCollection, and vertexProducer_.

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