|
|
Go to the documentation of this file. 1 #ifndef RecoParticleFlow_PFClusterProducer_PFHFRecHitCreator_h
2 #define RecoParticleFlow_PFClusterProducer_PFHFRecHitCreator_h
26 EM_Depth_(iConfig.getParameter<double>(
"EMDepthCorrection")),
27 HAD_Depth_(iConfig.getParameter<double>(
"HADDepthCorrection")),
32 thresh_HF_(iConfig.getParameter<double>(
"thresh_HF")),
33 HFCalib_(iConfig.getParameter<double>(
"HFCalib29")),
37 std::unique_ptr<reco::PFRecHitCollection>& cleaned,
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);
64 auto zp = dynamic_cast<IdealZPrism const*>(thisCell.get());
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)) {
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);
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();
158 out->push_back(newHit);
166 out->push_back(newHit);
195 return a.detId() <
b.detId();
double longFibre_Fraction
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
constexpr int iphi() const
get the cell iphi
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
constexpr int depth() const
get the tower depth
edm::EDGetTokenT< edm::SortedCollection< HFRecHit > > recHitToken_
bool operator()(const reco::PFRecHit &a, const reco::PFRecHit &b)
PFHFRecHitCreator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
std::vector< PFRecHit > PFRecHitCollection
collection of PFRecHit objects
double shortFibre_Fraction
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
void setEnergy(float energy)
constexpr std::array< uint8_t, layerIndexSize > layer
constexpr int ieta() const
get the cell ieta
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
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.
Log< level::Error, false > LogError
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
constexpr uint32_t rawId() const
get the raw id
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Abs< T >::type abs(const T &t)
void importRecHits(std::unique_ptr< reco::PFRecHitCollection > &out, std::unique_ptr< reco::PFRecHitCollection > &cleaned, const edm::Event &iEvent, const edm::EventSetup &iSetup) override
void setTime(double time)