41 inputTag_ (iConfig.getParameter<edm::InputTag> (
"TriggerResultsTag")),
42 HLTPathNamesConfigPreVal_(iConfig.getParameter<std::vector<std::string > >(
"HLTPaths")),
45 nValidConfigTriggers_(0),
78 if (processName !=
""){
85 typedef std::map<std::string, std::string> TriggerMap;
86 const TriggerMap &triggerMap = triggerBits->m_alcarecoToTrig;
88 TriggerMap::const_iterator listIter = triggerMap.find(
esPathsKey_);
90 if (listIter == triggerMap.end()) {
94 <<
" No triggerList with key " <<
esPathsKey_ <<
" in AlCaRecoTriggerBitsRcd";
112 edm::LogError(
"HLTMonBitSummary") <<
"HLTConfigProvider initialization with process name "
113 << processName <<
" failed." << std::endl;
118 std::vector<int> removePaths;
124 reverse(removePaths.begin(),removePaths.end());
125 if(removePaths.size()){
126 for(
unsigned int k=0;
k<removePaths.size(); ++
k)
142 edm::LogWarning(
"HLTMonBitSummary") <<
"A change in the HLT configuration has been found."
144 <<
"BitSummary histograms do not support changing configurations."
146 <<
"Processing of events halted.";
172 int numModule = 0, numFilters = 0;
173 std::string moduleName, moduleType;
174 unsigned int moduleIndex;
177 std::vector<std::string>::const_iterator iDumpModName;
178 for (iDumpModName = moduleNames.begin();iDumpModName != moduleNames.end();iDumpModName++) {
179 moduleName = *iDumpModName;
182 LogDebug (
"HLTMonBitSummary") <<
"Module" << numModule
183 <<
" is called " << moduleName
184 <<
" , type = " << moduleType
185 <<
" , index = " << moduleIndex
200 edm::LogError(
"HLTMonBitSummary") <<
"HLTConfigProvider initialization has failed."
201 <<
" Could not get filter names." << std::endl;
238 for(
int trig = 0; trig < nbin; trig++ ) {
243 nbin_sub+1, -0.5, 0.5+(
double)nbin_sub));
251 for(
int trig = 0; trig < nbin; trig++ ) {
255 nbin_sub+1, -0.5, 0.5+(
double)nbin_sub));
266 std::stringstream rNs;
268 std::string rN = rNs.str();
269 LogDebug(
"HLTMonBitSummary")<<
"this is the beginning of a NEW run: "<< r.
run();
298 const std::string
invalid(
"@@invalid@@");
312 unsigned int lastModule = 0;
334 for(
unsigned int filt = 0; filt <
triggerFilters_[trig].size()-1; filt++){
354 float efferr =
sqrt(eff*(1-eff)/ (
float)
total_);
363 std::vector<bool> validity(nValidTriggers_);
373 uint denominatorIndex = 0;
374 bool denominatorValidity=
false;
377 denominatorValidity= (denominatorIndex <trh->size());
382 bool atLeastOne=
false;
385 bool denomAccept=
false;
386 if (
ratio_ && denominatorValidity) {
387 denomAccept=trh->accept(denominatorIndex);
392 if (!validity[
i])
continue;
403 if (!validity[
j])
continue;
410 float pf_efferr =
sqrt(pf_eff*(1-pf_eff) / (
float)
total_);
415 if (
ratio_ && denomAccept){
424 for (
unsigned int j=0;
j!=
i;
j++) {
425 if (!validity[
j])
continue;
427 if (iAccept || jAccept)
434 LogDebug(
"BitPlotting|BitReport")<<report.str();
471 report <<
" out of: "<<
total_<<
" events.\n";
479 edm::LogInfo(
"HLTMonBitSummary|BitSummary")<<report.str();
480 LogDebug(
"HLTMonBitSummary|BitSummary")<<report.str();
492 bool goodToGo =
false;
494 while(!goodToGo && selectTriggers.size()!=0){
496 for (std::vector<std::string>::iterator
j=selectTriggers.begin();
j!=selectTriggers.end();++
j){
500 TPRegexp wildCard(*
j);
502 for (
unsigned int i = 0;
i != validTriggerNames.size(); ++
i){
503 if (TString(validTriggerNames[
i]).Contains(wildCard)){
505 if (
find(theSelectTriggers.begin(),
506 theSelectTriggers.end(),
507 validTriggerNames[
i])==theSelectTriggers.end()){
509 theSelectTriggers.push_back( validTriggerNames[i] );
std::vector< MonitorElement * > hSubFilterCount
virtual void beginRun(const edm::Run &r, const edm::EventSetup &)
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_
std::vector< std::string > dummyFilters_
const std::vector< std::string > & triggerNames() const
names of trigger paths
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_
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
const T & max(const T &a, const T &b)
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_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< std::vector< uint > > triggerFilterIndices_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< unsigned int > count_
virtual void configSelector(std::vector< std::string > selectTriggers, std::vector< std::string > &theSelectTriggers)
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_