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);
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
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
int depth() const
get the tower depth
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
double shortFibre_Fraction
int ieta() const
get the cell ieta
Abs< T >::type abs(const T &t)
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
void setTime(double time)
int iphi() const
get the cell iphi
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.
void setEnergy(float energy)
double longFibre_Fraction