16 hltProcessName_(ps.getUntrackedParameter<
std::
string>(
"HLTProcessName",
"HLT")),
17 triggerResultsSrc_(ps.getUntrackedParameter<
edm::
InputTag>(
"TriggerResultsSrc")),
19 triggerEventSrc_(ps.getUntrackedParameter<
edm::
InputTag>(
"TriggerEventSrc")),
21 pathRegex_(ps.getUntrackedParameter<
std::
string>(
"Paths")),
22 nPtBins_(ps.getUntrackedParameter<
int>(
"PtHistoBins", 20)),
23 nEtaBins_(ps.getUntrackedParameter<
int>(
"EtaHistoBins",12)),
24 nPhiBins_(ps.getUntrackedParameter<
int>(
"PhiHistoBins",18)),
25 ptMax_(ps.getUntrackedParameter<double>(
"PtHistoMax",200)),
26 highPtMax_(ps.getUntrackedParameter<double>(
"HighPtHistoMax",1000)),
27 l1MatchDr_(ps.getUntrackedParameter<double>(
"L1MatchDeltaR", 0.5)),
28 hltMatchDr_(ps.getUntrackedParameter<double>(
"HLTMatchDeltaR", 0.5)),
29 dqmBaseFolder_(ps.getUntrackedParameter<
std::
string>(
"DQMBaseFolder")),
31 prescaleEvt_(ps.getUntrackedParameter<
int>(
"prescaleEvt", -1))
36 if(ps.
exists(
"L1Plotter") && !ps.
exists(
"TagAndProbe")) {
40 if(ps.
exists(
"PathSummaryPlotter")) {
45 if(ps.
exists(
"TagAndProbe")) {
51 using VPSet = std::vector<edm::ParameterSet>;
65 bool hltMenuChanged =
false;
67 LogDebug(
"HLTTauDQMOffline") <<
"dqmBeginRun(), hltMenuChanged " << hltMenuChanged;
71 std::vector<std::string> foundPaths;
75 if(std::regex_search(pathName, what,
pathRegex_)) {
76 LogDebug(
"HLTTauDQMOffline") <<
"Found path " << pathName;
77 foundPaths.emplace_back(pathName);
80 std::sort(foundPaths.begin(), foundPaths.end());
83 std::vector<const HLTTauDQMPath *> pathObjects;
85 pathObjects.reserve(foundPaths.size());
87 pathPlotters_.emplace_back(pathName,
HLTCP_,
doRefAnalysis_,
dqmBaseFolder_,
hltProcessName_,
nPtBins_,
nEtaBins_,
nPhiBins_,
ptMax_,
highPtMax_,
l1MatchDr_,
hltMatchDr_);
99 std::vector<std::string> foundPaths;
103 std::vector<std::string> moduleLabels;
105 std::vector<std::string> denominators = denpset.
getParameter<std::vector<std::string> >(
"hltPaths");
106 std::vector<std::string> updatedDenominators;
107 for(
size_t i = 0;
i < denominators.size(); ++
i){
108 const std::regex denRegex_(denominators[
i]);
110 if(std::regex_search(pathName, what, denRegex_)) {
111 updatedDenominators.push_back(pathName);
116 denpset.
addParameter<std::vector<std::string> >(
"hltPaths",updatedDenominators);
121 std::vector<std::string> numerators = numpset.
getParameter<std::vector<std::string> >(
"hltPaths");
123 const std::regex numRegex_(numerators[0]);
125 if(std::regex_search(pathName, what, numRegex_)) {
129 std::vector<std::string> updatedHltPaths;
130 updatedHltPaths.push_back(pathName);
131 numpset.addParameter<std::vector<std::string> >(
"hltPaths",updatedHltPaths);
152 pathPlotter.bookHistograms(iBooker);
155 tpPlotter->bookHistograms(iBooker,iRun,iSetup);
171 if(!triggerResultsHandle.
isValid()) {
178 if(!triggerEventHandle.
isValid()) {
192 if(refObj.objID == 11) {
195 else if(refObj.objID == 13) {
196 refC.
muons.insert(refC.
muons.end(), collHandle->begin(), collHandle->end());
198 else if(refObj.objID == 15) {
199 refC.
taus.insert(refC.
taus.end(), collHandle->begin(), collHandle->end());
201 else if(refObj.objID == 0) {
202 refC.
met.insert(refC.
met.end(), collHandle->begin(), collHandle->end());
209 if(pathPlotter.isValid())
210 pathPlotter.analyze(*triggerResultsHandle, *triggerEventHandle, refC);
225 tpPlotter->analyze(iEvent,*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
std::vector< edm::ParameterSet > tagAndProbePaths
~HLTTauDQMOfflineSource() override
HLTTauDQMOfflineSource(const edm::ParameterSet &)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< HLTTauDQMPathPlotter > pathPlotters_
void addParameter(std::string const &name, T const &value)
std::vector< std::unique_ptr< HLTTauDQMTagAndProbePlotter > > tagandprobePlotters_
std::unique_ptr< HLTTauDQMPathSummaryPlotter > pathSummaryPlotter_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
const std::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