CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
LumiSummary Class Reference

#include <LumiSummary.h>

Classes

class  HLT
 
class  L1
 

Public Member Functions

float avgInsDelLumi () const
 
float avgInsDelLumiErr () const
 
float avgInsRecLumi () const
 
float avgInsRecLumiErr () const
 
unsigned long long bitzerocount () const
 
void copyHLTData (const std::vector< HLT > &hltdata)
 
void copyL1Data (const std::vector< L1 > &l1data)
 
unsigned long long deadcount () const
 
float deadFrac () const
 
HLT hltinfo (unsigned int idx) const
 
float intgDelLumi () const
 
float intgRecLumi () const
 
bool isProductEqual (LumiSummary const &next) const
 
bool isValid () const
 
L1 l1info (unsigned int idx) const
 
float liveFrac () const
 
unsigned int lsNumber () const
 
short lumiSecQual () const
 
float lumiSectionLength () const
 
 LumiSummary ()
 default constructor More...
 
 LumiSummary (float avginsdellumi, float avginsdellumierr, short lumisecqual, unsigned long long deadcount, unsigned long long bitzerocount, unsigned int lsnumber, const std::vector< L1 > &l1in, const std::vector< HLT > &hltin, unsigned int startorbit, unsigned int numorbit, const std::string &lumiversion)
 set default constructor More...
 
std::string lumiVersion () const
 
size_t nHLTPath () const
 
size_t nTriggerLine () const
 
unsigned int numOrbit () const
 
void setBitZeroCount (unsigned long long bitzerocount)
 
void setDeadCount (unsigned long long deadcount)
 
void setlsnumber (unsigned int lsnumber)
 
void setLumiData (float instlumi, float instlumierr, short lumiquality)
 
void setLumiVersion (const std::string &lumiversion)
 
void setOrbitData (unsigned int startorbit, unsigned int numorbit)
 
unsigned int startOrbit () const
 
void swapHLTData (std::vector< HLT > &hltdata)
 
void swapL1Data (std::vector< L1 > &l1data)
 
 ~LumiSummary ()
 destructor More...
 

Private Attributes

float avginsdellumi_
 
float avginsdellumierr_
 
unsigned long long bitzerocount_
 
unsigned long long deadcount_
 
std::vector< HLThltdata_
 
std::vector< L1l1data_
 
unsigned int lsnumber_
 
short lumisecqual_
 
std::string lumiversion_
 
unsigned int numorbit_
 
unsigned int startorbit_
 

Detailed Description

LumiSummary holds Summary information averaged over all bunch crossings for the given luminosity section LS

Author
Valerie Halyo David Dagenhart Zhen Xie
Version
1st Version June 7 2007

Definition at line 20 of file LumiSummary.h.

Constructor & Destructor Documentation

◆ LumiSummary() [1/2]

LumiSummary::LumiSummary ( )
inline

default constructor

Definition at line 37 of file LumiSummary.h.

38  : lumiversion_("-1"),
39  avginsdellumi_(0.0),
40  avginsdellumierr_(0.0),
41  lumisecqual_(0),
42  deadcount_(0),
43  bitzerocount_(),
44  lsnumber_(0),
45  startorbit_(0),
46  numorbit_(0) {
47  hltdata_.reserve(100);
48  l1data_.reserve(192);
49  }

References hltdata_, and l1data_.

◆ LumiSummary() [2/2]

LumiSummary::LumiSummary ( float  avginsdellumi,
float  avginsdellumierr,
short  lumisecqual,
unsigned long long  deadcount,
unsigned long long  bitzerocount,
unsigned int  lsnumber,
const std::vector< L1 > &  l1in,
const std::vector< HLT > &  hltin,
unsigned int  startorbit,
unsigned int  numorbit,
const std::string &  lumiversion 
)
inline

set default constructor

Definition at line 52 of file LumiSummary.h.

64  avginsdellumi_(avginsdellumi),
65  avginsdellumierr_(avginsdellumierr),
66  lumisecqual_(lumisecqual),
69  lsnumber_(lsnumber),
70  hltdata_(hltin),
71  l1data_(l1in),
72  startorbit_(startorbit),
73  numorbit_(numorbit) {}

◆ ~LumiSummary()

LumiSummary::~LumiSummary ( )
inline

destructor

Definition at line 76 of file LumiSummary.h.

76 {}

Member Function Documentation

◆ avgInsDelLumi()

float LumiSummary::avgInsDelLumi ( ) const

average inst lumi,delivered, unit Hz/ub, uncalibrated for lumiversion v2

Definition at line 8 of file LumiSummary.cc.

8  {
9  size_t iIndex = lumiversion_.rfind("v");
10  //i.e. not "-1" and not "DIP", "-1" and "DIP" lumi are already corrected and unit conversion included in the raw data.
11  if (iIndex != std::string::npos) {
12  return avginsdellumi_ * 1000.0;
13  }
14  return avginsdellumi_;
15 }

References avginsdellumi_, and lumiversion_.

Referenced by avgInsRecLumi(), GetLumi::getRawValue(), and intgDelLumi().

◆ avgInsDelLumiErr()

float LumiSummary::avgInsDelLumiErr ( ) const

average inst lumi error, empty for lumiversion v2

Definition at line 17 of file LumiSummary.cc.

17 { return avginsdellumierr_; }

References avginsdellumierr_.

◆ avgInsRecLumi()

float LumiSummary::avgInsRecLumi ( ) const

avg inst lumi corrected by deadtime

Definition at line 55 of file LumiSummary.cc.

55 { return this->avgInsDelLumi() * liveFrac(); }

References avgInsDelLumi(), and liveFrac().

Referenced by intgRecLumi().

◆ avgInsRecLumiErr()

float LumiSummary::avgInsRecLumiErr ( ) const

avg inst lumi error corrected by deadtime

Definition at line 56 of file LumiSummary.cc.

56 { return avginsdellumierr_ * liveFrac(); }

References avginsdellumierr_, and liveFrac().

◆ bitzerocount()

unsigned long long LumiSummary::bitzerocount ( ) const

trigger normalization bit count*prescale

Definition at line 21 of file LumiSummary.cc.

21 { return bitzerocount_; }

References bitzerocount_.

Referenced by setBitZeroCount().

◆ copyHLTData()

void LumiSummary::copyHLTData ( const std::vector< HLT > &  hltdata)

Definition at line 80 of file LumiSummary.cc.

80 { hltdata_.assign(hltdata.begin(), hltdata.end()); }

References hltdata_.

◆ copyL1Data()

void LumiSummary::copyL1Data ( const std::vector< L1 > &  l1data)

Definition at line 79 of file LumiSummary.cc.

79 { l1data_.assign(l1data.begin(), l1data.end()); }

References l1data_.

◆ deadcount()

unsigned long long LumiSummary::deadcount ( ) const

trigger DeadtimeBeamActive count

Definition at line 20 of file LumiSummary.cc.

20 { return deadcount_; }

References deadcount_.

Referenced by setDeadCount().

◆ deadFrac()

float LumiSummary::deadFrac ( ) const

the fraction trigger is not active= trigger DeadtimeBeamActive/BitZero special values: if trigger data absent for this LS, return deadfraction 1.0 if bitzero=0 return -1.0 meaning no beam

Definition at line 22 of file LumiSummary.cc.

22  {
23  //definition: deadcount/bitzerocount
24  //if no trigger data, return deadfraction 1.0,mask out this LS
25  //if bitzerocount=0, return -1.0 meaning no beam
26  if (lumiversion_ == "DIP") {
28  }
29  if (l1data_.empty())
30  return 1.0;
31  if (bitzerocount_ == 0)
32  return -1.0;
34 }

References bitzerocount_, deadcount_, dqmMemoryStats::float, l1data_, and lumiversion_.

Referenced by liveFrac().

◆ hltinfo()

LumiSummary::HLT LumiSummary::hltinfo ( unsigned int  idx) const

Definition at line 52 of file LumiSummary.cc.

52 { return hltdata_.at(idx); }

References hltdata_, and charmTagsComputerCvsB_cfi::idx.

◆ intgDelLumi()

float LumiSummary::intgDelLumi ( ) const

delivered luminosity integrated over LS , unit /ub,
uncalibrated for lumiversion v2

Definition at line 16 of file LumiSummary.cc.

16 { return this->avgInsDelLumi() * float(this->lumiSectionLength()); }

References avgInsDelLumi(), dqmMemoryStats::float, and lumiSectionLength().

Referenced by DQMLumiMonitor::endLuminosityBlock(), and GetLumi::getRawValue().

◆ intgRecLumi()

float LumiSummary::intgRecLumi ( ) const

recorded luminosity integrated over LS

Definition at line 18 of file LumiSummary.cc.

18 { return this->avgInsRecLumi() * float(this->lumiSectionLength()); }

References avgInsRecLumi(), dqmMemoryStats::float, and lumiSectionLength().

◆ isProductEqual()

bool LumiSummary::isProductEqual ( LumiSummary const &  next) const

Definition at line 57 of file LumiSummary.cc.

57  {
58  return (avginsdellumi_ == next.avginsdellumi_ && avginsdellumierr_ == next.avginsdellumierr_ &&
59  lumisecqual_ == next.lumisecqual_ && deadcount_ == next.deadcount_ && lsnumber_ == next.lsnumber_ &&
60  startorbit_ == next.startorbit_ && numorbit_ == next.numorbit_ && l1data_.size() == next.l1data_.size() &&
61  hltdata_.size() == next.hltdata_.size() && lumiversion_ == next.lumiversion_);
62 }

References avginsdellumi_, avginsdellumierr_, deadcount_, hltdata_, l1data_, lsnumber_, lumisecqual_, lumiversion_, GetRecoTauVFromDQM_MC_cff::next, numorbit_, and startorbit_.

◆ isValid()

bool LumiSummary::isValid ( void  ) const

data are valid only if run exists from all sources lumi,trg ,hlt

Definition at line 50 of file LumiSummary.cc.

50 { return avginsdellumi_ > 0; }

References avginsdellumi_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), DQMLumiMonitor::endLuminosityBlock(), GetLumi::getRawValue(), and core.AutoHandle.AutoHandle::ReallyLoad().

◆ l1info()

LumiSummary::L1 LumiSummary::l1info ( unsigned int  idx) const

Definition at line 51 of file LumiSummary.cc.

51 { return l1data_.at(idx); }

References charmTagsComputerCvsB_cfi::idx, and l1data_.

◆ liveFrac()

float LumiSummary::liveFrac ( ) const

the fraction trigger is active= 1-deadfraction special values: if deadfraction<0(no beam) livefraction=0

Definition at line 35 of file LumiSummary.cc.

35  {
36  //1-deadfraction
37  //else if deadfraction<0 meaning no beam, live fraction=0
38  //
39  if (deadFrac() < 0)
40  return 0;
41  return 1 - deadFrac();
42 }

References deadFrac().

Referenced by avgInsRecLumi(), and avgInsRecLumiErr().

◆ lsNumber()

unsigned int LumiSummary::lsNumber ( ) const

Definition at line 47 of file LumiSummary.cc.

47 { return lsnumber_; }

References lsnumber_.

◆ lumiSecQual()

short LumiSummary::lumiSecQual ( ) const

Definition at line 19 of file LumiSummary.cc.

19 { return lumisecqual_; }

References lumisecqual_.

◆ lumiSectionLength()

float LumiSummary::lumiSectionLength ( ) const

lumi section length in seconds numorbits*3564*25e-09

Definition at line 43 of file LumiSummary.cc.

43  {
44  //numorbits*3564*24.95e-09
45  return numorbit_ * 3564.0 * 24.95e-9;
46 }

References numorbit_.

Referenced by intgDelLumi(), and intgRecLumi().

◆ lumiVersion()

std::string LumiSummary::lumiVersion ( ) const

lumi data version. special values: "-1" means not all lumi,trigger,hlt data exist, therefore invalid

Definition at line 63 of file LumiSummary.cc.

63 { return lumiversion_; }

References lumiversion_.

◆ nHLTPath()

size_t LumiSummary::nHLTPath ( ) const

Definition at line 54 of file LumiSummary.cc.

54 { return hltdata_.size(); }

References hltdata_.

◆ nTriggerLine()

size_t LumiSummary::nTriggerLine ( ) const

Definition at line 53 of file LumiSummary.cc.

53 { return l1data_.size(); }

References l1data_.

◆ numOrbit()

unsigned int LumiSummary::numOrbit ( ) const

Definition at line 49 of file LumiSummary.cc.

49 { return numorbit_; }

References numorbit_.

◆ setBitZeroCount()

void LumiSummary::setBitZeroCount ( unsigned long long  bitzerocount)

Definition at line 71 of file LumiSummary.cc.

References bitzerocount(), and bitzerocount_.

◆ setDeadCount()

void LumiSummary::setDeadCount ( unsigned long long  deadcount)

Definition at line 70 of file LumiSummary.cc.

70 { deadcount_ = deadcount; }

References deadcount(), and deadcount_.

◆ setlsnumber()

void LumiSummary::setlsnumber ( unsigned int  lsnumber)

Definition at line 72 of file LumiSummary.cc.

72 { lsnumber_ = lsnumber; }

References lsnumber_.

◆ setLumiData()

void LumiSummary::setLumiData ( float  instlumi,
float  instlumierr,
short  lumiquality 
)

Definition at line 65 of file LumiSummary.cc.

65  {
66  avginsdellumi_ = instlumi;
67  avginsdellumierr_ = instlumierr;
68  lumisecqual_ = lumiquality;
69 }

References avginsdellumi_, avginsdellumierr_, and lumisecqual_.

◆ setLumiVersion()

void LumiSummary::setLumiVersion ( const std::string &  lumiversion)

Definition at line 64 of file LumiSummary.cc.

References FastTimerService_cff::lumiversion, and lumiversion_.

◆ setOrbitData()

void LumiSummary::setOrbitData ( unsigned int  startorbit,
unsigned int  numorbit 
)

Definition at line 73 of file LumiSummary.cc.

73  {
74  startorbit_ = startorbit;
75  numorbit_ = numorbit;
76 }

References numorbit_, and startorbit_.

◆ startOrbit()

unsigned int LumiSummary::startOrbit ( ) const

Definition at line 48 of file LumiSummary.cc.

48 { return startorbit_; }

References startorbit_.

◆ swapHLTData()

void LumiSummary::swapHLTData ( std::vector< HLT > &  hltdata)

Definition at line 78 of file LumiSummary.cc.

78 { hltdata_.swap(hltdata); }

References hltdata_.

◆ swapL1Data()

void LumiSummary::swapL1Data ( std::vector< L1 > &  l1data)

Definition at line 77 of file LumiSummary.cc.

77 { l1data_.swap(l1data); }

References l1data_.

Member Data Documentation

◆ avginsdellumi_

float LumiSummary::avginsdellumi_
private

Definition at line 160 of file LumiSummary.h.

Referenced by avgInsDelLumi(), isProductEqual(), isValid(), and setLumiData().

◆ avginsdellumierr_

float LumiSummary::avginsdellumierr_
private

Definition at line 162 of file LumiSummary.h.

Referenced by avgInsDelLumiErr(), avgInsRecLumiErr(), isProductEqual(), and setLumiData().

◆ bitzerocount_

unsigned long long LumiSummary::bitzerocount_
private

Definition at line 166 of file LumiSummary.h.

Referenced by bitzerocount(), deadFrac(), and setBitZeroCount().

◆ deadcount_

unsigned long long LumiSummary::deadcount_
private

Definition at line 165 of file LumiSummary.h.

Referenced by deadcount(), deadFrac(), isProductEqual(), and setDeadCount().

◆ hltdata_

std::vector<HLT> LumiSummary::hltdata_
private

Definition at line 169 of file LumiSummary.h.

Referenced by copyHLTData(), hltinfo(), isProductEqual(), LumiSummary(), nHLTPath(), and swapHLTData().

◆ l1data_

std::vector<L1> LumiSummary::l1data_
private

◆ lsnumber_

unsigned int LumiSummary::lsnumber_
private

Definition at line 167 of file LumiSummary.h.

Referenced by isProductEqual(), lsNumber(), and setlsnumber().

◆ lumisecqual_

short LumiSummary::lumisecqual_
private

Definition at line 164 of file LumiSummary.h.

Referenced by isProductEqual(), lumiSecQual(), and setLumiData().

◆ lumiversion_

std::string LumiSummary::lumiversion_
private

Definition at line 158 of file LumiSummary.h.

Referenced by avgInsDelLumi(), deadFrac(), isProductEqual(), lumiVersion(), and setLumiVersion().

◆ numorbit_

unsigned int LumiSummary::numorbit_
private

Definition at line 175 of file LumiSummary.h.

Referenced by isProductEqual(), lumiSectionLength(), numOrbit(), and setOrbitData().

◆ startorbit_

unsigned int LumiSummary::startorbit_
private

Definition at line 173 of file LumiSummary.h.

Referenced by isProductEqual(), setOrbitData(), and startOrbit().

LumiSummary::deadFrac
float deadFrac() const
Definition: LumiSummary.cc:22
FastTimerService_cff.lumiversion
lumiversion
Definition: FastTimerService_cff.py:13
LumiSummary::lumiversion_
std::string lumiversion_
Definition: LumiSummary.h:158
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
LumiSummary::lumiSectionLength
float lumiSectionLength() const
Definition: LumiSummary.cc:43
LumiSummary::bitzerocount
unsigned long long bitzerocount() const
Definition: LumiSummary.cc:21
LumiSummary::avgInsDelLumi
float avgInsDelLumi() const
Definition: LumiSummary.cc:8
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
LumiSummary::deadcount
unsigned long long deadcount() const
Definition: LumiSummary.cc:20
LumiSummary::liveFrac
float liveFrac() const
Definition: LumiSummary.cc:35
LumiSummary::hltdata_
std::vector< HLT > hltdata_
Definition: LumiSummary.h:169
LumiSummary::avginsdellumierr_
float avginsdellumierr_
Definition: LumiSummary.h:162
LumiSummary::avgInsRecLumi
float avgInsRecLumi() const
Definition: LumiSummary.cc:55
LumiSummary::avginsdellumi_
float avginsdellumi_
Definition: LumiSummary.h:160
LumiSummary::numorbit_
unsigned int numorbit_
Definition: LumiSummary.h:175
LumiSummary::lumisecqual_
short lumisecqual_
Definition: LumiSummary.h:164
LumiSummary::l1data_
std::vector< L1 > l1data_
Definition: LumiSummary.h:171
LumiSummary::lsnumber_
unsigned int lsnumber_
Definition: LumiSummary.h:167
LumiSummary::bitzerocount_
unsigned long long bitzerocount_
Definition: LumiSummary.h:166
LumiSummary::deadcount_
unsigned long long deadcount_
Definition: LumiSummary.h:165
LumiSummary::startorbit_
unsigned int startorbit_
Definition: LumiSummary.h:173
GetRecoTauVFromDQM_MC_cff.next
next
Definition: GetRecoTauVFromDQM_MC_cff.py:31