74 useHF_(iConfig.getParameter<
bool>(
"useHF")) {
75 produces<CaloTowerCollection>();
87 typedef std::pair<int, int> EtaPhi;
88 typedef std::map<EtaPhi, double> EtaPhiMap;
93 for (
auto const& particle :
inputs) {
94 double eta = particle.eta();
97 int iphi = phi2iphi(particle.phi(),
ieta);
103 towers_[
ep] += particle.et();
106 auto prod = std::make_unique<CaloTowerCollection>();
107 prod->reserve(towers_.size());
108 for (
auto const&
tower : towers_) {
121 prod->emplace_back(newTowerId, p4.e(), 0, 0, 0, 0, p4,
point,
point);
134 double xeta = fabs(
eta);
172 int myphi = (
iphi - 1) /
n + 1;
196 desc.add<
bool>(
"useHF",
true);
199 descriptions.
add(
"PFTowers",
desc);
203 descriptions.
add(
"PackedPFTowers",
desc);
double iphi2phi(int iphi, int ieta) const
constexpr int32_t ceil(float num)
ParticleTowerProducer(const edm::ParameterSet &)
static constexpr int ietaMax
int eta2ieta(double eta) const
edm::EDGetTokenT< typename edm::View< T > > src_
ParticleTowerProducer< reco::PFCandidate > PFTowers
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
ParticleTowerProducer< pat::PackedCandidate > PackedPFTowers
void produce(edm::Event &, const edm::EventSetup &) override
constexpr valType make0To2pi(valType angle)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int phi2iphi(double phi, int ieta) const
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
double ieta2eta(int ieta) const
constexpr std::array< double, 42 > etaedge
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point