13 using namespace trigger;
19 LogDebug(
"TrigResRateMon") <<
"constructor...." ;
25 LogInfo(
"TrigResRateMon") <<
"unabel to get DQMStore service?";
35 dbe_->setCurrentFolder(dirname_);
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++) {
68 custompathnamepairs_.push_back(
71 pathconf->getParameter<
std::string>(
"denompathname")
77 if (hltPaths_.size() > 0)
80 scalersSelect =
dbe_->book1D(
"selectedScalers",
"Selected Scalers", hltPaths_.size(), 0.0, (double)hltPaths_.size());
148 specialPaths_ = iConfig.
getParameter<std::vector<std::string > >(
"SpecialPaths");
158 pathsIndividualHLTPathsPerLSFolder_ = iConfig.
getUntrackedParameter (
"individualPathsPerLSFolder",
std::string(
"HLT/TrigResults/PathsSummary/HLT LS/Paths/"));
164 maskedPaths_ = iConfig.
getParameter<std::vector<std::string > >(
"MaskedPaths");
167 foundReferenceTrigger_ =
false;
170 testPaths_ = iConfig.
getParameter<std::vector<std::string > >(
"testPaths");
175 ME_HLT_CUSTOM_BX =
NULL;
184 jmsFakeZBCounts =
false;
185 found_zbIndex =
false;
186 if (jmsDebug )
std::cout <<
"Printing extra info " << std::endl;
191 triggerResultsTokenFU_ = consumes<edm::TriggerResults>(triggerResultsLabelFU);
192 lumiScalersToken_ = consumes<LumiScalersCollection>(
InputTag(
"hltScalersRawToDigi",
"",
""));
217 using namespace trigger;
219 LogDebug(
"TrigResRateMon")<<
" analyze...." ;
225 edm::InputTag triggerResultsLabelFU(triggerResultsLabel_.label(),triggerResultsLabel_.instance(),
"FU");
228 edm::LogInfo(
"TrigResRateMon") <<
"TriggerResults not found, "
271 fillHltMatrix(triggerNames, iEvent, iSetup);
285 bool lumiHandleOK = iEvent.
getByToken(lumiScalersToken_, lumiScalers);
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;
299 if (jmsDebug)
std::cout <<
"Lumi Fill is " <<it3->lumiFill() << std::endl;
300 if (jmsDebug)
std::cout <<
"Lumi Fill is " <<it3->lumiRun() << 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;
304 addLumiToAverage(it3->instantLumi());
313 fillCountsPerPath(iEvent, iSetup);
315 if (passAny) nPass_ ++ ;
332 dbe->setCurrentFolder(dirname_);
336 MonitorElement* reportSummaryME = dbe->book1D(
"reportSummaryMap",
"report Summary Map",2,0,2);
337 if(reportSummaryME) reportSummaryME->
Fill(1);
346 LogInfo(
"TrigResRateMon") <<
"analyzed " << nev_ <<
" events";
355 LogDebug(
"TrigResRateMon") <<
"beginRun, run " << run.
id();
362 if (!hltConfig_.init(run, c, processname_, changed)) {
367 if (!hltConfig_.init(run, c, processname_, changed)){
369 if (jmsDebug)
std::cout <<
"HLTConfigProvider failed to initialize.";
372 if (jmsDebug)
std::cout <<
"Initialized HLTConfigProvider with name FU " << std::endl;
379 if (jmsDebug)
std::cout <<
"Initialized HLTConfigProvider with name HLT " << std::endl;
388 dbe->setCurrentFolder(dirname_);
394 TotalDroppedCounts = 0;
396 meDiagnostic = dbe->book1D(
"DroppedCounts Diagnose",
"LSs vs Status;Status;LSs", 3, -0.5,2.5 );
397 meCountsDroppedPerLS = dbe->book1D(
"CountsDroppedVsLS",
"Counts vs LumiSec;LS;Dropped Stream Counts", nLS_, 0.5, nLS_+0.5);
398 meCountsPassPerLS = dbe->book1D(
"CountsPassVsLS",
"Counts vs LumiSec;LS;Passed Stream Counts", nLS_, 0.5, nLS_+0.5);
399 meCountsStreamPerLS = dbe->book1D(
"CountsStreamVsLS",
"Counts vs LumiSec;LS;Stream Counts", nLS_, 0.5, nLS_+0.5);
400 meXsecStreamPerLS = dbe->book1D(
"XsecStreamVsLS",
"Xsec vs LumiSec;LS;Stream Xsec", nLS_, 0.5, nLS_+0.5);
409 dbe->setCurrentFolder(dirname_);
414 averageInstLumi3LS = 0 ;
415 findReferenceTriggerIndex();
416 meAverageLumiPerLS = dbe->book1D(
"InstLumiVsLS",
"Instantaneous Luminosity vs LumiSec;LS;#mub^{-1}*s^{-1}", nLS_, 0.5, nLS_+0.5);
593 vector<string> allPaths;
596 for(PathInfoCollection::iterator
v = hltPathsDiagonal_.begin();
v!= hltPathsDiagonal_.end(); ++
v ) {
601 vector<int> tempCount(5,0);
603 fPathTempCountPair.push_back(make_pair(pathName,0));
604 fPathBxTempCountPair.push_back(make_pair(pathName,tempCount));
606 allPaths.push_back(pathName);
635 fPathTempCountPair.push_back(make_pair(
"HLT_Any",0));
637 fGroupName.push_back(
"AllSelectedPaths");
647 for(
unsigned int g=0;
g<fGroupName.size();
g++) {
654 dbe_->setCurrentFolder(pathsSummaryFolder_.c_str());
676 vector<string>
datasetNames = hltConfig_.streamContent(
"A") ;
677 for (
unsigned int i=0;
i<datasetNames.size();
i++) {
679 vector<string> datasetPaths = hltConfig_.datasetContent(datasetNames[
i]);
680 fGroupNamePathsPair.push_back(make_pair(datasetNames[i],datasetPaths));
689 tempDS.
ratePerLSME_Name = pathsSummaryFolder_ +
"HLT_" + datasetNames[
i] +
"_Rate";
692 primaryDataSetInformation.push_back(tempDS);
694 rawCountsPerPD.push_back(0);
698 fGroupNamePathsPair.push_back(make_pair(
"A",datasetNames));
701 for (
unsigned int g=0;
g<fGroupNamePathsPair.size();
g++) {
703 fGroupTempCountPair.push_back(make_pair(fGroupNamePathsPair[
g].
first,0));
704 fGroupL1TempCountPair.push_back(make_pair(fGroupNamePathsPair[
g].first,0));
705 setupHltMatrix(fGroupNamePathsPair[
g].first,fGroupNamePathsPair[
g].
second);
1015 if(doCombineRuns_) fIsSetup =
true;
1025 LogDebug(
"TrigResRateMon") <<
"endRun, run " << run.
id();
1035 paths.push_back(
"");
1036 paths.push_back(
"Total "+label);
1042 dbe_->setCurrentFolder(pathsSummaryFolder_.c_str());
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);
1082 MonitorElement* ME_XsecScaled =
dbe_->bookProfile(h_name.c_str(), &tempProfileScaled);
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");
1166 dbe_->setCurrentFolder(pathsSummaryFolder_.c_str());
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);
1178 dbe_->setCurrentFolder(pathsSummaryHLTCorrelationsFolder_.c_str());
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;
1212 for (
unsigned int mi=0;mi<fGroupNamePathsPair.size()-1;mi++) {
1217 fullPathToME = pathsSummaryFolder_ +
"HLT_"+fGroupNamePathsPair[mi].first+
"_Pass_Any";
1221 LogTrace(
"TrigResRateMon") <<
" ME not valid although I gave full path" << endl;
1227 TH1F * hist_1d = ME_1d->
getTH1F();
1266 bool groupPassed =
false;
1273 for (
unsigned int i=0;
i< fGroupNamePathsPair[mi].second.size();
i++)
1277 string hltPathName = fGroupNamePathsPair[mi].second[
i];
1282 if(pathByIndex >= triggerResults_->size() )
continue;
1292 if(triggerResults_->accept(pathByIndex)){
1303 if (jmsDebug)
std::cout <<
"Trying to get prescales... " << std::endl;
1305 psValueCombo = hltConfig_.prescaleValues(iEvent, iSetup, hltPathName);
1307 if (jmsDebug)
std::cout <<
"Path " << hltPathName
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 );
1344 rawCountsPerPD[mi]++ ;
1354 bool isGroupFromStreamA =
false;
1356 vector<string> streamDatasetNames = hltConfig_.streamContent(
"A") ;
1357 for (
unsigned int g=0;
g<streamDatasetNames.size();
g++) {
1359 if(streamDatasetNames[
g] == fGroupNamePathsPair[mi].
first)
1362 isGroupFromStreamA =
true;
1368 if(isGroupFromStreamA) groupAcceptPair.push_back(make_pair(fGroupNamePathsPair[mi].
first,groupPassed));
1381 fullPathToME = pathsSummaryFolder_ +
"HLT_A_Pass_Any";
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);
1451 if (jmsDebug)
std::cout <<
"Filling counts per path" << std::endl;
1453 if (!triggerResults_.isValid()) {
1454 if (jmsDebug)
std::cout <<
"Trigger Results not valid, sorry" << std::endl;
1458 for (
unsigned iName = 0; iName < hltConfig_.size(); iName++) {
1459 if ( triggerResults_ ->
accept ( iName ) ){
1460 rawCountsPerPath[iName]++;
1463 std::string thisName = hltConfig_.triggerName(iName);
1465 std::pair<int,int> psValueCombo = hltConfig_.prescaleValues(iEvent, iSetup, thisName);
1467 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1468 finalCountsPerPath[iName] += psValueCombo.first * psValueCombo.second;
1470 finalCountsPerPath[iName]++;
1474 if ( (iName == referenceTrigIndex_) && (foundReferenceTrigger_) ) {
1476 std::pair<int,int> psValueCombo = hltConfig_.prescaleValues(iEvent, iSetup, referenceTrigName_);
1478 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1479 referenceTrigCountsPS_ += psValueCombo.first * psValueCombo.second;
1481 referenceTrigCountsPS_++;
1505 for (std::vector<DatasetInfo>::iterator iDS = primaryDataSetInformation.begin();
1506 iDS != primaryDataSetInformation.end();
1511 for (std::vector<std::string>::iterator iPath = iDS->pathNames.begin();
1512 iPath != iDS->pathNames.end();
1515 unsigned trigIndex = hltConfig_.triggerIndex(*iPath);
1517 if ( triggerResults_ ->
accept ( trigIndex ) ){
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;
1530 std::pair<int,int> psValueCombo = hltConfig_.prescaleValues(iEvent, iSetup, *iPath);
1533 if ( (psValueCombo.first > 0) && (psValueCombo.second > 0) ){
1534 iDS->incrementCountsForPath(*iPath, psValueCombo.first*psValueCombo.second);
1536 iDS->incrementCountsForPath(*iPath);
1552 for (
unsigned iName = 0; iName < hltConfig_.size(); iName++) {
1554 rawCountsPerPath.push_back(0);
1555 finalCountsPerPath.push_back(0);
1565 if (jmsDebug)
std::cout <<
"Looking for reference trigger " << referenceTrigInput_ << std::endl;
1566 for (
unsigned iName = 0; iName < hltConfig_.size(); iName++) {
1568 std::string thisName = hltConfig_.triggerName(iName);
1569 TString tempThisName(thisName.c_str());
1570 if (tempThisName.Contains(referenceTrigInput_)){
1571 referenceTrigName_ = thisName;
1572 if (jmsDebug)
std::cout <<
"Using Reference trigger " << referenceTrigName_ << std::endl;
1573 referenceTrigIndex_ = iName;
1574 foundReferenceTrigger_ =
true;
1575 referenceTrigCountsPS_ = 0;
1580 if (!foundReferenceTrigger_) {
1581 std::cout <<
"Sorry, we couldn't find a trigger like " << referenceTrigInput_ << std::endl;
1589 std::cout <<
"===> COUNTS THIS LUMI <===" << std::endl;
1591 for (
unsigned iName = 0; iName < hltConfig_.size() ; iName++) {
1592 std::cout << hltConfig_.triggerName(iName)
1593 <<
" = " << rawCountsPerPath[iName]
1594 <<
"finalCounts = " << finalCountsPerPath[iName]
1598 std::cout <<
"+++ Reference trigger " << referenceTrigName_ <<
" index " << referenceTrigIndex_ <<
" counts " << referenceTrigCountsPS_ << std::endl;
1601 for (std::vector<DatasetInfo>::const_iterator iDS = primaryDataSetInformation.begin();
1602 iDS != primaryDataSetInformation.end();
1605 iDS->printCountsPerPath();
1622 referenceTrigCountsPS_ = 0 ;
1625 for (std::vector<DatasetInfo>::iterator iDS = primaryDataSetInformation.begin();
1626 iDS != primaryDataSetInformation.end();
1628 iDS->clearCountsPerPath();
1636 averageInstLumi = 0;
1642 if (averageInstLumi == 0) {
1643 averageInstLumi =
lumi;
1645 averageInstLumi = (averageInstLumi +
lumi) / 2;
1654 double refTrigXSec = referenceTrigCountsPS_ / ( averageInstLumi * LSsize_);
1662 for (std::vector<DatasetInfo>::iterator iDS = primaryDataSetInformation.begin();
1663 iDS != primaryDataSetInformation.end();
1668 iDS->fillXsecPlot(thisXsecPlot, averageInstLumi, LSsize_);
1670 if (jmsDebug)
std::cout <<
"sorry but couldn't find this xsec plot"<< iDS->datasetName << std::endl;
1673 if (scaledXsecPlot){
1674 iDS->fillXsecPlot(scaledXsecPlot, averageInstLumi, LSsize_, refTrigXSec);
1676 if (jmsDebug)
std::cout <<
"sorry but couldn't find this scaled xsec plot"<< iDS->datasetName << std::endl;
1683 double rate = rawCountsPerPD[iPD] / LSsize_ ;
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;
1692 rawCountsPerPD[iPD] = 0 ;
1704 dbe_->setCurrentFolder(pathsSummaryFolder_);
1707 unsigned int npaths = hltPathsDiagonal_.size();
1709 ME_HLT_BX =
dbe_->book2D(
"HLT_bx",
1710 "HLT counts vs Event bx",
1711 Nbx_+1, -0.5, Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1712 ME_HLT_CUSTOM_BX =
dbe_->book2D(
"HLT_Custom_bx",
1713 "HLT counts vs Event bx",
1714 Nbx_+1, -0.5, Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1715 ME_HLT_BX->setAxisTitle(
"Bunch Crossing");
1716 ME_HLT_CUSTOM_BX->setAxisTitle(
"Bunch Crossing");
1720 for(
unsigned int i = 0;
i < npaths;
i++){
1722 ME_HLT_BX->getTH2F()->GetYaxis()->SetBinLabel(
i+1, (hltPathsDiagonal_[
i]).getPath().c_str());
1723 ME_HLT_CUSTOM_BX->getTH2F()->GetYaxis()->SetBinLabel(i+1, (hltPathsDiagonal_[i]).getPath().c_str());
1733 unsigned int npaths = hltPathsDiagonal_.size();
1737 dbe_->setCurrentFolder(pathsSummaryHLTPathsPerLSFolder_);
1739 ME_HLTAll_LS =
dbe_->book2D(
"AllSelectedPaths_count_LS",
1740 "AllSelectedPaths paths rate [Hz]",
1741 nLS_, 0, nLS_, npaths+1, -0.5, npaths+1-0.5);
1742 ME_HLTAll_LS->setAxisTitle(
"Luminosity Section");
1745 for(
unsigned int i = 0;
i < npaths;
i++){
1747 ME_HLTAll_LS->getTH2F()->GetYaxis()->SetBinLabel(
i+1, (hltPathsDiagonal_[
i]).getPath().c_str());
1751 unsigned int i = npaths;
1752 ME_HLTAll_LS->getTH2F()->GetYaxis()->SetBinLabel(i+1,
"HLT_Any");
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;
1786 tempME->
setBinLabel(bin+1, hltPathsDiagonal_[i].getPath().c_str(), 2);
1790 tempME->
setBinLabel(nBinsPerLSHisto+3,
"HLT_Any", 2);
1791 tempME->
setBinLabel(nBinsPerLSHisto+2,
"HLT_PhysicsDeclared", 2);
1793 v_ME_HLTAll_LS.push_back(tempME);
1804 unsigned int npaths = testPaths_.size();
1809 dbe_->setCurrentFolder(testPathsFolder_);
1811 TProfile tempProfile(
"XsecVsTestPath",
"Xsec vs Test Path;;Xsec #mub", npaths, 0.5, npaths+0.5);
1812 meXsecPerTestPath =
dbe_->bookProfile(
"XsecVsTestPath", &tempProfile);
1815 for(
unsigned int i = 0;
i < npaths;
i++){
1816 const char* pname = testPaths_[
i].c_str() ;
1817 TString
pathname = testPaths_[
i].c_str() ;
1818 meXsecPerTestPath->getTProfile()->GetXaxis()->SetBinLabel(
i+1, pathname );
1824 sprintf(name,
"path_%s_XsecVsLS", pname);
1825 sprintf(title,
"path_%s_XsecVsLS;LS;Xsec #mub", pname);
1831 v_ME_XsecPerLS.push_back(tempME);
1836 sprintf(name2,
"path_%s_countsVsLS", pname);
1837 sprintf(title2,
"path_%s_countsVsLS;LS;Counts", pname);
1843 v_ME_CountsPerLS.push_back(tempME2);
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);
1858 v_ME_Xsec.push_back(meXsec1);
1859 v_ME_Xsec.push_back(meXsec2);
1860 v_ME_Xsec.push_back(meXsec3);
1861 v_ME_Xsec.push_back(meXsec4);
1862 v_ME_Xsec.push_back(meXsec5);
1863 v_ME_Xsec.push_back(meXsec6);
1864 v_ME_Xsec.push_back(meXsec7);
1865 v_ME_Xsec.push_back(meXsec8);
1866 v_ME_Xsec.push_back(meXsec9);
1877 if (jmsDebug)
std::cout <<
"Inside begin lumi block" << std::endl;
1879 clearCountsPerPath();
1890 LogTrace(
"TrigResRateMon") <<
" end lumiSection number " << lumi << endl;
1900 if (jmsDebug) printCountsPerPathThisLumi();
1901 if (jmsDebug)
std::cout <<
"Average lumi is " << averageInstLumi << std::endl;
1903 if (averageInstLumi > 500) {
1908 fillXsecPerDataset(lumi);
1910 filltestHisto(lumi);
1932 TH1F* tempCountsStreamPerLS = meCountsStreamPerLS->getTH1F();
1934 tempCountsStreamPerLS->SetBinContent(lumi, nStream_);
1937 MonitorElement* tempDroppedEvents =
dbe_->get(
"SM_SMPS_Stats/droppedEventsCount_HLTTrigerResults DQM Consumer" );
1938 if (tempDroppedEvents) {
1939 TH1F* tempDiagnostic = meDiagnostic->getTH1F();
1941 tempDiagnostic->Fill(2);
1942 int64_t tempDroppedCounts = tempDroppedEvents->
getIntValue();
1943 int64_t currentDroppedCounts = tempDroppedCounts - TotalDroppedCounts;
1944 TotalDroppedCounts = tempDroppedCounts ;
1945 TH1F* tempCountsDroppedPerLS = meCountsDroppedPerLS->getTH1F();
1946 tempCountsDroppedPerLS->SetBinContent(lumi, currentDroppedCounts);
1948 else tempDiagnostic->Fill(1);
1951 TH1F* tempDiagnostic = meDiagnostic->getTH1F();
1952 tempDiagnostic->Fill(0);
1955 TH1F* tempXsecStreamPerLS = meXsecStreamPerLS->getTH1F();
1956 double xsecStream = 1.0 ;
1957 if (averageInstLumi > 0){
1958 xsecStream = nStream_ / (averageInstLumi*LSsize_);
1959 tempXsecStreamPerLS->SetBinContent(lumi, xsecStream);
1962 TH1F* tempCountsPassPerLS = meCountsPassPerLS->getTH1F();
1964 tempCountsPassPerLS->SetBinContent(lumi, nPass_);
1970 TH1F* tempLumiPerLS = meAverageLumiPerLS->getTH1F();
1971 tempLumiPerLS->SetBinContent(lumi, averageInstLumi);
1972 tempLumiPerLS->SetBinError(lumi, averageInstLumi*0.06);
1980 averageInstLumi3LS += averageInstLumi;
1983 unsigned int npaths = testPaths_.size();
1984 for(
unsigned int i = 0;
i < npaths;
i++){
1985 TString
pathname = testPaths_[
i].c_str() ;
1995 for (
unsigned iName = 0; iName < hltConfig_.size(); iName++) {
1997 std::string thisName = hltConfig_.triggerName(iName);
1998 TString checkName(thisName.c_str());
1999 if (checkName.Contains(pathname)){
2011 rawCount = rawCountsPerPath[
index];
2012 finalCount = finalCountsPerPath[
index];
2014 testME_rawCountsPerLS->
getTH1F()->SetBinContent(lumi, rawCount);
2016 if (averageInstLumi > 0 ) {
2017 xsec = finalCount/ (averageInstLumi3LS*LSsize_);
2019 testME_XsecPerLS->
getTH1F()->SetBinContent(lumi, xsec);
2021 testME_Xsec->
getTH1F()->Fill(xsec);
2023 meXsecPerTestPath->getTProfile()->Fill(
i+1,xsec);
2027 for (
unsigned iName = 0; iName < hltConfig_.size() ; iName++) {
2029 rawCountsPerPath[iName] = 0;
2030 finalCountsPerPath[iName] = 0;
2032 averageInstLumi3LS = 0 ;
2042 LogTrace(
"TrigResRateMon") <<
" countHLTGroupBXHitsEndLumiBlock() lumiSection number " << lumi << endl;
2044 if(! ME_HLT_BX)
return;
2046 TH2F * hist_2d_bx = ME_HLT_BX->getTH2F();
2048 for (std::vector<std::pair<
std::string, vector<int> > >::iterator ip = fPathBxTempCountPair.begin(); ip != fPathBxTempCountPair.end(); ++ip) {
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;
2097 for (
unsigned int j=0;
j<v_ME_Total_BX.size();
j++)
2100 bool isMember =
false;
2102 LogTrace(
"TrigResRateMon") <<
" ---- Group " << fGroupNamePathsPair[
j].first << endl;
2105 for (
unsigned int k = 0;
k<(fGroupNamePathsPair[
j].second).
size();
k++) {
2107 LogTrace(
"TrigResRateMon") <<
" comparing to " << fGroupNamePathsPair[
j].second[
k] << endl;
2109 if(fGroupNamePathsPair[
j].
second[
k] == pathname) {
2120 LogTrace(
"TrigResRateMon") <<
"Could not find a group to which the path belongs, path = " << pathname <<
" group = " << fGroupNamePathsPair[
j].first << endl;
2129 LogDebug(
"TrigResRateMon") <<
" cannot find ME_2d for 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];
2158 LogDebug(
"TrigResRateMon") <<
" cannot find ME_2d_Norm for group " << fGroupNamePathsPair[
j].first << endl;
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;
2186 for(
unsigned int i=0;
i<fGroupNamePathsPair.size();
i++){
2189 string fullPathToME = pathsSummaryFolder_ +
"HLT_" + fGroupNamePathsPair[
i].first+
"_Pass_Any";
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();
2204 for (std::vector<std::pair<std::string, float> >::iterator ip = fGroupL1TempCountPair.begin(); ip != fGroupL1TempCountPair.end(); ++ip) {
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;
2238 string fullPathToME_count = pathsSummaryHLTPathsPerLSFolder_ +
"HLT_" + pathname +
"_L1_Total_LS";
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;
2265 for(
unsigned int i=0;
i<fGroupNamePathsPair.size();
i++){
2268 string fullPathToME = pathsSummaryFolder_ +
"HLT_" + fGroupNamePathsPair[
i].first +
"_Pass_Any";
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();
2283 for (std::vector<std::pair<std::string, float> >::iterator ip = fGroupTempCountPair.begin(); ip != fGroupTempCountPair.end(); ++ip) {
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;
2330 string fullPathToME_count = pathsSummaryHLTPathsPerLSFolder_ +
"HLT_" + pathname +
"_Total_LS";
2333 string fullPathToME_2D_count = pathsSummaryHLTPathsPerLSFolder_ +
"HLT_" + pathname +
"_LS";
2336 string fullPathToME_Stream_A_2D_count = pathsSummaryHLTPathsPerLSFolder_ +
"HLT_A_LS";
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);
2347 string groupBinLabel =
"Total " + fGroupNamePathsPair[
i].first;
2348 int groupBin = ME_2d->
getTH2F()->GetYaxis()->FindBin(groupBinLabel.c_str());
2349 if(groupBin != -1) ME_2d->
getTH2F()->SetBinContent(lumi+1,groupBin,updatedLumiCount);
2352 groupBinLabel = fGroupNamePathsPair[
i].first;
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;
2375 string fullPathToME = pathsSummaryFolder_ +
"HLT_AllSelectedPaths_PassPass";
2380 LogTrace(
"TrigResRateMon") <<
" could not fine 2d matrix " << fullPathToME << endl;
2386 TH2F * hist_2d = ME_2d->
getTH2F();
2388 for (std::vector<std::pair<std::string, float> >::iterator ip = fPathTempCountPair.begin(); ip != fPathTempCountPair.end(); ++ip) {
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;
2417 if ( ME_HLTAll_LS) {
2419 TH2F* hist_All = ME_HLTAll_LS->getTH2F();
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;
2436 for (
unsigned int i=0 ;
i< v_ME_HLTAll_LS.size();
i++) {
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;
2464 string fullPathToME_count = pathsIndividualHLTPathsPerLSFolder_ + pathname +
"_count_per_LS";
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";
2523 vector<string> numpathmodules = hltConfig_.moduleLabels(pathname);
2525 for(vector<string>::iterator numpathmodule = numpathmodules.begin();
2526 numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2528 if (hltConfig_.moduleType(*numpathmodule) ==
"HLTLevel1GTSeed") {
2530 l1pathname = *numpathmodule;
2546 int l1ModuleIndex = 999;
2548 for(PathInfoCollection::iterator
v = hltPathsDiagonal_.begin();
v!= hltPathsDiagonal_.end(); ++
v ) {
2550 if(
v->getPath() ==
pathname ) l1ModuleIndex =
v->getL1ModuleIndex();
2554 unsigned int pathByIndex = triggerNames.
triggerIndex(pathname);
2555 if(pathByIndex >= triggerResults_->size() )
return rc;
2558 int lastModule = triggerResults_->index(pathByIndex);
2562 rc = (l1ModuleIndex < lastModule);
2573 unsigned int pathByIndex = triggerNames.
triggerIndex(pathname);
2574 if(pathByIndex >= triggerResults_->size() )
return rc;
2576 rc = triggerResults_->accept(pathByIndex);
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;
2626 vector<string>
datasetNames = hltConfig_.streamContent(
"A") ;
2629 for (
unsigned int i=0;
i<datasetNames.size();
i++) {
2631 fullPathToME = pathsSummaryFolder_ +
"HLT_"+datasetNames[
i]+
"_PassPass";
2632 v_ME_HLTPassPass.push_back(
dbe_->get(fullPathToME));
2634 fullPathToME = pathsSummaryHLTCorrelationsFolder_+
"HLT_"+datasetNames[
i]+
"_PassPass_Normalized";
2635 v_ME_HLTPassPass_Normalized.push_back(
dbe_->get(fullPathToME));
2637 fullPathToME = pathsSummaryHLTCorrelationsFolder_+
"HLT_"+datasetNames[
i]+
"_Pass_Normalized_Any";
2638 v_ME_HLTPass_Normalized_Any.push_back(
dbe_->get(fullPathToME));
2643 fullPathToME = pathsSummaryFolder_ +
"HLT_A_PassPass";
2644 v_ME_HLTPassPass.push_back(
dbe_->get(fullPathToME));
2646 fullPathToME = pathsSummaryHLTCorrelationsFolder_+
"HLT_A_PassPass_Normalized";
2647 v_ME_HLTPassPass_Normalized.push_back(
dbe_->get(fullPathToME));
2649 fullPathToME = pathsSummaryHLTCorrelationsFolder_+
"HLT_A_Pass_Normalized_Any";
2650 v_ME_HLTPass_Normalized_Any.push_back(
dbe_->get(fullPathToME));
2652 for (
unsigned int i =0;
i<v_ME_HLTPassPass.size();
i++) {
2655 MonitorElement* ME_HLTPassPass_Normalized = v_ME_HLTPassPass_Normalized[
i];
2656 MonitorElement* ME_HLTPass_Normalized_Any = v_ME_HLTPass_Normalized_Any[
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);
LuminosityBlockID id() const
int getThresholdFromName(const std::string &pathname)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
TrigResRateMon(const edm::ParameterSet &)
void countHLTGroupBXHitsEndLumiBlock(const int &lumi)
void fillHltMatrix(const edm::TriggerNames &triggerNames, const edm::Event &iEvent, const edm::EventSetup &iSetup)
std::string xsecPerPathME_Name
std::string countsPerPathME_Name
void setPaths(const std::vector< std::string > &inputPaths)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool hasL1Passed(const std::string &pathname, const edm::TriggerNames &triggerNames)
void countHLTGroupHitsEndLumiBlock(const int &lumi)
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)
void setupHltMatrix(const std::string &label, std::vector< std::string > &paths)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
void countHLTGroupL1HitsEndLumiBlock(const int &lumi)
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
void addLumiToAverage(double lumi)
bool hasHLTPassed(const std::string &pathname, const edm::TriggerNames &triggerNames)
triggerResultsToken_(consumes< edm::TriggerResults >(edm::InputTag("TriggerResults")))
U second(std::pair< T, U > const &p)
std::string scaledXsecPerPathME_Name
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
unsigned int triggerIndex(std::string const &name) const
void setupStreamMatrix(const std::string &label, std::vector< std::string > &paths)
void countHLTPathHitsEndLumiBlock(const int &lumi)
Kind kind(void) const
Get the type of the monitor element.
void filltestHisto(const int &lumi)
void fillXsecPerDataset(const int &lumi)
void findReferenceTriggerIndex()
static std::string const triggerResults("TriggerResults")
int64_t getIntValue(void) const
void beginRun(const edm::Run &run, const edm::EventSetup &c)
TH1F * getTH1F(void) const
std::string ratePerLSME_Name
LuminosityBlockNumber_t luminosityBlock() const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void normalizeHLTMatrix()
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
void clearCountsPerPath()
void printCountsPerPathThisLumi()
TProfile * getTProfile(void) const
void setMaskedPaths(const std::vector< std::string > &inputPaths)
volatile std::atomic< bool > shutdown_flag false
TH2F * getTH2F(void) const
int getTriggerTypeParsePathName(const std::string &pathname)
T first(std::pair< T, U > const &p)
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.
std::string rawCountsPerPathME_Name
const std::string getL1ConditionModuleName(const std::string &pathname)
void fillCountsPerPath(const edm::Event &iEvent, const edm::EventSetup &iSetup)