File indexing completed on 2023-03-17 11:28:00
0001 #ifndef L1Validator_h
0002 #define L1Validator_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include <iostream>
0025 #include <memory>
0026 #include <string>
0027 #include <vector>
0028
0029
0030 #include "FWCore/Framework/interface/Frameworkfwd.h"
0031
0032 #include "FWCore/Common/interface/Provenance.h"
0033 #include "FWCore/Framework/interface/ESHandle.h"
0034 #include "FWCore/Framework/interface/Event.h"
0035 #include "FWCore/Framework/interface/MakerMacros.h"
0036 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0037 #include "FWCore/ServiceRegistry/interface/Service.h"
0038
0039 #include "DataFormats/JetReco/interface/GenJet.h"
0040 #include "DataFormats/JetReco/interface/GenJetCollection.h"
0041 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
0042 #include <DataFormats/HepMCCandidate/interface/GenParticle.h>
0043 #include <DataFormats/HepMCCandidate/interface/GenParticleFwd.h>
0044 #include <DataFormats/L1Trigger/interface/EGamma.h>
0045 #include <DataFormats/L1Trigger/interface/Jet.h>
0046 #include <DataFormats/L1Trigger/interface/L1EmParticle.h>
0047 #include <DataFormats/L1Trigger/interface/L1EmParticleFwd.h>
0048 #include <DataFormats/L1Trigger/interface/L1EtMissParticle.h>
0049 #include <DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h>
0050 #include <DataFormats/L1Trigger/interface/L1JetParticle.h>
0051 #include <DataFormats/L1Trigger/interface/L1JetParticleFwd.h>
0052 #include <DataFormats/L1Trigger/interface/L1MuonParticle.h>
0053 #include <DataFormats/L1Trigger/interface/L1MuonParticleFwd.h>
0054 #include <DataFormats/L1Trigger/interface/Muon.h>
0055 #include <DataFormats/L1Trigger/interface/Tau.h>
0056
0057 #include <DQMServices/Core/interface/DQMEDAnalyzer.h>
0058 #include <DQMServices/Core/interface/DQMStore.h>
0059
0060 #include <Validation/L1T/interface/L1ValidatorHists.h>
0061
0062
0063
0064
0065
0066 class L1Validator : public DQMEDAnalyzer {
0067 public:
0068 explicit L1Validator(const edm::ParameterSet &);
0069 ~L1Validator() override;
0070
0071 static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
0072 void analyze(const edm::Event &, const edm::EventSetup &) override;
0073
0074 protected:
0075 void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0076
0077 private:
0078
0079 std::string _dirName;
0080 std::string _fileName;
0081
0082 edm::EDGetTokenT<reco::GenParticleCollection> _GenSource;
0083 edm::EDGetTokenT<l1t::MuonBxCollection> _L1MuonBXSource;
0084 edm::EDGetTokenT<l1t::EGammaBxCollection> _L1EGammaBXSource;
0085 edm::EDGetTokenT<l1t::TauBxCollection> _L1TauBXSource;
0086 edm::EDGetTokenT<l1t::JetBxCollection> _L1JetBXSource;
0087 edm::EDGetTokenT<GenEventInfoProduct> _srcToken;
0088 edm::EDGetTokenT<reco::GenJetCollection> _L1GenJetSource;
0089
0090 L1ValidatorHists _Hists;
0091
0092
0093 private:
0094 const reco::LeafCandidate *FindBest(const reco::GenParticle *,
0095 const std::vector<l1extra::L1EmParticle> *,
0096 const std::vector<l1extra::L1EmParticle> *);
0097 const reco::LeafCandidate *FindBest(const reco::GenParticle *,
0098 const std::vector<l1extra::L1JetParticle> *,
0099 const std::vector<l1extra::L1JetParticle> *);
0100 const reco::LeafCandidate *FindBest(const reco::GenParticle *, const std::vector<l1extra::L1MuonParticle> *);
0101 };
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115 #endif