41 inputTag_ (iConfig.getParameter<edm::InputTag> (
"TriggerResultsTag")),
42 HLTPathNamesConfigPreVal_(iConfig.getParameter<std::vector<std::
string > >(
"HLTPaths")),
45 nValidConfigTriggers_(0),
80 if (processName !=
""){
87 typedef std::map<std::string, std::string> TriggerMap;
88 const TriggerMap &triggerMap = triggerBits->m_alcarecoToTrig;
90 TriggerMap::const_iterator listIter = triggerMap.find(
esPathsKey_);
92 if (listIter == triggerMap.end()) {
96 <<
" No triggerList with key " <<
esPathsKey_ <<
" in AlCaRecoTriggerBitsRcd";
114 edm::LogError(
"HLTMonBitSummary") <<
"HLTConfigProvider initialization with process name "
115 << processName <<
" failed." << std::endl;
120 std::vector<int> removePaths;
126 reverse(removePaths.begin(),removePaths.end());
127 if(removePaths.size()){
128 for(
unsigned int k=0;
k<removePaths.size(); ++
k)
144 edm::LogWarning(
"HLTMonBitSummary") <<
"A change in the HLT configuration has been found."
146 <<
"BitSummary histograms do not support changing configurations."
148 <<
"Processing of events halted.";
174 int numModule = 0, numFilters = 0;
176 unsigned int moduleIndex;
179 std::vector<std::string>::const_iterator iDumpModName;
180 for (iDumpModName = moduleNames.begin();iDumpModName != moduleNames.end();iDumpModName++) {
181 moduleName = *iDumpModName;
184 LogDebug (
"HLTMonBitSummary") <<
"Module" << numModule
185 <<
" is called " << moduleName
186 <<
" , type = " << moduleType
187 <<
" , index = " << moduleIndex
202 edm::LogError(
"HLTMonBitSummary") <<
"HLTConfigProvider initialization has failed."
203 <<
" Could not get filter names." << std::endl;
240 for(
int trig = 0; trig < nbin; trig++ ) {
245 nbin_sub+1, -0.5, 0.5+(
double)nbin_sub));
253 for(
int trig = 0; trig < nbin; trig++ ) {
257 nbin_sub+1, -0.5, 0.5+(
double)nbin_sub));
268 std::stringstream rNs;
271 LogDebug(
"HLTMonBitSummary")<<
"this is the beginning of a NEW run: "<< r.
run();
314 unsigned int lastModule = 0;
336 for(
unsigned int filt = 0; filt <
triggerFilters_[trig].size()-1; filt++){
356 float efferr =
sqrt(eff*(1-eff)/ (
float)
total_);
365 std::vector<bool> validity(nValidTriggers_);
375 uint denominatorIndex = 0;
376 bool denominatorValidity=
false;
379 denominatorValidity= (denominatorIndex <trh->size());
384 bool atLeastOne=
false;
387 bool denomAccept=
false;
388 if (
ratio_ && denominatorValidity) {
389 denomAccept=trh->accept(denominatorIndex);
394 if (!validity[
i])
continue;
405 if (!validity[
j])
continue;
412 float pf_efferr =
sqrt(pf_eff*(1-pf_eff) / (
float)
total_);
417 if (
ratio_ && denomAccept){
426 for (
unsigned int j=0;
j!=
i;
j++) {
427 if (!validity[
j])
continue;
429 if (iAccept || jAccept)
436 LogDebug(
"BitPlotting|BitReport")<<report.str();
473 report <<
" out of: "<<
total_<<
" events.\n";
481 edm::LogInfo(
"HLTMonBitSummary|BitSummary")<<report.str();
482 LogDebug(
"HLTMonBitSummary|BitSummary")<<report.str();
493 bool goodToGo =
false;
495 while(!goodToGo && selectTriggers.size()!=0){
497 for (
auto j=selectTriggers.begin();
j!=selectTriggers.end();++
j){
501 TPRegexp wildCard(*
j);
503 for (
unsigned int i = 0;
i != validTriggerNames.size(); ++
i){
504 if (TString(validTriggerNames[
i]).Contains(wildCard)){
506 if (
find(theSelectTriggers.begin(),
507 theSelectTriggers.end(),
508 validTriggerNames[
i])==theSelectTriggers.end()){
510 theSelectTriggers.push_back( validTriggerNames[i] );
std::vector< MonitorElement * > hSubFilterCount
virtual void beginRun(const edm::Run &r, const edm::EventSetup &)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > HLTPathNamesConfig_
HLTConfigProvider hltConfig_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
std::vector< MonitorElement * > hSubFilterEff
void setBinContent(int binx, double content)
set content of bin (1-D)
const std::string moduleType(const std::string &module) const
C++ class name of module.
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
std::vector< std::string > HLTPathNamesKey_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< std::string > dummyFilters_
const std::vector< std::string > & triggerNames() const
names of trigger paths
edm::EDGetTokenT< edm::TriggerResults > inputToken_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
unsigned int ndenomAccept_
std::string moduleName(Provenance const &provenance)
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
unsigned int triggerIndex(std::string const &name) const
std::vector< unsigned int > HLTPathsByIndex_
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setVerbose(unsigned level)
std::vector< std::string > HLTPathDenomName_
std::vector< std::vector< uint > > triggerFilterIndices_
virtual void configSelector(const std::vector< std::string > &selectTriggers, std::vector< std::string > &theSelectTriggers)
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< unsigned int > count_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
TH1F * getTH1F(void) const
std::vector< std::string > HLTPathNamesConfigPreVal_
double getBinContent(int binx) const
get content of bin (1-D)
std::vector< std::string > filterTypes_
HLTMonBitSummary(const edm::ParameterSet &)
std::vector< std::string > HLTPathDenomNamePreVal_
unsigned int nValidTriggers_
std::vector< std::string > HLTPathsByName_
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
tuple size
Write out results.
void setCurrentFolder(const std::string &fullpath)
std::string denominatorWild_
unsigned int nValidConfigTriggers_
std::vector< std::vector< std::string > > triggerFilters_