CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
HLTMonSimpleBTag Class Reference

#include <DQM/HLTEvF/plugins/HLTMonSimpleBTag.cc>

Inheritance diagram for HLTMonSimpleBTag:
edm::EDAnalyzer

Classes

class  PathInfo
 
class  PathInfoCollection
 

Public Member Functions

 HLTMonSimpleBTag (const edm::ParameterSet &)
 
 ~HLTMonSimpleBTag ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
void calcEff (void)
 calcEff: calculates efficiency using histograms booked in std::map<std::string,std::string> triggerMap_; More...
 
void doEffCalc (MonitorElement *eff, MonitorElement *num, MonitorElement *denom)
 
virtual void endJob ()
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 EndRun. More...
 
std::string makeEffName (std::string trig1, std::string trig2)
 
std::string makeEffNumeratorName (std::string trig1, std::string trig2)
 

Private Attributes

int currentRun_
 
DQMStoredbe_
 
std::string dirname_
 
double dRTrigObjMatch_
 
PathInfoCollection hltEfficiencies_
 
PathInfoCollection hltPaths_
 
bool monitorDaemon_
 
unsigned int nBins_
 
int nev_
 
double ptMax_
 
double ptMin_
 
int refresheff_
 
bool resetMe_
 
int theHLTOutputType
 
MonitorElementtotal_
 
std::vector< std::pair
< std::string, std::string > > 
triggerMap_
 
edm::InputTag triggerResultLabel_
 
edm::InputTag triggerSummaryLabel_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

DQM/HLTEvF/interface/HLTMonSimpleBTag.h

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 50 of file HLTMonSimpleBTag.h.

Constructor & Destructor Documentation

HLTMonSimpleBTag::HLTMonSimpleBTag ( const edm::ParameterSet iConfig)
explicit

Definition at line 22 of file HLTMonSimpleBTag.cc.

References dbe_, dirname_, dRTrigObjMatch_, filters, spr::find(), HLTMonSimpleBTag::PathInfoCollection::find(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hltEfficiencies_, hltPaths_, LogDebug, makeEffName(), makeEffNumeratorName(), nBins_, cppFunctionSkipper::operator, ptMax_, ptMin_, refresheff_, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), triggerMap_, and triggerSummaryLabel_.

22  :
23  resetMe_(true), currentRun_(-99)
24 {
25  LogDebug("HLTMonSimpleBTag") << "constructor...." ;
26 
28  if ( ! dbe_ ) {
29  LogWarning("Status") << "unable to get DQMStore service?";
30  }
31  if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
32  dbe_->setVerbose(0);
33  }
34 
35 
36  dirname_="HLT/HLTMonSimpleBTag" ;
37 
38  if (dbe_ != 0 ) {
39  LogDebug("Status") << "Setting current directory to " << dirname_;
41  }
42 
43 
44  // plotting paramters
45  ptMin_ = iConfig.getUntrackedParameter<double>("ptMin",0.);
46  ptMax_ = iConfig.getUntrackedParameter<double>("ptMax",200.);
47  nBins_ = iConfig.getUntrackedParameter<unsigned int>("Nbins",50);
48  dRTrigObjMatch_ = iConfig.getUntrackedParameter<double>("dRMatch",0.3);
49  refresheff_ = iConfig.getUntrackedParameter<unsigned int>("Nrefresh",10);
50 
51 
52 
53  // this is the list of paths to look at.
54  std::vector<edm::ParameterSet> filters =
55  iConfig.getParameter<std::vector<edm::ParameterSet> >("filters");
56  for(std::vector<edm::ParameterSet>::iterator
57  filterconf = filters.begin() ; filterconf != filters.end();
58  filterconf++) {
59  std::string me = filterconf->getParameter<std::string>("name");
60  std::string denom = filterconf->getParameter<std::string>("refname");
61  // only fill if both triggers are not there yet.
62  if(hltPaths_.find(me)==hltPaths_.end())
63  hltPaths_.push_back(PathInfo(me,ptMin_, ptMax_));
64  if(hltPaths_.find(denom)==hltPaths_.end())
65  hltPaths_.push_back(PathInfo(denom, ptMin_, ptMax_));
66 
67  std::string effname = makeEffName(me,denom);
68  std::string numername=makeEffNumeratorName(me,denom);
69  std::pair<std::string,std::string> trigpair(me,denom);
70  if(find(triggerMap_.begin(),triggerMap_.end(),trigpair)==triggerMap_.end())
71  triggerMap_.push_back(trigpair);
72  if(hltEfficiencies_.find(effname)==hltEfficiencies_.end())
73  hltEfficiencies_.push_back(PathInfo(effname,ptMin_,ptMax_));
74  if(hltEfficiencies_.find(numername)==hltEfficiencies_.end())
75  hltEfficiencies_.push_back(PathInfo(numername,ptMin_,ptMax_));
76 
77  }
79  iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
80 }
#define LogDebug(id)
std::string dirname_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< PathInfo >::iterator find(std::string pathName)
std::vector< std::pair< std::string, std::string > > triggerMap_
unsigned int nBins_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
std::vector< TPRegexp > filters
Definition: eve_filter.cc:25
edm::InputTag triggerSummaryLabel_
PathInfoCollection hltEfficiencies_
void setVerbose(unsigned level)
Definition: DQMStore.cc:393
std::string makeEffNumeratorName(std::string trig1, std::string trig2)
PathInfoCollection hltPaths_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
std::string makeEffName(std::string trig1, std::string trig2)
HLTMonSimpleBTag::~HLTMonSimpleBTag ( )

Definition at line 83 of file HLTMonSimpleBTag.cc.

84 {
85 
86  // do anything here that needs to be done at desctruction time
87  // (e.g. close files, deallocate resources etc.)
88 
89 }

Member Function Documentation

void HLTMonSimpleBTag::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 98 of file HLTMonSimpleBTag.cc.

References calcEff(), reco::deltaR(), dRTrigObjMatch_, eta(), HLTMonSimpleBTag::PathInfoCollection::find(), edm::Event::getByLabel(), hltEfficiencies_, hltPaths_, gen::k, LogDebug, makeEffNumeratorName(), mergeVDriftHistosByStation::name, nev_, AlCaHLTBitMon_ParallelJobs::p, phi, refresheff_, triggerMap_, and triggerSummaryLabel_.

99 {
100  using namespace edm;
101  using namespace trigger;
102  ++nev_;
103  LogDebug("Status")<< "analyze" ;
104 
105  edm::Handle<TriggerEvent> triggerObj;
106  iEvent.getByLabel(triggerSummaryLabel_,triggerObj);
107  if(!triggerObj.isValid()) {
108  edm::LogInfo("Status") << "Summary HLT object (TriggerEvent) not found, "
109  "skipping event";
110  return;
111  }
112 
113  const trigger::TriggerObjectCollection & toc(triggerObj->getObjects());
114 
115  for ( size_t ia = 0; ia < triggerObj->sizeFilters(); ++ ia) {
116  std::string fullname = triggerObj->filterTag(ia).encode();
117  // the name can have in it the module label as well as the process and
118  // other labels - strip 'em
119  std::string name;
120  size_t p = fullname.find_first_of(':');
121  if ( p != std::string::npos) {
122  name = fullname.substr(0, p);
123  }
124  else {
125  name = fullname;
126  }
127 
128  LogDebug("Parameter") << "filter " << ia << ", full name = " << fullname
129  << ", p = " << p
130  << ", abbreviated = " << name ;
131  // std::cout << std::endl;
132  // check that trigger is in 'watch list'
133  PathInfoCollection::iterator pic = hltPaths_.find(name);
134  if(pic==hltPaths_.end())
135  continue;
136 
137  // find keys
138 
139  const trigger::Keys & k = triggerObj->filterKeys(ia);
140  for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
141  LogDebug("Parameters") << name << "(" << ki-k.begin() << "): pt, eta, phi = "
142  << toc[*ki].pt() << ", "
143  << toc[*ki].eta() << ", "
144  << toc[*ki].phi() <<","
145  << toc[*ki].id();
146  pic->getEtHisto()->Fill(toc[*ki].pt());
147  pic->getEtaHisto()->Fill(toc[*ki].eta());
148  pic->getPhiHisto()->Fill(toc[*ki].phi());
149  pic->getEtaVsPhiHisto()->Fill(toc[*ki].eta(), toc[*ki].phi());
150  }
151 
152  // check which trigger this trigger is reference to, fill those histograms separately:
153  for(std::vector<std::pair<std::string, std::string> >::iterator matchIter = triggerMap_.begin(); matchIter!=triggerMap_.end(); ++matchIter){
154  // only do anything if you actually have a match
155  if(matchIter->second!=name)
156  continue;
157  LogDebug("HLTMonSimpleBTag") << "found match! " << " " << matchIter->first << " " << matchIter->second ;
158  // now go find this one in the trigger collection... this is somewhat painful :(
159  for(size_t ib = 0; ib < triggerObj->sizeFilters(); ++ ib) {
160  if(ib==ia)
161  continue;
162  std::string fullname_b = triggerObj->filterTag(ib).encode();
163  // the name can have in it the module label as well as the process and
164  // other labels - strip 'em
165  std::string name_b;
166  size_t p_b = fullname_b.find_first_of(':');
167  if ( p_b != std::string::npos) {
168  name_b = fullname_b.substr(0, p_b);
169  }
170  else {
171  name_b = fullname_b;
172  }
173  // this is where the matching to the trigger array happens
174  if(name_b!=matchIter->first)
175  continue;
176 
177  // ok, now we have two matching triggers with indices ia and ib in the trigger index. Get the keys for ib.
178 
179  // find the correct monitoring element:
180  std::string numeratorname = makeEffNumeratorName(matchIter->first,matchIter->second);
181  PathInfoCollection::iterator pic_b = hltEfficiencies_.find(numeratorname);
182  if(pic_b==hltEfficiencies_.end())
183  continue;
184 
185  const trigger::Keys & k_b = triggerObj->filterKeys(ib);
186 
187  const trigger::Keys & k = triggerObj->filterKeys(ia);
188  for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
189  for (trigger::Keys::const_iterator ki_b = k_b.begin(); ki_b !=k_b.end(); ++ki_b ) {
190  // do cone match...
191  if(reco::deltaR(toc[*ki].eta(),toc[*ki_b].phi(),toc[*ki].eta(),toc[*ki_b].phi())>dRTrigObjMatch_)
192  continue;
193 
194  LogDebug("Parameters") << "matched pt, eta, phi = "
195  << toc[*ki].pt() << ", "
196  << toc[*ki].eta() << ", "
197  << toc[*ki].phi() << " to "
198  << toc[*ki_b].pt() << ", "
199  << toc[*ki_b].eta() << ", "
200  << toc[*ki_b].phi() << " (using the first to fill histo to avoid division problems...)";
201  // as these are going to be divided it is important to fill numerator and denominator with the same pT spectrum. So this is why these are filled with ki objects instead of ki_b objects...
202  pic_b->getEtHisto()->Fill(toc[*ki].pt());
203  pic_b->getEtaHisto()->Fill(toc[*ki].eta());
204  pic_b->getPhiHisto()->Fill(toc[*ki].phi());
205  pic_b->getEtaVsPhiHisto()->Fill(toc[*ki].eta(), toc[*ki].phi());
206  // for now just take the first match there are two keys within the same cone...
207  break;
208  }
209  }
210  }
211  }
212  }
213  // and calculate efficiencies, only if the number of events is the refresh rate:
214  if(nev_%refresheff_==0 && nev_!=1){
215  calcEff();
216  }
217 }
#define LogDebug(id)
std::vector< PathInfo >::iterator find(std::string pathName)
std::vector< std::pair< std::string, std::string > > triggerMap_
T eta() const
edm::InputTag triggerSummaryLabel_
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
PathInfoCollection hltEfficiencies_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
int k[5][pyjets_maxn]
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
std::string makeEffNumeratorName(std::string trig1, std::string trig2)
PathInfoCollection hltPaths_
void calcEff(void)
calcEff: calculates efficiency using histograms booked in std::map&lt;std::string,std::string&gt; triggerMa...
Definition: DDAxes.h:10
void HLTMonSimpleBTag::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 222 of file HLTMonSimpleBTag.cc.

References DQMStore::book1D(), DQMStore::book2D(), dirname_, eta(), hltEfficiencies_, hltPaths_, nBins_, nev_, cppFunctionSkipper::operator, phi, DQMStore::rmdir(), DQMStore::setCurrentFolder(), indexGen::title, and v.

223 {
224  nev_ = 0;
225  DQMStore *dbe = 0;
226  dbe = Service<DQMStore>().operator->();
227 
228  if (dbe) {
229  dbe->setCurrentFolder(dirname_);
230  dbe->rmdir(dirname_);
231  }
232 
233 
234  if (dbe) {
235  dbe->setCurrentFolder(dirname_);
236 
237  for(PathInfoCollection::iterator v = hltPaths_.begin();
238  v!= hltPaths_.end(); ++v ) {
239  MonitorElement *et, *eta, *phi, *etavsphi=0;
240  std::string histoname(v->getName()+"_et");
241  std::string title(v->getName()+" E_t");
242  et = dbe->book1D(histoname.c_str(),
243  title.c_str(),nBins_,
244  v->getPtMin(),
245  v->getPtMax());
246 
247  histoname = v->getName()+"_eta";
248  title = v->getName()+" #eta";
249  eta = dbe->book1D(histoname.c_str(),
250  title.c_str(),nBins_/2,-2.7,2.7);
251 
252  histoname = v->getName()+"_phi";
253  title = v->getName()+" #phi";
254  phi = dbe->book1D(histoname.c_str(),
255  histoname.c_str(),nBins_/2,-3.14,3.14);
256 
257 
258  histoname = v->getName()+"_etaphi";
259  title = v->getName()+" #eta vs #phi";
260  etavsphi = dbe->book2D(histoname.c_str(),
261  title.c_str(),
262  nBins_/2,-2.7,2.7,
263  nBins_/2,-3.14, 3.14);
264 
265  v->setHistos( et, eta, phi, etavsphi);
266  }
267 
268  for(PathInfoCollection::iterator v = hltEfficiencies_.begin();
269  v!= hltEfficiencies_.end(); ++v ) {
270  MonitorElement *et, *eta, *phi, *etavsphi=0;
271  std::string histoname(v->getName()+"_et");
272  std::string title(v->getName()+" E_t");
273  et = dbe->book1D(histoname.c_str(),
274  title.c_str(),nBins_,
275  v->getPtMin(),
276  v->getPtMax());
277 
278  histoname = v->getName()+"_eta";
279  title = v->getName()+" #eta";
280  eta = dbe->book1D(histoname.c_str(),
281  title.c_str(),nBins_/2,-2.7,2.7);
282 
283  histoname = v->getName()+"_phi";
284  title = v->getName()+" #phi";
285  phi = dbe->book1D(histoname.c_str(),
286  histoname.c_str(),nBins_/2,-3.14,3.14);
287 
288 
289  histoname = v->getName()+"_etaphi";
290  title = v->getName()+" #eta vs #phi";
291  etavsphi = dbe->book2D(histoname.c_str(),
292  title.c_str(),
293  nBins_/2,-2.7,2.7,
294  nBins_/2,-3.14, 3.14);
295 
296  v->setHistos( et, eta, phi, etavsphi);
297  }
298  }
299 }
std::string dirname_
unsigned int nBins_
T eta() const
PathInfoCollection hltEfficiencies_
PathInfoCollection hltPaths_
mathSSE::Vec4< T > v
Definition: DDAxes.h:10
void HLTMonSimpleBTag::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 311 of file HLTMonSimpleBTag.cc.

References edm::RunBase::id(), and LogDebug.

312 {
313  LogDebug("Status") << "beginRun, run " << run.id();
314 }
#define LogDebug(id)
RunID const & id() const
Definition: RunBase.h:41
void HLTMonSimpleBTag::calcEff ( void  )
private

calcEff: calculates efficiency using histograms booked in std::map<std::string,std::string> triggerMap_;

Definition at line 329 of file HLTMonSimpleBTag.cc.

References doEffCalc(), HLTMonSimpleBTag::PathInfoCollection::find(), hltEfficiencies_, hltPaths_, LogDebug, makeEffName(), makeEffNumeratorName(), and triggerMap_.

Referenced by analyze(), and endRun().

329  {
330 
331  for( std::vector<std::pair<std::string,std::string> >::iterator iter = triggerMap_.begin(); iter!=triggerMap_.end(); iter++){
332  if(hltPaths_.find(iter->first)==hltPaths_.end())
333  continue;
334  if(hltPaths_.find(iter->second)==hltPaths_.end())
335  continue;
336 
337  std::string effname = makeEffName(iter->first,iter->second);
338  std::string numeratorname = makeEffNumeratorName(iter->first,iter->second);
339  LogDebug("HLTMonBTagSlim::calcEff") << "calculating efficiencies for histogram with effname=" << effname << " using also histogram " << numeratorname ;
340  PathInfoCollection::iterator effHists = hltEfficiencies_.find(effname);
341  if(effHists==hltEfficiencies_.end())
342  continue;
343  PathInfoCollection::iterator numerHists = hltEfficiencies_.find(numeratorname);
344  if(numerHists==hltEfficiencies_.end())
345  continue;
346  LogDebug("HLTMonBTagSlim::calcEff") << "found histo with name " << effname << " and " << numeratorname << "!" ;
347  // do the hists all separately:
348 
349  doEffCalc(effHists->getEtHisto(),numerHists->getEtHisto(),hltPaths_.find(iter->second)->getEtHisto());
350  doEffCalc(effHists->getEtaHisto(),numerHists->getEtaHisto(),hltPaths_.find(iter->second)->getEtaHisto());
351  doEffCalc(effHists->getPhiHisto(),numerHists->getPhiHisto(),hltPaths_.find(iter->second)->getPhiHisto());
352  doEffCalc(effHists->getEtaVsPhiHisto(),numerHists->getEtaVsPhiHisto(),hltPaths_.find(iter->second)->getEtaVsPhiHisto());
353 
354 
355  }
356  LogDebug("HLTMonBTagSlim::calcEff") << "done with efficiencies!" ;
357 }
#define LogDebug(id)
std::vector< PathInfo >::iterator find(std::string pathName)
std::vector< std::pair< std::string, std::string > > triggerMap_
PathInfoCollection hltEfficiencies_
std::string makeEffNumeratorName(std::string trig1, std::string trig2)
PathInfoCollection hltPaths_
void doEffCalc(MonitorElement *eff, MonitorElement *num, MonitorElement *denom)
std::string makeEffName(std::string trig1, std::string trig2)
void HLTMonSimpleBTag::doEffCalc ( MonitorElement eff,
MonitorElement num,
MonitorElement denom 
)
private

Definition at line 361 of file HLTMonSimpleBTag.cc.

References DQMNet::DQM_PROP_TYPE_TH1D, DQMNet::DQM_PROP_TYPE_TH1F, DQMNet::DQM_PROP_TYPE_TH1S, DQMNet::DQM_PROP_TYPE_TH2D, DQMNet::DQM_PROP_TYPE_TH2F, DQMNet::DQM_PROP_TYPE_TH2S, MonitorElement::getBinContent(), MonitorElement::getBinError(), MonitorElement::getName(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), MonitorElement::kind(), LogDebug, MonitorElement::setBinContent(), MonitorElement::setBinError(), mathSSE::sqrt(), vdt::x, and detailsBasic3DVector::y.

Referenced by calcEff().

361  {
362  double x,y,errx,erry;
363 
364  // presuming error propagation is non-quadratic (binominal):
365  // so: err!= Sqrt(errx^2/x^2+erry^2/y^2) but instead
366  //
367  // err=sqrt(errx^2/x^2+erry^2/y^2)* x/y*(1-x/y)
368  bool is1d=false;
369  bool is2d=false;
371  is1d=true;
373  is2d=true;
374 
375 
376  for(int ibin=0; ibin<=eff->getNbinsX() && ibin<=num->getNbinsX(); ibin++){
377  if(is1d){ // 1D histograms!
378  x=num->getBinContent(ibin);
379  errx=num->getBinError(ibin);
380  y=denom->getBinContent(ibin);
381  erry=denom->getBinError(ibin);
382  if(fabs(y)<0.00001 || fabs(x)<0.0001){// very stringent non-zero!
383  eff->setBinContent(ibin,0);
384  eff->setBinError(ibin,0);
385  continue;
386  }
387 
388  LogDebug("HLTMonSimpleBTag::calcEff()") << eff->getName() << " (" << ibin << ") " << x << " " << y;
389  eff->setBinContent(ibin,x/y);
390  eff->setBinError(ibin,sqrt((errx*errx)/(x*x)+(erry*erry)/(y*y))* (x/y)*(1-(x/y)));
391  }
392  else if(is2d){ // 2D histograms!
393  for(int jbin=0; jbin<=num->getNbinsY(); jbin++){
394  x=num->getBinContent(ibin,jbin);
395  errx=num->getBinError(ibin,jbin);
396  y=denom->getBinContent(ibin,jbin);
397  erry=denom->getBinError(ibin,jbin);
398  if(fabs(y)<0.0001 || fabs(x)<0.0001){ // very stringent non-zero!
399  eff->setBinContent(ibin,jbin,0.);
400  eff->setBinError(ibin,jbin,0.);
401  continue;
402  }
403  LogDebug("HLTMonSimpleBTag::calcEff()") << eff->getName() << " (" << ibin<< "," << jbin << ") " << x << " " << y ;
404 
405  eff->setBinContent(ibin,jbin,x/y);
406  eff->setBinError(ibin,jbin,sqrt((errx*errx)/(x*x)+(erry*erry)/(y*y))* (x/y)*(1-(x/y)));
407  }
408  }
409  }
410 }
#define LogDebug(id)
const std::string & getName(void) const
get name of ME
void setBinContent(int binx, double content)
set content of bin (1-D)
static const uint32_t DQM_PROP_TYPE_TH1S
Definition: DQMNet.h:32
static const uint32_t DQM_PROP_TYPE_TH2D
Definition: DQMNet.h:36
static const uint32_t DQM_PROP_TYPE_TH1F
Definition: DQMNet.h:31
int getNbinsY(void) const
get # of bins in Y-axis
T sqrt(T t)
Definition: SSEVec.h:46
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
Kind kind(void) const
Get the type of the monitor element.
static const uint32_t DQM_PROP_TYPE_TH1D
Definition: DQMNet.h:33
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
double getBinContent(int binx) const
get content of bin (1-D)
static const uint32_t DQM_PROP_TYPE_TH2S
Definition: DQMNet.h:35
int getNbinsX(void) const
get # of bins in X-axis
x
Definition: VDTMath.h:216
static const uint32_t DQM_PROP_TYPE_TH2F
Definition: DQMNet.h:34
void HLTMonSimpleBTag::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 303 of file HLTMonSimpleBTag.cc.

References nev_.

304 {
305  LogInfo("Status") << "endJob: analyzed " << nev_ << " events";
306  return;
307 }
void HLTMonSimpleBTag::endRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 317 of file HLTMonSimpleBTag.cc.

References calcEff(), edm::RunBase::id(), and LogDebug.

318 {
319  LogDebug("Status") << "final re-calculation efficiencies!" ;
320  calcEff();
321  LogDebug("Status") << "endRun, run " << run.id();
322 
323 }
#define LogDebug(id)
RunID const & id() const
Definition: RunBase.h:41
void calcEff(void)
calcEff: calculates efficiency using histograms booked in std::map&lt;std::string,std::string&gt; triggerMa...
std::string HLTMonSimpleBTag::makeEffName ( std::string  trig1,
std::string  trig2 
)
inlineprivate

Definition at line 71 of file HLTMonSimpleBTag.h.

References query::result.

Referenced by calcEff(), and HLTMonSimpleBTag().

71 {std::string result="effRelative_"+trig1+"_passedanddivby_"+trig2; return result;}
tuple result
Definition: query.py:137
std::string HLTMonSimpleBTag::makeEffNumeratorName ( std::string  trig1,
std::string  trig2 
)
inlineprivate

Definition at line 72 of file HLTMonSimpleBTag.h.

References query::result.

Referenced by analyze(), calcEff(), and HLTMonSimpleBTag().

72 {std::string result="selected_"+trig1+"_passed_"+trig2; return result;}
tuple result
Definition: query.py:137

Member Data Documentation

int HLTMonSimpleBTag::currentRun_
private

Definition at line 83 of file HLTMonSimpleBTag.h.

DQMStore* HLTMonSimpleBTag::dbe_
private

Definition at line 78 of file HLTMonSimpleBTag.h.

Referenced by HLTMonSimpleBTag().

std::string HLTMonSimpleBTag::dirname_
private

Definition at line 90 of file HLTMonSimpleBTag.h.

Referenced by beginJob(), and HLTMonSimpleBTag().

double HLTMonSimpleBTag::dRTrigObjMatch_
private

Definition at line 88 of file HLTMonSimpleBTag.h.

Referenced by analyze(), and HLTMonSimpleBTag().

PathInfoCollection HLTMonSimpleBTag::hltEfficiencies_
private

Definition at line 176 of file HLTMonSimpleBTag.h.

Referenced by analyze(), beginJob(), calcEff(), and HLTMonSimpleBTag().

PathInfoCollection HLTMonSimpleBTag::hltPaths_
private

Definition at line 175 of file HLTMonSimpleBTag.h.

Referenced by analyze(), beginJob(), calcEff(), and HLTMonSimpleBTag().

bool HLTMonSimpleBTag::monitorDaemon_
private

Definition at line 91 of file HLTMonSimpleBTag.h.

unsigned int HLTMonSimpleBTag::nBins_
private

Definition at line 85 of file HLTMonSimpleBTag.h.

Referenced by beginJob(), and HLTMonSimpleBTag().

int HLTMonSimpleBTag::nev_
private

Definition at line 76 of file HLTMonSimpleBTag.h.

Referenced by analyze(), beginJob(), and endJob().

double HLTMonSimpleBTag::ptMax_
private

Definition at line 87 of file HLTMonSimpleBTag.h.

Referenced by HLTMonSimpleBTag().

double HLTMonSimpleBTag::ptMin_
private

Definition at line 86 of file HLTMonSimpleBTag.h.

Referenced by HLTMonSimpleBTag().

int HLTMonSimpleBTag::refresheff_
private

Definition at line 77 of file HLTMonSimpleBTag.h.

Referenced by analyze(), and HLTMonSimpleBTag().

bool HLTMonSimpleBTag::resetMe_
private

Definition at line 82 of file HLTMonSimpleBTag.h.

int HLTMonSimpleBTag::theHLTOutputType
private

Definition at line 92 of file HLTMonSimpleBTag.h.

MonitorElement* HLTMonSimpleBTag::total_
private

Definition at line 80 of file HLTMonSimpleBTag.h.

std::vector<std::pair<std::string,std::string> > HLTMonSimpleBTag::triggerMap_
private

Definition at line 178 of file HLTMonSimpleBTag.h.

Referenced by analyze(), calcEff(), and HLTMonSimpleBTag().

edm::InputTag HLTMonSimpleBTag::triggerResultLabel_
private

Definition at line 94 of file HLTMonSimpleBTag.h.

edm::InputTag HLTMonSimpleBTag::triggerSummaryLabel_
private

Definition at line 93 of file HLTMonSimpleBTag.h.

Referenced by analyze(), and HLTMonSimpleBTag().