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;
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)
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
std::vector< EcalRecHit >::const_iterator const_iterator
const CaloSubdetectorGeometry * geometry_
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.
const_iterator end() const
double energy() const
cluster energy
const EcalRecHitCollection * recHits_
iterator find(key_type k)
static int position[264][3]
SuperClusterShapeAlgo(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry)