Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:41

0001 #ifndef Validation_HLTrigger_HLTGenValHistCollPath_h
0002 #define Validation_HLTrigger_HLTGenValHistCollPath_h
0003 
0004 //********************************************************************************
0005 //
0006 // Description:
0007 //   This contains a collection of HLTGenValHistCollFilter used to measure the efficiencies of all
0008 //   filters in a specified path. The actual booking and filling happens in the respective HLTGenValHistCollFilters.
0009 //
0010 // Author : Finn Labe, UHH, Oct. 2021
0011 // (Heavily borrowed from Sam Harpers HLTDQMFilterEffHists)
0012 //
0013 //***********************************************************************************
0014 
0015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0016 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0017 
0018 #include "DQMServices/Core/interface/DQMStore.h"
0019 
0020 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
0021 
0022 #include "DQMOffline/Trigger/interface/FunctionDefs.h"
0023 #include "DQMOffline/Trigger/interface/UtilFuncs.h"
0024 
0025 #include "Validation/HLTrigger/interface/HLTGenValHistCollFilter.h"
0026 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
0027 
0028 #include "Validation/HLTrigger/interface/HLTGenValObject.h"
0029 
0030 // class containing a collection of HLTGenValHistCollFilters for a specific path
0031 // at object creation time, the object type (used for systematically naming the histogram),
0032 // triggerPath, hltConfig and dR2limit (for deltaR matching) need to be specified
0033 // functions for initial booking of hists, and filling of hists for a single object, are available
0034 class HLTGenValHistCollPath {
0035 public:
0036   using MonitorElement = dqm::legacy::MonitorElement;
0037   using DQMStore = dqm::legacy::DQMStore;
0038 
0039   explicit HLTGenValHistCollPath(edm::ParameterSet pathCollConfig, HLTConfigProvider& hltConfig);
0040 
0041   static edm::ParameterSetDescription makePSetDescription();
0042 
0043   void bookHists(DQMStore::IBooker& iBooker,
0044                  std::vector<edm::ParameterSet>& histConfigs,
0045                  std::vector<edm::ParameterSet>& histConfigs2D);
0046   void fillHists(const HLTGenValObject& obj, edm::Handle<trigger::TriggerEvent>& triggerEvent);
0047 
0048 private:
0049   std::string triggerPath_;
0050   std::vector<HLTGenValHistCollFilter> collectionFilter_;
0051   std::vector<std::string> filters_;
0052   HLTConfigProvider hltConfig_;
0053   bool doOnlyLastFilter_;
0054 
0055   // we will add a string to the root file that is named after the path
0056   // it will contain the filters of that path divided by semicola
0057   std::string pathStringName_;
0058   std::string pathString_;
0059 };
0060 
0061 #endif