15 #include "vdt/vdtMath.h" 19 using namespace hgcal;
46 float energy=0.f, energyHad=0.f;
49 const auto&
id =
hit.first;
62 switch(
id.subdetId() ) {
75 <<
" Cluster contains hits that are not from HGCal! " << std::endl;
83 <<
" Cluster contains hits that are not from HGCal! " << std::endl;
88 fraction = energyHad/energy;
100 double totweight = 0.;
102 for(
const auto& ptr : clu.
clusters() ) {
104 if(ptr->energy()<.01*mcenergy)
continue;
106 const double weight = ptr->energy();
112 if (totweight != 0) {
127 for(
const auto& ptr : clu.
clusters() ) {
128 acc += ptr->energy();
147 for (
unsigned int ih=0; ih<nhit; ++ih) {
158 double logweight = 0;
164 sigmaetaeta += deltaetaeta2*
weight;
165 sigmaphiphi += deltaphiphi2 *
weight;
166 sigmaetaetal += deltaetaeta2* logweight;
167 sigmaphiphil += deltaphiphi2 * logweight;
169 sumlogw += logweight;
174 if (sumw<=0.)
return false;
182 sigmaetaetal /= sumlogw;
184 sigmaphiphil /= sumlogw;
constexpr float energy() const
const math::XYZPoint & position() const
cluster centroid position
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Geom::Phi< T > phi() const
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
U second(std::pair< T, U > const &p)
const edm::PtrVector< reco::BasicCluster > & clusters() const
double energy() const
cluster energy
T const * product() const
XYZPointD XYZPoint
point in space with cartesian internal representation
iterator find(key_type k)
static int position[264][3]