1 #ifndef RecoParticleFlow_PFClusterProducer_PFHGCalRecHitCreator_h
2 #define RecoParticleFlow_PFClusterProducer_PFHGCalRecHitCreator_h
22 template <
typename DET,PFLayer::Layer Layer,ForwardSubdetector subdet>
47 unsigned skipped_rechits = 0;
48 for (
unsigned int i=0;
i<rechits.
size();++
i) {
50 const DET detid(hgrh.
detid());
52 if( subdet != detid.subdet() ) {
54 <<
"subdet expected: " << subdet
55 <<
" subdet gotten: " << detid.subdet() << std::endl;
59 double time = hgrh.
time();
67 <<
"warning detid "<<detid.rawId()
68 <<
" not found in geometry"<<std::endl;
78 position.
x(), position.
y(), position.
z(),
84 assert( corners.size() == 8 );
86 rh.setNECorner( corners[0].
x(), corners[0].
y(), corners[0].
z() );
87 rh.setSECorner( corners[1].
x(), corners[1].
y(), corners[1].
z() );
88 rh.setSWCorner( corners[2].
x(), corners[2].
y(), corners[2].
z() );
89 rh.setNWCorner( corners[3].
x(), corners[3].
y(), corners[3].
z() );
91 bool rcleaned =
false;
106 cleaned->push_back(rh);
109 <<
"Skipped " << skipped_rechits
110 <<
" out of " << rechits.
size() <<
" rechits!" << std::endl;
112 <<
"Created " << out->size() <<
" PFRecHits!" << std::endl;
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
A base class to handle the particular shape of HGCal volumes.
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
const DetId & detid() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PFHGCalRecHitCreator< HGCEEDetId, PFLayer::HGCAL, HGCEE > PFHGCEERecHitCreator
PFHGCalRecHitCreator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
std::vector< GlobalPoint > CornersVec
GlobalPoint getPosition(const DetId &id) const
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell's volume.
SeedingLayerSetsHits::SeedingLayer Layer
PFHGCalRecHitCreator< HGCHEDetId, PFLayer::HGCAL, HGCHEB > PFHGCHEBRecHitCreator
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
edm::EDGetTokenT< HGCRecHitCollection > recHitToken_
void importRecHits(std::auto_ptr< reco::PFRecHitCollection > &out, std::auto_ptr< reco::PFRecHitCollection > &cleaned, const edm::Event &iEvent, const edm::EventSetup &iSetup)
static int position[264][3]
PFHGCalRecHitCreator< HGCHEDetId, PFLayer::HGCAL, HGCHEF > PFHGCHEFRecHitCreator
virtual const CaloCellGeometry * getGeometry(const DetId &id) const override
Get the cell geometry of a given detector id. Should return false if not found.
std::string geometryInstance_
void setOriginalRecHit(const T &rh)