1 #ifndef RecoParticleFlow_PFClusterProducer_PFHcalRecHitCreator_h
2 #define RecoParticleFlow_PFClusterProducer_PFHcalRecHitCreator_h
20 template <
typename Digi,
typename Geometry,PFLayer::Layer Layer,
int Detector>
45 const Geometry *hcalGeo =
dynamic_cast< const Geometry*
> (gTmp);
48 for(
const auto& erh : *recHitHandle ) {
57 double energy = erh.energy();
58 double time = erh.time();
65 thisCell= hcalGeo->getGeometry(detid);
70 <<
"warning detid "<<detid.
rawId()
71 <<
" not found in geometry"<<std::endl;
84 position.x(), position.y(), position.z(),
89 assert( corners.
size() == 8 );
91 rh.setNECorner( corners[0].
x(), corners[0].
y(), corners[0].
z());
92 rh.setSECorner( corners[1].
x(), corners[1].
y(), corners[1].
z());
93 rh.setSWCorner( corners[2].
x(), corners[2].
y(), corners[2].
z());
94 rh.setNWCorner( corners[3].
x(), corners[3].
y(), corners[3].
z());
97 bool rcleaned =
false;
102 if (!qtest->test(rh,erh,rcleaned)) {
112 cleaned->push_back(rh);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
PFHcalRecHitCreator< HORecHit, CaloSubdetectorGeometry, PFLayer::HCAL_BARREL2, HcalOuter > PFHORecHitCreator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void importRecHits(std::auto_ptr< reco::PFRecHitCollection > &out, std::auto_ptr< reco::PFRecHitCollection > &cleaned, const edm::Event &iEvent, const edm::EventSetup &iSetup)
PFHcalRecHitCreator< HBHERecHit, CaloSubdetectorGeometry, PFLayer::HCAL_BARREL1, HcalBarrel > PFHBRecHitCreator
static int position[TOTALCHAMBERS][3]
SeedingLayerSetsHits::SeedingLayer Layer
uint32_t rawId() const
get the raw id
PFHcalRecHitCreator< HBHERecHit, CaloSubdetectorGeometry, PFLayer::HCAL_ENDCAP, HcalEndcap > PFHERecHitCreator
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
edm::EDGetTokenT< edm::SortedCollection< Digi > > recHitToken_
void setTime(double time)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
XYZVectorD XYZVector
spatial vector with cartesian internal representation
PFHcalRecHitCreator< HFRecHit, CaloSubdetectorGeometry, PFLayer::HF_EM, HcalForward > PFHFEMRecHitCreator
PFHcalRecHitCreator< HFRecHit, CaloSubdetectorGeometry, PFLayer::HF_HAD, HcalForward > PFHFHADRecHitCreator
PFHcalRecHitCreator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
const CornersVec & getCorners() const
Returns the corner points of this cell's volume.
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.