File indexing completed on 2024-04-06 12:04:33
0001 #include "DataFormats/L1THGCal/interface/HGCalMulticluster.h"
0002
0003 using namespace l1t;
0004
0005 HGCalMulticluster::HGCalMulticluster(const LorentzVector p4, int pt, int eta, int phi)
0006 : HGCalClusterT<l1t::HGCalCluster>(p4, pt, eta, phi), hOverE_(-99), hOverEValid_(false) {}
0007
0008 HGCalMulticluster::HGCalMulticluster(const edm::Ptr<l1t::HGCalCluster> &clusterSeed, float fraction)
0009 : HGCalClusterT<l1t::HGCalCluster>(clusterSeed, fraction), hOverE_(-99), hOverEValid_(false) {}
0010
0011 HGCalMulticluster::~HGCalMulticluster() {}
0012
0013 void HGCalMulticluster::saveEnergyInterpretation(const HGCalMulticluster::EnergyInterpretation eInt, double energy) {
0014 energyInterpretationFractions_[eInt] = energy / this->energy();
0015 }
0016
0017 double HGCalMulticluster::interpretationFraction(const HGCalMulticluster::EnergyInterpretation eInt) const {
0018 auto intAndEnergyFraction = energyInterpretationFractions_.find(eInt);
0019 if (intAndEnergyFraction == energyInterpretationFractions_.end()) {
0020
0021 return 1;
0022 }
0023 return intAndEnergyFraction->second;
0024 }