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 (const FinalStat &other)
 
 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 56 of file GenLumiInfoProduct.h.

Constructor & Destructor Documentation

◆ FinalStat() [1/3]

GenLumiInfoProduct::FinalStat::FinalStat ( )
inline

Definition at line 58 of file GenLumiInfoProduct.h.

58 : n_(0), sum_(0.0), sum2_(0.0) {}

◆ FinalStat() [2/3]

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

Definition at line 59 of file GenLumiInfoProduct.h.

59 : n_(n1), sum_(sum1), sum2_(sum21) {}

◆ FinalStat() [3/3]

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

Definition at line 60 of file GenLumiInfoProduct.h.

60 : n_(other.n_), sum_(other.sum_), sum2_(other.sum2_) {}

Member Function Documentation

◆ add()

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

Definition at line 66 of file GenLumiInfoProduct.h.

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

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

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

◆ n()

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

Definition at line 62 of file GenLumiInfoProduct.h.

62 { return n_; }

References n_.

◆ operator!=()

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

Definition at line 78 of file GenLumiInfoProduct.h.

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

References trackingPlots::other.

◆ operator==()

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

Definition at line 75 of file GenLumiInfoProduct.h.

75  {
76  return n_ == other.n_ && sum_ == other.sum_ && sum2_ == other.sum2_;
77  }

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

◆ sum()

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

Definition at line 63 of file GenLumiInfoProduct.h.

63 { return sum_; }

References sum_.

Referenced by GenXSecAnalyzer::globalEndLuminosityBlock(), and GenLumiInfoProduct::ProcessInfo::mergeXSec().

◆ sum2()

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

Definition at line 64 of file GenLumiInfoProduct.h.

64 { return sum2_; }

References sum2_.

Referenced by GenXSecAnalyzer::globalEndLuminosityBlock().

Member Data Documentation

◆ n_

unsigned int GenLumiInfoProduct::FinalStat::n_
private

Definition at line 81 of file GenLumiInfoProduct.h.

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

◆ sum2_

double GenLumiInfoProduct::FinalStat::sum2_
private

Definition at line 83 of file GenLumiInfoProduct.h.

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

◆ sum_

double GenLumiInfoProduct::FinalStat::sum_
private

Definition at line 82 of file GenLumiInfoProduct.h.

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

GenLumiInfoProduct::FinalStat::sum2_
double sum2_
Definition: GenLumiInfoProduct.h:83
GenLumiInfoProduct::FinalStat::n_
unsigned int n_
Definition: GenLumiInfoProduct.h:81
trackingPlots.other
other
Definition: trackingPlots.py:1464
GenLumiInfoProduct::FinalStat::sum_
double sum_
Definition: GenLumiInfoProduct.h:82