CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes
EcalTimeMapDigitizer::time_average Struct Reference

#include <EcalTimeMapDigitizer.h>

Public Member Functions

void calculateAverage ()
 
void setZero ()
 
 time_average (const DetId &myId)
 
bool zero ()
 

Public Attributes

float average_time [time_average_capacity]
 
DetId id
 
unsigned int nhits [time_average_capacity]
 
float tot_energy [time_average_capacity]
 

Static Public Attributes

static const unsigned short time_average_capacity = 10
 

Detailed Description

Definition at line 21 of file EcalTimeMapDigitizer.h.

Constructor & Destructor Documentation

◆ time_average()

EcalTimeMapDigitizer::time_average::time_average ( const DetId myId)
inline

Definition at line 29 of file EcalTimeMapDigitizer.h.

29  : id(myId) {
30  for (unsigned int i(0); i < time_average_capacity; ++i) {
31  average_time[i] = 0;
32  nhits[i] = 0;
33  tot_energy[i] = 0;
34  }
35  };

References average_time, mps_fire::i, nhits, time_average_capacity, and tot_energy.

Member Function Documentation

◆ calculateAverage()

void EcalTimeMapDigitizer::time_average::calculateAverage ( )
inline

Definition at line 37 of file EcalTimeMapDigitizer.h.

37  {
38  for (unsigned int i(0); i < time_average_capacity; ++i) {
39  if (nhits[i] > 0)
41  else
42  average_time[i] = 0;
43  }
44  };

References average_time, mps_fire::i, nhits, time_average_capacity, and tot_energy.

Referenced by EcalTimeMapDigitizer::finalizeHits().

◆ setZero()

void EcalTimeMapDigitizer::time_average::setZero ( )
inline

Definition at line 46 of file EcalTimeMapDigitizer.h.

46  {
47  for (unsigned int i(0); i < time_average_capacity; ++i) {
48  average_time[i] = 0;
49  nhits[i] = 0;
50  tot_energy[i] = 0;
51  }
52  };

References average_time, mps_fire::i, nhits, time_average_capacity, and tot_energy.

Referenced by EcalTimeMapDigitizer::blankOutUsedSamples().

◆ zero()

bool EcalTimeMapDigitizer::time_average::zero ( )
inline

Definition at line 54 of file EcalTimeMapDigitizer.h.

54  {
55  for (unsigned int i(0); i < time_average_capacity; ++i) {
56  if (nhits[i] > 0)
57  return false;
58  }
59  return true;
60  };

References mps_fire::i, nhits, and time_average_capacity.

Member Data Documentation

◆ average_time

float EcalTimeMapDigitizer::time_average::average_time[time_average_capacity]

◆ id

DetId EcalTimeMapDigitizer::time_average::id

Definition at line 24 of file EcalTimeMapDigitizer.h.

◆ nhits

unsigned int EcalTimeMapDigitizer::time_average::nhits[time_average_capacity]

◆ time_average_capacity

const unsigned short EcalTimeMapDigitizer::time_average::time_average_capacity = 10
static

◆ tot_energy

float EcalTimeMapDigitizer::time_average::tot_energy[time_average_capacity]
mps_fire.i
i
Definition: mps_fire.py:355
EcalTimeMapDigitizer::time_average::tot_energy
float tot_energy[time_average_capacity]
Definition: EcalTimeMapDigitizer.h:27
EcalTimeMapDigitizer::time_average::average_time
float average_time[time_average_capacity]
Definition: EcalTimeMapDigitizer.h:25
EcalTimeMapDigitizer::time_average::id
DetId id
Definition: EcalTimeMapDigitizer.h:24
EcalTimeMapDigitizer::time_average::nhits
unsigned int nhits[time_average_capacity]
Definition: EcalTimeMapDigitizer.h:26
EcalTimeMapDigitizer::time_average::time_average_capacity
static const unsigned short time_average_capacity
Definition: EcalTimeMapDigitizer.h:22