CMS 3D CMS Logo

LumiSummary.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Luminosity_LumiSummary_h
00002 #define DataFormats_Luminosity_LumiSummary_h
00003  
00018 #include <vector>
00019 
00020 class LumiSummary {
00021   public:
00022 
00024     LumiSummary():
00025       avginsdellumi_(-99.),
00026       avginsdellumierr_(-99.),
00027       lumisecqual_(-1),
00028       deadfrac_(-99.),
00029       lsnumber_(-1)
00030     { }
00031 
00033     LumiSummary(float avginsdellumi, float avginsdellumierr,
00034                 int lumisecqual,
00035                 float deadfrac, int lsnumber,
00036                 const std::vector<int>& l1ratecounter, const std::vector<int>& l1scaler,
00037                 const std::vector<int>& hltratecounter, const std::vector<int>& hltscaler,
00038                 const std::vector<int>& hltinput):
00039       avginsdellumi_(avginsdellumi), avginsdellumierr_(avginsdellumierr), 
00040       lumisecqual_(lumisecqual),
00041       deadfrac_(deadfrac), lsnumber_(lsnumber),
00042       l1ratecounter_(l1ratecounter), l1scaler_(l1scaler),
00043       hltratecounter_(hltratecounter), hltscaler_(hltscaler),
00044       hltinput_(hltinput)
00045     { }
00046 
00048     ~LumiSummary(){}
00049          
00050     float avgInsDelLumi() const { return avginsdellumi_; }
00051   
00052     float avgInsDelLumiErr() const { return avginsdellumierr_; }
00053   
00054     int    lumiSecQual() const { return lumisecqual_; }
00055 
00056     float deadFrac() const { return deadfrac_; }
00057     float liveFrac() const { return (1.0f - deadfrac_); }
00058  
00059     int    lsNumber() const { return lsnumber_; }
00060 
00061     bool isValid() const { return (lsnumber_ != -1); }
00062 
00063     // other inline have to be made to return 
00064     // the rate counter and scalers based on the label
00065 
00066     int    l1RateCounter(int line) const {return l1ratecounter_.at(line);}
00067     int    l1Scaler(int line) const {return l1scaler_.at(line);}
00068     int    hltRateCounter(int line) const {return hltratecounter_.at(line);}
00069     int    hltScaler(int line) const {return hltscaler_.at(line);}
00070     int    hltInput(int line) const {return hltinput_.at(line);}
00071 
00072     const std::vector<int>&    l1RateCounter() const {return l1ratecounter_;}
00073     const std::vector<int>&    l1Scaler() const {return l1scaler_;}
00074     const std::vector<int>&    hltRateCounter() const {return hltratecounter_;}
00075     const std::vector<int>&    hltScaler() const {return hltscaler_;}
00076     const std::vector<int>&    hltInput() const {return hltinput_;}
00077 
00078     float avgInsRecLumi() const { return avginsdellumi_ * liveFrac(); }
00079   
00080     float avgInsRecLumiErr() const { return avginsdellumierr_ * liveFrac(); }
00081   
00082     bool isProductEqual(LumiSummary const& next);
00083 
00084   private :
00085 
00086     float avginsdellumi_;
00087     float avginsdellumierr_;
00088     int    lumisecqual_;
00089     float deadfrac_;
00090     int    lsnumber_;
00091 
00092     std::vector<int> l1ratecounter_;
00093     std::vector<int> l1scaler_;
00094     std::vector<int> hltratecounter_;
00095     std::vector<int> hltscaler_;
00096     std::vector<int> hltinput_;
00097 }; 
00098 
00099 std::ostream& operator<<(std::ostream& s, const LumiSummary& lumiSummary);
00100 
00101 #endif // DataFormats_Luminosity_LumiSummary_h

Generated on Tue Jun 9 17:31:14 2009 for CMSSW by  doxygen 1.5.4