12 using namespace trigger;
18 LogDebug(
"TrigResRateMon") <<
"constructor...." ;
24 LogInfo(
"TrigResRateMon") <<
"unabel to get DQMStore service?";
62 std::vector<edm::ParameterSet>
paths =
63 iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"paths");
65 for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
69 pathconf->getParameter<std::string>(
"pathname"),
70 pathconf->getParameter<std::string>(
"denompathname")
194 using namespace trigger;
196 LogDebug(
"TrigResRateMon")<<
" analyze...." ;
203 if(!triggerResults.isValid()) {
205 iEvent.
getByLabel(triggerResultsLabelFU,triggerResults);
206 if(!triggerResults.isValid()) {
207 edm::LogInfo(
"TrigResRateMon") <<
"TriggerResults not found, "
314 if(reportSummaryME) reportSummaryME->
Fill(1);
323 LogInfo(
"TrigResRateMon") <<
"analyzed " <<
nev_ <<
" events";
332 LogDebug(
"TrigResRateMon") <<
"beginRun, run " << run.
id();
345 LogDebug(
"TrigResRateMon") <<
"HLTConfigProvider failed to initialize.";
369 for (
unsigned int j=0;
j!=
n; ++
j) {
379 for (
unsigned int i=0;
i!=
n; ++
i) {
386 std::string filtername(
"dummy");
389 if (
plotAll_ && denomobjectType == objectType && objectType != 0) {
393 hltPaths_.push_back(
PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername,
processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
404 for (
unsigned int i=0;
i!=
n; ++
i) {
406 std::string denompathname =
"";
414 std::string filtername(
"dummy");
429 if (objectType != -1 && pathname.find(
"FinalPath") == std::string::npos){
434 hltPaths_.push_back(
PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername,
processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
436 hltPathsDiagonal_.push_back(
PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername,
processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
447 std::string numpathname = custompathnamepair->first;
448 std::string denompathname = custompathnamepair->second;
450 if (numpathname != denompathname) {
453 bool founddenominator =
false;
454 for (
unsigned int k=0;
k!=
n; ++
k) {
458 if (n_pathname.find(denompathname) != std::string::npos) {
460 LogDebug(
"TrigResRateMon") <<
"denompathname is selected to be = " << n_pathname << endl;;
461 founddenominator =
true;
468 if (!founddenominator) {
470 edm::LogInfo(
"TrigResRateMon") <<
"denompathname not found, go to the next pair numearator-denominator" << endl;
478 bool foundnumerator =
false;
479 for (
unsigned int j=0;
j!=
n; ++
j) {
483 LogDebug(
"TrigResRateMon") <<
"check if path " << pathname <<
" is numpathname = " << numpathname << endl;
486 LogDebug(
"TrigResRateMon") <<
"pathname is selected to be = " << denompathname << endl;;
487 foundnumerator =
true;
492 if (!foundnumerator) {
494 edm::LogInfo(
"TrigResRateMon") <<
"pathname not found, ignoring " << pathname;
504 std::string filtername(
"dummy");
518 if (objectType != 0) {
521 hltPaths_.push_back(
PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername,
processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
541 vector<string> allPaths;
549 vector<int> tempCount(5,0);
554 allPaths.push_back(pathName);
625 for (
unsigned int i=0;
i<datasetNames.size();
i++) {
674 string moduleName, moduleType;
675 unsigned int moduleIndex;
678 vector<string>::const_iterator iDumpModName;
679 for (iDumpModName = moduleNames.begin();iDumpModName != moduleNames.end();iDumpModName++) {
681 moduleName = *iDumpModName;
685 LogTrace (
"TrigResRateMon") <<
"Module " << numModule
686 <<
" is called " << moduleName
687 <<
" , type = " << moduleType
688 <<
" , index = " << moduleIndex
693 if((moduleType.find(
"Filter") != string::npos && moduleType.find(
"HLTTriggerTypeFilter") == string::npos ) ||
694 (moduleType.find(
"Associator") != string::npos) ||
695 (moduleType.find(
"HLTLevel1GTSeed") != string::npos) ||
696 (moduleType.find(
"HLTGlobalSumsCaloMET") != string::npos) ||
697 (moduleType.find(
"HLTPrescaler") != string::npos) ) {
703 v->filtersAndIndices.push_back(make_pair(moduleName,moduleIndex));
713 int nbin_sub =
v->filtersAndIndices.size()+2;
717 "Filters_" +
v->getPath(),
718 nbin_sub+1, -0.5, 0.5+(double)nbin_sub);
720 for(
unsigned int filt = 0; filt <
v->filtersAndIndices.size(); filt++){
722 filters->
setBinLabel(filt+1, (
v->filtersAndIndices[filt]).first);
729 v->getPath() +
" rate [Hz]",
733 v->setFilterHistos(filters);
754 std::string labelname(
"dummy");
755 labelname =
v->getPath() +
"_wrt_" +
v->getDenomPath();
756 std::string histoname(labelname+
"_NOn");
757 std::string
title(labelname+
" N online");
758 double histEtaMax = 2.5;
794 TString pathfolder =
dirname_ + TString(
"/FourVector/") +
v->getPath();
955 LogDebug(
"TrigResRateMon") <<
"endRun, run " << run.
id();
966 paths.push_back(
"Total "+label);
974 h_name=
"HLT_"+label+
"_PassPass";
975 h_title =
"HLT_"+label+
"_PassPass (x=Pass, y=Pass)";
977 paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
979 h_name=
"HLT_"+label+
"_Pass_Any";
980 h_title =
"HLT_"+label+
"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
982 paths.size(), -0.5, paths.size()-0.5);
985 h_name=
"HLT_"+label+
"_PassPass_Normalized";
986 h_title =
"HLT_"+label+
"_PassPass (x=Pass, y=Pass) normalized to xBin=Pass";
988 paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
989 h_name=
"HLT_"+label+
"_Pass_Normalized_Any";
990 h_title =
"HLT_"+label+
"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
992 paths.size(), -0.5, paths.size()-0.5);
995 h_name=
"HLT_"+label+
"_Total_LS";
996 h_title = label+
" HLT paths total combined rate [Hz]";
1000 h_name=
"HLT_"+label+
"_LS";
1001 h_title = label+
" HLT paths rate [Hz]";
1032 for(
unsigned int i = 0;
i < paths.size();
i++){
1034 ME->
getTH2F()->GetXaxis()->SetBinLabel(
i+1, (paths[
i]).c_str());
1035 ME->
getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1036 ME_Group_LS->
getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1038 ME_Normalized->
getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1039 ME_Normalized->
getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1040 ME_Normalized_Any->
getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1041 ME_Any->
getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1051 paths.push_back(
"");
1052 paths.push_back(
"HLT_"+label+
"_Any");
1059 h_name=
"HLT_"+label+
"_PassPass";
1060 h_title =
"HLT_"+label+
"_PassPass (x=Pass, y=Pass)";
1062 paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1064 h_name=
"HLT_"+label+
"_Pass_Any";
1065 h_title =
"HLT_"+label+
"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1067 paths.size(), -0.5, paths.size()-0.5);
1070 h_name=
"HLT_"+label+
"_PassPass_Normalized";
1071 h_title =
"HLT_"+label+
"_PassPass (x=Pass, y=Pass) normalized to xBin=Pass";
1073 paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1074 h_name=
"HLT_"+label+
"_Pass_Normalized_Any";
1075 h_title =
"HLT_"+label+
"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1077 paths.size(), -0.5, paths.size()-0.5);
1079 for(
unsigned int i = 0;
i < paths.size();
i++){
1081 ME->
getTH2F()->GetXaxis()->SetBinLabel(
i+1, (paths[
i]).c_str());
1082 ME->
getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1084 ME_Normalized->
getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1085 ME_Normalized->
getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1087 ME_Any->
getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1088 ME_Normalized_Any->
getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1096 string fullPathToME;
1097 std::vector <std::pair<std::string, bool> > groupAcceptPair;
1106 if(!ME_2d || !ME_1d) {
1108 LogTrace(
"TrigResRateMon") <<
" ME not valid although I gave full path" << endl;
1113 TH2F * hist_2d = ME_2d->
getTH2F();
1114 TH1F * hist_1d = ME_1d->
getTH1F();
1118 int anyBinNumber = hist_2d->GetXaxis()->FindBin(
"HLT_Any");
1122 int groupBinNumber = hist_2d->GetXaxis()->FindBin(groupBinLabel.c_str());
1127 hist_2d->Fill(anyBinNumber-1,anyBinNumber-1);
1128 hist_1d->Fill(anyBinNumber-1);
1132 bool groupPassed =
false;
1133 bool groupL1Passed =
false;
1161 groupL1Passed =
true;
1163 hist_2d->Fill(i,anyBinNumber-1);
1164 hist_2d->Fill(anyBinNumber-1,i);
1166 hist_2d->Fill(i,groupBinNumber-1);
1167 hist_2d->Fill(groupBinNumber-1,i);
1199 hist_1d->Fill(groupBinNumber-1);
1200 hist_2d->Fill(groupBinNumber-1,groupBinNumber-1);
1201 hist_2d->Fill(anyBinNumber-1,groupBinNumber-1);
1202 hist_2d->Fill(groupBinNumber-1,anyBinNumber-1);
1208 bool isGroupFromStreamA =
false;
1211 for (
unsigned int g=0;
g<streamDatasetNames.size();
g++) {
1216 isGroupFromStreamA =
true;
1227 int groupL1BinNumber = hist_2d->GetXaxis()->FindBin(groupL1BinLabel.c_str());
1229 if(groupL1Passed) hist_1d->Fill(groupL1BinNumber-1);
1237 if(!ME_2d_Stream || !ME_1d_Stream) {
1239 LogTrace(
"TrigResRateMon") <<
" ME not valid although I gave full path" << endl;
1245 TH2F * hist_2d_Stream = ME_2d_Stream->
getTH2F();
1246 TH1F * hist_1d_Stream = ME_1d_Stream->
getTH1F();
1248 int streamBinNumber = hist_1d_Stream->GetXaxis()->GetLast();
1250 bool acceptedStreamA =
false;
1253 for (
unsigned int i=0;
i<groupAcceptPair.size();
i++) {
1255 if(groupAcceptPair[
i].
second) {
1257 acceptedStreamA =
true;
1259 int groupBinNumber_i = hist_2d_Stream->GetXaxis()->FindBin(groupAcceptPair[
i].
first.c_str());
1261 hist_1d_Stream->Fill(groupBinNumber_i-1);
1262 hist_2d_Stream->Fill(groupBinNumber_i-1,streamBinNumber-1);
1263 hist_2d_Stream->Fill(streamBinNumber-1,groupBinNumber_i-1);
1265 for (
unsigned int j=0;
j<groupAcceptPair.size();
j++) {
1268 if(groupAcceptPair[
j].second) {
1270 int groupBinNumber_j = hist_2d_Stream->GetXaxis()->FindBin(groupAcceptPair[
j].
first.c_str());
1274 hist_2d_Stream->Fill(groupBinNumber_i-1,groupBinNumber_j-1);
1284 if(acceptedStreamA) {
1286 hist_2d_Stream->Fill(streamBinNumber-1,streamBinNumber-1);
1287 hist_1d_Stream->Fill(streamBinNumber-1);
1306 "HLT counts vs Event bx",
1307 Nbx_+1, -0.5,
Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1309 "HLT counts vs Event bx",
1310 Nbx_+1, -0.5,
Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1316 for(
unsigned int i = 0;
i < npaths;
i++){
1336 "AllSelectedPaths paths rate [Hz]",
1337 nLS_, 0,
nLS_, npaths+1, -0.5, npaths+1-0.5);
1341 for(
unsigned int i = 0;
i < npaths;
i++){
1347 unsigned int i = npaths;
1350 int nBinsPerLSHisto = 20;
1351 int nLSHistos = npaths/nBinsPerLSHisto;
1352 for (
int nh=0;nh<nLSHistos+1;nh++) {
1357 sprintf(name,
"Group_%d_paths_count_LS",nLSHistos-nh);
1358 sprintf(title,
"Group %d, paths rate [Hz]",nLSHistos-nh);
1361 nLS_, 0,
nLS_, nBinsPerLSHisto+3, -0.5, nBinsPerLSHisto+3-0.5);
1366 for(
int i = nh*nBinsPerLSHisto; i < (nh+1)*nBinsPerLSHisto; i++){
1368 if (i ==
int(npaths))
break;
1378 bin = i % nBinsPerLSHisto;
1386 tempME->
setBinLabel(nBinsPerLSHisto+3,
"HLT_Any", 2);
1387 tempME->
setBinLabel(nBinsPerLSHisto+2,
"HLT_PhysicsDeclared", 2);
1409 LogTrace(
"TrigResRateMon") <<
" end lumiSection number " << lumi << endl;
1423 LogTrace(
"TrigResRateMon") <<
" countHLTGroupBXHitsEndLumiBlock() lumiSection number " << lumi << endl;
1432 std::string pathname = ip->first;
1433 vector<int> prevCount = ip->second;
1436 vector<int> currCount (5,0);
1437 vector<int> diffCount (5,0);
1440 int pathBin = hist_2d_bx->GetYaxis()->FindBin(pathname.c_str());
1442 if(pathBin > hist_2d_bx->GetNbinsY()) {
1444 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
1449 for (
unsigned int b =0;
b<currCount.size();
b++) {
1453 if(bunch < 1) bunch +=
Nbx_ ;
1454 int bxBin = bunch +1;
1457 currCount[
b] = int(hist_2d_bx->GetBinContent(bxBin, pathBin));
1459 LogTrace(
"TrigResRateMon") <<
"currCount = " << currCount[
b] << endl;
1462 diffCount[
b] = currCount[
b] - prevCount[
b];
1464 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
"bxOffset = " << bxOffset <<
" count = " << diffCount[
b] << endl;
1469 ip->second = currCount;
1474 LogTrace(
"TrigResRateMon") <<
"Find " << pathname << endl;
1481 bool isMember =
false;
1501 LogTrace(
"TrigResRateMon") <<
"Could not find a group to which the path belongs, path = " << pathname <<
" group = " <<
fGroupNamePathsPair[
j].first << endl;
1515 vector<int> updatedLumiCount(5,0);
1517 float entireBXWindowUpdatedLumiCount = 0;
1519 TH2F* hist_All = ME_2d->
getTH2F();
1521 for (
unsigned int b = 0;
b<diffCount.size();
b++) {
1524 int binNumber =
b+1;
1527 int currentLumiCount = int(hist_All->GetBinContent(lumi+1,binNumber));
1528 updatedLumiCount[
b] = currentLumiCount + diffCount[
b];
1529 hist_All->SetBinContent(lumi+1,binNumber,updatedLumiCount[
b]);
1531 entireBXWindowUpdatedLumiCount += updatedLumiCount[
b];
1544 TH2F* hist_All_Norm = ME_2d_Norm->
getTH2F();
1546 for (
unsigned int b = 0;
b<diffCount.size();
b++) {
1549 int binNumber =
b+1;
1552 hist_All_Norm->SetBinContent(lumi+1,binNumber,
float(updatedLumiCount[
b])/entireBXWindowUpdatedLumiCount);
1565 LogTrace(
"TrigResRateMon") <<
" countHLTGroupL1HitsEndLumiBlock() lumiSection number " << lumi << endl;
1575 LogTrace(
"TrigResRateMon") <<
" could not find 1d matrix " << fullPathToME << endl;
1581 LogTrace(
"TrigResRateMon") <<
" Looking in histogram " << fullPathToME << endl;
1583 TH1F * hist_1d = ME_1d->
getTH1F();
1588 string pathname = ip->first;
1589 float prevCount = ip->second;
1591 string binLabel =
"HLT_"+pathname+
"_L1_Any";
1593 LogTrace(
"TrigResRateMon") <<
" Looking for binLabel = " << binLabel << endl;
1595 int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
1597 LogTrace(
"TrigResRateMon") <<
" pathBin = " << pathBin <<
" out of histogram total number of bins " << hist_1d->GetNbinsX() << endl;
1600 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
1605 float currCount = hist_1d->GetBinContent(pathBin)/
LSsize_;
1608 float diffCount = currCount - prevCount;
1610 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
" count " << diffCount << endl;
1613 ip->second = currCount;
1624 float currentLumiCount = ME_1d->
getTH1()->GetBinContent(lumi+1);
1625 float updatedLumiCount = currentLumiCount + diffCount;
1626 ME_1d->
getTH1()->SetBinContent(lumi+1,updatedLumiCount);
1631 LogDebug(
"TrigResRateMon") <<
" cannot find ME " << fullPathToME_count << endl;
1645 LogTrace(
"TrigResRateMon") <<
" countHLTGroupHitsEndLumiBlock() lumiSection number " << lumi << endl;
1654 LogTrace(
"TrigResRateMon") <<
" could not find 1d matrix " << fullPathToME << endl;
1660 LogTrace(
"TrigResRateMon") <<
" Looking in histogram " << fullPathToME << endl;
1662 TH1F * hist_1d = ME_1d->
getTH1F();
1667 string pathname = ip->first;
1668 float prevCount = ip->second;
1670 string binLabel =
"Total "+pathname;
1672 LogTrace(
"TrigResRateMon") <<
" Looking for binLabel = " << binLabel << endl;
1675 int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
1677 LogTrace(
"TrigResRateMon") <<
" pathBin = " << pathBin <<
" out of histogram total number of bins " << hist_1d->GetNbinsX() << endl;
1680 binLabel = pathname;
1681 int alternativePathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
1683 if(alternativePathBin == -1) {
1685 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
1692 pathBin = alternativePathBin;
1698 float currCount = hist_1d->GetBinContent(pathBin)/
LSsize_;
1701 float diffCount = currCount - prevCount;
1703 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
" diffCount " << diffCount << endl;
1706 ip->second = currCount;
1720 if ( ME_1d && ME_2d && ME_Stream_A_2d) {
1724 float currentLumiCount = ME_1d->
getTH1()->GetBinContent(lumi+1);
1725 float updatedLumiCount = currentLumiCount + diffCount;
1726 ME_1d->
getTH1()->SetBinContent(lumi+1,updatedLumiCount);
1729 int groupBin = ME_2d->
getTH2F()->GetYaxis()->FindBin(groupBinLabel.c_str());
1730 if(groupBin != -1) ME_2d->
getTH2F()->SetBinContent(lumi+1,groupBin,updatedLumiCount);
1734 groupBin = ME_Stream_A_2d->
getTH2F()->GetYaxis()->FindBin(groupBinLabel.c_str());
1735 if(groupBin != -1) ME_Stream_A_2d->
getTH2F()->SetBinContent(lumi+1,groupBin,updatedLumiCount);
1740 LogDebug(
"TrigResRateMon") <<
" cannot find ME " << fullPathToME_count << endl;
1754 LogTrace(
"TrigResRateMon") <<
" countHLTPathHitsEndLumiBlock() lumiSection number " << lumi << endl;
1761 LogTrace(
"TrigResRateMon") <<
" could not fine 2d matrix " << fullPathToME << endl;
1767 TH2F * hist_2d = ME_2d->
getTH2F();
1772 std::string pathname = ip->first;
1773 float prevCount = ip->second;
1776 float pathBin = hist_2d->GetXaxis()->FindBin(pathname.c_str());
1778 if(pathBin > hist_2d->GetNbinsX()) {
1780 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
1785 float currCount = hist_2d->GetBinContent(pathBin, pathBin)/
LSsize_;
1788 float diffCount = currCount - prevCount;
1790 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
" count " << diffCount << endl;
1793 ip->second = currCount;
1803 int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
1806 float currentLumiCount = hist_All->GetBinContent(lumi+1,pathBinNumber);
1807 float updatedLumiCount = currentLumiCount + diffCount;
1808 hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
1813 LogDebug(
"TrigResRateMon") <<
" cannot find ME_HLTAll_LS" << endl;
1823 TH2F* hist_All = tempME->
getTH2F();
1826 int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
1828 float currentLumiCount = hist_All->GetBinContent(lumi+1,pathBinNumber);
1829 float updatedLumiCount = currentLumiCount + diffCount;
1830 hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
1835 LogDebug(
"TrigResRateMon") <<
" cannot find tempME " << endl;
1850 float currentLumiCount = ME_1d->
getTH1()->GetBinContent(lumi+1);
1851 float updatedLumiCount = currentLumiCount + diffCount;
1852 ME_1d->
getTH1()->SetBinContent(lumi+1,updatedLumiCount);
1857 LogDebug(
"TrigResRateMon") <<
" cannot find ME " << fullPathToME_count << endl;
1870 if (pathname.find(
"MET") != std::string::npos)
1872 if (pathname.find(
"SumET") != std::string::npos)
1874 if (pathname.find(
"HT") != std::string::npos)
1876 if (pathname.find(
"Jet") != std::string::npos)
1878 if (pathname.find(
"Mu") != std::string::npos)
1880 if (pathname.find(
"Ele") != std::string::npos)
1882 if (pathname.find(
"Photon") != std::string::npos)
1884 if (pathname.find(
"EG") != std::string::npos)
1886 if (pathname.find(
"Tau") != std::string::npos)
1888 if (pathname.find(
"IsoTrack") != std::string::npos)
1890 if (pathname.find(
"BTag") != std::string::npos)
1902 string l1pathname =
"dummy";
1906 for(vector<string>::iterator numpathmodule = numpathmodules.begin();
1907 numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1911 l1pathname = *numpathmodule;
1927 int l1ModuleIndex = 999;
1931 if(
v->getPath() == pathname ) l1ModuleIndex =
v->getL1ModuleIndex();
1935 unsigned int pathByIndex = triggerNames.
triggerIndex(pathname);
1943 rc = (l1ModuleIndex < lastModule);
1954 unsigned int pathByIndex = triggerNames.
triggerIndex(pathname);
1967 std::string pathname =
name;
1972 if(pathname.find(
"L1") != std::string::npos) pathname.replace(pathname.find(
"L1"),2,
"");
1974 if(pathname.find(
"L2") != std::string::npos) pathname.replace(pathname.find(
"L2"),2,
"");
1976 if(pathname.find(
"8E29") != std::string::npos) pathname.replace(pathname.find(
"8E29"),4,
"");
1978 int digitLocation=0;
1979 for (
unsigned int i=0;
i < pathname.length();
i++)
1981 if (isdigit(pathname.at(
i))) {
1990 string hltThresholdString = pathname.substr(digitLocation);
1992 int hltThreshold = 0;
1995 sscanf (hltThresholdString.c_str(),
"%d%*s",&hltThreshold);
1998 return hltThreshold;
2004 string fullPathToME;
2011 for (
unsigned int i=0;
i<datasetNames.size();
i++) {
2040 if(!ME_HLTPassPass || !ME_HLTPassPass_Normalized || !ME_HLTPass_Normalized_Any)
return;
2042 float passCount = 0;
2043 unsigned int nBinsX = ME_HLTPassPass->
getTH2F()->GetNbinsX();
2044 unsigned int nBinsY = ME_HLTPassPass->
getTH2F()->GetNbinsY();
2046 for(
unsigned int binX = 0; binX < nBinsX+1; binX++) {
2048 passCount = ME_HLTPassPass->
getTH2F()->GetBinContent(binX,binX);
2051 for(
unsigned int binY = 0; binY < nBinsY+1; binY++) {
2053 if(passCount != 0) {
2056 float normalizedBinContentPassPass = (ME_HLTPassPass->
getTH2F()->GetBinContent(binX,binY))/passCount;
2059 ME_HLTPassPass_Normalized->
getTH2F()->SetBinContent(binX,binY,normalizedBinContentPassPass);
2062 if(binX == nBinsX) {
2064 ME_HLTPass_Normalized_Any->
getTH1F()->SetBinContent(binY,normalizedBinContentPassPass);
2071 ME_HLTPassPass_Normalized->
getTH2F()->SetBinContent(binX,binY,0);
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
unsigned int size() const
number of trigger paths in trigger table
std::vector< std::pair< std::string, float > > fGroupL1TempCountPair
edm::InputTag triggerResultsLabel_
LuminosityBlockID id() const
double normalizedChi2Cut_
int getThresholdFromName(const std::string &pathname)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
unsigned int nBinsOneOverEt_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
std::string pathsSummaryFilterCountsFolder_
TrigResRateMon(const edm::ParameterSet &)
const std::string moduleType(const std::string &module) const
C++ class name of module.
HLTConfigProvider hltConfig_
std::vector< std::string > fGroupName
void countHLTGroupBXHitsEndLumiBlock(const int &lumi)
std::vector< std::pair< std::string, float > > fPathTempCountPair
const std::string & triggerName(unsigned int triggerIndex) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
MonitorElement * ME_HLTAll_LS
enum start value shifted to 81 so as to avoid clashes with PDG codes
std::string fCustomBXPath
edm::InputTag recHitsEBTag_
MonitorElement * scalersSelect
bool hasL1Passed(const std::string &pathname, const edm::TriggerNames &triggerNames)
void countHLTGroupHitsEndLumiBlock(const int &lumi)
PathInfoCollection hltPaths_
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::vector< MonitorElement * > v_ME_HLTAll_LS
std::string pathsSummaryHLTPathsPerLSFolder_
double dRMaxElectronMuon_
void setupHltMatrix(const std::string &label, std::vector< std::string > &paths)
void countHLTGroupL1HitsEndLumiBlock(const int &lumi)
std::vector< TPRegexp > filters
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
PathInfoCollection hltPathsDiagonal_
bool hasHLTPassed(const std::string &pathname, const edm::TriggerNames &triggerNames)
U second(std::pair< T, U > const &p)
const std::string * pathName() const
std::vector< std::string > specialPaths_
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
unsigned int triggerIndex(std::string const &name) const
void fillHltMatrix(const edm::TriggerNames &triggerNames)
std::string pathsSummaryStreamsFolder_
const std::vector< std::string > & streamContent(unsigned int stream) const
names of datasets in stream with index i
void setupStreamMatrix(const std::string &label, std::vector< std::string > &paths)
std::vector< std::pair< std::string, float > > fGroupTempCountPair
std::vector< MonitorElement * > v_ME_HLTPassPass_Normalized
edm::InputTag recHitsEETag_
void setVerbose(unsigned level)
void countHLTPathHitsEndLumiBlock(const int &lumi)
std::vector< MonitorElement * > v_ME_HLTPassPass
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::vector< MonitorElement * > v_ME_Total_BX
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * ME_HLT_BX
edm::InputTag triggerSummaryLabel_
unsigned int referenceBX_
std::vector< MonitorElement * > v_ME_Total_BX_Norm
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
std::string pathsSummaryFolder_
std::string pathsIndividualHLTPathsPerLSFolder_
edm::Handle< edm::TriggerResults > triggerResults_
void beginRun(const edm::Run &run, const edm::EventSetup &c)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
TH1F * getTH1F(void) const
LuminosityBlockNumber_t luminosityBlock() const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void normalizeHLTMatrix()
std::string pathsSummaryHLTCorrelationsFolder_
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
std::vector< MonitorElement * > v_ME_HLTPass_Normalized_Any
std::string pathsSummaryHLTPathsPerBXFolder_
TH2F * getTH2F(void) const
int getTriggerTypeParsePathName(const std::string &pathname)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
std::vector< std::pair< std::string, std::vector< int > > > fPathBxTempCountPair
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
tuple size
Write out results.
MonitorElement * ME_HLT_CUSTOM_BX
void setCurrentFolder(const std::string &fullpath)
const std::string getL1ConditionModuleName(const std::string &pathname)