51 produces<edm::ValueMap<float>>(
"HoEForPhoEACorr");
91 return ph->superCluster()->eta();
103 template <
typename T>
111 unsigned int nInput =
src->size();
116 for (
const auto&
obj : *
src) {
119 auto quadratic_ea_hOverE = quadratic_ea_hOverE_->getQuadraticEA(fabs(getEtaForEA(&
obj)));
120 auto linear_ea_hOverE = quadratic_ea_hOverE_->getLinearEA(fabs(getEtaForEA(&
obj)));
122 float scale = relative_ ? 1.0 /
obj.pt() : 1;
131 fillerHoverEQuadratic.
fill();
137 template <
typename T>
141 desc.add<
bool>(
"relative")->setComment(
"compute relative HoverE instead of absolute one");
144 ->setComment(
"txt file containing quadratic effective areas to be used for H/E pileup subtraction for photons");
147 "rho to be used for effective-area based H/E pileup subtraction for photons");
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Analysis-level Photon class.
T getParameter(std::string const &) const
void doHoverEPho(edm::Event &) const
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
HoverEValueMapProducer< pat::Photon > PhoHoverEValueMapProducer
void insert(const H &h, I begin, I end)
~HoverEValueMapProducer() override
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
float getEtaForEA(const T *) const
edm::EDGetTokenT< double > rho_
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< EffectiveAreas > quadratic_ea_hOverE_
edm::EDGetTokenT< edm::View< T > > src_
HoverEValueMapProducer(const edm::ParameterSet &iConfig)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)