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]
 
const DetId id
 
unsigned int nhits [time_average_capacity]
 
float tot_energy [time_average_capacity]
 
float waveform [waveform_capacity]
 

Static Public Attributes

static const unsigned short time_average_capacity = 10
 
static const unsigned short waveform_capacity = EcalTimeDigi::WAVEFORMSAMPLES
 
static constexpr double waveform_granularity = 1.
 

Detailed Description

Definition at line 22 of file EcalTimeMapDigitizer.h.

Constructor & Destructor Documentation

◆ time_average()

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

Definition at line 33 of file EcalTimeMapDigitizer.h.

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

33  : id(myId) {
34  for (unsigned int i(0); i < time_average_capacity; ++i) {
35  average_time[i] = 0;
36  nhits[i] = 0;
37  tot_energy[i] = 0;
38  }
39  for (unsigned int i(0); i < waveform_capacity; ++i) {
40  waveform[i] = 0;
41  }
42  };
unsigned int nhits[time_average_capacity]
static const unsigned short time_average_capacity
float average_time[time_average_capacity]
float tot_energy[time_average_capacity]
static const unsigned short waveform_capacity

Member Function Documentation

◆ calculateAverage()

void EcalTimeMapDigitizer::time_average::calculateAverage ( )
inline

Definition at line 44 of file EcalTimeMapDigitizer.h.

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

Referenced by EcalTimeMapDigitizer::finalizeHits().

44  {
45  for (unsigned int i(0); i < time_average_capacity; ++i) {
46  if (nhits[i] > 0)
48  else
49  average_time[i] = 0;
50  }
51  };
unsigned int nhits[time_average_capacity]
static const unsigned short time_average_capacity
float average_time[time_average_capacity]
float tot_energy[time_average_capacity]

◆ setZero()

void EcalTimeMapDigitizer::time_average::setZero ( )
inline

Definition at line 53 of file EcalTimeMapDigitizer.h.

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

Referenced by EcalTimeMapDigitizer::blankOutUsedSamples().

53  {
54  for (unsigned int i(0); i < time_average_capacity; ++i) {
55  average_time[i] = 0;
56  nhits[i] = 0;
57  tot_energy[i] = 0;
58  }
59  for (unsigned int i(0); i < waveform_capacity; ++i) {
60  waveform[i] = 0;
61  }
62  };
unsigned int nhits[time_average_capacity]
static const unsigned short time_average_capacity
float average_time[time_average_capacity]
float tot_energy[time_average_capacity]
static const unsigned short waveform_capacity

◆ zero()

bool EcalTimeMapDigitizer::time_average::zero ( )
inline

Definition at line 64 of file EcalTimeMapDigitizer.h.

References mps_fire::i, nhits, and time_average_capacity.

64  {
65  for (unsigned int i(0); i < time_average_capacity; ++i) {
66  if (nhits[i] > 0)
67  return false;
68  }
69  return true;
70  };
unsigned int nhits[time_average_capacity]
static const unsigned short time_average_capacity

Member Data Documentation

◆ average_time

float EcalTimeMapDigitizer::time_average::average_time[time_average_capacity]

◆ id

const DetId EcalTimeMapDigitizer::time_average::id

Definition at line 27 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]

◆ waveform

float EcalTimeMapDigitizer::time_average::waveform[waveform_capacity]

Definition at line 31 of file EcalTimeMapDigitizer.h.

Referenced by setZero(), and time_average().

◆ waveform_capacity

const unsigned short EcalTimeMapDigitizer::time_average::waveform_capacity = EcalTimeDigi::WAVEFORMSAMPLES
static

Definition at line 24 of file EcalTimeMapDigitizer.h.

Referenced by setZero(), and time_average().

◆ waveform_granularity

constexpr double EcalTimeMapDigitizer::time_average::waveform_granularity = 1.
static

Definition at line 25 of file EcalTimeMapDigitizer.h.