26 const std::vector<bool>&,
27 const std::vector<bool>&,
39 #define LOGVERB(x) edm::LogVerbatim(x) 40 #define LOGWARN(x) edm::LogWarning(x) 41 #define LOGERR(x) edm::LogError(x) 42 #define LOGDRESSED(x) edm::LogInfo(x) 44 #define LOGVERB(x) LogTrace(x) 45 #define LOGWARN(x) edm::LogWarning(x) 46 #define LOGERR(x) edm::LogError(x) 47 #define LOGDRESSED(x) LogDebug(x) 53 const std::vector<bool>& rechitMask,
54 const std::vector<bool>& seedable,
61 std::unordered_map<uint32_t, size_t> detIdToIndex(
hits.size());
62 for (uint32_t
i = 0;
i <
hits.size(); ++
i) {
63 detIdToIndex[
hits[
i].detId()] =
i;
71 double energy = 0.0, highest_energy = 0.0;
72 auto hitsAndFractions = sc.hits_and_fractions();
73 for (
const auto& hAndF : hitsAndFractions) {
74 auto itr = detIdToIndex.find(hAndF.first);
75 if (itr == detIdToIndex.end())
78 const double hit_energy = hAndF.second * ref->energy();
81 if (hit_energy > highest_energy || highest_energy == 0.0) {
82 highest_energy = hit_energy;
T getParameter(std::string const &) const
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
reco::PFRecHitRef makeRefhit(const edm::Handle< reco::PFRecHitCollection > &h, const unsigned i) const
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
uint32_t cc[maxCellsPerHit]
GenericSimClusterMapper B2DGT
B2DGT & operator=(const B2DGT &)=delete
Fraction of a PFRecHit (rechits can be shared between several PFCluster's)
void setEnergy(double energy)
GenericSimClusterMapper(const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
void updateEvent(const edm::Event &) final
static std::string const input
void setSeed(const DetId &id)
edm::Handle< SimClusterCollection > _simClusterH
void setCorrectedEnergy(double cenergy)
edm::EDGetTokenT< SimClusterCollection > _simClusterToken
void addRecHitFraction(const reco::PFRecHitFraction &frac)
add a given fraction of the rechit
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< SimCluster > SimClusterCollection
~GenericSimClusterMapper() override=default
void buildClusters(const edm::Handle< reco::PFRecHitCollection > &, const std::vector< bool > &, const std::vector< bool > &, reco::PFClusterCollection &, const HcalPFCuts *) override