Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:18:47

0001 #ifndef HLTVertexPerformanceAnalyzer_H
0002 #define HLTVertexPerformanceAnalyzer_H
0003 
0004 // user include files
0005 #include "FWCore/Framework/interface/Event.h"
0006 #include "FWCore/Framework/interface/Frameworkfwd.h"
0007 #include "FWCore/Framework/interface/MakerMacros.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 
0010 // Trigger
0011 #include "DataFormats/Common/interface/TriggerResults.h"
0012 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
0013 
0014 // Vertex
0015 #include "DataFormats/VertexReco/interface/Vertex.h"
0016 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0017 #include <SimDataFormats/Vertex/interface/SimVertex.h>
0018 
0019 // DQM services
0020 #include "DQMServices/Core/interface/DQMStore.h"
0021 #include "FWCore/ServiceRegistry/interface/Service.h"
0022 #include <DQMServices/Core/interface/DQMEDAnalyzer.h>
0023 
0024 #include "FWCore/Utilities/interface/transform.h"
0025 
0026 /** \class HLTVertexPerformanceAnalyzer
0027  *
0028  *  Code used to produce DQM validation plots for b-tag at HLT.
0029  *  It plots the distribution of recoVertex.z() - simVertex.z() of the primary
0030  * vertex.
0031  */
0032 
0033 class HLTVertexPerformanceAnalyzer : public DQMEDAnalyzer {
0034 public:
0035   explicit HLTVertexPerformanceAnalyzer(const edm::ParameterSet &);
0036   ~HLTVertexPerformanceAnalyzer() override;
0037   void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override;
0038 
0039 private:
0040   void analyze(const edm::Event &, const edm::EventSetup &) override;
0041   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0042 
0043   // variables from python configuration
0044   std::string mainFolder_;
0045   edm::EDGetTokenT<edm::TriggerResults> hlTriggerResults_;
0046   edm::EDGetTokenT<std::vector<SimVertex>> simVertexCollection_;
0047   std::vector<std::string> hltPathNames_;
0048   HLTConfigProvider hltConfigProvider_;
0049   bool triggerConfChanged_;
0050 
0051   std::vector<edm::EDGetTokenT<reco::VertexCollection>> VertexCollection_;
0052   std::vector<int> hltPathIndexs_;
0053 
0054   // other class variables
0055   std::vector<bool> _isfoundHLTs;
0056   std::vector<std::string> folders;
0057   std::vector<std::map<std::string, MonitorElement *>> H1_;
0058 
0059   edm::EDConsumerBase::Labels label;
0060   std::vector<std::string> VertexCollection_Label;
0061   std::string hlTriggerResults_Label;
0062 };
0063 
0064 #endif