00001 00002 #ifndef RCTMonitor_RCTMonitor_H 00003 #define RCTMOnitor_RCTMonitor_H 00004 00005 // -*- C++ -*- 00006 // 00007 // Package: RCTMonitor 00008 // Class: RCTMonitor 00009 // 00015 // 00016 // Original Author: S.Dasu. H.Patel, A.Savin 00017 // version 0 is based on the GCTMonitor package created by A.Tapper 00018 // 00019 // 00020 00021 // Framework files 00022 00023 #include "FWCore/PluginManager/interface/ModuleDef.h" 00024 00025 #include <iostream> 00026 #include "DataFormats/Common/interface/Handle.h" 00027 #include "FWCore/Framework/interface/EventSetup.h" 00028 #include "FWCore/Framework/interface/ESHandle.h" 00029 00030 #include "CalibFormats/CaloTPG/interface/CaloTPGTranscoder.h" 00031 00032 #include "CalibFormats/CaloTPG/interface/CaloTPGRecord.h" 00033 #include "CondFormats/L1TObjects/interface/L1CaloGeometry.h" 00034 #include "CondFormats/DataRecord/interface/L1CaloGeometryRecord.h" 00035 00036 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h" 00037 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCT.h" 00038 00039 00040 #include <TH1F.h> 00041 #include <TH1I.h> 00042 00043 //#include <SimDataFormats/Track/interface/SimTrackContainer.h> 00044 00045 #include "FWCore/Framework/interface/Frameworkfwd.h" 00046 #include "FWCore/Framework/interface/EDAnalyzer.h" 00047 #include "FWCore/Framework/interface/Event.h" 00048 #include "FWCore/Framework/interface/MakerMacros.h" 00049 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00050 #include "FWCore/ServiceRegistry/interface/Service.h" 00051 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00052 00053 // DQM files 00054 #include "DQMServices/Core/interface/DQMStore.h" 00055 #include "DQMServices/Core/interface/MonitorElement.h" 00056 00057 // GCT and RCT data formats 00058 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCollections.h" 00059 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctEtSums.h" 00060 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h" 00061 //#include <SimDataFormats/Track/interface/SimTrackContainer.h> 00062 00063 // TPs 00064 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h" 00065 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h" 00066 00067 // L1Extra 00068 #include "DataFormats/L1Trigger/interface/L1EmParticle.h" 00069 #include "DataFormats/L1Trigger/interface/L1JetParticle.h" 00070 #include "DataFormats/L1Trigger/interface/L1EtMissParticle.h" 00071 00072 struct rct_location { unsigned crate,card,region; }; 00073 00074 class RCTMonitor : public edm::EDAnalyzer { 00075 00076 public: 00077 00078 explicit RCTMonitor( const edm::ParameterSet& ); 00079 ~RCTMonitor(); 00080 00081 virtual void analyze( const edm::Event&, const edm::EventSetup& ); 00082 virtual void beginJob(); 00083 virtual void endJob(void); 00084 00085 void BookRCT() ; 00086 void FillRCT(const edm::Event&, const edm::EventSetup&) ; 00087 00088 00089 private: 00090 00091 // Don't use the default constructor 00092 RCTMonitor(); 00093 00094 // RCT stuff 00095 MonitorElement* m_rctRegionsEtEtaPhi; 00096 MonitorElement* m_rctRegionsOccEtaPhi; 00097 MonitorElement* m_rctTauVetoEtaPhi; 00098 MonitorElement* m_rctRegionEt; 00099 00100 MonitorElement* m_rctIsoEmRankEtaPhi1; 00101 MonitorElement* m_rctIsoEmRankEtaPhi10; 00102 MonitorElement* m_rctIsoEmOccEtaPhi1; 00103 MonitorElement* m_rctIsoEmOccEtaPhi10; 00104 MonitorElement* m_rctNonIsoEmRankEtaPhi1; 00105 MonitorElement* m_rctNonIsoEmRankEtaPhi10; 00106 MonitorElement* m_rctRelaxedEmRankEtaPhi1; 00107 MonitorElement* m_rctRelaxedEmRankEtaPhi10; 00108 MonitorElement* m_rctNonIsoEmOccEtaPhi1; 00109 MonitorElement* m_rctNonIsoEmOccEtaPhi10; 00110 MonitorElement* m_rctRelaxedEmOccEtaPhi1; 00111 MonitorElement* m_rctRelaxedEmOccEtaPhi10; 00112 MonitorElement* m_rctIsoEmRank1; 00113 MonitorElement* m_rctIsoEmRank10; 00114 MonitorElement* m_rctRelaxedEmRank1; 00115 MonitorElement* m_rctRelaxedEmRank10; 00116 MonitorElement* m_rctNonIsoEmRank1; 00117 MonitorElement* m_rctNonIsoEmRank10; 00118 00119 // Bins etc. 00120 00121 // GCT and RCT 00122 static const unsigned int ETABINS; static const float ETAMIN; static const float ETAMAX; 00123 static const unsigned int PHIBINS; static const float PHIMIN; static const float PHIMAX; 00124 static const unsigned int METPHIBINS; static const float METPHIMIN; static const float METPHIMAX; 00125 static const unsigned int R6BINS; static const float R6MIN; static const float R6MAX; 00126 static const unsigned int R10BINS; static const float R10MIN; static const float R10MAX; 00127 static const unsigned int R12BINS; static const float R12MIN; static const float R12MAX; 00128 00129 // HCAL and ECAL TPs 00130 static const unsigned int TPETABINS; static const float TPETAMIN; static const float TPETAMAX; 00131 static const unsigned int TPPHIBINS; static const float TPPHIMIN; static const float TPPHIMAX; 00132 static const unsigned int RTPBINS; static const float RTPMIN; static const float RTPMAX; 00133 00134 // Physical bins 1 GeV to 1 TeV in steps of 1 GeV 00135 static const unsigned int TEVBINS; static const float TEVMIN; static const float TEVMAX; 00136 static const unsigned int L1EETABINS; static const float L1EETAMIN; static const float L1EETAMAX; 00137 static const unsigned int L1EPHIBINS; static const float L1EPHIMIN; static const float L1EPHIMAX; 00138 00139 // event counter 00140 int m_nevts; 00141 00142 // back-end interface 00143 DQMStore * m_dbe; 00144 00145 // Enable the daemon 00146 bool m_enableMonitorDaemon; 00147 00148 // Input digi labels 00149 00150 edm::InputTag m_rctSource; 00151 00152 // Write events to an output file named in parameters 00153 bool m_writeOutputFile; 00154 std::string m_outputFileName; 00155 00156 00157 00158 }; 00159 00160 #endif 00161