Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:42:30

0001 // -*-C++-*-
0002 #ifndef L1TGCT_H
0003 #define L1TGCT_H
0004 
0005 /*
0006  * \file L1TGCT.h
0007  *
0008  * \author J. Berryhill
0009  *
0010  * Revision 1.23  2010/05/30 10:01:58  tapper
0011  * Added one histogram, correlation of sum ET and HT and changed a few labels for the better.
0012  *
0013  * Revision 1.22  2009/11/19 14:33:13  puigh
0014  * modify beginJob
0015  *
0016  * Revision 1.21  2009/11/02 17:00:04  tapper
0017  * Changes to L1TdeGCT (to include energy sums), to L1TDEMON (should not make any difference now) and L1TGCT to add multiple BXs.
0018  *
0019  * Revision 1.20  2009/06/23 09:48:55  tapper
0020  * Added missing occupancy plot for central and forward jets.
0021  *
0022  * Revision 1.19  2009/06/22 15:58:20  tapper
0023  * Added MET vs MHT correlation plots (both for magnitude and phi). Still untested!
0024  *
0025  * Revision 1.18  2009/06/22 15:47:04  tapper
0026  * Removed rank difference histograms and added MHT. Untested so far!
0027  *
0028  * Revision 1.17  2009/05/27 21:49:26  jad
0029  * updated Total and Missing Energy histograms and added Overlow plots
0030  *
0031  * Revision 1.16  2008/11/11 13:20:31  tapper
0032  * A whole list of house keeping:
0033  * 1. New shifter histogram with central and forward jets together.
0034  * 2. Relabelled Ring 0 and Ring 1 to Ring 1 and Ring 2 for HF rings.
0035  * 3. Tidied up some histograms names to make all consistent.
0036  * 4. Switched eta and phi in 2D plots to match RCT.
0037  * 5. Removed 1D eta and phi plots. Will not be needed for Qtests in future.
0038  *
0039  * Revision 1.15  2008/09/21 14:33:12  jad
0040  * updated HF Sums & Counts and added individual Jet Candidates and differences
0041  *
0042  * Revision 1.14  2008/06/09 11:08:05  tapper
0043  * Removed electron sub-folders with histograms per eta and phi bin.
0044  *
0045  * Revision 1.13  2008/06/02 11:08:58  tapper
0046  * Added HF ring histograms....
0047  *
0048  * Revision 1.12  2008/04/28 09:23:07  tapper
0049  * Added 1D eta and phi histograms for electrons and jets as input to Q tests.
0050  *
0051  * Revision 1.11  2008/04/25 15:40:21  tapper
0052  * Added histograms to EventInfo//errorSummarySegments.
0053  *
0054  * Revision 1.10  2008/03/01 00:40:00  lat
0055  * DQM core migration.
0056  *
0057  * Revision 1.9  2008/02/20 19:24:24  tapper
0058  * Removed noisy include.
0059  *
0060  * Revision 1.8  2008/02/20 18:59:29  tapper
0061  * Ported GCTMonitor histograms into L1TGCT
0062  *
0063  * Revision 1.7  2007/09/04 02:54:21  wittich
0064  * - fix dupe ME in RCT
0065  * - put in rank>0 req in GCT
0066  * - various small other fixes
0067  *
0068  * Revision 1.6  2007/08/31 18:14:20  wittich
0069  * update GCT packages to reflect GctRawToDigi, and move to raw plots
0070  *
0071  * Revision 1.5  2007/08/31 11:02:55  wittich
0072  * cerr -> LogInfo
0073  *
0074  * Revision 1.4  2007/02/22 19:43:52  berryhil
0075  *
0076  *
0077  *
0078  * InputTag parameters added for all modules
0079  *
0080  * Revision 1.3  2007/02/19 22:49:53  wittich
0081  * - Add RCT monitor
0082  *
0083  * Revision 1.2  2007/02/19 21:11:23  wittich
0084  * - Updates for integrating GCT monitor.
0085  *   + Adapted right now only the L1E elements thereof.
0086  *   + added DataFormats/L1Trigger to build file.
0087  *
0088  *
0089 */
0090 
0091 // system include files
0092 #include <memory>
0093 #include <unistd.h>
0094 
0095 #include <iostream>
0096 #include <fstream>
0097 #include <vector>
0098 
0099 // user include files
0100 #include "FWCore/Framework/interface/Frameworkfwd.h"
0101 
0102 #include "FWCore/Framework/interface/Event.h"
0103 #include "FWCore/Framework/interface/MakerMacros.h"
0104 
0105 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0106 
0107 #include "FWCore/ServiceRegistry/interface/Service.h"
0108 
0109 // DQM
0110 #include "DQMServices/Core/interface/DQMStore.h"
0111 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCollections.h"
0112 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0113 
0114 //
0115 // class declaration
0116 //
0117 
0118 class L1TGCT : public DQMEDAnalyzer {
0119 public:
0120   // Constructor
0121   L1TGCT(const edm::ParameterSet& ps);
0122 
0123   // Destructor
0124   ~L1TGCT() override;
0125 
0126 protected:
0127   // Analyze
0128   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0129 
0130   void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const&) override;
0131 
0132 private:
0133   // ----------member data ---------------------------
0134 
0135   std::string monitorDir_;
0136 
0137   // trigger type information
0138   MonitorElement* triggerType_;
0139 
0140   // Jet and EM stuff
0141   MonitorElement* l1GctAllJetsEtEtaPhi_;
0142   MonitorElement* l1GctCenJetsEtEtaPhi_;
0143   MonitorElement* l1GctForJetsEtEtaPhi_;
0144   MonitorElement* l1GctTauJetsEtEtaPhi_;
0145   MonitorElement* l1GctIsoTauJetsEtEtaPhi_;
0146   MonitorElement* l1GctIsoEmRankEtaPhi_;
0147   MonitorElement* l1GctNonIsoEmRankEtaPhi_;
0148 
0149   MonitorElement* l1GctAllJetsOccEtaPhi_;
0150   MonitorElement* l1GctCenJetsOccEtaPhi_;
0151   MonitorElement* l1GctForJetsOccEtaPhi_;
0152   MonitorElement* l1GctTauJetsOccEtaPhi_;
0153   MonitorElement* l1GctIsoTauJetsOccEtaPhi_;
0154   MonitorElement* l1GctIsoEmOccEtaPhi_;
0155   MonitorElement* l1GctNonIsoEmOccEtaPhi_;
0156 
0157   MonitorElement* l1GctCenJetsRank_;
0158   MonitorElement* l1GctForJetsRank_;
0159   MonitorElement* l1GctTauJetsRank_;
0160   MonitorElement* l1GctIsoTauJetsRank_;
0161   MonitorElement* l1GctIsoEmRank_;
0162   MonitorElement* l1GctNonIsoEmRank_;
0163 
0164   MonitorElement* l1GctAllJetsOccRankBx_;
0165   MonitorElement* l1GctAllEmOccRankBx_;
0166 
0167   // Energy sums stuff
0168   MonitorElement* l1GctEtMiss_;
0169   MonitorElement* l1GctEtMissPhi_;
0170   MonitorElement* l1GctEtMissOf_;
0171   MonitorElement* l1GctEtMissOccBx_;
0172   MonitorElement* l1GctHtMiss_;
0173   MonitorElement* l1GctHtMissPhi_;
0174   MonitorElement* l1GctHtMissOf_;
0175   MonitorElement* l1GctHtMissOccBx_;
0176   MonitorElement* l1GctEtMissHtMissCorr_;
0177   MonitorElement* l1GctEtMissHtMissCorrPhi_;
0178   MonitorElement* l1GctEtTotal_;
0179   MonitorElement* l1GctEtTotalOf_;
0180   MonitorElement* l1GctEtTotalOccBx_;
0181   MonitorElement* l1GctEtHad_;
0182   MonitorElement* l1GctEtHadOf_;
0183   MonitorElement* l1GctEtHadOccBx_;
0184   MonitorElement* l1GctEtTotalEtHadCorr_;
0185 
0186   // HF Rings stuff
0187   MonitorElement* l1GctHFRing1PosEtaNegEta_;
0188   MonitorElement* l1GctHFRing2PosEtaNegEta_;
0189   MonitorElement* l1GctHFRing1TowerCountPosEtaNegEta_;
0190   MonitorElement* l1GctHFRing2TowerCountPosEtaNegEta_;
0191   MonitorElement* l1GctHFRing1TowerCountPosEta_;
0192   MonitorElement* l1GctHFRing1TowerCountNegEta_;
0193   MonitorElement* l1GctHFRing2TowerCountPosEta_;
0194   MonitorElement* l1GctHFRing2TowerCountNegEta_;
0195   MonitorElement* l1GctHFRing1ETSumPosEta_;
0196   MonitorElement* l1GctHFRing1ETSumNegEta_;
0197   MonitorElement* l1GctHFRing2ETSumPosEta_;
0198   MonitorElement* l1GctHFRing2ETSumNegEta_;
0199   MonitorElement* l1GctHFRingRatioPosEta_;
0200   MonitorElement* l1GctHFRingRatioNegEta_;
0201   MonitorElement* l1GctHFRingETSumOccBx_;
0202   MonitorElement* l1GctHFRingTowerCountOccBx_;
0203 
0204   int nev_;                 // Number of events processed
0205   std::string outputFile_;  //file name for ROOT ouput
0206   bool verbose_;
0207   bool monitorDaemon_;
0208   std::ofstream logFile_;
0209 
0210   edm::InputTag gctCenJetsSource_;
0211   edm::InputTag gctForJetsSource_;
0212   edm::InputTag gctTauJetsSource_;
0213   edm::InputTag gctIsoTauJetsSource_;
0214   edm::InputTag gctEnergySumsSource_;
0215   edm::InputTag gctIsoEmSource_;
0216   edm::InputTag gctNonIsoEmSource_;
0217 
0218   /// filter TriggerType
0219   bool m_stage1_layer2_;
0220   int filterTriggerType_;
0221 
0222   //define Token(-s)
0223   edm::EDGetTokenT<L1GctEmCandCollection> gctIsoEmSourceToken_;
0224   edm::EDGetTokenT<L1GctEmCandCollection> gctNonIsoEmSourceToken_;
0225   edm::EDGetTokenT<L1GctJetCandCollection> gctCenJetsSourceToken_;
0226   edm::EDGetTokenT<L1GctJetCandCollection> gctForJetsSourceToken_;
0227   edm::EDGetTokenT<L1GctJetCandCollection> gctTauJetsSourceToken_;
0228   edm::EDGetTokenT<L1GctJetCandCollection> gctIsoTauJetsSourceToken_;
0229   edm::EDGetTokenT<L1GctHFRingEtSumsCollection> gctEnergySumsSourceToken_;
0230   edm::EDGetTokenT<L1GctHFBitCountsCollection> l1HFCountsToken_;
0231   edm::EDGetTokenT<L1GctEtMissCollection> l1EtMissToken_;
0232   edm::EDGetTokenT<L1GctHtMissCollection> l1HtMissToken_;
0233   edm::EDGetTokenT<L1GctEtHadCollection> l1EtHadToken_;
0234   edm::EDGetTokenT<L1GctEtTotalCollection> l1EtTotalToken_;
0235 };
0236 
0237 #endif