Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:20:49

0001 #ifndef HLTBTagHarvestingAnalyzer_H
0002 #define HLTBTagHarvestingAnalyzer_H
0003 
0004 // user include files
0005 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0006 #include "FWCore/Framework/interface/Event.h"
0007 #include "FWCore/Framework/interface/Frameworkfwd.h"
0008 #include "FWCore/Framework/interface/MakerMacros.h"
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010 
0011 // DQM services
0012 #include "DQMServices/Core/interface/DQMStore.h"
0013 #include "FWCore/ServiceRegistry/interface/Service.h"
0014 
0015 #include "TCutG.h"
0016 #include "TEfficiency.h"
0017 
0018 /** \class HLTBTagHarvestingAnalyzer
0019  *
0020  *  Code used to produce DQM validation plots for b-tag at HLT.
0021  *  This class read the plots producted by HLTBTagPerformanceAnalyzer and make
0022  * plots of: b-tag efficiency vs discr, b-tag efficiency vs jet pt, b-tag
0023  * efficiency vs mistag rate
0024  *
0025  */
0026 
0027 class HLTBTagHarvestingAnalyzer : public DQMEDHarvester {
0028 public:
0029   explicit HLTBTagHarvestingAnalyzer(const edm::ParameterSet &);
0030   ~HLTBTagHarvestingAnalyzer() override;
0031 
0032   void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override;
0033   TH1F calculateEfficiency1D(
0034       DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, TH1 &num, TH1 &den, std::string name);
0035   bool GetNumDenumerators(DQMStore::IBooker &ibooker,
0036                           DQMStore::IGetter &igetter,
0037                           std::string num,
0038                           std::string den,
0039                           TH1 *&ptrnum,
0040                           TH1 *&ptrden,
0041                           int type);
0042   void mistagrate(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, TH1F *num, TH1F *den, std::string effName);
0043   void modulesrate(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, TH1F *num, TH1F *den, std::string effName);
0044 
0045 private:
0046   // ----------member data ---------------------------
0047   std::string mainFolder_;
0048   std::vector<std::string> hltPathNames_;
0049   typedef unsigned int flavour_t;
0050   typedef std::vector<flavour_t> flavours_t;
0051   double m_minTag;
0052   std::vector<std::string> m_mcLabels;
0053   std::vector<flavours_t> m_mcFlavours;
0054   bool m_mcMatching;
0055   std::vector<std::string> m_histoName;
0056 
0057   // Histogram handler
0058   std::map<std::string, MonitorElement *> H1_;
0059 
0060   enum HCALSpecials { HEP17, HEP18, HEM17 };
0061   std::map<HLTBTagHarvestingAnalyzer::HCALSpecials, std::string> HCALSpecialsNames;
0062 };
0063 
0064 #endif