14 inline double ptFast(
const double energy,
17 const auto v = position - origin;
21 #include <unordered_map> 45 "SuperClusterImporter");
53 _maxHoverE(conf.getParameter<double>(
"maximumHoverE")),
54 _pTbyPass(conf.getParameter<double>(
"minPTforBypass")),
55 _minSCPt(conf.getParameter<double>(
"minSuperClusterPt")),
71 _hadTower->setTowerCollection(towers.product());
72 elems.reserve(elems.size()+eb_scs->size()+ee_scs->size());
74 auto SCs_end = std::partition(elems.begin(),elems.end(),
79 auto bsc = eb_scs->cbegin();
80 auto esc = eb_scs->cend();
83 for(
auto sc = bsc;
sc != esc; ++
sc ) {
86 auto sc_elem = std::find_if(elems.begin(),SCs_end,myEqual);
88 const double H_tower = (
_hadTower->getDepth1HcalESum(*
sc) +
91 if( sc_elem == SCs_end && scpT >
_minSCPt &&
95 SCs_end = elems.emplace(SCs_end, scbe);
100 bsc = ee_scs->cbegin();
101 esc = ee_scs->cend();
102 for(
auto sc = bsc;
sc != esc; ++
sc ) {
105 auto sc_elem = std::find_if(elems.begin(),SCs_end,myEqual);
107 const double H_tower = (
_hadTower->getDepth1HcalESum(*
sc) +
110 if( sc_elem == SCs_end && scpT >
_minSCPt &&
114 SCs_end = elems.emplace(SCs_end, scbe);
118 elems.shrink_to_fit();
edm::EDGetTokenT< reco::SuperClusterCollection > _srcEE
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)
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
SuperClusterImporter(const edm::ParameterSet &, edm::ConsumesCollector &)
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
float energy() const
Energy. Note this is taken from the first SimTrack only.
std::unique_ptr< EgammaHadTower > _hadTower
edm::EDGetTokenT< CaloTowerCollection > _srcTowers
XYZPointD XYZPoint
point in space with cartesian internal representation
static int position[264][3]
void importToBlock(const edm::Event &, ElementList &) const override
#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)