CMS 3D CMS Logo

LumiInfo.cc
Go to the documentation of this file.
2 
3 #include <iomanip>
4 #include <ostream>
5 #include <iostream>
6 
7 float LumiInfo::instLuminosity() const {
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 }
15 
18 }
19 
22 }
23 
25  // numorbits (262144)*numBX/orbit (3564)*bx spacing (24.95e-09)
27 }
28 
30  return (deadtimeFraction_ == next.deadtimeFraction_ &&
32 }
33 
34 void LumiInfo::fillInstLumi(const std::vector<float>& instLumiByBX) {
35  instLumiByBX_.assign(instLumiByBX.begin(), instLumiByBX.end());
36 }
37 
38 void LumiInfo::fill(const std::vector<float>& instLumiByBX) {
39  fillInstLumi(instLumiByBX);
40 }
41 
42 std::ostream& operator<<(std::ostream& s, const LumiInfo& lumiInfo) {
43  s << "\nDumping LumiInfo\n\n";
44  s << " instLuminosity = " << lumiInfo.instLuminosity() << "\n";
45  s << " integLuminosity = " << lumiInfo.integLuminosity() << "\n";
46  s << " recordedLuminosity = " << lumiInfo.recordedLuminosity() << "\n";
47  s << " deadtimeFraction = " << lumiInfo.deadFraction() << "\n";
48  s << " instLumiByBX = ";
49  const std::vector<float>& lumiBX = lumiInfo.getInstLumiAllBX();
50  for (unsigned int i=0; i<10 && i<lumiBX.size(); ++i) {
51  s << lumiBX.at(i) << " ";
52  }
53  s << " ...\n";
54 
55  return s << "\n";
56 }
void fillInstLumi(const std::vector< float > &instLumiByBX)
Definition: LumiInfo.cc:34
int i
Definition: DBlmapReader.cc:9
bool isProductEqual(LumiInfo const &next) const
Definition: LumiInfo.cc:29
float recordedLuminosity() const
Definition: LumiInfo.cc:20
float lumiSectionLength() const
Definition: LumiInfo.cc:24
static const unsigned int numOrbits
Definition: LumiConstants.h:8
float deadFraction() const
Definition: LumiInfo.h:57
static const unsigned int numBX
Definition: LumiConstants.h:9
float integLuminosity() const
Definition: LumiInfo.cc:16
std::ostream & operator<<(std::ostream &s, const LumiInfo &lumiInfo)
Definition: LumiInfo.cc:42
float instLuminosity() const
Definition: LumiInfo.cc:7
void fill(const std::vector< float > &instLumiByBX)
Definition: LumiInfo.cc:38
static const float bxSpacingExact
Definition: LumiConstants.h:10
const std::vector< float > & getInstLumiAllBX() const
Definition: LumiInfo.h:65
float deadtimeFraction_
Definition: LumiInfo.h:80
std::vector< float > instLumiByBX_
Definition: LumiInfo.h:81