19 #include <unordered_map> 49 _maxHoverE(conf.getParameter<double>(
"maximumHoverE")),
50 _pTbyPass(conf.getParameter<double>(
"minPTforBypass")),
51 _minSCPt(conf.getParameter<double>(
"minSuperClusterPt")),
52 _superClustersArePF(conf.getParameter<
bool>(
"superClustersArePF")),
58 auto eb_scs =
e.getHandle(
_srcEB);
59 auto ee_scs =
e.getHandle(
_srcEE);
61 elems.reserve(elems.size() + eb_scs->size() + ee_scs->size());
66 auto bsc = eb_scs->cbegin();
67 auto esc = eb_scs->cend();
70 for (
auto sc =
bsc; sc != esc; ++sc) {
73 auto sc_elem = std::find_if(elems.begin(), SCs_end, myEqual);
74 const double scpT =
ptFast(sc->energy(), sc->position(),
_zero);
76 const double H_tower =
78 const double HoverE = H_tower / sc->energy();
82 SCs_end = elems.emplace(SCs_end, scbe);
87 bsc = ee_scs->cbegin();
89 for (
auto sc =
bsc; sc != esc; ++sc) {
92 auto sc_elem = std::find_if(elems.begin(), SCs_end, myEqual);
93 const double scpT =
ptFast(sc->energy(), sc->position(),
_zero);
95 const double H_tower =
97 const double HoverE = H_tower / sc->energy();
101 SCs_end = elems.emplace(SCs_end, scbe);
105 elems.shrink_to_fit();
CaloTowerConstituentsMap const * towerMap_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const edm::ESGetToken< CaloTowerConstituentsMap, CaloGeometryRecord > _ctmapToken
uint32_t cc[maxCellsPerHit]
edm::EDGetTokenT< reco::SuperClusterCollection > _srcEE
void importToBlock(const edm::Event &, ElementList &) const override
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
edm::EDGetTokenT< reco::SuperClusterCollection > _srcEB
double ptFast(const double energy, const math::XYZPoint &position, const math::XYZPoint &origin)
SuperClusterImporter(const edm::ParameterSet &, edm::ConsumesCollector &)
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
double depth2HcalESum(std::vector< CaloTowerDetId > const &towers, CaloTowerCollection const &)
double depth1HcalESum(std::vector< CaloTowerDetId > const &towers, CaloTowerCollection const &)
edm::EDGetTokenT< CaloTowerCollection > _srcTowers
XYZPointD XYZPoint
point in space with cartesian internal representation
static int position[264][3]
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< std::unique_ptr< reco::PFBlockElement > > ElementList
static const math::XYZPoint _zero
void updateEventSetup(const edm::EventSetup &es) override
void setFromPFSuperCluster(bool val)
std::vector< CaloTowerDetId > towersOf(reco::SuperCluster const &sc, CaloTowerConstituentsMap const &towerMap, HoeMode mode=HoeMode::SingleTower)