Go to the documentation of this file.
10 #define LOGVERB(x) edm::LogVerbatim(x)
11 #define LOGWARN(x) edm::LogWarning(x)
12 #define LOGERR(x) edm::LogError(x)
13 #define LOGDRESSED(x) edm::LogInfo(x)
15 #define LOGVERB(x) LogTrace(x)
16 #define LOGWARN(x) edm::LogWarning(x)
17 #define LOGERR(x) edm::LogError(x)
18 #define LOGDRESSED(x) LogDebug(x)
24 const std::vector<bool>& rechitMask,
25 const std::vector<bool>& seedable,
31 std::unordered_map<uint32_t, size_t> detIdToIndex(
hits.size());
32 for (uint32_t
i = 0;
i <
hits.size(); ++
i) {
33 detIdToIndex[
hits[
i].detId()] =
i;
37 for (
const auto& sc : simClusters) {
41 double energy = 0.0, highest_energy = 0.0;
42 auto hitsAndFractions = sc.hits_and_fractions();
43 for (
const auto& hAndF : hitsAndFractions) {
44 auto itr = detIdToIndex.find(hAndF.first);
45 if (itr == detIdToIndex.end())
48 const double hit_energy = hAndF.second * ref->energy();
51 if (hit_energy > highest_energy || highest_energy == 0.0) {
52 highest_energy = hit_energy;
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
void setSeed(const DetId &id)
std::vector< SimCluster > SimClusterCollection
static const std::string input
Fraction of a PFRecHit (rechits can be shared between several PFCluster's)
void setCorrectedEnergy(double cenergy)
reco::PFRecHitRef makeRefhit(const edm::Handle< reco::PFRecHitCollection > &h, const unsigned i) const
void updateEvent(const edm::Event &) final
edm::Handle< SimClusterCollection > _simClusterH
edm::EDGetTokenT< SimClusterCollection > _simClusterToken
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
void buildClusters(const edm::Handle< reco::PFRecHitCollection > &, const std::vector< bool > &, const std::vector< bool > &, reco::PFClusterCollection &) override
void addRecHitFraction(const reco::PFRecHitFraction &frac)
add a given fraction of the rechit
void setEnergy(double energy)
Particle flow cluster, see clustering algorithm in PFClusterAlgo.