15 : recHits_(hits), geometry_(geo) {}
18 double numeratorEtaWidth = 0;
19 double numeratorPhiWidth = 0;
21 double scEnergy = passedCluster.
energy();
24 double scEta = passedCluster.
position().eta();
25 double scPhi = passedCluster.
position().phi();
27 const std::vector<std::pair<DetId, float> >& detId = passedCluster.
hitsAndFractions();
29 for (
std::vector<std::pair<DetId, float> >::const_iterator
hit = detId.begin();
hit != detId.end(); ++
hit) {
36 if (this_cell ==
nullptr) {
42 double energyHit = rHit->energy() *
hit->second;
45 double dPhi = position.
phi() - scPhi;
53 double dEta = position.
eta() - scEta;
56 numeratorEtaWidth += energyHit * dEta * dEta;
57 numeratorPhiWidth += energyHit * dPhi * dPhi;
const math::XYZPoint & position() const
cluster centroid position
void Calculate_Covariances(const reco::SuperCluster &passedCluster)
Geom::Phi< T > phi() const
std::vector< EcalRecHit >::const_iterator const_iterator
const CaloSubdetectorGeometry * geometry_
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
double energy() const
cluster energy
const_iterator end() const
const EcalRecHitCollection * recHits_
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
iterator find(key_type k)
static int position[264][3]
SuperClusterShapeAlgo(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry)