File indexing completed on 2024-04-06 12:07:44
0001 #ifndef DQM_L1TMonitor_L1ExtraDQM_h
0002 #define DQM_L1TMonitor_L1ExtraDQM_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <iosfwd>
0021 #include <memory>
0022 #include <vector>
0023 #include <string>
0024 #include <algorithm>
0025
0026
0027
0028
0029 #include "FWCore/Framework/interface/Frameworkfwd.h"
0030 #include "FWCore/ServiceRegistry/interface/Service.h"
0031 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0032
0033 #include "FWCore/Framework/interface/Event.h"
0034 #include "FWCore/Framework/interface/Run.h"
0035 #include "FWCore/Framework/interface/EventSetup.h"
0036
0037 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0038 #include "FWCore/Utilities/interface/InputTag.h"
0039
0040 #include "DataFormats/Common/interface/Handle.h"
0041 #include "FWCore/Framework/interface/ESHandle.h"
0042 #include "DataFormats/Common/interface/OrphanHandle.h"
0043
0044 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0045
0046
0047 #include "DataFormats/L1Trigger/interface/L1MuonParticle.h"
0048 #include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
0049 #include "DataFormats/L1Trigger/interface/L1EmParticle.h"
0050 #include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h"
0051 #include "DataFormats/L1Trigger/interface/L1JetParticle.h"
0052 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
0053 #include "DataFormats/L1Trigger/interface/L1EtMissParticle.h"
0054 #include "DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h"
0055 #include "DataFormats/L1Trigger/interface/L1HFRings.h"
0056 #include "DataFormats/L1Trigger/interface/L1HFRingsFwd.h"
0057
0058 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0059
0060 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1PhiConversion.h"
0061 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1GetHistLimits.h"
0062 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1RetrieveL1Extra.h"
0063
0064 #include "DQMServices/Core/interface/DQMStore.h"
0065
0066 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0067
0068
0069
0070
0071 class L1ExtraDQM : public DQMOneEDAnalyzer<> {
0072 public:
0073
0074 explicit L1ExtraDQM(const edm::ParameterSet&);
0075
0076
0077 ~L1ExtraDQM() override;
0078
0079 public:
0080 template <class CollectionType>
0081 class L1ExtraMonElement {
0082 public:
0083
0084 L1ExtraMonElement(const L1GetHistLimits::Tokens&, const int);
0085
0086
0087 virtual ~L1ExtraMonElement();
0088
0089 public:
0090 typedef typename CollectionType::const_iterator CIterColl;
0091
0092 void bookhistograms(const edm::EventSetup& evSetup,
0093 DQMStore::IBooker& ibooker,
0094 const std::string& l1ExtraObject,
0095 const std::vector<L1GtObject>& l1GtObj,
0096 const bool bookPhi = true,
0097 const bool bookEta = true);
0098
0099
0100 void fillNrObjects(const CollectionType* collType, const bool validColl, const bool isL1Coll, const int bxInEvent);
0101
0102
0103 void fillPtPhiEta(const CollectionType* collType,
0104 const bool validColl,
0105 const bool bookPhi,
0106 const bool bookEta,
0107 const bool isL1Coll,
0108 const int bxInEvent);
0109
0110
0111 void fillEtPhiEta(const CollectionType* collType,
0112 const bool validColl,
0113 const bool bookPhi,
0114 const bool bookEta,
0115 const bool isL1Coll,
0116 const int bxInEvent);
0117
0118
0119 void fillEtTotal(const CollectionType* collType, const bool validColl, const bool isL1Coll, const int bxInEvent);
0120
0121
0122 void fillCharge(const CollectionType* collType, const bool validColl, const bool isL1Coll, const int bxInEvent);
0123
0124
0125 void fillHfBitCounts(const CollectionType* collType,
0126 const bool validColl,
0127 const int countIndex,
0128 const bool isL1Coll,
0129 const int bxInEvent);
0130
0131
0132 void fillHfRingEtSums(const CollectionType* collType,
0133 const bool validColl,
0134 const int countIndex,
0135 const bool isL1Coll,
0136 const int bxInEvent);
0137
0138 private:
0139 L1GetHistLimits::Tokens m_tokens;
0140 std::vector<MonitorElement*> m_monElement;
0141
0142
0143 int m_indexNrObjects;
0144 int m_indexPt;
0145 int m_indexEt;
0146 int m_indexPhi;
0147 int m_indexEta;
0148 int m_indexEtTotal;
0149 int m_indexCharge;
0150 int m_indexHfBitCounts;
0151 int m_indexHfRingEtSums;
0152 };
0153
0154 protected:
0155 void analyzeL1ExtraMuon(const edm::Event&, const edm::EventSetup&);
0156 void analyzeL1ExtraIsoEG(const edm::Event&, const edm::EventSetup&);
0157 void analyzeL1ExtraNoIsoEG(const edm::Event&, const edm::EventSetup&);
0158 void analyzeL1ExtraCenJet(const edm::Event&, const edm::EventSetup&);
0159 void analyzeL1ExtraForJet(const edm::Event&, const edm::EventSetup&);
0160 void analyzeL1ExtraTauJet(const edm::Event&, const edm::EventSetup&);
0161 void analyzeL1ExtraIsoTauJet(const edm::Event&, const edm::EventSetup&);
0162 void analyzeL1ExtraETT(const edm::Event&, const edm::EventSetup&);
0163 void analyzeL1ExtraETM(const edm::Event&, const edm::EventSetup&);
0164 void analyzeL1ExtraHTT(const edm::Event&, const edm::EventSetup&);
0165 void analyzeL1ExtraHTM(const edm::Event&, const edm::EventSetup&);
0166 void analyzeL1ExtraHfBitCounts(const edm::Event&, const edm::EventSetup&);
0167 void analyzeL1ExtraHfRingEtSums(const edm::Event&, const edm::EventSetup&);
0168
0169 void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const&) override;
0170 void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0171 void analyze(const edm::Event&, const edm::EventSetup&) override;
0172 void dqmEndRun(const edm::Run& run, const edm::EventSetup& evSetup) override;
0173
0174 private:
0175
0176 L1RetrieveL1Extra m_retrieveL1Extra;
0177 edm::InputTag L1ExtraIsoTauJetSource;
0178
0179 std::string m_dirName;
0180 bool m_stage1_layer2_;
0181
0182
0183 int m_nrBxInEventGmt;
0184 int m_nrBxInEventGct;
0185
0186
0187
0188 bool m_resetModule;
0189 int m_currentRun;
0190
0191
0192 int m_nrEvJob;
0193 int m_nrEvRun;
0194
0195 private:
0196 edm::EDGetTokenT<l1extra::L1JetParticleCollection> m_tagL1ExtraIsoTauJetTok;
0197
0198 L1GetHistLimits::Tokens m_histTokens;
0199
0200
0201 std::vector<L1ExtraMonElement<l1extra::L1MuonParticleCollection>*> m_meAnalysisL1ExtraMuon;
0202
0203 std::vector<L1ExtraMonElement<l1extra::L1EmParticleCollection>*> m_meAnalysisL1ExtraIsoEG;
0204 std::vector<L1ExtraMonElement<l1extra::L1EmParticleCollection>*> m_meAnalysisL1ExtraNoIsoEG;
0205
0206 std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*> m_meAnalysisL1ExtraCenJet;
0207 std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*> m_meAnalysisL1ExtraForJet;
0208 std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*> m_meAnalysisL1ExtraTauJet;
0209 std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*> m_meAnalysisL1ExtraIsoTauJet;
0210
0211 std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*> m_meAnalysisL1ExtraETT;
0212
0213 std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*> m_meAnalysisL1ExtraETM;
0214
0215 std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*> m_meAnalysisL1ExtraHTT;
0216
0217 std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*> m_meAnalysisL1ExtraHTM;
0218
0219 std::vector<L1ExtraMonElement<l1extra::L1HFRingsCollection>*> m_meAnalysisL1ExtraHfBitCounts;
0220
0221 std::vector<L1ExtraMonElement<l1extra::L1HFRingsCollection>*> m_meAnalysisL1ExtraHfRingEtSums;
0222 };
0223
0224 #endif