HCALSpecials

HLTBTagHarvestingAnalyzer

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
#ifndef HLTBTagHarvestingAnalyzer_H
#define HLTBTagHarvestingAnalyzer_H

// user include files
#include "DQMServices/Core/interface/DQMEDHarvester.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

// DQM services
#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/ServiceRegistry/interface/Service.h"

#include "TCutG.h"
#include "TEfficiency.h"

/** \class HLTBTagHarvestingAnalyzer
 *
 *  Code used to produce DQM validation plots for b-tag at HLT.
 *  This class read the plots producted by HLTBTagPerformanceAnalyzer and make
 * plots of: b-tag efficiency vs discr, b-tag efficiency vs jet pt, b-tag
 * efficiency vs mistag rate
 *
 */

class HLTBTagHarvestingAnalyzer : public DQMEDHarvester {
public:
  explicit HLTBTagHarvestingAnalyzer(const edm::ParameterSet &);
  ~HLTBTagHarvestingAnalyzer() override;

  void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override;
  TH1F calculateEfficiency1D(
      DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, TH1 &num, TH1 &den, std::string name);
  bool GetNumDenumerators(DQMStore::IBooker &ibooker,
                          DQMStore::IGetter &igetter,
                          std::string num,
                          std::string den,
                          TH1 *&ptrnum,
                          TH1 *&ptrden,
                          int type);
  void mistagrate(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, TH1F *num, TH1F *den, std::string effName);
  void modulesrate(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, TH1F *num, TH1F *den, std::string effName);

private:
  // ----------member data ---------------------------
  std::string mainFolder_;
  std::vector<std::string> hltPathNames_;
  typedef unsigned int flavour_t;
  typedef std::vector<flavour_t> flavours_t;
  double m_minTag;
  std::vector<std::string> m_mcLabels;
  std::vector<flavours_t> m_mcFlavours;
  bool m_mcMatching;
  std::vector<std::string> m_histoName;

  // Histogram handler
  std::map<std::string, MonitorElement *> H1_;

  enum HCALSpecials { HEP17, HEP18, HEM17 };
  std::map<HLTBTagHarvestingAnalyzer::HCALSpecials, std::string> HCALSpecialsNames;
};

#endif