14 using namespace trigger;
20 LogDebug(
"TrigResRateMon") <<
"constructor...." ;
26 LogInfo(
"TrigResRateMon") <<
"unabel to get DQMStore service?";
64 std::vector<edm::ParameterSet>
paths =
65 iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"paths");
67 for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
71 pathconf->getParameter<std::string>(
"pathname"),
72 pathconf->getParameter<std::string>(
"denompathname")
187 if (jmsDebug )
std::cout <<
"Printing extra info " << std::endl;
213 using namespace trigger;
215 LogDebug(
"TrigResRateMon")<<
" analyze...." ;
224 edm::LogInfo(
"TrigResRateMon") <<
"TriggerResults not found, "
280 bool lumiHandleOK = iEvent.
getByLabel(
InputTag(
"hltScalersRawToDigi",
"",
""), lumiScalers);
282 if (
jmsDebug)
std::cout <<
"Tried to get lumi handle result = " << lumiHandleOK << std::endl;
285 if (
jmsDebug)
std::cout <<
"LumiScalers size is: " << lumiScalers->size() << std::endl;
287 if (lumiScalers->size()) {
288 LumiScalersCollection::const_iterator it3 = lumiScalers->begin();
289 unsigned int lumisection = it3->sectionNumber();
292 if (
jmsDebug)
std::cout <<
"Instanteous Lumi is " << it3->instantLumi() << std::endl;
293 if (
jmsDebug)
std::cout <<
"Instanteous Lumi Error is " <<it3->instantLumiErr() << std::endl;
296 if (
jmsDebug)
std::cout <<
"Live Lumi Fill is " <<it3->liveLumiFill() << std::endl;
297 if (
jmsDebug)
std::cout <<
"Live Lumi Run is " <<it3->liveLumiRun() << std::endl;
332 if(reportSummaryME) reportSummaryME->
Fill(1);
341 LogInfo(
"TrigResRateMon") <<
"analyzed " <<
nev_ <<
" events";
350 LogDebug(
"TrigResRateMon") <<
"beginRun, run " << run.
id();
367 if (
jmsDebug)
std::cout <<
"Initialized HLTConfigProvider with name FU " << std::endl;
374 if (
jmsDebug)
std::cout <<
"Initialized HLTConfigProvider with name HLT " << std::endl;
391 meDiagnostic = dbe->
book1D(
"DroppedCounts Diagnose",
"LSs vs Status;Status;LSs", 3, -0.5,2.5 );
588 vector<string> allPaths;
596 vector<int> tempCount(5,0);
601 allPaths.push_back(pathName);
672 for (
unsigned int i=0;
i<datasetNames.size();
i++) {
1020 LogDebug(
"TrigResRateMon") <<
"endRun, run " << run.
id();
1030 paths.push_back(
"");
1031 paths.push_back(
"Total "+label);
1046 h_name=
"HLT_"+label+
"_Pass_Any";
1047 h_title =
"HLT_"+label+
"_Pass -- Prescale*Counts Per Path;Path;PS*Counts";
1049 paths.size(), -0.5, paths.size()-0.5);
1053 h_name=
"HLT_"+label+
"_RawCounts";
1054 h_title =
"HLT_"+label+
"_Pass (x=Pass, An) normalized to HLT_Any Pass;;Counts";
1056 paths.size(), -0.5, paths.size()-0.5);
1061 h_name=
"HLT_"+label+
"_Xsec";
1062 h_title =
"HLT_"+label+
"_Xsec -- Profile shows Average Xsec per path;;#sigma (#mu b)";
1064 TProfile tempProfile(h_name.c_str(), h_title.c_str(),
1065 paths.size(), -0.5, paths.size()-0.5);
1072 h_name=
"HLT_"+label+
"_XsecScaled";
1073 h_title =
"HLT_"+label+
"_Xsec -- Profile shows Average Xsec per path Scaled to Reference;;Ratio (#sigma/#sigma_{ref}";
1075 TProfile tempProfileScaled(h_name.c_str(), h_title.c_str(),
1076 paths.size(), -0.5, paths.size()-0.5);
1080 h_name=
"HLT_"+label+
"_Rate";
1081 h_title =
"HLT_"+label+
"_Rate -- histogram shows Average Rate per LS;LS;Rate [Hz]";
1134 for(
unsigned int i = 0;
i < paths.size();
i++){
1143 ME_Any->
getTH1F()->GetXaxis()->SetBinLabel(
i+1, (paths[
i]).c_str());
1144 ME_Xsec->
getTProfile()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1145 ME_XsecScaled->
getTProfile()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1146 ME_RawCounts->
getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1155 paths.push_back(
"");
1156 paths.push_back(
"HLT_"+label+
"_Any");
1163 h_name=
"HLT_"+label+
"_PassPass";
1164 h_title =
"HLT_"+label+
"_PassPass (x=Pass, y=Pass)";
1166 paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1168 h_name=
"HLT_"+label+
"_Pass_Any";
1169 h_title =
"HLT_"+label+
"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1171 paths.size(), -0.5, paths.size()-0.5);
1174 h_name=
"HLT_"+label+
"_PassPass_Normalized";
1175 h_title =
"HLT_"+label+
"_PassPass (x=Pass, y=Pass) normalized to xBin=Pass";
1177 paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1178 h_name=
"HLT_"+label+
"_Pass_Normalized_Any";
1179 h_title =
"HLT_"+label+
"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1181 paths.size(), -0.5, paths.size()-0.5);
1183 for(
unsigned int i = 0;
i < paths.size();
i++){
1185 ME->
getTH2F()->GetXaxis()->SetBinLabel(
i+1, (paths[
i]).c_str());
1186 ME->
getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1188 ME_Normalized->
getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1189 ME_Normalized->
getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1191 ME_Any->
getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1192 ME_Normalized_Any->
getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1200 string fullPathToME;
1201 std::vector <std::pair<std::string, bool> > groupAcceptPair;
1204 std::pair<int,int> psValueCombo;
1216 LogTrace(
"TrigResRateMon") <<
" ME not valid although I gave full path" << endl;
1222 TH1F * hist_1d = ME_1d->
getTH1F();
1261 bool groupPassed =
false;
1303 <<
" L1 PS " << psValueCombo.first
1304 <<
" and hlt ps " << psValueCombo.second << std::endl;
1306 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1307 hist_1d->Fill(i, psValueCombo.first * psValueCombo.second );
1349 bool isGroupFromStreamA =
false;
1352 for (
unsigned int g=0;
g<streamDatasetNames.size();
g++) {
1357 isGroupFromStreamA =
true;
1381 LogTrace(
"TrigResRateMon") <<
" ME not valid although I gave full path" << endl;
1388 TH1F * hist_1d_Stream = ME_1d_Stream->
getTH1F();
1390 int streamBinNumber = hist_1d_Stream->GetXaxis()->GetLast();
1392 bool acceptedStreamA =
false;
1395 for (
unsigned int i=0;
i<groupAcceptPair.size();
i++) {
1397 if(groupAcceptPair[
i].
second) {
1399 acceptedStreamA =
true;
1402 int groupBinNumber_i = hist_1d_Stream->GetXaxis()->FindBin(groupAcceptPair[
i].
first.c_str());
1405 hist_1d_Stream->Fill(groupBinNumber_i-1);
1428 if(acceptedStreamA) {
1431 hist_1d_Stream->Fill(streamBinNumber-1);
1462 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1473 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1506 for (std::vector<std::string>::iterator iPath = iDS->pathNames.begin();
1507 iPath != iDS->pathNames.end();
1516 if (thisRawCountsPlot){
1517 iDS->fillRawCountsForPath(thisRawCountsPlot, *iPath);
1519 if (
jmsDebug)
std::cout <<
"sorry but couldn't find this raw counts plot"<< iDS->datasetName << std::endl;
1528 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1529 iDS->incrementCountsForPath(*iPath, psValueCombo.first*psValueCombo.second);
1531 iDS->incrementCountsForPath(*iPath);
1564 TString tempThisName(thisName.c_str());
1584 std::cout <<
"===> COUNTS THIS LUMI <===" << std::endl;
1600 iDS->printCountsPerPath();
1623 iDS->clearCountsPerPath();
1665 if (
jmsDebug)
std::cout <<
"sorry but couldn't find this xsec plot"<< iDS->datasetName << std::endl;
1668 if (scaledXsecPlot){
1671 if (
jmsDebug)
std::cout <<
"sorry but couldn't find this scaled xsec plot"<< iDS->datasetName << std::endl;
1680 TH1F* rateHist = thisRatePlot->
getTH1F();
1681 rateHist->SetBinContent(lumi, rate);
1684 if (
jmsDebug)
std::cout <<
"sorry but couldn't find this rate plot"<< iDS->datasetName << std::endl;
1705 "HLT counts vs Event bx",
1706 Nbx_+1, -0.5,
Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1708 "HLT counts vs Event bx",
1709 Nbx_+1, -0.5,
Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1715 for(
unsigned int i = 0;
i < npaths;
i++){
1735 "AllSelectedPaths paths rate [Hz]",
1736 nLS_, 0,
nLS_, npaths+1, -0.5, npaths+1-0.5);
1740 for(
unsigned int i = 0;
i < npaths;
i++){
1746 unsigned int i = npaths;
1749 int nBinsPerLSHisto = 20;
1750 int nLSHistos = npaths/nBinsPerLSHisto;
1751 for (
int nh=0;nh<nLSHistos+1;nh++) {
1756 sprintf(name,
"Group_%d_paths_count_LS",nLSHistos-nh);
1757 sprintf(title,
"Group %d, paths rate [Hz]",nLSHistos-nh);
1760 nLS_, 0,
nLS_, nBinsPerLSHisto+3, -0.5, nBinsPerLSHisto+3-0.5);
1765 for(
int i = nh*nBinsPerLSHisto; i < (nh+1)*nBinsPerLSHisto; i++){
1767 if (i ==
int(npaths))
break;
1777 bin = i % nBinsPerLSHisto;
1785 tempME->
setBinLabel(nBinsPerLSHisto+3,
"HLT_Any", 2);
1786 tempME->
setBinLabel(nBinsPerLSHisto+2,
"HLT_PhysicsDeclared", 2);
1806 TProfile tempProfile(
"XsecVsTestPath",
"Xsec vs Test Path;;Xsec #mub", npaths, 0.5, npaths+0.5);
1810 for(
unsigned int i = 0;
i < npaths;
i++){
1819 sprintf(name,
"path_%s_XsecVsLS", pname);
1820 sprintf(title,
"path_%s_XsecVsLS;LS;Xsec #mub", pname);
1831 sprintf(name2,
"path_%s_countsVsLS", pname);
1832 sprintf(title2,
"path_%s_countsVsLS;LS;Counts", pname);
1842 MonitorElement* meXsec1 =
dbe_->
book1D(
"Xsec_HLT_IsoMu30_eta2p1",
"HLT_IsoMu30_eta2p1 Xsec;Xsec #mub;number of LS", 10, 0.008, 0.012);
1843 MonitorElement* meXsec2 =
dbe_->
book1D(
"Xsec_HLT_Ele65_CaloIdVT_TrkIdT",
"HLT_Ele65_CaloIdVT_TrkIdT Xsec;Xsec #mub;number of LS", 10, 0.002, 0.0025);
1844 MonitorElement* meXsec3 =
dbe_->
book1D(
"Xsec_HLT_MET200",
"HLT_MET200 Xsec;Xsec #mub;number of LS", 10, 0.0004, 0.0008);
1845 MonitorElement* meXsec4 =
dbe_->
book1D(
"Xsec_HLT_Jet370",
"HLT_Jet370 Xsec;Xsec #mub;number of LS", 10, 0.0006, 0.0008);
1846 MonitorElement* meXsec5 =
dbe_->
book1D(
"Xsec_HLT_HT600",
"HLT_HT600 Xsec;Xsec #mub;number of LS", 10, 0.004, 0.005);
1847 MonitorElement* meXsec6 =
dbe_->
book1D(
"Xsec_HLT_Photon26_R9Id_Photon18_R9Id",
"HLT_Photon26_R9Id_Photon18_R9Id Xsec;Xsec #mub;number of LS", 10, 0.002, 0.004);
1848 MonitorElement* meXsec7 =
dbe_->
book1D(
"Xsec_HLT_IsoMu15_eta2p1_LooseIsoPFTau20",
"HLT_IsoMu15_eta2p1_LooseIsoPFTau20 Xsec;Xsec #mub;number of LS", 10, 0.0022, 0.003);
1849 MonitorElement* meXsec8 =
dbe_->
book1D(
"Xsec_HLT_PFMHT150",
"HLT_PFMHT150 Xsec;Xsec #mub;number of LS", 10, 0.0005, 0.001);
1850 MonitorElement* meXsec9 =
dbe_->
book1D(
"Xsec_HLT_Photon90_CaloIdVL_IsoL",
"HLT_Photon90_CaloIdVL_IsoL Xsec;Xsec #mub;number of LS", 10, 0.0015, 0.0025);
1885 LogTrace(
"TrigResRateMon") <<
" end lumiSection number " << lumi << endl;
1929 tempCountsStreamPerLS->SetBinContent(lumi,
nStream_);
1932 MonitorElement* tempDroppedEvents =
dbe_->
get(
"SM_SMPS_Stats/droppedEventsCount_HLTTrigerResults DQM Consumer" );
1933 if (tempDroppedEvents) {
1936 tempDiagnostic->Fill(2);
1937 int64_t tempDroppedCounts = tempDroppedEvents->
getIntValue();
1939 TotalDroppedCounts = tempDroppedCounts ;
1941 tempCountsDroppedPerLS->SetBinContent(lumi, currentDroppedCounts);
1943 else tempDiagnostic->Fill(1);
1947 tempDiagnostic->Fill(0);
1951 double xsecStream = 1.0 ;
1954 tempXsecStreamPerLS->SetBinContent(lumi, xsecStream);
1959 tempCountsPassPerLS->SetBinContent(lumi,
nPass_);
1979 for(
unsigned int i = 0;
i < npaths;
i++){
1993 TString checkName(thisName.c_str());
1994 if (checkName.Contains(pathname)){
2009 testME_rawCountsPerLS->
getTH1F()->SetBinContent(lumi, rawCount);
2014 testME_XsecPerLS->
getTH1F()->SetBinContent(lumi, xsec);
2016 testME_Xsec->
getTH1F()->Fill(xsec);
2037 LogTrace(
"TrigResRateMon") <<
" countHLTGroupBXHitsEndLumiBlock() lumiSection number " << lumi << endl;
2047 vector<int> prevCount = ip->second;
2050 vector<int> currCount (5,0);
2051 vector<int> diffCount (5,0);
2054 int pathBin = hist_2d_bx->GetYaxis()->FindBin(pathname.c_str());
2056 if(pathBin > hist_2d_bx->GetNbinsY()) {
2058 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
2063 for (
unsigned int b =0;
b<currCount.size();
b++) {
2067 if(bunch < 1) bunch +=
Nbx_ ;
2068 int bxBin = bunch +1;
2071 currCount[
b] = int(hist_2d_bx->GetBinContent(bxBin, pathBin));
2073 LogTrace(
"TrigResRateMon") <<
"currCount = " << currCount[
b] << endl;
2076 diffCount[
b] = currCount[
b] - prevCount[
b];
2078 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
"bxOffset = " << bxOffset <<
" count = " << diffCount[
b] << endl;
2083 ip->second = currCount;
2088 LogTrace(
"TrigResRateMon") <<
"Find " << pathname << endl;
2095 bool isMember =
false;
2115 LogTrace(
"TrigResRateMon") <<
"Could not find a group to which the path belongs, path = " << pathname <<
" group = " <<
fGroupNamePathsPair[
j].first << endl;
2129 vector<int> updatedLumiCount(5,0);
2131 float entireBXWindowUpdatedLumiCount = 0;
2133 TH2F* hist_All = ME_2d->
getTH2F();
2135 for (
unsigned int b = 0;
b<diffCount.size();
b++) {
2141 int currentLumiCount = int(hist_All->GetBinContent(lumi+1,binNumber));
2142 updatedLumiCount[
b] = currentLumiCount + diffCount[
b];
2143 hist_All->SetBinContent(lumi+1,binNumber,updatedLumiCount[
b]);
2145 entireBXWindowUpdatedLumiCount += updatedLumiCount[
b];
2158 TH2F* hist_All_Norm = ME_2d_Norm->
getTH2F();
2160 for (
unsigned int b = 0;
b<diffCount.size();
b++) {
2166 hist_All_Norm->SetBinContent(lumi+1,binNumber,
float(updatedLumiCount[
b])/entireBXWindowUpdatedLumiCount);
2179 LogTrace(
"TrigResRateMon") <<
" countHLTGroupL1HitsEndLumiBlock() lumiSection number " << lumi << endl;
2189 LogTrace(
"TrigResRateMon") <<
" could not find 1d matrix " << fullPathToME << endl;
2195 LogTrace(
"TrigResRateMon") <<
" Looking in histogram " << fullPathToME << endl;
2197 TH1F * hist_1d = ME_1d->
getTH1F();
2203 float prevCount = ip->second;
2205 string binLabel =
"HLT_"+pathname+
"_L1_Any";
2207 LogTrace(
"TrigResRateMon") <<
" Looking for binLabel = " << binLabel << endl;
2209 int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
2211 LogTrace(
"TrigResRateMon") <<
" pathBin = " << pathBin <<
" out of histogram total number of bins " << hist_1d->GetNbinsX() << endl;
2214 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
2219 float currCount = hist_1d->GetBinContent(pathBin)/
LSsize_;
2222 float diffCount = currCount - prevCount;
2224 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
" count " << diffCount << endl;
2227 ip->second = currCount;
2238 float currentLumiCount = ME_1d->
getTH1()->GetBinContent(lumi+1);
2239 float updatedLumiCount = currentLumiCount + diffCount;
2240 ME_1d->
getTH1()->SetBinContent(lumi+1,updatedLumiCount);
2245 LogDebug(
"TrigResRateMon") <<
" cannot find ME " << fullPathToME_count << endl;
2259 LogTrace(
"TrigResRateMon") <<
" countHLTGroupHitsEndLumiBlock() lumiSection number " << lumi << endl;
2268 LogTrace(
"TrigResRateMon") <<
" could not find 1d matrix " << fullPathToME << endl;
2274 LogTrace(
"TrigResRateMon") <<
" Looking in histogram " << fullPathToME << endl;
2276 TH1F * hist_1d = ME_1d->
getTH1F();
2282 float prevCount = ip->second;
2284 string binLabel =
"Total "+
pathname;
2286 LogTrace(
"TrigResRateMon") <<
" Looking for binLabel = " << binLabel << endl;
2289 int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
2291 LogTrace(
"TrigResRateMon") <<
" pathBin = " << pathBin <<
" out of histogram total number of bins " << hist_1d->GetNbinsX() << endl;
2295 int alternativePathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
2297 if(alternativePathBin == -1) {
2299 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
2306 pathBin = alternativePathBin;
2312 float currCount = hist_1d->GetBinContent(pathBin)/
LSsize_;
2315 float diffCount = currCount - prevCount;
2317 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
" diffCount " << diffCount << endl;
2320 ip->second = currCount;
2334 if ( ME_1d && ME_2d && ME_Stream_A_2d) {
2338 float currentLumiCount = ME_1d->
getTH1()->GetBinContent(lumi+1);
2339 float updatedLumiCount = currentLumiCount + diffCount;
2340 ME_1d->
getTH1()->SetBinContent(lumi+1,updatedLumiCount);
2343 int groupBin = ME_2d->
getTH2F()->GetYaxis()->FindBin(groupBinLabel.c_str());
2344 if(groupBin != -1) ME_2d->
getTH2F()->SetBinContent(lumi+1,groupBin,updatedLumiCount);
2348 groupBin = ME_Stream_A_2d->
getTH2F()->GetYaxis()->FindBin(groupBinLabel.c_str());
2349 if(groupBin != -1) ME_Stream_A_2d->
getTH2F()->SetBinContent(lumi+1,groupBin,updatedLumiCount);
2354 LogDebug(
"TrigResRateMon") <<
" cannot find ME " << fullPathToME_count << endl;
2368 LogTrace(
"TrigResRateMon") <<
" countHLTPathHitsEndLumiBlock() lumiSection number " << lumi << endl;
2375 LogTrace(
"TrigResRateMon") <<
" could not fine 2d matrix " << fullPathToME << endl;
2381 TH2F * hist_2d = ME_2d->
getTH2F();
2387 float prevCount = ip->second;
2390 float pathBin = hist_2d->GetXaxis()->FindBin(pathname.c_str());
2392 if(pathBin > hist_2d->GetNbinsX()) {
2394 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
2399 float currCount = hist_2d->GetBinContent(pathBin, pathBin)/
LSsize_;
2402 float diffCount = currCount - prevCount;
2404 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
" count " << diffCount << endl;
2407 ip->second = currCount;
2417 int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
2420 float currentLumiCount = hist_All->GetBinContent(lumi+1,pathBinNumber);
2421 float updatedLumiCount = currentLumiCount + diffCount;
2422 hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
2427 LogDebug(
"TrigResRateMon") <<
" cannot find ME_HLTAll_LS" << endl;
2437 TH2F* hist_All = tempME->
getTH2F();
2440 int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
2442 float currentLumiCount = hist_All->GetBinContent(lumi+1,pathBinNumber);
2443 float updatedLumiCount = currentLumiCount + diffCount;
2444 hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
2449 LogDebug(
"TrigResRateMon") <<
" cannot find tempME " << endl;
2464 float currentLumiCount = ME_1d->
getTH1()->GetBinContent(lumi+1);
2465 float updatedLumiCount = currentLumiCount + diffCount;
2466 ME_1d->
getTH1()->SetBinContent(lumi+1,updatedLumiCount);
2471 LogDebug(
"TrigResRateMon") <<
" cannot find ME " << fullPathToME_count << endl;
2484 if (pathname.find(
"MET") != std::string::npos)
2486 if (pathname.find(
"SumET") != std::string::npos)
2488 if (pathname.find(
"HT") != std::string::npos)
2490 if (pathname.find(
"Jet") != std::string::npos)
2492 if (pathname.find(
"Mu") != std::string::npos)
2494 if (pathname.find(
"Ele") != std::string::npos)
2496 if (pathname.find(
"Photon") != std::string::npos)
2498 if (pathname.find(
"EG") != std::string::npos)
2500 if (pathname.find(
"Tau") != std::string::npos)
2502 if (pathname.find(
"IsoTrack") != std::string::npos)
2504 if (pathname.find(
"BTag") != std::string::npos)
2516 string l1pathname =
"dummy";
2520 for(vector<string>::iterator numpathmodule = numpathmodules.begin();
2521 numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2525 l1pathname = *numpathmodule;
2541 int l1ModuleIndex = 999;
2545 if(
v->getPath() ==
pathname ) l1ModuleIndex =
v->getL1ModuleIndex();
2549 unsigned int pathByIndex = triggerNames.
triggerIndex(pathname);
2557 rc = (l1ModuleIndex < lastModule);
2568 unsigned int pathByIndex = triggerNames.
triggerIndex(pathname);
2585 if(pathname.find(
"L1") != std::string::npos) pathname.replace(pathname.find(
"L1"),2,
"");
2587 if(pathname.find(
"L2") != std::string::npos) pathname.replace(pathname.find(
"L2"),2,
"");
2589 if(pathname.find(
"8E29") != std::string::npos) pathname.replace(pathname.find(
"8E29"),4,
"");
2591 int digitLocation=0;
2592 for (
unsigned int i=0;
i < pathname.length();
i++)
2594 if (isdigit(pathname.at(
i))) {
2603 string hltThresholdString = pathname.substr(digitLocation);
2605 int hltThreshold = 0;
2608 sscanf (hltThresholdString.c_str(),
"%d%*s",&hltThreshold);
2611 return hltThreshold;
2617 string fullPathToME;
2624 for (
unsigned int i=0;
i<datasetNames.size();
i++) {
2653 if(!ME_HLTPassPass || !ME_HLTPassPass_Normalized || !ME_HLTPass_Normalized_Any)
return;
2655 float passCount = 0;
2656 unsigned int nBinsX = ME_HLTPassPass->
getTH2F()->GetNbinsX();
2657 unsigned int nBinsY = ME_HLTPassPass->
getTH2F()->GetNbinsY();
2659 for(
unsigned int binX = 0; binX < nBinsX+1; binX++) {
2661 passCount = ME_HLTPassPass->
getTH2F()->GetBinContent(binX,binX);
2664 for(
unsigned int binY = 0; binY < nBinsY+1; binY++) {
2666 if(passCount != 0) {
2669 float normalizedBinContentPassPass = (ME_HLTPassPass->
getTH2F()->GetBinContent(binX,binY))/passCount;
2672 ME_HLTPassPass_Normalized->
getTH2F()->SetBinContent(binX,binY,normalizedBinContentPassPass);
2675 if(binX == nBinsX) {
2677 ME_HLTPass_Normalized_Any->
getTH1F()->SetBinContent(binY,normalizedBinContentPassPass);
2684 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< unsigned > rawCountsPerPD
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)
void fillHltMatrix(const edm::TriggerNames &triggerNames, const edm::Event &iEvent, const edm::EventSetup &iSetup)
std::vector< std::string > testPaths_
std::vector< std::pair< std::string, float > > fPathTempCountPair
const std::string & triggerName(unsigned int triggerIndex) const
std::string xsecPerPathME_Name
std::string countsPerPathME_Name
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
std::vector< unsigned > finalCountsPerPath
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
MonitorElement * ME_HLTAll_LS
std::string fCustomBXPath
MonitorElement * meAverageLumiPerLS
edm::InputTag recHitsEBTag_
double averageInstLumi3LS
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::vector< MonitorElement * > v_ME_Xsec
std::string pathsSummaryHLTPathsPerLSFolder_
double dRMaxElectronMuon_
void setupHltMatrix(const std::string &label, std::vector< std::string > &paths)
std::vector< unsigned > rawCountsPerPath
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
void countHLTGroupL1HitsEndLumiBlock(const int &lumi)
std::vector< DatasetInfo > primaryDataSetInformation
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_
void addLumiToAverage(double lumi)
bool hasHLTPassed(const std::string &pathname, const edm::TriggerNames &triggerNames)
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
U second(std::pair< T, U > const &p)
std::vector< std::string > specialPaths_
std::string scaledXsecPerPathME_Name
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
unsigned int triggerIndex(std::string const &name) const
bool foundReferenceTrigger_
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_
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
void setVerbose(unsigned level)
void countHLTPathHitsEndLumiBlock(const int &lumi)
Kind kind(void) const
Get the type of the monitor element.
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
void filltestHisto(const int &lumi)
std::vector< MonitorElement * > v_ME_CountsPerLS
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * ME_HLT_BX
edm::InputTag triggerSummaryLabel_
unsigned int referenceBX_
std::string referenceTrigName_
MonitorElement * meXsecPerTestPath
unsigned referenceTrigIndex_
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 testPathsFolder_
MonitorElement * meCountsDroppedPerLS
void fillXsecPerDataset(const int &lumi)
void findReferenceTriggerIndex()
std::string pathsIndividualHLTPathsPerLSFolder_
edm::Handle< edm::TriggerResults > triggerResults_
MonitorElement * meXsecStreamPerLS
int64_t getIntValue(void) const
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)
d'tor
std::string referenceTrigInput_
MonitorElement * meDiagnostic
TH1F * getTH1F(void) const
std::string ratePerLSME_Name
LuminosityBlockNumber_t luminosityBlock() const
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger) const
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
std::vector< MonitorElement * > v_ME_XsecPerLS
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void normalizeHLTMatrix()
void setPaths(std::vector< std::string > inputPaths)
std::string pathsSummaryHLTCorrelationsFolder_
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
void clearCountsPerPath()
void printCountsPerPathThisLumi()
std::vector< std::string > maskedPaths_
MonitorElement * meCountsStreamPerLS
TProfile * getTProfile(void) const
std::vector< MonitorElement * > v_ME_HLTPass_Normalized_Any
int64_t TotalDroppedCounts
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)
std::string rawCountsPerPathME_Name
MonitorElement * meCountsPassPerLS
const std::string getL1ConditionModuleName(const std::string &pathname)
void setMaskedPaths(std::vector< std::string > inputPaths)
unsigned referenceTrigCountsPS_
void fillCountsPerPath(const edm::Event &iEvent, const edm::EventSetup &iSetup)