1 #ifndef RecoParticleFlow_PFClusterProducer_PFHcalRecHitCreator_h
2 #define RecoParticleFlow_PFClusterProducer_PFHcalRecHitCreator_h
20 template <
typename Digi,
typename Geometry,PFLayer::Layer Layer,
int Detector>
44 const Geometry *hcalGeo =
dynamic_cast< const Geometry*
> (gTmp);
47 for(
const auto& erh : *recHitHandle ) {
56 double energy = erh.energy();
57 double time = erh.time();
58 int depth =detid.
depth();
64 thisCell= hcalGeo->getGeometry(detid);
69 <<
"warning detid "<<detid.
rawId()
70 <<
" not found in geometry"<<std::endl;
75 position.SetCoordinates (
point.x(),
84 position.x(), position.y(), position.z(),
90 assert( corners.
size() == 8 );
92 rh.setNECorner( corners[0].
x(), corners[0].
y(), corners[0].
z());
93 rh.setSECorner( corners[1].
x(), corners[1].
y(), corners[1].
z());
94 rh.setSWCorner( corners[2].
x(), corners[2].
y(), corners[2].
z());
95 rh.setNWCorner( corners[3].
x(), corners[3].
y(), corners[3].
z());
98 bool rcleaned =
false;
103 if (!qtest->test(rh,erh,rcleaned)) {
113 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
SeedingLayerSetsHits::SeedingLayer Layer
uint32_t rawId() const
get the raw id
int depth() const
get the tower depth
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 beginEvent(const edm::Event &event, const edm::EventSetup &setup)
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
static int position[264][3]
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.
*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