CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HcalInterpolatedPulseColl.cc
Go to the documentation of this file.
3 
4 HcalInterpolatedPulseColl::HcalInterpolatedPulseColl(const std::vector<HcalInterpolatedPulse>& pulses,
5  const HBHEChannelGroups& groups)
6  : pulses_(pulses), groups_(groups) {
7  if (!(pulses_.size() == groups_.largestGroupNumber() + 1U))
8  throw cms::Exception("Inconsistent arguments in HcalInterpolatedPulseColl constructor");
9 }
10 
12  // Figure out the group number for this channel
13  const unsigned lindex = hbheChannelMap().linearIndex(id.depth(), id.ieta(), id.iphi());
14  const unsigned grN = groups_.getGroup(lindex);
15 
16  // Return the pulse for this group
17  return pulses_[grN];
18 }
unsigned getGroup(const unsigned linearChannel) const
std::vector< HcalInterpolatedPulse > pulses_
unsigned largestGroupNumber() const
const HcalInterpolatedPulse & getChannelPulse(const HcalDetId &id) const
const HBHELinearMap & hbheChannelMap()
unsigned linearIndex(unsigned depth, int ieta, unsigned iphi) const