1 #ifndef RecoParticleFlow_PFClusterProducer_PFEcalRecHitCreator_h
2 #define RecoParticleFlow_PFClusterProducer_PFEcalRecHitCreator_h
26 template <
typename Geometry,PFLayer::Layer Layer,
int Detector>
52 const Geometry *ecalGeo =
dynamic_cast< const Geometry*
> (gTmp);
55 for(
const auto& erh : *recHitHandle ) {
57 double energy = erh.energy();
58 double time = erh.time();
64 thisCell= ecalGeo->getGeometry(detid);
69 <<
"warning detid "<<detid.
rawId()
70 <<
" not found in geometry"<<std::endl;
84 axis.SetCoordinates( pyr->getPosition(1).x(),
85 pyr->getPosition(1).y(),
86 pyr->getPosition(1).z() );
89 pyr->getPosition(0).y(),
90 pyr->getPosition(0).z() );
98 position.x(), position.y(), position.z(),
99 axis.x(), axis.y(), axis.z() );
104 assert( corners.size() == 8 );
106 rh.setNECorner( corners[0].
x(), corners[0].
y(), corners[0].
z() );
107 rh.setSECorner( corners[1].
x(), corners[1].
y(), corners[1].
z() );
108 rh.setSWCorner( corners[2].
x(), corners[2].
y(), corners[2].
z() );
109 rh.setNWCorner( corners[3].
x(), corners[3].
y(), corners[3].
z() );
112 bool rcleaned =
false;
117 if (!qtest->test(rh,erh,rcleaned)) {
127 cleaned->push_back(rh);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
void importRecHits(std::auto_ptr< reco::PFRecHitCollection > &out, std::auto_ptr< reco::PFRecHitCollection > &cleaned, const edm::Event &iEvent, const edm::EventSetup &iSetup)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static int position[TOTALCHAMBERS][3]
SeedingLayerSetsHits::SeedingLayer Layer
uint32_t rawId() const
get the raw id
PFEcalRecHitCreator< EcalEndcapGeometry, PFLayer::ECAL_ENDCAP, EcalEndcap > PFEERecHitCreator
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
edm::EDGetTokenT< EcalRecHitCollection > recHitToken_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code...
PFEcalRecHitCreator< EcalBarrelGeometry, PFLayer::ECAL_BARREL, EcalBarrel > PFEBRecHitCreator
PFEcalRecHitCreator(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.