CMS 3D CMS Logo

LumiInfo.cc
Go to the documentation of this file.
2 
3 #include <vector>
4 #include <iomanip>
5 #include <ostream>
6 #include <iostream>
7 
9  float totLum = 0;
10  for (std::vector<float>::const_iterator it = instLumiByBX_.begin(); it != instLumiByBX_.end(); ++it) {
11  totLum += *it;
12  }
13  return totLum;
14 }
15 
17 
19 
21 
23  // numorbits (262144)*numBX/orbit (3564)*bx spacing (24.95e-09)
25 }
26 
28  return (deadtimeFraction_ == next.deadtimeFraction_ && instLumiByBX_ == next.instLumiByBX_);
29 }
30 
31 void LumiInfo::setInstLumiAllBX(std::vector<float>& instLumiByBX) {
32  instLumiByBX_.assign(instLumiByBX.begin(), instLumiByBX.end());
33 }
34 
35 void LumiInfo::setErrorLumiAllBX(std::vector<float>& errLumiByBX) {
36  instLumiStatErrByBX_.assign(errLumiByBX.begin(), errLumiByBX.end());
37 }
38 
39 std::ostream& operator<<(std::ostream& s, const LumiInfo& lumiInfo) {
40  s << "\nDumping LumiInfo\n\n";
41  s << " getTotalInstLumi = " << lumiInfo.getTotalInstLumi() << "\n";
42  s << " integLuminosity = " << lumiInfo.integLuminosity() << "\n";
43  s << " recordedLuminosity = " << lumiInfo.recordedLuminosity() << "\n";
44  s << " deadtimeFraction = " << lumiInfo.getDeadFraction() << "\n";
45  s << " instLumiByBX = ";
46  const std::vector<float>& lumiBX = lumiInfo.getInstLumiAllBX();
47  for (unsigned int i = 0; i < 10 && i < lumiBX.size(); ++i) {
48  s << lumiBX.at(i) << " ";
49  }
50  s << " ...\n";
51 
52  return s << "\n";
53 }
mps_fire.i
i
Definition: mps_fire.py:355
LumiInfo
Definition: LumiInfo.h:28
LumiConstants::numBX
static const unsigned int numBX
Definition: LumiConstants.h:8
pileupCalc.lumiInfo
lumiInfo
Definition: pileupCalc.py:237
LumiInfo::deadtimeFraction_
float deadtimeFraction_
Definition: LumiInfo.h:167
LumiInfo::setTotalInstLumi
void setTotalInstLumi(float totalLumi)
Definition: LumiInfo.h:122
LumiConstants::numOrbits
static const unsigned int numOrbits
Definition: LumiConstants.h:7
alignCSCRings.s
s
Definition: alignCSCRings.py:92
LumiInfo::setInstLumiAllBX
void setInstLumiAllBX(std::vector< float > &instLumiByBX)
Definition: LumiInfo.cc:31
LumiConstants::bxSpacingExact
static const float bxSpacingExact
Definition: LumiConstants.h:9
operator<<
std::ostream & operator<<(std::ostream &s, const LumiInfo &lumiInfo)
Definition: LumiInfo.cc:39
LumiInfo.h
LumiInfo::getTotalInstLumi
float getTotalInstLumi() const
Definition: LumiInfo.h:85
LumiInfo::integLuminosity
float integLuminosity() const
Definition: LumiInfo.cc:16
LumiInfo::lumiSectionLength
float lumiSectionLength() const
Definition: LumiInfo.cc:22
LumiInfo::recordedLuminosity
float recordedLuminosity() const
Definition: LumiInfo.cc:20
LumiInfo::isProductEqual
bool isProductEqual(LumiInfo const &next) const
Definition: LumiInfo.cc:27
LumiInfo::setTotalInstToBXSum
void setTotalInstToBXSum()
Definition: LumiInfo.cc:18
LumiInfo::instLumiByBX_
std::vector< float > instLumiByBX_
Definition: LumiInfo.h:170
LumiInfo::instLumiStatErrByBX_
std::vector< float > instLumiStatErrByBX_
Definition: LumiInfo.h:171
LumiInfo::instLuminosityBXSum
float instLuminosityBXSum() const
Definition: LumiInfo.cc:8
LumiInfo::setErrorLumiAllBX
void setErrorLumiAllBX(std::vector< float > &errLumiByBX)
Definition: LumiInfo.cc:35
GetRecoTauVFromDQM_MC_cff.next
next
Definition: GetRecoTauVFromDQM_MC_cff.py:31