EfficiencyPlotter

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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
#ifndef EfficiencyPlotter_H
#define EfficiencyPlotter_H

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "DQMServices/Core/interface/DQMEDHarvester.h"
#include "DataFormats/Common/interface/Handle.h"
#include <FWCore/Framework/interface/ESHandle.h>
#include <FWCore/Framework/interface/Event.h>
#include <FWCore/Framework/interface/MakerMacros.h>
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include <FWCore/Framework/interface/LuminosityBlock.h>

#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/Framework/interface/Run.h"

#include <memory>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include "TH1F.h"

class EfficiencyPlotter : public DQMEDHarvester {
public:
  /// Constructor
  EfficiencyPlotter(const edm::ParameterSet& ps);

  /// Destructor
  ~EfficiencyPlotter() override;

protected:
  /// DQM Client Diagnostic
  void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;  //performed in the endJob

private:
  // counters
  int nevents;
  unsigned int nLumiSegs;
  int prescaleFactor;
  int run;
  // Switch for verbosity
  std::string metname;

  edm::ParameterSet parameters;

  //histo binning parameters
  int etaBin;
  double etaMin;
  double etaMax;

  int ptBin;
  double ptMin;
  double ptMax;

  int phiBin;
  double phiMin;
  double phiMax;

  int vtxBin;
  double vtxMin;
  double vtxMax;

  std::string ID_;

  // efficiency histograms
  MonitorElement* h_eff_pt_ID;
  MonitorElement* h_eff_inner_pt_ID;
  MonitorElement* h_eff_inner_eta_ID;
  MonitorElement* h_eff_inner_phi_ID;
  MonitorElement* h_eff_pt_EB_ID;
  MonitorElement* h_eff_pt_EE_ID;
  MonitorElement* h_eff_eta_ID;
  MonitorElement* h_eff_hp_eta_ID;
  MonitorElement* h_eff_phi_ID;
  MonitorElement* h_eff_pt_detIsoID;
  MonitorElement* h_eff_pt_EB_detIsoID;
  MonitorElement* h_eff_pt_EE_detIsoID;
  MonitorElement* h_eff_pt_pfIsoID;
  MonitorElement* h_eff_pt_EB_pfIsoID;
  MonitorElement* h_eff_pt_EE_pfIsoID;

  MonitorElement* h_eff_vtx_detIsoID;
  MonitorElement* h_eff_vtx_pfIsoID;
  MonitorElement* h_eff_vtx_EB_detIsoID;
  MonitorElement* h_eff_vtx_EE_detIsoID;
  MonitorElement* h_eff_vtx_EB_pfIsoID;
  MonitorElement* h_eff_vtx_EE_pfIsoID;

  MonitorElement* h_eff_pt_pfIsodBID;
  MonitorElement* h_eff_pt_EB_pfIsodBID;
  MonitorElement* h_eff_pt_EE_pfIsodBID;

  MonitorElement* h_eff_vtx_pfIsodBID;
  MonitorElement* h_eff_vtx_EB_pfIsodBID;
  MonitorElement* h_eff_vtx_EE_pfIsodBID;
  std::string theFolder;
};

#endif