10 using namespace l1extra;
11 using namespace trigger;
17 hltProcessName_(ps.getUntrackedParameter<std::
string>(
"HLTProcessName",
"HLT")),
18 triggerResultsSrc_(ps.getUntrackedParameter<edm::
InputTag>(
"TriggerResultsSrc")),
20 triggerEventSrc_(ps.getUntrackedParameter<edm::
InputTag>(
"TriggerEventSrc")),
21 triggerEventToken_(consumes<trigger::
TriggerEvent>(triggerEventSrc_)),
22 pathRegex_(ps.getUntrackedParameter<std::
string>(
"Paths")),
23 nPtBins_(ps.getUntrackedParameter<int>(
"PtHistoBins", 20)),
24 nEtaBins_(ps.getUntrackedParameter<int>(
"EtaHistoBins",12)),
25 nPhiBins_(ps.getUntrackedParameter<int>(
"PhiHistoBins",18)),
26 ptMax_(ps.getUntrackedParameter<double>(
"PtHistoMax",200)),
27 highPtMax_(ps.getUntrackedParameter<double>(
"HighPtHistoMax",1000)),
28 l1MatchDr_(ps.getUntrackedParameter<double>(
"L1MatchDeltaR", 0.5)),
29 hltMatchDr_(ps.getUntrackedParameter<double>(
"HLTMatchDeltaR", 0.5)),
30 dqmBaseFolder_(ps.getUntrackedParameter<std::
string>(
"DQMBaseFolder")),
32 prescaleEvt_(ps.getUntrackedParameter<int>(
"prescaleEvt", -1))
37 if(ps.
exists(
"L1Plotter")) {
41 if(ps.
exists(
"PathSummaryPlotter")) {
47 using VPSet = std::vector<edm::ParameterSet>;
62 bool hltMenuChanged =
false;
64 LogDebug(
"HLTTauDQMOffline") <<
"dqmBeginRun(), hltMenuChanged " << hltMenuChanged;
67 std::vector<std::string> foundPaths;
76 std::sort(foundPaths.begin(), foundPaths.end());
79 std::vector<const HLTTauDQMPath *> pathObjects;
81 pathObjects.reserve(foundPaths.size());
83 pathPlotters_.emplace_back(
pathName,
HLTCP_,
doRefAnalysis_,
dqmBaseFolder_,
hltProcessName_,
nPtBins_,
nEtaBins_,
nPhiBins_,
ptMax_,
highPtMax_,
l1MatchDr_,
hltMatchDr_);
105 pathPlotter.bookHistograms(iBooker);
121 if(!triggerResultsHandle.
isValid()) {
128 if(!triggerEventHandle.
isValid()) {
142 if(refObj.objID == 11) {
145 else if(refObj.objID == 13) {
146 refC.
muons.insert(refC.
muons.end(), collHandle->begin(), collHandle->end());
148 else if(refObj.objID == 15) {
149 refC.
taus.insert(refC.
taus.end(), collHandle->begin(), collHandle->end());
151 else if(refObj.objID == 0) {
152 refC.
met.insert(refC.
met.end(), collHandle->begin(), collHandle->end());
159 if(pathPlotter.isValid())
160 pathPlotter.analyze(*triggerResultsHandle, *triggerEventHandle, refC);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::string dqmBaseFolder_
edm::InputTag triggerEventSrc_
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
std::vector< LV > electrons
The single EDProduct to be saved for each event (AOD case)
std::string hltProcessName_
edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< RefObject > refObjects_
void bookHistograms(DQMStore::IBooker &iBooker, const edm::Run &r, const edm::EventSetup &c) override
const std::vector< std::string > & triggerNames() const
names of trigger paths
bool exists(std::string const ¶meterName) const
checks if a parameter exists
triggerResultsToken_(consumes< edm::TriggerResults >(edm::InputTag("TriggerResults")))
HLTTauDQMOfflineSource(const edm::ParameterSet &)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< HLTTauDQMPathPlotter > pathPlotters_
std::unique_ptr< HLTTauDQMPathSummaryPlotter > pathSummaryPlotter_
~HLTTauDQMOfflineSource()
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
const boost::regex pathRegex_
edm::InputTag triggerResultsSrc_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
std::unique_ptr< HLTTauDQML1Plotter > l1Plotter_
void analyze(const edm::Event &e, const edm::EventSetup &c) override