00001 #ifndef L1TRPCTF_H 00002 #define L1TRPCTF_H 00003 00004 /* 00005 * \file L1TRPCTF.h 00006 * 00007 * $Date: 2009/11/19 14:34:30 $ 00008 * $Revision: 1.21 $ 00009 * \author J. Berryhill 00010 * 00011 */ 00012 00013 // system include files 00014 #include <memory> 00015 #include <unistd.h> 00016 00017 // user include files 00018 #include "FWCore/Framework/interface/Frameworkfwd.h" 00019 #include "FWCore/Framework/interface/EDAnalyzer.h" 00020 00021 #include "FWCore/Framework/interface/Event.h" 00022 #include "FWCore/Framework/interface/MakerMacros.h" 00023 00024 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00025 00026 #include "DQMServices/Core/interface/DQMStore.h" 00027 #include "DQMServices/Core/interface/MonitorElement.h" 00028 #include "FWCore/ServiceRegistry/interface/Service.h" 00029 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00030 00031 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h" 00032 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTCand.h" 00033 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTExtendedCand.h" 00034 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutCollection.h" 00035 #include "DQM/L1TMonitor/interface/L1TRateHelper.h" 00036 #include <iostream> 00037 #include <fstream> 00038 #include <vector> 00039 #include <set> 00040 00041 // 00042 // class decleration 00043 // 00044 00045 class L1TRPCTF : public edm::EDAnalyzer { 00046 00047 public: 00048 00049 // Constructor 00050 L1TRPCTF(const edm::ParameterSet& ps); 00051 00052 // Destructor 00053 virtual ~L1TRPCTF(); 00054 00055 protected: 00056 // Analyze 00057 void analyze(const edm::Event& e, const edm::EventSetup& c); 00058 00059 // BeginJob 00060 void beginJob(void); 00061 00062 // EndJob 00063 void endJob(void); 00064 00065 void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 00066 const edm::EventSetup& context); 00067 void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 00068 const edm::EventSetup& c); 00069 00070 void endRun(const edm::Run & r, const edm::EventSetup & c); 00071 00072 00073 private: 00074 void fillRateHistos(int orbit, bool flush=false); 00075 00076 00077 // ----------member data --------------------------- 00078 DQMStore * m_dbe; 00079 00080 MonitorElement* rpctfetavalue[3]; 00081 MonitorElement* rpctfphivalue[3]; 00082 MonitorElement* rpctfptvalue[3]; 00083 MonitorElement* rpctfchargevalue[3]; 00084 MonitorElement* rpctfquality[3]; 00085 MonitorElement* rpctfntrack_b[3]; 00086 MonitorElement* rpctfntrack_e[3]; 00087 MonitorElement* rpctfbx; 00088 MonitorElement* m_qualVsEta[3]; 00089 MonitorElement* m_muonsEtaPhi[3]; 00090 //MonitorElement* m_phipacked; 00091 00092 MonitorElement * m_rateAvg; 00093 MonitorElement * m_rateMin; 00094 MonitorElement * m_rateMax; 00095 MonitorElement* m_bxDiff; 00096 MonitorElement* rpctfcratesynchro[12]; 00097 std::set<unsigned long long int> m_globBX; 00098 00099 00100 L1TRateHelper::L1TRateHelper m_rateHelper; 00101 00102 00103 edm::InputTag rpctfSource_ ; 00104 00105 int nev_; // Number of events processed 00106 int nevRPC_; // Number of events processed where muon was found by rpc trigger 00107 std::string outputFile_; //file name for ROOT ouput 00108 bool verbose_; 00109 bool monitorDaemon_; 00110 //bool m_rpcDigiFine; 00111 //bool m_useRpcDigi; 00112 00113 int m_rateUpdateTime; 00114 int m_rateBinSize; 00115 int m_rateNoOfBins; 00116 long long int m_lastUsedBxInBxdiff; 00117 std::string output_dir_; 00118 struct BxDelays { int bx, eta_t, phi_p; }; 00119 00120 00121 }; 00122 00123 #endif