File indexing completed on 2025-02-13 02:58:34
0001 #ifndef Validation_HLTrigger_HLTGenValHistCollFilter_h
0002 #define Validation_HLTrigger_HLTGenValHistCollFilter_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
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 "Validation/HLTrigger/interface/HLTGenValHist.h"
0023 #include "DQMOffline/Trigger/interface/FunctionDefs.h"
0024 #include "DQMOffline/Trigger/interface/UtilFuncs.h"
0025
0026 #include "Validation/HLTrigger/interface/HLTGenValObject.h"
0027 #include "Validation/HLTrigger/interface/HLTGenValPathSpecificSettingParser.h"
0028
0029 #include "DataFormats/Math/interface/deltaR.h"
0030
0031 #include <utility>
0032
0033
0034
0035 class HLTGenResHistColl {
0036 public:
0037 using MonitorElement = dqm::legacy::MonitorElement;
0038 using DQMStore = dqm::legacy::DQMStore;
0039
0040 explicit HLTGenResHistColl(edm::ParameterSet filterCollConfig, std::string hltProcessName);
0041
0042 static edm::ParameterSetDescription makePSetDescription();
0043
0044 void bookHists(DQMStore::IBooker& iBooker);
0045 void fillHists(const HLTGenValObject& obj, edm::Handle<trigger::TriggerEvent>& triggerEvent);
0046
0047 const std::string& objType() const { return objType_; }
0048
0049 private:
0050 void book1D(DQMStore::IBooker& iBooker, const edm::ParameterSet& histConfig);
0051 void book2D(DQMStore::IBooker& iBooker, const edm::ParameterSet& histConfig2D);
0052 bool passFilterSelection(trigger::size_type key, const trigger::TriggerEvent& triggerEvent) const;
0053 std::string getHistName(const std::string& resVar, const std::string& vsVar = "") const;
0054
0055 std::vector<std::unique_ptr<HLTGenValHist>> hists_;
0056 std::string objType_;
0057 bool isEventLevelVariable_;
0058 std::string tag_;
0059 std::vector<std::string> filters_;
0060 bool andFilters_;
0061 std::string hltProcessName_;
0062 std::string collectionName_;
0063 double dR2limit_;
0064 std::string histNamePrefix_;
0065 std::string separator_;
0066 std::vector<edm::ParameterSet> histConfigs_;
0067 std::vector<edm::ParameterSet> histConfigs2D_;
0068 };
0069
0070 #endif