CMS 3D CMS Logo

List of all members | Public Member Functions
HBHETimeProfileStatusBitSetter::compare_digi_energy Struct Reference
Inheritance diagram for HBHETimeProfileStatusBitSetter::compare_digi_energy:

Public Member Functions

bool operator() (const HBHEDataFrame &x, const HBHEDataFrame &y)
 

Detailed Description

Definition at line 52 of file HBHETimeProfileStatusBitSetter.h.

Member Function Documentation

bool HBHETimeProfileStatusBitSetter::compare_digi_energy::operator() ( const HBHEDataFrame x,
const HBHEDataFrame y 
)
inline

Definition at line 53 of file HBHETimeProfileStatusBitSetter.h.

References mps_fire::i, HcalQIESample::nominal_fC(), HBHEDataFrame::sample(), and HBHEDataFrame::size().

53  {
54  double TotalX=0, TotalY=0;
55  for(int i=0; i!=x.size(); TotalX += x.sample(i++).nominal_fC());
56  for(int i=0; i!=y.size(); TotalY += y.sample(i++).nominal_fC());
57 
58  return (TotalX>TotalY) ;
59 
60  }
int size() const
total number of samples in the digi
Definition: HBHEDataFrame.h:31
constexpr double nominal_fC() const
get the nominal FC (no calibrations applied)
Definition: HcalQIESample.h:61
HcalQIESample const & sample(int i) const
access a sample
Definition: HBHEDataFrame.h:44