1 #ifndef RecoParticleFlow_PFClusterProducer_PFEcalRecHitCreatorMaxSample_h
2 #define RecoParticleFlow_PFClusterProducer_PFEcalRecHitCreatorMaxSample_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;
74 position.SetCoordinates (
point.x(),
84 axis.SetCoordinates( point1.x(),
101 position.x(), position.y(), position.z(),
102 axis.x(), axis.y(), axis.z() );
108 assert( corners.size() == 8 );
110 rh.setNECorner( corners[0].
x(), corners[0].
y(), corners[0].
z() );
111 rh.setSECorner( corners[1].
x(), corners[1].
y(), corners[1].
z() );
112 rh.setSWCorner( corners[2].
x(), corners[2].
y(), corners[2].
z() );
113 rh.setNWCorner( corners[3].
x(), corners[3].
y(), corners[3].
z() );
116 bool rcleaned =
false;
121 if (!qtest->test(rh,erh,rcleaned)) {
132 cleaned->push_back(rh);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
PFEcalRecHitCreatorMaxSample(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< EcalRecHitCollection > recHitToken_
PFEcalRecHitCreatorMaxSample< EcalBarrelGeometry, PFLayer::ECAL_BARREL, EcalBarrel > PFEBRecHitCreatorMaxSample
SeedingLayerSetsHits::SeedingLayer Layer
uint32_t rawId() const
get the raw id
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
PFEcalRecHitCreatorMaxSample< EcalEndcapGeometry, PFLayer::ECAL_ENDCAP, EcalEndcap > PFEERecHitCreatorMaxSample
const GlobalPoint getPosition(CCGFloat depth) const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void importRecHits(std::auto_ptr< reco::PFRecHitCollection > &out, std::auto_ptr< reco::PFRecHitCollection > &cleaned, const edm::Event &iEvent, const edm::EventSetup &iSetup)
A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code...
static int position[264][3]
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