CMS 3D CMS Logo

HcalInterpolatedPulseColl.cc
Go to the documentation of this file.
3 
5  const std::vector<HcalInterpolatedPulse>& pulses,
6  const HBHEChannelGroups& groups)
7  : pulses_(pulses),
8  groups_(groups)
9 {
10  if (!(pulses_.size() == groups_.largestGroupNumber() + 1U))
11  throw cms::Exception(
12  "Inconsistent arguments in HcalInterpolatedPulseColl constructor");
13 }
14 
16  const HcalDetId& id) const
17 {
18  // Figure out the group number for this channel
19  const unsigned lindex = hbheChannelMap().linearIndex(
20  id.depth(), id.ieta(), id.iphi());
21  const unsigned grN = groups_.getGroup(lindex);
22 
23  // Return the pulse for this group
24  return pulses_[grN];
25 }
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