Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:27:59

0001 #ifndef Validation_HLTrigger_HLTGenValHistCollFilter_h
0002 #define Validation_HLTrigger_HLTGenValHistCollFilter_h
0003 
0004 //********************************************************************************
0005 //
0006 // Description:
0007 //   This class contains a collection of HLTGenvalHists used to measure the efficiency of a
0008 //   specified filter. It is resonsible for booking and filling the histograms of all vsVars
0009 //   histograms that are created for a specific filter.
0010 //
0011 // Author : Finn Labe, UHH, Jul. 2022
0012 //          (Strongly inspired by Sam Harpers HLTDQMFilterEffHists class)
0013 //
0014 //***********************************************************************************
0015 
0016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0018 
0019 #include "DQMServices/Core/interface/DQMStore.h"
0020 
0021 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
0022 
0023 #include "Validation/HLTrigger/interface/HLTGenValHist.h"
0024 #include "DQMOffline/Trigger/interface/FunctionDefs.h"
0025 #include "DQMOffline/Trigger/interface/UtilFuncs.h"
0026 
0027 #include "Validation/HLTrigger/interface/HLTGenValObject.h"
0028 #include "Validation/HLTrigger/interface/HLTGenValPathSpecificSettingParser.h"
0029 
0030 #include "DataFormats/Math/interface/deltaR.h"
0031 
0032 #include <utility>
0033 
0034 // class containing a collection of HLTGenValHist for a specific filter
0035 // functions for initial booking of hists, and filling of hists for a single object are available
0036 class HLTGenValHistCollFilter {
0037 public:
0038   using MonitorElement = dqm::legacy::MonitorElement;
0039   using DQMStore = dqm::legacy::DQMStore;
0040 
0041   explicit HLTGenValHistCollFilter(edm::ParameterSet filterCollConfig);
0042 
0043   static edm::ParameterSetDescription makePSetDescription();
0044 
0045   void bookHists(DQMStore::IBooker& iBooker,
0046                  const std::vector<edm::ParameterSet>& histConfigs,
0047                  const std::vector<edm::ParameterSet>& histConfigs2D);
0048   void fillHists(const HLTGenValObject& obj, edm::Handle<trigger::TriggerEvent>& triggerEvent);
0049 
0050 private:
0051   void book1D(DQMStore::IBooker& iBooker, const edm::ParameterSet& histConfig);
0052   void book2D(DQMStore::IBooker& iBooker, const edm::ParameterSet& histConfig2D);
0053 
0054   std::vector<std::unique_ptr<HLTGenValHist>> hists_;  // the collection of histograms
0055   std::string objType_;
0056   std::string tag_;
0057   std::string filter_;
0058   std::string path_;
0059   std::string hltProcessName_;
0060   double dR2limit_;
0061   std::string separator_;
0062 };
0063 
0064 #endif