CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
HcalInterpolatedPulseColl Class Reference

#include <HcalInterpolatedPulseColl.h>

Public Member Functions

const HcalInterpolatedPulsegetChannelPulse (const HcalDetId &id) const
 
const HcalInterpolatedPulsegetChannelPulse (const unsigned i) const
 
 HcalInterpolatedPulseColl (const std::vector< HcalInterpolatedPulse > &pulses, const HBHEChannelGroups &groups)
 
 HcalInterpolatedPulseColl ()
 
bool operator!= (const HcalInterpolatedPulseColl &r)
 
bool operator== (const HcalInterpolatedPulseColl &r)
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, unsigned)
 

Private Attributes

HBHEChannelGroups groups_
 
std::vector< HcalInterpolatedPulsepulses_
 

Friends

class boost::serialization::access
 

Detailed Description

Definition at line 8 of file HcalInterpolatedPulseColl.h.

Constructor & Destructor Documentation

◆ HcalInterpolatedPulseColl() [1/2]

HcalInterpolatedPulseColl::HcalInterpolatedPulseColl ( const std::vector< HcalInterpolatedPulse > &  pulses,
const HBHEChannelGroups groups 
)

Definition at line 4 of file HcalInterpolatedPulseColl.cc.

References Exception, groups_, HBHEChannelGroups::largestGroupNumber(), pulses_, and mitigatedMETSequence_cff::U.

6  : pulses_(pulses), groups_(groups) {
7  if (!(pulses_.size() == groups_.largestGroupNumber() + 1U))
8  throw cms::Exception("Inconsistent arguments in HcalInterpolatedPulseColl constructor");
9 }
std::vector< HcalInterpolatedPulse > pulses_
unsigned largestGroupNumber() const

◆ HcalInterpolatedPulseColl() [2/2]

HcalInterpolatedPulseColl::HcalInterpolatedPulseColl ( )
inline

Definition at line 29 of file HcalInterpolatedPulseColl.h.

29 {}

Member Function Documentation

◆ getChannelPulse() [1/2]

const HcalInterpolatedPulse & HcalInterpolatedPulseColl::getChannelPulse ( const HcalDetId id) const

Definition at line 11 of file HcalInterpolatedPulseColl.cc.

References hcalRecHitTable_cff::depth, HBHEChannelGroups::getGroup(), groups_, hbheChannelMap(), hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, HBHELinearMap::linearIndex(), and pulses_.

11  {
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 }
std::vector< HcalInterpolatedPulse > pulses_
unsigned linearIndex(unsigned depth, int ieta, unsigned iphi) const
unsigned getGroup(const unsigned linearChannel) const
const HBHELinearMap & hbheChannelMap()

◆ getChannelPulse() [2/2]

const HcalInterpolatedPulse& HcalInterpolatedPulseColl::getChannelPulse ( const unsigned  i) const
inline

Definition at line 16 of file HcalInterpolatedPulseColl.h.

References HBHEChannelGroups::getGroup(), groups_, mps_fire::i, and pulses_.

16 { return pulses_[groups_.getGroup(i)]; }
std::vector< HcalInterpolatedPulse > pulses_
unsigned getGroup(const unsigned linearChannel) const

◆ operator!=()

bool HcalInterpolatedPulseColl::operator!= ( const HcalInterpolatedPulseColl r)
inline

Definition at line 20 of file HcalInterpolatedPulseColl.h.

References alignCSCRings::r.

20 { return !(*this == r); }

◆ operator==()

bool HcalInterpolatedPulseColl::operator== ( const HcalInterpolatedPulseColl r)
inline

Definition at line 18 of file HcalInterpolatedPulseColl.h.

References groups_, pulses_, and alignCSCRings::r.

18 { return pulses_ == r.pulses_ && groups_ == r.groups_; }
std::vector< HcalInterpolatedPulse > pulses_

◆ serialize()

template<class Archive >
void HcalInterpolatedPulseColl::serialize ( Archive &  ar,
unsigned   
)
inlineprivate

Definition at line 35 of file HcalInterpolatedPulseColl.h.

References groups_, and pulses_.

35  {
36  ar & pulses_ & groups_;
37  }
std::vector< HcalInterpolatedPulse > pulses_

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 32 of file HcalInterpolatedPulseColl.h.

Member Data Documentation

◆ groups_

HBHEChannelGroups HcalInterpolatedPulseColl::groups_
private

◆ pulses_

std::vector<HcalInterpolatedPulse> HcalInterpolatedPulseColl::pulses_
private