Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:38

0001 /*
0002  *  File: DataFormats/Scalers/interface/LumiScalers.h   (W.Badgett)
0003  *
0004  *  Various Luminosity Scalers from the HF Lumi System
0005  *
0006  */
0007 
0008 #ifndef DATAFORMATS_SCALERS_LUMISCALERS_H
0009 #define DATAFORMATS_SCALERS_LUMISCALERS_H
0010 
0011 #include "DataFormats/Scalers/interface/TimeSpec.h"
0012 
0013 #include <ctime>
0014 #include <iosfwd>
0015 #include <vector>
0016 #include <string>
0017 
0018 /*! \file LumiScalers.h
0019  * \Header file for HF Lumi Scalers
0020  * 
0021  * \author: William Badgett
0022  *
0023  */
0024 
0025 /// \class LumiScalers.h
0026 /// \brief Persistable copy of HF Lumi Scalers
0027 
0028 class LumiScalers {
0029 public:
0030   LumiScalers();
0031   LumiScalers(const unsigned char* rawData);
0032   virtual ~LumiScalers();
0033 
0034   enum { nOcc = 2 };
0035 
0036   /// name method
0037   std::string name() const { return "LumiScalers"; }
0038 
0039   /// empty method (= false)
0040   bool empty() const { return false; }
0041 
0042   unsigned int trigType() const { return (trigType_); }
0043   unsigned int eventID() const { return (eventID_); }
0044   unsigned int sourceID() const { return (sourceID_); }
0045   unsigned int bunchNumber() const { return (bunchNumber_); }
0046 
0047   int version() const { return (version_); }
0048   timespec collectionTime() const { return (collectionTime_.get_timespec()); }
0049   float normalization() const { return (normalization_); }
0050   float deadTimeNormalization() const { return (deadTimeNormalization_); }
0051 
0052   float lumiFill() const { return (lumiFill_); }
0053   float lumiRun() const { return (lumiRun_); }
0054   float liveLumiFill() const { return (liveLumiFill_); }
0055   float liveLumiRun() const { return (liveLumiRun_); }
0056   float instantLumi() const { return (instantLumi_); }
0057   float instantLumiErr() const { return (instantLumiErr_); }
0058   unsigned char instantLumiQlty() const { return (instantLumiQlty_); }
0059 
0060   float lumiETFill() const { return (lumiETFill_); }
0061   float lumiETRun() const { return (lumiETRun_); }
0062   float liveLumiETFill() const { return (liveLumiETFill_); }
0063   float liveLumiETRun() const { return (liveLumiETRun_); }
0064   float instantETLumi() const { return (instantETLumi_); }
0065   float instantETLumiErr() const { return (instantETLumiErr_); }
0066   unsigned char instantETLumiQlty() const { return (instantETLumiQlty_); }
0067 
0068   std::vector<float> lumiOccFill() const { return (lumiOccFill_); }
0069   std::vector<float> lumiOccRun() const { return (lumiOccRun_); }
0070   std::vector<float> liveLumiOccFill() const { return (liveLumiOccFill_); }
0071   std::vector<float> liveLumiOccRun() const { return (liveLumiOccRun_); }
0072   std::vector<float> instantOccLumi() const { return (instantOccLumi_); }
0073   std::vector<float> instantOccLumiErr() const { return (instantOccLumiErr_); }
0074   std::vector<unsigned char> instantOccLumiQlty() const { return (instantOccLumiQlty_); }
0075   std::vector<float> lumiNoise() const { return (lumiNoise_); }
0076 
0077   unsigned int sectionNumber() const { return (sectionNumber_); }
0078   unsigned int startOrbit() const { return (startOrbit_); }
0079   unsigned int numOrbits() const { return (numOrbits_); }
0080 
0081   float pileup() const { return (pileup_); }
0082   float pileupRMS() const { return (pileupRMS_); }
0083   float bunchLumi() const { return (bunchLumi_); }
0084   float spare() const { return (spare_); }
0085 
0086   /// equality operator
0087   int operator==(const LumiScalers& e) const { return false; }
0088 
0089   /// inequality operator
0090   int operator!=(const LumiScalers& e) const { return false; }
0091 
0092 protected:
0093   unsigned int trigType_;
0094   unsigned int eventID_;
0095   unsigned int sourceID_;
0096   unsigned int bunchNumber_;
0097 
0098   int version_;
0099 
0100   TimeSpec collectionTime_;
0101 
0102   float normalization_;
0103   float deadTimeNormalization_;
0104 
0105   float lumiFill_;
0106   float lumiRun_;
0107   float liveLumiFill_;
0108   float liveLumiRun_;
0109   float instantLumi_;
0110   float instantLumiErr_;
0111   unsigned char instantLumiQlty_;
0112 
0113   float lumiETFill_;
0114   float lumiETRun_;
0115   float liveLumiETFill_;
0116   float liveLumiETRun_;
0117   float instantETLumi_;
0118   float instantETLumiErr_;
0119 
0120   unsigned char instantETLumiQlty_;
0121 
0122   std::vector<float> lumiOccFill_;
0123   std::vector<float> lumiOccRun_;
0124   std::vector<float> liveLumiOccFill_;
0125   std::vector<float> liveLumiOccRun_;
0126   std::vector<float> instantOccLumi_;
0127   std::vector<float> instantOccLumiErr_;
0128   std::vector<unsigned char> instantOccLumiQlty_;
0129   std::vector<float> lumiNoise_;
0130 
0131   unsigned int sectionNumber_;
0132   unsigned int startOrbit_;
0133   unsigned int numOrbits_;
0134 
0135   float pileup_;
0136   float pileupRMS_;
0137   float bunchLumi_;
0138   float spare_;
0139 };
0140 
0141 /// Pretty-print operator for LumiScalers
0142 std::ostream& operator<<(std::ostream& s, const LumiScalers& c);
0143 
0144 typedef std::vector<LumiScalers> LumiScalersCollection;
0145 
0146 #endif