1 #ifndef RecoParticleFlow_PFClusterProducer_PFEcalRecHitCreator_h
2 #define RecoParticleFlow_PFClusterProducer_PFEcalRecHitCreator_h
26 template <
typename Geometry,PFLayer::Layer Layer,
int Detector>
49 const Geometry *ecalGeo =
dynamic_cast< const Geometry*
> (gTmp);
52 for(
const auto& erh : *recHitHandle ) {
53 const DetId& detid = erh.detid();
54 double energy = erh.energy();
55 double time = erh.time();
61 thisCell= ecalGeo->getGeometry(detid);
66 <<
"warning detid "<<detid.
rawId()
67 <<
" not found in geometry"<<std::endl;
73 position.SetCoordinates (
point.x(),
84 axis.SetCoordinates( point1.x(),
100 position.x(), position.y(), position.z(),
101 axis.x(), axis.y(), axis.z() );
107 assert( corners.size() == 8 );
109 rh.setNECorner( corners[0].
x(), corners[0].
y(), corners[0].
z() );
110 rh.setSECorner( corners[1].
x(), corners[1].
y(), corners[1].
z() );
111 rh.setSWCorner( corners[2].
x(), corners[2].
y(), corners[2].
z() );
112 rh.setNWCorner( corners[3].
x(), corners[3].
y(), corners[3].
z() );
115 bool rcleaned =
false;
120 if (!qtest->test(rh,erh,rcleaned)) {
131 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
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_
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
const GlobalPoint getPosition(CCGFloat depth) const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code...
static int position[264][3]
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.
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point