84 auto const& cell = (*input)[kcell];
85 int cell_layer = (
int)cell.layer();
91 double thresholdE = 0.;
92 double thresholdPT2 = 0.;
94 for (
unsigned int j = 0; j < (std::get<1>(
thresholds)).size(); ++
j) {
105 if (hcalCuts !=
nullptr) {
109 thresholdE =
item->noiseThreshold();
113 if (cell.energy() < thresholdE || cell.pt2() < thresholdPT2) {
114 LOGDRESSED(
"GenericTopoCluster::buildTopoCluster()")
115 <<
"RecHit " << cell.detId() <<
" with enegy " << cell.energy() <<
" GeV was rejected!." << std::endl;
124 auto const& neighbours = (
_useCornerCells ? cell.neighbours8() : cell.neighbours4());
126 for (
auto nb : neighbours) {
127 if (used[nb] || !rechitMask[nb]) {
128 LOGDRESSED(
"GenericTopoCluster::buildTopoCluster()")
129 <<
" RecHit " << cell.detId() <<
"\'s" 130 <<
" neighbor RecHit " <<
input->at(nb).detId() <<
" with enegy " <<
input->at(nb).energy()
131 <<
" GeV was rejected!" 132 <<
" Reasons : " << used[nb] <<
" (used) " << !rechitMask[nb] <<
" (masked)." << std::endl;
reco::PFRecHitRef makeRefhit(const edm::Handle< reco::PFRecHitCollection > &h, const unsigned i) const
Fraction of a PFRecHit (rechits can be shared between several PFCluster's)
void buildTopoCluster(const edm::Handle< reco::PFRecHitCollection > &, const std::vector< bool > &, unsigned int, std::vector< bool > &, reco::PFCluster &, const HcalPFCuts *)
const Item * getValues(DetId fId, bool throwOnFail=true) const
static std::string const input
const bool _useCornerCells
Abs< T >::type abs(const T &t)
constexpr uint32_t rawId() const
get the raw id
void addRecHitFraction(const reco::PFRecHitFraction &frac)
add a given fraction of the rechit
std::unordered_map< int, I3tuple > _thresholds