CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GenLumiInfoProduct::FinalStat Struct Reference

#include <GenLumiInfoProduct.h>

Public Member Functions

void add (const FinalStat &other)
 
 FinalStat ()
 
 FinalStat (unsigned int n1, double sum1, double sum21)
 
unsigned int n () const
 
bool operator!= (const FinalStat &other) const
 
bool operator== (const FinalStat &other) const
 
double sum () const
 
double sum2 () const
 

Private Attributes

unsigned int n_
 
double sum2_
 
double sum_
 

Detailed Description

Definition at line 54 of file GenLumiInfoProduct.h.

Constructor & Destructor Documentation

◆ FinalStat() [1/2]

GenLumiInfoProduct::FinalStat::FinalStat ( )
inline

◆ FinalStat() [2/2]

GenLumiInfoProduct::FinalStat::FinalStat ( unsigned int  n1,
double  sum1,
double  sum21 
)
inline

Definition at line 57 of file GenLumiInfoProduct.h.

Member Function Documentation

◆ add()

void GenLumiInfoProduct::FinalStat::add ( const FinalStat other)
inline

Definition at line 63 of file GenLumiInfoProduct.h.

References n_, trackingPlots::other, sum2_, and sum_.

Referenced by GenLumiInfoProduct::ProcessInfo::addOthers(), and counter.Counter::register().

63  {
64  //Hadronizers treat 0, -1., -1. to mean the value is not present
65  if (other.n() != 0 and other.sum_ != -1. and other.sum2() != -1.) {
66  n_ += other.n();
67  sum_ += other.sum();
68  sum2_ += other.sum2();
69  }
70  }

◆ n()

unsigned int GenLumiInfoProduct::FinalStat::n ( ) const
inline

Definition at line 59 of file GenLumiInfoProduct.h.

References n_.

59 { return n_; }

◆ operator!=()

bool GenLumiInfoProduct::FinalStat::operator!= ( const FinalStat other) const
inline

Definition at line 75 of file GenLumiInfoProduct.h.

References trackingPlots::other.

75 { return !(*this == other); }

◆ operator==()

bool GenLumiInfoProduct::FinalStat::operator== ( const FinalStat other) const
inline

Definition at line 72 of file GenLumiInfoProduct.h.

References n_, trackingPlots::other, sum2_, and sum_.

◆ sum()

double GenLumiInfoProduct::FinalStat::sum ( ) const
inline

◆ sum2()

double GenLumiInfoProduct::FinalStat::sum2 ( ) const
inline

Definition at line 61 of file GenLumiInfoProduct.h.

References sum2_.

Referenced by GenXSecAnalyzer::globalEndLuminosityBlock().

Member Data Documentation

◆ n_

unsigned int GenLumiInfoProduct::FinalStat::n_
private

Definition at line 78 of file GenLumiInfoProduct.h.

Referenced by add(), n(), and operator==().

◆ sum2_

double GenLumiInfoProduct::FinalStat::sum2_
private

Definition at line 80 of file GenLumiInfoProduct.h.

Referenced by add(), operator==(), and sum2().

◆ sum_

double GenLumiInfoProduct::FinalStat::sum_
private

Definition at line 79 of file GenLumiInfoProduct.h.

Referenced by add(), operator==(), and sum().