Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:51

0001 // -*- c++ -*-
0002 #ifndef HLTTauDQMPlotter_h
0003 #define HLTTauDQMPlotter_h
0004 
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include "FWCore/ServiceRegistry/interface/Service.h"
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008 #include "FWCore/Framework/interface/Frameworkfwd.h"
0009 
0010 #include "DataFormats/Math/interface/LorentzVector.h"
0011 
0012 //Include DQM core
0013 #include "DQMServices/Core/interface/DQMStore.h"
0014 
0015 using LV = math::XYZTLorentzVectorD;
0016 using LVColl = std::vector<LV>;
0017 
0018 struct HLTTauDQMOfflineObjects {
0019   void clear() {
0020     electrons.clear();
0021     muons.clear();
0022     taus.clear();
0023     met.clear();
0024   };
0025   std::vector<LV> electrons;
0026   std::vector<LV> muons;
0027   std::vector<LV> taus;
0028   std::vector<LV> met;
0029 };
0030 
0031 //Virtual base class for HLT-Tau-DQM Plotters
0032 class HLTTauDQMPlotter {
0033 public:
0034   typedef dqm::legacy::DQMStore DQMStore;
0035   typedef dqm::legacy::MonitorElement MonitorElement;
0036   HLTTauDQMPlotter(const edm::ParameterSet& pset, std::string dqmBaseFolder);
0037   HLTTauDQMPlotter(const std::string& dqmFolder, const std::string& dqmBaseFolder);
0038   ~HLTTauDQMPlotter();
0039   bool isValid() const { return configValid_; }
0040 
0041 protected:
0042   //Helper functions
0043   std::pair<bool, LV> match(const LV&, const LVColl&, double);
0044   const std::string& triggerTag() const { return dqmFullFolder_; }
0045 
0046   //DQM folders
0047   std::string dqmFullFolder_;
0048   std::string dqmFolder_;
0049 
0050   //Validity check
0051   bool configValid_;
0052 };
0053 #endif