Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:05

0001 #ifndef RCTMonitor_RCTMonitor_H
0002 #define RCTMonitor_RCTMonitor_H
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    RCTMonitor
0007 // Class:      RCTMonitor
0008 //
0009 /**\class RCTMonitor
0010 
0011  Description: DQM monitor for the Regional Calorimeter Trigger
0012 
0013 */
0014 //
0015 // Original Author:  S.Dasu. H.Patel, A.Savin
0016 // version 0 is based on the GCTMonitor package created by A.Tapper
0017 //
0018 //
0019 
0020 // Framework files
0021 
0022 #include "FWCore/PluginManager/interface/ModuleDef.h"
0023 
0024 #include "DataFormats/Common/interface/Handle.h"
0025 #include "FWCore/Framework/interface/ESHandle.h"
0026 #include "FWCore/Framework/interface/EventSetup.h"
0027 #include <iostream>
0028 
0029 #include "CalibFormats/CaloTPG/interface/CaloTPGTranscoder.h"
0030 
0031 #include "CalibFormats/CaloTPG/interface/CaloTPGRecord.h"
0032 #include "CondFormats/DataRecord/interface/L1CaloGeometryRecord.h"
0033 #include "CondFormats/L1TObjects/interface/L1CaloGeometry.h"
0034 
0035 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCT.h"
0036 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h"
0037 
0038 #include <TH1F.h>
0039 #include <TH1I.h>
0040 
0041 //#include <SimDataFormats/Track/interface/SimTrackContainer.h>
0042 
0043 #include "FWCore/Framework/interface/Event.h"
0044 #include "FWCore/Framework/interface/Frameworkfwd.h"
0045 #include "FWCore/Framework/interface/MakerMacros.h"
0046 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0047 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0048 #include "FWCore/ServiceRegistry/interface/Service.h"
0049 
0050 // DQM files
0051 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0052 #include "DQMServices/Core/interface/DQMStore.h"
0053 
0054 // GCT and RCT data formats
0055 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
0056 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCollections.h"
0057 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctEtSums.h"
0058 //#include <SimDataFormats/Track/interface/SimTrackContainer.h>
0059 
0060 // TPs
0061 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0062 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0063 
0064 // L1Extra
0065 #include "DataFormats/L1Trigger/interface/L1EmParticle.h"
0066 #include "DataFormats/L1Trigger/interface/L1EtMissParticle.h"
0067 #include "DataFormats/L1Trigger/interface/L1JetParticle.h"
0068 
0069 struct rct_location {
0070   unsigned crate, card, region;
0071 };
0072 
0073 class RCTMonitor : public DQMEDAnalyzer {
0074 public:
0075   explicit RCTMonitor(const edm::ParameterSet &);
0076   ~RCTMonitor() override;
0077   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0078   void analyze(const edm::Event &, const edm::EventSetup &) override;
0079   void FillRCT(const edm::Event &, const edm::EventSetup &);
0080 
0081 private:
0082   // RCT stuff
0083   MonitorElement *m_rctRegionsEtEtaPhi;
0084   MonitorElement *m_rctRegionsOccEtaPhi;
0085   MonitorElement *m_rctTauVetoEtaPhi;
0086   MonitorElement *m_rctRegionEt;
0087 
0088   MonitorElement *m_rctIsoEmRankEtaPhi1;
0089   MonitorElement *m_rctIsoEmRankEtaPhi10;
0090   MonitorElement *m_rctIsoEmOccEtaPhi1;
0091   MonitorElement *m_rctIsoEmOccEtaPhi10;
0092   MonitorElement *m_rctNonIsoEmRankEtaPhi1;
0093   MonitorElement *m_rctNonIsoEmRankEtaPhi10;
0094   MonitorElement *m_rctRelaxedEmRankEtaPhi1;
0095   MonitorElement *m_rctRelaxedEmRankEtaPhi10;
0096   MonitorElement *m_rctNonIsoEmOccEtaPhi1;
0097   MonitorElement *m_rctNonIsoEmOccEtaPhi10;
0098   MonitorElement *m_rctRelaxedEmOccEtaPhi1;
0099   MonitorElement *m_rctRelaxedEmOccEtaPhi10;
0100   MonitorElement *m_rctIsoEmRank1;
0101   MonitorElement *m_rctIsoEmRank10;
0102   MonitorElement *m_rctRelaxedEmRank1;
0103   MonitorElement *m_rctRelaxedEmRank10;
0104   MonitorElement *m_rctNonIsoEmRank1;
0105   MonitorElement *m_rctNonIsoEmRank10;
0106 
0107   // Bins etc.
0108   // GCT and RCT
0109   static const unsigned int ETABINS;
0110   static const float ETAMIN;
0111   static const float ETAMAX;
0112   static const unsigned int PHIBINS;
0113   static const float PHIMIN;
0114   static const float PHIMAX;
0115   static const unsigned int METPHIBINS;
0116   static const float METPHIMIN;
0117   static const float METPHIMAX;
0118   static const unsigned int R6BINS;
0119   static const float R6MIN;
0120   static const float R6MAX;
0121   static const unsigned int R10BINS;
0122   static const float R10MIN;
0123   static const float R10MAX;
0124   static const unsigned int R12BINS;
0125   static const float R12MIN;
0126   static const float R12MAX;
0127 
0128   // HCAL and ECAL TPs
0129   static const unsigned int TPETABINS;
0130   static const float TPETAMIN;
0131   static const float TPETAMAX;
0132   static const unsigned int TPPHIBINS;
0133   static const float TPPHIMIN;
0134   static const float TPPHIMAX;
0135   static const unsigned int RTPBINS;
0136   static const float RTPMIN;
0137   static const float RTPMAX;
0138 
0139   // Physical bins 1 GeV to 1 TeV in steps of 1 GeV
0140   static const unsigned int TEVBINS;
0141   static const float TEVMIN;
0142   static const float TEVMAX;
0143   static const unsigned int L1EETABINS;
0144   static const float L1EETAMIN;
0145   static const float L1EETAMAX;
0146   static const unsigned int L1EPHIBINS;
0147   static const float L1EPHIMIN;
0148   static const float L1EPHIMAX;
0149 
0150   // define Token(-s)
0151   edm::EDGetTokenT<L1CaloEmCollection> m_rctSourceToken_;
0152 };
0153 
0154 #endif  // RCTMonitor_RCTMonitor_H