Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-12 05:47:39

0001 #ifndef L1Validator_h
0002 #define L1Validator_h
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    L1T
0007 // Class:      L1Validator
0008 //
0009 /**\class L1T L1Validator.cc Validation/L1T/plugins/L1Validator.cc
0010 
0011  Description: [one line class summary]
0012 
0013  Implementation:
0014      [Notes on implementation]
0015 */
0016 //
0017 // Original Author:  Scott Wilbur
0018 //         Created:  Wed, 28 Aug 2013 09:42:55 GMT
0019 // $Id$
0020 //
0021 //
0022 
0023 // system include files
0024 #include <iostream>
0025 #include <memory>
0026 #include <string>
0027 #include <vector>
0028 
0029 // user include files
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 // class declaration
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   // ----------member data ---------------------------
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   //---------------helper functions------------------
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 // constants, enums and typedefs
0105 //
0106 
0107 //
0108 // static data member definitions
0109 //
0110 
0111 //
0112 // constructors and destructor
0113 //
0114 
0115 #endif