HLTTauDQMOfflineObjects

HLTTauDQMPlotter

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
// -*- c++ -*-
#ifndef HLTTauDQMPlotter_h
#define HLTTauDQMPlotter_h

#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"

#include "DataFormats/Math/interface/LorentzVector.h"

//Include DQM core
#include "DQMServices/Core/interface/DQMStore.h"

using LV = math::XYZTLorentzVectorD;
using LVColl = std::vector<LV>;

struct HLTTauDQMOfflineObjects {
  void clear() {
    electrons.clear();
    muons.clear();
    taus.clear();
    met.clear();
  };
  std::vector<LV> electrons;
  std::vector<LV> muons;
  std::vector<LV> taus;
  std::vector<LV> met;
};

//Virtual base class for HLT-Tau-DQM Plotters
class HLTTauDQMPlotter {
public:
  typedef dqm::legacy::DQMStore DQMStore;
  typedef dqm::legacy::MonitorElement MonitorElement;
  HLTTauDQMPlotter(const edm::ParameterSet& pset, std::string dqmBaseFolder);
  HLTTauDQMPlotter(const std::string& dqmFolder, const std::string& dqmBaseFolder);
  ~HLTTauDQMPlotter();
  bool isValid() const { return configValid_; }

protected:
  //Helper functions
  std::pair<bool, LV> match(const LV&, const LVColl&, double);
  const std::string& triggerTag() const { return dqmFullFolder_; }

  //DQM folders
  std::string dqmFullFolder_;
  std::string dqmFolder_;

  //Validity check
  bool configValid_;
};
#endif