13 using namespace trigger;
19 LogDebug(
"TrigResRateMon") <<
"constructor...." ;
25 LogInfo(
"TrigResRateMon") <<
"unabel to get DQMStore service?";
63 std::vector<edm::ParameterSet>
paths =
64 iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"paths");
66 for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
71 pathconf->getParameter<
std::string>(
"denompathname")
186 if (jmsDebug )
std::cout <<
"Printing extra info " << std::endl;
217 using namespace trigger;
219 LogDebug(
"TrigResRateMon")<<
" analyze...." ;
228 edm::LogInfo(
"TrigResRateMon") <<
"TriggerResults not found, "
287 if (
jmsDebug)
std::cout <<
"Tried to get lumi handle result = " << lumiHandleOK << std::endl;
290 if (
jmsDebug)
std::cout <<
"LumiScalers size is: " << lumiScalers->size() << std::endl;
292 if (lumiScalers->size()) {
293 LumiScalersCollection::const_iterator it3 = lumiScalers->begin();
294 unsigned int lumisection = it3->sectionNumber();
297 if (
jmsDebug)
std::cout <<
"Instanteous Lumi is " << it3->instantLumi() << std::endl;
298 if (
jmsDebug)
std::cout <<
"Instanteous Lumi Error is " <<it3->instantLumiErr() << std::endl;
301 if (
jmsDebug)
std::cout <<
"Live Lumi Fill is " <<it3->liveLumiFill() << std::endl;
302 if (
jmsDebug)
std::cout <<
"Live Lumi Run is " <<it3->liveLumiRun() << std::endl;
337 if(reportSummaryME) reportSummaryME->
Fill(1);
346 LogInfo(
"TrigResRateMon") <<
"analyzed " <<
nev_ <<
" events";
355 LogDebug(
"TrigResRateMon") <<
"beginRun, run " << run.
id();
372 if (
jmsDebug)
std::cout <<
"Initialized HLTConfigProvider with name FU " << std::endl;
379 if (
jmsDebug)
std::cout <<
"Initialized HLTConfigProvider with name HLT " << std::endl;
396 meDiagnostic = dbe->
book1D(
"DroppedCounts Diagnose",
"LSs vs Status;Status;LSs", 3, -0.5,2.5 );
593 vector<string> allPaths;
601 vector<int> tempCount(5,0);
606 allPaths.push_back(pathName);
677 for (
unsigned int i=0;
i<datasetNames.size();
i++) {
1025 LogDebug(
"TrigResRateMon") <<
"endRun, run " << run.
id();
1035 paths.push_back(
"");
1036 paths.push_back(
"Total "+label);
1051 h_name=
"HLT_"+label+
"_Pass_Any";
1052 h_title =
"HLT_"+label+
"_Pass -- Prescale*Counts Per Path;Path;PS*Counts";
1054 paths.size(), -0.5, paths.size()-0.5);
1058 h_name=
"HLT_"+label+
"_RawCounts";
1059 h_title =
"HLT_"+label+
"_Pass (x=Pass, An) normalized to HLT_Any Pass;;Counts";
1061 paths.size(), -0.5, paths.size()-0.5);
1066 h_name=
"HLT_"+label+
"_Xsec";
1067 h_title =
"HLT_"+label+
"_Xsec -- Profile shows Average Xsec per path;;#sigma (#mu b)";
1069 TProfile tempProfile(h_name.c_str(), h_title.c_str(),
1070 paths.size(), -0.5, paths.size()-0.5);
1077 h_name=
"HLT_"+label+
"_XsecScaled";
1078 h_title =
"HLT_"+label+
"_Xsec -- Profile shows Average Xsec per path Scaled to Reference;;Ratio (#sigma/#sigma_{ref}";
1080 TProfile tempProfileScaled(h_name.c_str(), h_title.c_str(),
1081 paths.size(), -0.5, paths.size()-0.5);
1085 h_name=
"HLT_"+label+
"_Rate";
1086 h_title =
"HLT_"+label+
"_Rate -- histogram shows Average Rate per LS;LS;Rate [Hz]";
1139 for(
unsigned int i = 0;
i < paths.size();
i++){
1148 ME_Any->
getTH1F()->GetXaxis()->SetBinLabel(
i+1, (paths[
i]).c_str());
1149 ME_Xsec->
getTProfile()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1150 ME_XsecScaled->
getTProfile()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1151 ME_RawCounts->
getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1160 paths.push_back(
"");
1161 paths.push_back(
"HLT_"+label+
"_Any");
1168 h_name=
"HLT_"+label+
"_PassPass";
1169 h_title =
"HLT_"+label+
"_PassPass (x=Pass, y=Pass)";
1171 paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1173 h_name=
"HLT_"+label+
"_Pass_Any";
1174 h_title =
"HLT_"+label+
"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1176 paths.size(), -0.5, paths.size()-0.5);
1179 h_name=
"HLT_"+label+
"_PassPass_Normalized";
1180 h_title =
"HLT_"+label+
"_PassPass (x=Pass, y=Pass) normalized to xBin=Pass";
1182 paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1183 h_name=
"HLT_"+label+
"_Pass_Normalized_Any";
1184 h_title =
"HLT_"+label+
"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1186 paths.size(), -0.5, paths.size()-0.5);
1188 for(
unsigned int i = 0;
i < paths.size();
i++){
1190 ME->
getTH2F()->GetXaxis()->SetBinLabel(
i+1, (paths[
i]).c_str());
1191 ME->
getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1193 ME_Normalized->
getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1194 ME_Normalized->
getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1196 ME_Any->
getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1197 ME_Normalized_Any->
getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1205 string fullPathToME;
1206 std::vector <std::pair<std::string, bool> > groupAcceptPair;
1209 std::pair<int,int> psValueCombo;
1221 LogTrace(
"TrigResRateMon") <<
" ME not valid although I gave full path" << endl;
1227 TH1F * hist_1d = ME_1d->
getTH1F();
1266 bool groupPassed =
false;
1308 <<
" L1 PS " << psValueCombo.first
1309 <<
" and hlt ps " << psValueCombo.second << std::endl;
1311 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1312 hist_1d->Fill(i, psValueCombo.first * psValueCombo.second );
1354 bool isGroupFromStreamA =
false;
1357 for (
unsigned int g=0;
g<streamDatasetNames.size();
g++) {
1362 isGroupFromStreamA =
true;
1386 LogTrace(
"TrigResRateMon") <<
" ME not valid although I gave full path" << endl;
1393 TH1F * hist_1d_Stream = ME_1d_Stream->
getTH1F();
1395 int streamBinNumber = hist_1d_Stream->GetXaxis()->GetLast();
1397 bool acceptedStreamA =
false;
1400 for (
unsigned int i=0;
i<groupAcceptPair.size();
i++) {
1402 if(groupAcceptPair[
i].
second) {
1404 acceptedStreamA =
true;
1407 int groupBinNumber_i = hist_1d_Stream->GetXaxis()->FindBin(groupAcceptPair[
i].
first.c_str());
1410 hist_1d_Stream->Fill(groupBinNumber_i-1);
1433 if(acceptedStreamA) {
1436 hist_1d_Stream->Fill(streamBinNumber-1);
1467 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1478 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1511 for (std::vector<std::string>::iterator iPath = iDS->pathNames.begin();
1512 iPath != iDS->pathNames.end();
1521 if (thisRawCountsPlot){
1522 iDS->fillRawCountsForPath(thisRawCountsPlot, *iPath);
1524 if (
jmsDebug)
std::cout <<
"sorry but couldn't find this raw counts plot"<< iDS->datasetName << std::endl;
1533 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1534 iDS->incrementCountsForPath(*iPath, psValueCombo.first*psValueCombo.second);
1536 iDS->incrementCountsForPath(*iPath);
1569 TString tempThisName(thisName.c_str());
1589 std::cout <<
"===> COUNTS THIS LUMI <===" << std::endl;
1605 iDS->printCountsPerPath();
1628 iDS->clearCountsPerPath();
1670 if (
jmsDebug)
std::cout <<
"sorry but couldn't find this xsec plot"<< iDS->datasetName << std::endl;
1673 if (scaledXsecPlot){
1676 if (
jmsDebug)
std::cout <<
"sorry but couldn't find this scaled xsec plot"<< iDS->datasetName << std::endl;
1685 TH1F* rateHist = thisRatePlot->
getTH1F();
1686 rateHist->SetBinContent(lumi, rate);
1689 if (
jmsDebug)
std::cout <<
"sorry but couldn't find this rate plot"<< iDS->datasetName << std::endl;
1710 "HLT counts vs Event bx",
1711 Nbx_+1, -0.5,
Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1713 "HLT counts vs Event bx",
1714 Nbx_+1, -0.5,
Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1720 for(
unsigned int i = 0;
i < npaths;
i++){
1740 "AllSelectedPaths paths rate [Hz]",
1741 nLS_, 0,
nLS_, npaths+1, -0.5, npaths+1-0.5);
1745 for(
unsigned int i = 0;
i < npaths;
i++){
1751 unsigned int i = npaths;
1754 int nBinsPerLSHisto = 20;
1755 int nLSHistos = npaths/nBinsPerLSHisto;
1756 for (
int nh=0;nh<nLSHistos+1;nh++) {
1761 sprintf(name,
"Group_%d_paths_count_LS",nLSHistos-nh);
1762 sprintf(title,
"Group %d, paths rate [Hz]",nLSHistos-nh);
1765 nLS_, 0,
nLS_, nBinsPerLSHisto+3, -0.5, nBinsPerLSHisto+3-0.5);
1770 for(
int i = nh*nBinsPerLSHisto; i < (nh+1)*nBinsPerLSHisto; i++){
1772 if (i ==
int(npaths))
break;
1782 bin = i % nBinsPerLSHisto;
1790 tempME->
setBinLabel(nBinsPerLSHisto+3,
"HLT_Any", 2);
1791 tempME->
setBinLabel(nBinsPerLSHisto+2,
"HLT_PhysicsDeclared", 2);
1811 TProfile tempProfile(
"XsecVsTestPath",
"Xsec vs Test Path;;Xsec #mub", npaths, 0.5, npaths+0.5);
1815 for(
unsigned int i = 0;
i < npaths;
i++){
1824 sprintf(name,
"path_%s_XsecVsLS", pname);
1825 sprintf(title,
"path_%s_XsecVsLS;LS;Xsec #mub", pname);
1836 sprintf(name2,
"path_%s_countsVsLS", pname);
1837 sprintf(title2,
"path_%s_countsVsLS;LS;Counts", pname);
1847 MonitorElement* meXsec1 =
dbe_->
book1D(
"Xsec_HLT_IsoMu30_eta2p1",
"HLT_IsoMu30_eta2p1 Xsec;Xsec #mub;number of LS", 10, 0.008, 0.012);
1848 MonitorElement* meXsec2 =
dbe_->
book1D(
"Xsec_HLT_Ele65_CaloIdVT_TrkIdT",
"HLT_Ele65_CaloIdVT_TrkIdT Xsec;Xsec #mub;number of LS", 10, 0.002, 0.0025);
1849 MonitorElement* meXsec3 =
dbe_->
book1D(
"Xsec_HLT_MET200",
"HLT_MET200 Xsec;Xsec #mub;number of LS", 10, 0.0004, 0.0008);
1850 MonitorElement* meXsec4 =
dbe_->
book1D(
"Xsec_HLT_Jet370",
"HLT_Jet370 Xsec;Xsec #mub;number of LS", 10, 0.0006, 0.0008);
1851 MonitorElement* meXsec5 =
dbe_->
book1D(
"Xsec_HLT_HT600",
"HLT_HT600 Xsec;Xsec #mub;number of LS", 10, 0.004, 0.005);
1852 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);
1853 MonitorElement* meXsec7 =
dbe_->
book1D(
"Xsec_HLT_IsoMu15_eta2p1_LooseIsoPFTau20",
"HLT_IsoMu15_eta2p1_LooseIsoPFTau20 Xsec;Xsec #mub;number of LS", 10, 0.0022, 0.003);
1854 MonitorElement* meXsec8 =
dbe_->
book1D(
"Xsec_HLT_PFMHT150",
"HLT_PFMHT150 Xsec;Xsec #mub;number of LS", 10, 0.0005, 0.001);
1855 MonitorElement* meXsec9 =
dbe_->
book1D(
"Xsec_HLT_Photon90_CaloIdVL_IsoL",
"HLT_Photon90_CaloIdVL_IsoL Xsec;Xsec #mub;number of LS", 10, 0.0015, 0.0025);
1890 LogTrace(
"TrigResRateMon") <<
" end lumiSection number " << lumi << endl;
1934 tempCountsStreamPerLS->SetBinContent(lumi,
nStream_);
1937 MonitorElement* tempDroppedEvents =
dbe_->
get(
"SM_SMPS_Stats/droppedEventsCount_HLTTrigerResults DQM Consumer" );
1938 if (tempDroppedEvents) {
1941 tempDiagnostic->Fill(2);
1942 int64_t tempDroppedCounts = tempDroppedEvents->
getIntValue();
1944 TotalDroppedCounts = tempDroppedCounts ;
1946 tempCountsDroppedPerLS->SetBinContent(lumi, currentDroppedCounts);
1948 else tempDiagnostic->Fill(1);
1952 tempDiagnostic->Fill(0);
1956 double xsecStream = 1.0 ;
1959 tempXsecStreamPerLS->SetBinContent(lumi, xsecStream);
1964 tempCountsPassPerLS->SetBinContent(lumi,
nPass_);
1984 for(
unsigned int i = 0;
i < npaths;
i++){
1998 TString checkName(thisName.c_str());
1999 if (checkName.Contains(pathname)){
2014 testME_rawCountsPerLS->
getTH1F()->SetBinContent(lumi, rawCount);
2019 testME_XsecPerLS->
getTH1F()->SetBinContent(lumi, xsec);
2021 testME_Xsec->
getTH1F()->Fill(xsec);
2042 LogTrace(
"TrigResRateMon") <<
" countHLTGroupBXHitsEndLumiBlock() lumiSection number " << lumi << endl;
2052 vector<int> prevCount = ip->second;
2055 vector<int> currCount (5,0);
2056 vector<int> diffCount (5,0);
2059 int pathBin = hist_2d_bx->GetYaxis()->FindBin(pathname.c_str());
2061 if(pathBin > hist_2d_bx->GetNbinsY()) {
2063 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
2068 for (
unsigned int b =0;
b<currCount.size();
b++) {
2072 if(bunch < 1) bunch +=
Nbx_ ;
2073 int bxBin = bunch +1;
2076 currCount[
b] = int(hist_2d_bx->GetBinContent(bxBin, pathBin));
2078 LogTrace(
"TrigResRateMon") <<
"currCount = " << currCount[
b] << endl;
2081 diffCount[
b] = currCount[
b] - prevCount[
b];
2083 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
"bxOffset = " << bxOffset <<
" count = " << diffCount[
b] << endl;
2088 ip->second = currCount;
2093 LogTrace(
"TrigResRateMon") <<
"Find " << pathname << endl;
2100 bool isMember =
false;
2120 LogTrace(
"TrigResRateMon") <<
"Could not find a group to which the path belongs, path = " << pathname <<
" group = " <<
fGroupNamePathsPair[
j].first << endl;
2134 vector<int> updatedLumiCount(5,0);
2136 float entireBXWindowUpdatedLumiCount = 0;
2138 TH2F* hist_All = ME_2d->
getTH2F();
2140 for (
unsigned int b = 0;
b<diffCount.size();
b++) {
2146 int currentLumiCount = int(hist_All->GetBinContent(lumi+1,binNumber));
2147 updatedLumiCount[
b] = currentLumiCount + diffCount[
b];
2148 hist_All->SetBinContent(lumi+1,binNumber,updatedLumiCount[
b]);
2150 entireBXWindowUpdatedLumiCount += updatedLumiCount[
b];
2163 TH2F* hist_All_Norm = ME_2d_Norm->
getTH2F();
2165 for (
unsigned int b = 0;
b<diffCount.size();
b++) {
2171 hist_All_Norm->SetBinContent(lumi+1,binNumber,
float(updatedLumiCount[
b])/entireBXWindowUpdatedLumiCount);
2184 LogTrace(
"TrigResRateMon") <<
" countHLTGroupL1HitsEndLumiBlock() lumiSection number " << lumi << endl;
2194 LogTrace(
"TrigResRateMon") <<
" could not find 1d matrix " << fullPathToME << endl;
2200 LogTrace(
"TrigResRateMon") <<
" Looking in histogram " << fullPathToME << endl;
2202 TH1F * hist_1d = ME_1d->
getTH1F();
2208 float prevCount = ip->second;
2210 string binLabel =
"HLT_"+pathname+
"_L1_Any";
2212 LogTrace(
"TrigResRateMon") <<
" Looking for binLabel = " << binLabel << endl;
2214 int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
2216 LogTrace(
"TrigResRateMon") <<
" pathBin = " << pathBin <<
" out of histogram total number of bins " << hist_1d->GetNbinsX() << endl;
2219 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
2224 float currCount = hist_1d->GetBinContent(pathBin)/
LSsize_;
2227 float diffCount = currCount - prevCount;
2229 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
" count " << diffCount << endl;
2232 ip->second = currCount;
2243 float currentLumiCount = ME_1d->
getTH1()->GetBinContent(lumi+1);
2244 float updatedLumiCount = currentLumiCount + diffCount;
2245 ME_1d->
getTH1()->SetBinContent(lumi+1,updatedLumiCount);
2250 LogDebug(
"TrigResRateMon") <<
" cannot find ME " << fullPathToME_count << endl;
2264 LogTrace(
"TrigResRateMon") <<
" countHLTGroupHitsEndLumiBlock() lumiSection number " << lumi << endl;
2273 LogTrace(
"TrigResRateMon") <<
" could not find 1d matrix " << fullPathToME << endl;
2279 LogTrace(
"TrigResRateMon") <<
" Looking in histogram " << fullPathToME << endl;
2281 TH1F * hist_1d = ME_1d->
getTH1F();
2287 float prevCount = ip->second;
2289 string binLabel =
"Total "+
pathname;
2291 LogTrace(
"TrigResRateMon") <<
" Looking for binLabel = " << binLabel << endl;
2294 int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
2296 LogTrace(
"TrigResRateMon") <<
" pathBin = " << pathBin <<
" out of histogram total number of bins " << hist_1d->GetNbinsX() << endl;
2300 int alternativePathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
2302 if(alternativePathBin == -1) {
2304 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
2311 pathBin = alternativePathBin;
2317 float currCount = hist_1d->GetBinContent(pathBin)/
LSsize_;
2320 float diffCount = currCount - prevCount;
2322 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
" diffCount " << diffCount << endl;
2325 ip->second = currCount;
2339 if ( ME_1d && ME_2d && ME_Stream_A_2d) {
2343 float currentLumiCount = ME_1d->
getTH1()->GetBinContent(lumi+1);
2344 float updatedLumiCount = currentLumiCount + diffCount;
2345 ME_1d->
getTH1()->SetBinContent(lumi+1,updatedLumiCount);
2348 int groupBin = ME_2d->
getTH2F()->GetYaxis()->FindBin(groupBinLabel.c_str());
2349 if(groupBin != -1) ME_2d->
getTH2F()->SetBinContent(lumi+1,groupBin,updatedLumiCount);
2353 groupBin = ME_Stream_A_2d->
getTH2F()->GetYaxis()->FindBin(groupBinLabel.c_str());
2354 if(groupBin != -1) ME_Stream_A_2d->
getTH2F()->SetBinContent(lumi+1,groupBin,updatedLumiCount);
2359 LogDebug(
"TrigResRateMon") <<
" cannot find ME " << fullPathToME_count << endl;
2373 LogTrace(
"TrigResRateMon") <<
" countHLTPathHitsEndLumiBlock() lumiSection number " << lumi << endl;
2380 LogTrace(
"TrigResRateMon") <<
" could not fine 2d matrix " << fullPathToME << endl;
2386 TH2F * hist_2d = ME_2d->
getTH2F();
2392 float prevCount = ip->second;
2395 float pathBin = hist_2d->GetXaxis()->FindBin(pathname.c_str());
2397 if(pathBin > hist_2d->GetNbinsX()) {
2399 LogTrace(
"TrigResRateMon") <<
" Cannot find the bin for path " << pathname << endl;
2404 float currCount = hist_2d->GetBinContent(pathBin, pathBin)/
LSsize_;
2407 float diffCount = currCount - prevCount;
2409 LogTrace(
"TrigResRateMon") <<
" lumi = " << lumi <<
" path " << pathname <<
" count " << diffCount << endl;
2412 ip->second = currCount;
2422 int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
2425 float currentLumiCount = hist_All->GetBinContent(lumi+1,pathBinNumber);
2426 float updatedLumiCount = currentLumiCount + diffCount;
2427 hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
2432 LogDebug(
"TrigResRateMon") <<
" cannot find ME_HLTAll_LS" << endl;
2442 TH2F* hist_All = tempME->
getTH2F();
2445 int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
2447 float currentLumiCount = hist_All->GetBinContent(lumi+1,pathBinNumber);
2448 float updatedLumiCount = currentLumiCount + diffCount;
2449 hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
2454 LogDebug(
"TrigResRateMon") <<
" cannot find tempME " << endl;
2469 float currentLumiCount = ME_1d->
getTH1()->GetBinContent(lumi+1);
2470 float updatedLumiCount = currentLumiCount + diffCount;
2471 ME_1d->
getTH1()->SetBinContent(lumi+1,updatedLumiCount);
2476 LogDebug(
"TrigResRateMon") <<
" cannot find ME " << fullPathToME_count << endl;
2489 if (pathname.find(
"MET") != std::string::npos)
2491 if (pathname.find(
"SumET") != std::string::npos)
2493 if (pathname.find(
"HT") != std::string::npos)
2495 if (pathname.find(
"Jet") != std::string::npos)
2497 if (pathname.find(
"Mu") != std::string::npos)
2499 if (pathname.find(
"Ele") != std::string::npos)
2501 if (pathname.find(
"Photon") != std::string::npos)
2503 if (pathname.find(
"EG") != std::string::npos)
2505 if (pathname.find(
"Tau") != std::string::npos)
2507 if (pathname.find(
"IsoTrack") != std::string::npos)
2509 if (pathname.find(
"BTag") != std::string::npos)
2521 string l1pathname =
"dummy";
2525 for(vector<string>::iterator numpathmodule = numpathmodules.begin();
2526 numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2530 l1pathname = *numpathmodule;
2546 int l1ModuleIndex = 999;
2550 if(
v->getPath() ==
pathname ) l1ModuleIndex =
v->getL1ModuleIndex();
2554 unsigned int pathByIndex = triggerNames.
triggerIndex(pathname);
2562 rc = (l1ModuleIndex < lastModule);
2573 unsigned int pathByIndex = triggerNames.
triggerIndex(pathname);
2590 if(pathname.find(
"L1") != std::string::npos) pathname.replace(pathname.find(
"L1"),2,
"");
2592 if(pathname.find(
"L2") != std::string::npos) pathname.replace(pathname.find(
"L2"),2,
"");
2594 if(pathname.find(
"8E29") != std::string::npos) pathname.replace(pathname.find(
"8E29"),4,
"");
2596 int digitLocation=0;
2597 for (
unsigned int i=0;
i < pathname.length();
i++)
2599 if (isdigit(pathname.at(
i))) {
2608 string hltThresholdString = pathname.substr(digitLocation);
2610 int hltThreshold = 0;
2613 sscanf (hltThresholdString.c_str(),
"%d%*s",&hltThreshold);
2616 return hltThreshold;
2622 string fullPathToME;
2629 for (
unsigned int i=0;
i<datasetNames.size();
i++) {
2658 if(!ME_HLTPassPass || !ME_HLTPassPass_Normalized || !ME_HLTPass_Normalized_Any)
return;
2660 float passCount = 0;
2661 unsigned int nBinsX = ME_HLTPassPass->
getTH2F()->GetNbinsX();
2662 unsigned int nBinsY = ME_HLTPassPass->
getTH2F()->GetNbinsY();
2664 for(
unsigned int binX = 0; binX < nBinsX+1; binX++) {
2666 passCount = ME_HLTPassPass->
getTH2F()->GetBinContent(binX,binX);
2669 for(
unsigned int binY = 0; binY < nBinsY+1; binY++) {
2671 if(passCount != 0) {
2674 float normalizedBinContentPassPass = (ME_HLTPassPass->
getTH2F()->GetBinContent(binX,binY))/passCount;
2677 ME_HLTPassPass_Normalized->
getTH2F()->SetBinContent(binX,binY,normalizedBinContentPassPass);
2680 if(binX == nBinsX) {
2682 ME_HLTPass_Normalized_Any->
getTH1F()->SetBinContent(binY,normalizedBinContentPassPass);
2689 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
void setPaths(const std::vector< std::string > &inputPaths)
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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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)
edm::EDGetTokenT< LumiScalersCollection > lumiScalersToken_
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)
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
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
static std::string const triggerResults
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
edm::EDGetTokenT< edm::TriggerResults > triggerResultsTokenFU_
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()
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
void setMaskedPaths(const std::vector< std::string > &inputPaths)
int64_t TotalDroppedCounts
volatile std::atomic< bool > shutdown_flag false
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)
unsigned referenceTrigCountsPS_
void fillCountsPerPath(const edm::Event &iEvent, const edm::EventSetup &iSetup)