CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
LumiInfo Class Reference

#include <LumiInfo.h>

Public Member Functions

float deadFraction () const
 
void fill (const std::vector< float > &instLumiByBX)
 
void fillInstLumi (const std::vector< float > &instLumiByBX)
 
const std::vector< float > & getInstLumiAllBX () const
 
float getInstLumiBX (int bx) const
 
float instLuminosity () const
 
float integLuminosity () const
 
bool isProductEqual (LumiInfo const &next) const
 
float liveFraction () const
 
 LumiInfo ()
 default constructor More...
 
 LumiInfo (float deadtimeFraction, const std::vector< float > &instLumiByBX)
 constructor with fill More...
 
float lumiSectionLength () const
 
float recordedLuminosity () const
 
void setDeadFraction (float deadtimeFraction)
 
 ~LumiInfo ()
 destructor More...
 

Private Attributes

float deadtimeFraction_
 
std::vector< float > instLumiByBX_
 

Detailed Description

LumiInfo has been created by merging the content of the old LumiSummary and LumiDetails classes to streamline the lumi information. Many old member variables have been removed.

Author
Valerie Halyo David Dagenhart Zhen Xie Paul Lujan
Version
1st Version June 7 2007, merged September 10 2014

Definition at line 26 of file LumiInfo.h.

Constructor & Destructor Documentation

LumiInfo::LumiInfo ( )
inline

default constructor

Definition at line 29 of file LumiInfo.h.

References instLumiByBX_, and LumiConstants::numBX.

29  :
31  {
33  }
static const unsigned int numBX
Definition: LumiConstants.h:9
float deadtimeFraction_
Definition: LumiInfo.h:80
std::vector< float > instLumiByBX_
Definition: LumiInfo.h:81
LumiInfo::LumiInfo ( float  deadtimeFraction,
const std::vector< float > &  instLumiByBX 
)
inline

constructor with fill

Definition at line 36 of file LumiInfo.h.

References instLumiByBX_.

37  :
38  deadtimeFraction_(deadtimeFraction)
39  {
40  instLumiByBX_.assign(instLumiByBX.begin(), instLumiByBX.end());
41  }
float deadtimeFraction_
Definition: LumiInfo.h:80
std::vector< float > instLumiByBX_
Definition: LumiInfo.h:81
LumiInfo::~LumiInfo ( )
inline

destructor

Definition at line 44 of file LumiInfo.h.

44 {}

Member Function Documentation

float LumiInfo::deadFraction ( ) const
inline

Definition at line 57 of file LumiInfo.h.

References deadtimeFraction_.

Referenced by operator<<().

57 { return deadtimeFraction_; }
float deadtimeFraction_
Definition: LumiInfo.h:80
void LumiInfo::fill ( const std::vector< float > &  instLumiByBX)

Definition at line 38 of file LumiInfo.cc.

References fillInstLumi().

38  {
39  fillInstLumi(instLumiByBX);
40 }
void fillInstLumi(const std::vector< float > &instLumiByBX)
Definition: LumiInfo.cc:34
void LumiInfo::fillInstLumi ( const std::vector< float > &  instLumiByBX)

Definition at line 34 of file LumiInfo.cc.

References instLumiByBX_.

Referenced by fill().

34  {
35  instLumiByBX_.assign(instLumiByBX.begin(), instLumiByBX.end());
36 }
std::vector< float > instLumiByBX_
Definition: LumiInfo.h:81
const std::vector<float>& LumiInfo::getInstLumiAllBX ( ) const
inline

Definition at line 65 of file LumiInfo.h.

References instLumiByBX_.

Referenced by operator<<().

65 { return instLumiByBX_; }
std::vector< float > instLumiByBX_
Definition: LumiInfo.h:81
float LumiInfo::getInstLumiBX ( int  bx) const
inline

Definition at line 64 of file LumiInfo.h.

References instLumiByBX_.

64 { return instLumiByBX_.at(bx); }
std::vector< float > instLumiByBX_
Definition: LumiInfo.h:81
float LumiInfo::instLuminosity ( ) const

Definition at line 7 of file LumiInfo.cc.

References instLumiByBX_.

Referenced by integLuminosity(), and operator<<().

7  {
8  float totLum = 0;
9  for (std::vector<float>::const_iterator it = instLumiByBX_.begin();
10  it != instLumiByBX_.end(); ++it) {
11  totLum += *it;
12  }
13  return totLum;
14 }
std::vector< float > instLumiByBX_
Definition: LumiInfo.h:81
float LumiInfo::integLuminosity ( ) const

Definition at line 16 of file LumiInfo.cc.

References instLuminosity(), and lumiSectionLength().

Referenced by operator<<(), and recordedLuminosity().

16  {
18 }
float lumiSectionLength() const
Definition: LumiInfo.cc:24
float instLuminosity() const
Definition: LumiInfo.cc:7
bool LumiInfo::isProductEqual ( LumiInfo const &  next) const

Definition at line 29 of file LumiInfo.cc.

References deadtimeFraction_, and instLumiByBX_.

29  {
30  return (deadtimeFraction_ == next.deadtimeFraction_ &&
31  instLumiByBX_ == next.instLumiByBX_);
32 }
float deadtimeFraction_
Definition: LumiInfo.h:80
std::vector< float > instLumiByBX_
Definition: LumiInfo.h:81
float LumiInfo::liveFraction ( ) const
inline

Definition at line 58 of file LumiInfo.h.

References deadtimeFraction_.

58 { return 1-deadtimeFraction_; }
float deadtimeFraction_
Definition: LumiInfo.h:80
float LumiInfo::lumiSectionLength ( ) const

Definition at line 24 of file LumiInfo.cc.

References LumiConstants::bxSpacingExact, LumiConstants::numBX, and LumiConstants::numOrbits.

Referenced by integLuminosity().

24  {
25  // numorbits (262144)*numBX/orbit (3564)*bx spacing (24.95e-09)
27 }
static const unsigned int numOrbits
Definition: LumiConstants.h:8
static const unsigned int numBX
Definition: LumiConstants.h:9
static const float bxSpacingExact
Definition: LumiConstants.h:10
float LumiInfo::recordedLuminosity ( ) const

Definition at line 20 of file LumiInfo.cc.

References deadtimeFraction_, and integLuminosity().

Referenced by operator<<().

20  {
22 }
float integLuminosity() const
Definition: LumiInfo.cc:16
float deadtimeFraction_
Definition: LumiInfo.h:80
void LumiInfo::setDeadFraction ( float  deadtimeFraction)
inline

Definition at line 73 of file LumiInfo.h.

References deadtimeFraction_.

73 { deadtimeFraction_ = deadtimeFraction; }
float deadtimeFraction_
Definition: LumiInfo.h:80

Member Data Documentation

float LumiInfo::deadtimeFraction_
private
std::vector<float> LumiInfo::instLumiByBX_
private