#include <LumiSummary.h>
Classes | |
class | HLT |
class | L1 |
Public Member Functions | |
float | avgInsDelLumi () const |
float | avgInsDelLumiErr () const |
float | avgInsRecLumi () const |
float | avgInsRecLumiErr () 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 (const std::string &pathname) const |
HLT | hltinfo (unsigned int idx) const |
std::vector< std::string > | HLTPaths () const |
float | intgDelLumi () const |
float | intgRecLumi () const |
bool | isProductEqual (LumiSummary const &next) const |
bool | isValid () const |
L1 | l1info (unsigned int idx) const |
L1 | l1info (const std::string &name) const |
float | liveFrac () const |
unsigned int | lsNumber () const |
short | lumiSecQual () const |
float | lumiSectionLength () const |
LumiSummary (float avginsdellumi, float avginsdellumierr, short lumisecqual, unsigned long long deadcount, 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 | |
LumiSummary () | |
default constructor | |
std::string | lumiVersion () const |
size_t | nHLTPath () const |
size_t | nTriggerLine () const |
unsigned int | numOrbit () const |
void | setDeadtime (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 | |
Private Attributes | |
float | avginsdellumi_ |
float | avginsdellumierr_ |
unsigned long long | deadcount_ |
std::vector< HLT > | hltdata_ |
std::vector< L1 > | l1data_ |
unsigned int | lsnumber_ |
short | lumisecqual_ |
std::string | lumiversion_ |
unsigned int | numorbit_ |
unsigned int | startorbit_ |
LumiSummary holds Summary information averaged over all bunch crossings for the given luminosity section LS
Definition at line 21 of file LumiSummary.h.
LumiSummary::LumiSummary | ( | ) | [inline] |
default constructor
Definition at line 41 of file LumiSummary.h.
References hltdata_, and l1data_.
: lumiversion_("-1"), avginsdellumi_(0.0), avginsdellumierr_(0.0), lumisecqual_(0), deadcount_(0), lsnumber_(0), startorbit_(0), numorbit_(0) { hltdata_.reserve(100); l1data_.reserve(192); }
LumiSummary::LumiSummary | ( | float | avginsdellumi, |
float | avginsdellumierr, | ||
short | lumisecqual, | ||
unsigned long long | deadcount, | ||
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 56 of file LumiSummary.h.
: lumiversion_(lumiversion), avginsdellumi_(avginsdellumi), avginsdellumierr_(avginsdellumierr), lumisecqual_(lumisecqual), deadcount_(deadcount), lsnumber_(lsnumber), hltdata_(hltin), l1data_(l1in), startorbit_(startorbit),numorbit_(numorbit) { }
LumiSummary::~LumiSummary | ( | ) | [inline] |
float LumiSummary::avgInsDelLumi | ( | ) | const |
average inst lumi
Definition at line 10 of file LumiSummary.cc.
References avginsdellumi_.
Referenced by operator<<().
{ return avginsdellumi_; }
float LumiSummary::avgInsDelLumiErr | ( | ) | const |
average inst lumi error
Definition at line 18 of file LumiSummary.cc.
References avginsdellumierr_.
Referenced by operator<<().
{ return avginsdellumierr_; }
float LumiSummary::avgInsRecLumi | ( | ) | const |
avg inst lumi corrected by deadtime
Definition at line 110 of file LumiSummary.cc.
References avginsdellumi_, and liveFrac().
Referenced by intgRecLumi(), and operator<<().
{ return avginsdellumi_ * liveFrac(); }
float LumiSummary::avgInsRecLumiErr | ( | ) | const |
avg inst lumi error corrected by deadtime
Definition at line 114 of file LumiSummary.cc.
References avginsdellumierr_, and liveFrac().
Referenced by operator<<().
{ return avginsdellumierr_ * liveFrac(); }
void LumiSummary::copyHLTData | ( | const std::vector< HLT > & | hltdata | ) |
void LumiSummary::copyL1Data | ( | const std::vector< L1 > & | l1data | ) |
Definition at line 166 of file LumiSummary.cc.
References l1data_.
{ l1data_.assign(l1data.begin(),l1data.end()); }
unsigned long long LumiSummary::deadcount | ( | ) | const |
trigger DeadtimeBeamActive count
Definition at line 30 of file LumiSummary.cc.
References deadcount_.
Referenced by operator<<(), and setDeadtime().
{ return deadcount_; }
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 34 of file LumiSummary.cc.
References deadcount_, and l1data_.
Referenced by liveFrac(), and operator<<().
{ //definition: deadcount/bizerocount //if no trigger data, return deadfraction 1.0,mask out this LS //if bitzerocount=0, return -1.0 meaning no beam if (l1data_.size()==0) return 1.0; if (l1data_.begin()->ratecount==0) return -1.0; return float(deadcount_)/float(l1data_.begin()->ratecount*l1data_.begin()->prescale); }
LumiSummary::HLT LumiSummary::hltinfo | ( | const std::string & | pathname | ) | const |
Definition at line 87 of file LumiSummary.cc.
References hltdata_.
{ for(std::vector<HLT>::const_iterator it=hltdata_.begin();it!=hltdata_.end();++it){ if(it->pathname==pathname) return *it; } return LumiSummary::HLT(); }
LumiSummary::HLT LumiSummary::hltinfo | ( | unsigned int | idx | ) | const |
Definition at line 83 of file LumiSummary.cc.
References hltdata_.
Referenced by operator<<().
{ return hltdata_.at(idx); }
std::vector< std::string > LumiSummary::HLTPaths | ( | ) | const |
Definition at line 102 of file LumiSummary.cc.
References hltdata_, and query::result.
float LumiSummary::intgDelLumi | ( | ) | const |
delivered luminosity integrated over LS
Definition at line 14 of file LumiSummary.cc.
References avginsdellumi_, and lumiSectionLength().
{ return avginsdellumi_*float(this->lumiSectionLength()); }
float LumiSummary::intgRecLumi | ( | ) | const |
recorded luminosity integrated over LS
Definition at line 22 of file LumiSummary.cc.
References avgInsRecLumi(), and lumiSectionLength().
{ return this->avgInsRecLumi() *float(this->lumiSectionLength()); }
bool LumiSummary::isProductEqual | ( | LumiSummary const & | next | ) | const |
Definition at line 118 of file LumiSummary.cc.
References avginsdellumi_, avginsdellumierr_, deadcount_, hltdata_, l1data_, lsnumber_, lumisecqual_, lumiversion_, numorbit_, and startorbit_.
{ return (avginsdellumi_ == next.avginsdellumi_ && avginsdellumierr_ == next.avginsdellumierr_ && lumisecqual_ == next.lumisecqual_ && deadcount_ == next.deadcount_ && lsnumber_ == next.lsnumber_ && startorbit_== next.startorbit_ && numorbit_==next.numorbit_&& l1data_.size() == next.l1data_.size() && hltdata_.size() == next.hltdata_.size() && lumiversion_ == next.lumiversion_ ); }
bool LumiSummary::isValid | ( | void | ) | const |
data are valid only if run exists from all sources lumi,trg ,hlt
Definition at line 68 of file LumiSummary.cc.
References lumiversion_.
Referenced by operator<<().
{ return (lumiversion_!="-1"); }
LumiSummary::L1 LumiSummary::l1info | ( | unsigned int | idx | ) | const |
Definition at line 79 of file LumiSummary.cc.
References l1data_.
Referenced by operator<<().
{ return l1data_.at(idx); }
LumiSummary::L1 LumiSummary::l1info | ( | const std::string & | name | ) | const |
Definition at line 72 of file LumiSummary.cc.
References l1data_.
{ for(std::vector<L1>::const_iterator it=l1data_.begin();it!=l1data_.end();++it){ if(it->triggername==name) return *it; } return LumiSummary::L1(); }
float LumiSummary::liveFrac | ( | ) | const |
the fraction trigger is active= 1-deadfraction special values: if deadfraction<0(no beam) livefraction=0
Definition at line 43 of file LumiSummary.cc.
References deadFrac().
Referenced by avgInsRecLumi(), avgInsRecLumiErr(), and operator<<().
unsigned int LumiSummary::lsNumber | ( | ) | const |
Definition at line 56 of file LumiSummary.cc.
References lsnumber_.
Referenced by operator<<().
{ return lsnumber_; }
short LumiSummary::lumiSecQual | ( | ) | const |
Definition at line 26 of file LumiSummary.cc.
References lumisecqual_.
Referenced by operator<<().
{ return lumisecqual_; }
float LumiSummary::lumiSectionLength | ( | ) | const |
lumi section length in seconds numorbits*3564*25e-09
Definition at line 51 of file LumiSummary.cc.
References ExpressReco_HICollisions_FallBack::e, and numorbit_.
Referenced by intgDelLumi(), and intgRecLumi().
std::string LumiSummary::lumiVersion | ( | ) | const |
lumi data version. special values: "-1" means not all lumi,trigger,hlt data exist, therefore invalid
Definition at line 131 of file LumiSummary.cc.
References lumiversion_.
Referenced by operator<<().
{ return lumiversion_; }
size_t LumiSummary::nHLTPath | ( | ) | const |
Definition at line 98 of file LumiSummary.cc.
References hltdata_.
Referenced by operator<<().
{ return hltdata_.size(); }
size_t LumiSummary::nTriggerLine | ( | ) | const |
Definition at line 94 of file LumiSummary.cc.
References l1data_.
Referenced by operator<<().
{ return l1data_.size(); }
unsigned int LumiSummary::numOrbit | ( | ) | const |
Definition at line 64 of file LumiSummary.cc.
References numorbit_.
Referenced by operator<<().
{ return numorbit_; }
void LumiSummary::setDeadtime | ( | unsigned long long | deadcount | ) |
Definition at line 145 of file LumiSummary.cc.
References deadcount(), and deadcount_.
Referenced by LumiProducer::writeProductsForEntry().
{ deadcount_=deadcount; }
void LumiSummary::setlsnumber | ( | unsigned int | lsnumber | ) |
Definition at line 149 of file LumiSummary.cc.
References lsnumber_.
Referenced by LumiProducer::writeProductsForEntry().
{ lsnumber_=lsnumber; }
void LumiSummary::setLumiData | ( | float | instlumi, |
float | instlumierr, | ||
short | lumiquality | ||
) |
Definition at line 139 of file LumiSummary.cc.
References avginsdellumi_, avginsdellumierr_, and lumisecqual_.
Referenced by LumiProducer::writeProductsForEntry().
{ avginsdellumi_=instlumi; avginsdellumierr_=instlumierr; lumisecqual_=lumiquality; }
void LumiSummary::setLumiVersion | ( | const std::string & | lumiversion | ) |
Definition at line 135 of file LumiSummary.cc.
References ExpressReco_HICollisions_FallBack::lumiversion, and lumiversion_.
Referenced by LumiProducer::writeProductsForEntry().
{ lumiversion_=lumiversion; }
void LumiSummary::setOrbitData | ( | unsigned int | startorbit, |
unsigned int | numorbit | ||
) |
Definition at line 153 of file LumiSummary.cc.
References numorbit_, and startorbit_.
Referenced by LumiProducer::writeProductsForEntry().
{ startorbit_=startorbit; numorbit_=numorbit; }
unsigned int LumiSummary::startOrbit | ( | ) | const |
Definition at line 60 of file LumiSummary.cc.
References startorbit_.
Referenced by operator<<().
{ return startorbit_; }
void LumiSummary::swapHLTData | ( | std::vector< HLT > & | hltdata | ) |
Definition at line 162 of file LumiSummary.cc.
References hltdata_.
Referenced by LumiProducer::writeProductsForEntry().
void LumiSummary::swapL1Data | ( | std::vector< L1 > & | l1data | ) |
Definition at line 158 of file LumiSummary.cc.
References l1data_.
Referenced by LumiProducer::writeProductsForEntry().
{ l1data_.swap(l1data); }
float LumiSummary::avginsdellumi_ [private] |
Definition at line 147 of file LumiSummary.h.
Referenced by avgInsDelLumi(), avgInsRecLumi(), intgDelLumi(), isProductEqual(), and setLumiData().
float LumiSummary::avginsdellumierr_ [private] |
Definition at line 149 of file LumiSummary.h.
Referenced by avgInsDelLumiErr(), avgInsRecLumiErr(), isProductEqual(), and setLumiData().
unsigned long long LumiSummary::deadcount_ [private] |
Definition at line 152 of file LumiSummary.h.
Referenced by deadcount(), deadFrac(), isProductEqual(), and setDeadtime().
std::vector<HLT> LumiSummary::hltdata_ [private] |
Definition at line 155 of file LumiSummary.h.
Referenced by copyHLTData(), hltinfo(), HLTPaths(), isProductEqual(), LumiSummary(), nHLTPath(), and swapHLTData().
std::vector<L1> LumiSummary::l1data_ [private] |
Definition at line 157 of file LumiSummary.h.
Referenced by copyL1Data(), deadFrac(), isProductEqual(), l1info(), LumiSummary(), nTriggerLine(), and swapL1Data().
unsigned int LumiSummary::lsnumber_ [private] |
Definition at line 153 of file LumiSummary.h.
Referenced by isProductEqual(), lsNumber(), and setlsnumber().
short LumiSummary::lumisecqual_ [private] |
Definition at line 151 of file LumiSummary.h.
Referenced by isProductEqual(), lumiSecQual(), and setLumiData().
std::string LumiSummary::lumiversion_ [private] |
Definition at line 145 of file LumiSummary.h.
Referenced by isProductEqual(), isValid(), lumiVersion(), and setLumiVersion().
unsigned int LumiSummary::numorbit_ [private] |
Definition at line 161 of file LumiSummary.h.
Referenced by isProductEqual(), lumiSectionLength(), numOrbit(), and setOrbitData().
unsigned int LumiSummary::startorbit_ [private] |
Definition at line 159 of file LumiSummary.h.
Referenced by isProductEqual(), setOrbitData(), and startOrbit().