ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
L1CaloRampStep Class Reference

Class to store the measured energy per step for either calorimeter or level-1. More...

#include <L1CaloRampData.h>

Collaboration diagram for L1CaloRampStep:

Public Member Functions

 L1CaloRampStep ()
 
virtual ~L1CaloRampStep ()
 
void addEvent (double energy)
 
double mean () const
 
double rms () const
 

Private Attributes

unsigned int m_nEntries
 
double m_w
 
double m_w2
 

Detailed Description

Class to store the measured energy per step for either calorimeter or level-1.

Author
Veit Scharf veit..nosp@m.scha.nosp@m.rf@ki.nosp@m.p.un.nosp@m.i-hei.nosp@m.delb.nosp@m.erg.d.nosp@m.e

Definition at line 17 of file L1CaloRampData.h.

Constructor & Destructor Documentation

◆ L1CaloRampStep()

L1CaloRampStep::L1CaloRampStep ( )
inline

Definition at line 20 of file L1CaloRampData.h.

20 : m_nEntries(0) , m_w(0.), m_w2(0.) {}

◆ ~L1CaloRampStep()

virtual L1CaloRampStep::~L1CaloRampStep ( )
inlinevirtual

Definition at line 21 of file L1CaloRampData.h.

21 {}

Member Function Documentation

◆ addEvent()

void L1CaloRampStep::addEvent ( double  energy)

Definition at line 7 of file L1CaloRampData.cxx.

8 {
9  ++m_nEntries;
10  m_w += energy;
11  m_w2 += (energy * energy);
12 }

◆ mean()

double L1CaloRampStep::mean ( ) const

Definition at line 14 of file L1CaloRampData.cxx.

15 {
16  if(!m_nEntries) return 0.;
17  return m_w / double(m_nEntries);
18 }

◆ rms()

double L1CaloRampStep::rms ( ) const

Definition at line 20 of file L1CaloRampData.cxx.

21 {
22  if(!m_nEntries) return 1.;
23  if(m_nEntries == 1) return 1.;
24  double mean = this->mean();
25  return std::sqrt((m_w2 / double(m_nEntries))) - mean;
26 }

Member Data Documentation

◆ m_nEntries

unsigned int L1CaloRampStep::m_nEntries
private

Definition at line 28 of file L1CaloRampData.h.

◆ m_w

double L1CaloRampStep::m_w
private

Definition at line 29 of file L1CaloRampData.h.

◆ m_w2

double L1CaloRampStep::m_w2
private

Definition at line 30 of file L1CaloRampData.h.


The documentation for this class was generated from the following files:
L1CaloRampStep::m_w2
double m_w2
Definition: L1CaloRampData.h:30
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
L1CaloRampStep::mean
double mean() const
Definition: L1CaloRampData.cxx:14
L1CaloRampStep::m_w
double m_w
Definition: L1CaloRampData.h:29
L1CaloRampStep::m_nEntries
unsigned int m_nEntries
Definition: L1CaloRampData.h:28