52 for (
const auto& erh : *recHitHandle) {
60 auto energy = erh.energy();
61 auto time = erh.time();
63 std::shared_ptr<const CaloCellGeometry> thisCell = hcalGeo->
getGeometry(detid);
66 thisCell = zp->forPF();
71 <<
"warning detid " << detid.
rawId() <<
" not found in geometry" << std::endl;
81 bool rcleaned =
false;
86 if (!qtest->test(rh, erh, rcleaned)) {
99 std::sort(tmpOut.begin(), tmpOut.end(),
sorter);
103 for (
auto&
hit : tmpOut) {
106 if (detid.
depth() == 1) {
107 double lONG =
hit.energy();
112 return a.detId() <
b.rawId();
114 if (found_hit != tmpOut.end() && found_hit->detId() == shortID.rawId()) {
115 double sHORT = found_hit->energy();
117 double energy = lONG - sHORT;
124 out->push_back(newHit);
127 double energy = lONG;
133 out->push_back(newHit);
137 double sHORT =
hit.energy();
141 return a.detId() <
b.rawId();
143 double energy = 2 * sHORT;
144 if (found_hit != tmpOut.end() && found_hit->detId() == longID.rawId()) {
145 double lONG = found_hit->energy();
150 energy = lONG + sHORT;
158 out->push_back(newHit);
166 out->push_back(newHit);
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edm::SortedCollection< HFRecHit > > recHitToken_
constexpr uint32_t rawId() const
get the raw id
std::vector< PFRecHit > PFRecHitCollection
collection of PFRecHit objects
Log< level::Error, false > LogError
constexpr std::array< uint8_t, layerIndexSize > layer
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
double shortFibre_Fraction
constexpr int iphi() const
get the cell iphi
Abs< T >::type abs(const T &t)
constexpr int ieta() const
get the cell ieta
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
void setTime(double time)
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
void setEnergy(float energy)
constexpr int depth() const
get the tower depth
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
double longFibre_Fraction