1 #ifndef RecoParticleFlow_PFClusterProducer_PFPSRecHitCreator_h
2 #define RecoParticleFlow_PFClusterProducer_PFPSRecHitCreator_h
49 for(
const auto& erh : *recHitHandle ) {
51 double energy = erh.energy();
58 switch( detid.plane() ) {
67 <<
"incorrect preshower plane !! plane number "
68 <<detid.plane()<<std::endl;
79 <<
"warning detid "<<detid.rawId()
80 <<
" not found in geometry"<<std::endl;
85 position.SetCoordinates (
point.x(),
89 out->emplace_back( detid.rawId(),layer,
91 position.x(), position.y(), position.z(),
93 auto & rh = out->back();
94 rh.setDepth(detid.plane());
95 rh.setTime(erh.time());
100 rh.setNECorner( corners[0].
x(), corners[0].
y(), corners[0].
z() );
101 rh.setSECorner( corners[1].
x(), corners[1].
y(), corners[1].
z() );
102 rh.setSWCorner( corners[2].
x(), corners[2].
y(), corners[2].
z() );
103 rh.setNWCorner( corners[3].
x(), corners[3].
y(), corners[3].
z() );
106 bool rcleaned =
false;
111 if (!qtest->test(rh,erh,rcleaned)) {
117 cleaned->push_back(
std::move(out->back()));
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
void importRecHits(std::auto_ptr< reco::PFRecHitCollection > &out, std::auto_ptr< reco::PFRecHitCollection > &cleaned, const edm::Event &iEvent, const edm::EventSetup &iSetup)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
edm::EDGetTokenT< EcalRecHitCollection > recHitToken_
static int position[264][3]
PFPSRecHitCreator(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