6 #include <vdt/vdtMath.h>
41 void setEcalEnergy(
reco::GsfElectron& ele, const
float scale, const
float smear) const;
47 virtual float val(
const float et)
const = 0;
55 :
lowEt_(conf.getParameter<double>(
"lowEt")),
56 highEt_(conf.getParameter<double>(
"highEt")),
66 float val(
const float et)
const override {
93 if (funcName ==
"UncertFuncV1") {
94 uncertFunc_ = std::make_unique<UncertFuncV1>(funcPSet);
96 throw cms::Exception(
"ConfigError") <<
"Error constructing EGEtScaleSysModifier, function name " << funcName
125 const auto oldP4 = ele.
p4();
132 const float energyEtUncertUp =
calCombinedMom(ele, corr + etUncert, smear).first;
133 const float energyEtUncertDn =
calCombinedMom(ele, corr - etUncert, smear).first;
141 ele.
addUserFloat(
"energyScaleEtDown", energyEtUncertDn);
158 const float energyEtUncertUp = ecalEnergyPreCorr * (corr + etUncert);
159 const float energyEtUncertDn = ecalEnergyPreCorr * (corr - etUncert);
162 pho.
addUserFloat(
"energyScaleEtDown", energyEtUncertDn);
167 const float smear)
const {
170 const auto oldP4 = ele.
p4();
180 return combinedMomentum;
Analysis-level Photon class.
float trackMomentumError() const
const LorentzVector & p4(P4Kind kind) const
std::unique_ptr< UncertFuncBase > uncertFunc_
static const std::string & name(size_t index)
void correctMomentum(const LorentzVector &p4, float trackMomentumError, float p4Error)
EpCombinationTool epCombTool_
float p4Error(P4Kind kind) const
virtual ~UncertFuncBase()
void addUserFloat(const std::string &label, float data, const bool overwrite=false)
Set user-defined float.
float userFloat(const std::string &key) const
std::pair< float, float > calCombinedMom(reco::GsfElectron &ele, const float scale, const float smear) const
void setCorrectedEcalEnergyError(float newEnergyError)
UncertFuncV1(const edm::ParameterSet &conf)
float ecalEnergyError() const
ParameterSet const & getParameterSet(std::string const &) const
void setEvent(const edm::Event &) final
T getParameter(std::string const &) const
Analysis-level electron class.
void setEventContent(const edm::EventSetup &) final
void setEcalEnergy(reco::GsfElectron &ele, const float scale, const float smear) const
float val(const float et) const override
void setCorrectedEcalEnergy(float newEnergy)
double et() const final
transverse energy
EGEtScaleSysModifier(const edm::ParameterSet &conf, edm::ConsumesCollector &)
void modifyObject(pat::Electron &ele) const final
#define DEFINE_EDM_PLUGIN(factory, type, name)
constexpr char Electron[]
~EGEtScaleSysModifier() override
double energy() const final
energy