96 double phoEcalEnergy = -9999.;
97 double phoEcalEnergyError = -9999.;
98 double phoRegr1Energy = -9999.;
99 double phoRegr1EnergyError = -9999.;
112 if ( thePhoton.
r9() > minR9 ) {
115 float e5x5=thePhoton.
e5x5();
117 phoEcalEnergy = e5x5 + thePhoton.
superCluster()->preshowerEnergy() ;
126 if ( thePhoton.
r9() > minR9 ) {
132 float e5x5=thePhoton.
e5x5();
134 phoEcalEnergy = e5x5 + thePhoton.
superCluster()->preshowerEnergy() ;
154 std::pair<double,double> cor =
regressionCorrector_->CorrectedEnergyWithError(thePhoton, vtxcol, lazyTools, iSetup);
155 phoRegr1Energy = cor.first;
156 phoRegr1EnergyError = cor.second;
189 double crackcor = 1.;
195 cc->energy()*(crackCorrectionFunction->
getValue(*cc)-1.)) /
T getParameter(std::string const &) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
edm::ESHandle< CaloGeometry > theCaloGeom_
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
std::unique_ptr< EcalClusterFunctionBaseClass > scCrackEnergyFunction_
void setCorrectedEnergy(P4type type, float E, float dE, bool toCand=true)
double applyCrackCorrection(const reco::SuperCluster &cl, EcalClusterFunctionBaseClass *crackCorrectionFunction)
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHitsToken_
std::vector< Vertex > VertexCollection
collection of Vertex objects
std::unique_ptr< EnergyUncertaintyPhotonSpecific > photonUncertaintyCalculator_
PhotonEnergyCorrector(const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
virtual float getValue(const reco::BasicCluster &, const EcalRecHitCollection &) const =0
std::unique_ptr< EcalClusterFunctionBaseClass > scEnergyFunction_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHitsToken_
void init(const edm::EventSetup &theEventSetup)
float getCorrectedEnergyError(P4type type) const
std::unique_ptr< EcalClusterFunctionBaseClass > photonEcalEnergyCorrFunction_
void calculate(edm::Event &evt, reco::Photon &, int subdet, const reco::VertexCollection &vtxcol, const edm::EventSetup &iSetup)
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
ParameterSet const & getParameterSet(std::string const &) const
std::unique_ptr< EcalClusterFunctionBaseClass > scEnergyErrorFunction_
float getCorrectedEnergy(P4type type) const
edm::InputTag endcapEcalHits_
std::unique_ptr< ModifyObjectValueBase > gedRegression_
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
std::unique_ptr< EGEnergyCorrector > regressionCorrector_
volatile std::atomic< bool > shutdown_flag false
edm::InputTag barrelEcalHits_
T get(const Candidate &c)
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents