CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GenFilterEfficiencyAnalyzer.cc
Go to the documentation of this file.
2 
4  totalGenFilterInfo_(0,0,0,0,0.,0.,0.,0.)
5 {
6 }
7 
9 {
10 }
11 
12 void
14 {
15 }
16 
17 // ------------ method called once each job just after ending the event loop ------------
18 
19 void
21 
23  iLumi.getByType(genFilter);
24 
25  std::cout << "Lumi section " << iLumi.id() << std::endl;
26  std::cout << "N total = " << genFilter->sumWeights() << " N passed = " << genFilter->sumPassWeights() << " N failed = " << genFilter->sumFailWeights() << std::endl;
27  std::cout << "Generator filter efficiency = " << genFilter->filterEfficiency(-1) << " +- " << genFilter->filterEfficiencyError(-1) << std::endl;
29 
30 }
31 
32 void
34 
35  std::cout << "Total events = " << totalGenFilterInfo_.sumWeights()
36  << " Passed events = " << totalGenFilterInfo_.sumPassWeights() << std::endl;
37  std::cout << "Filter efficiency = " << totalGenFilterInfo_.filterEfficiency(-1)
38  << " +- " << totalGenFilterInfo_.filterEfficiencyError(-1) << std::endl;
39 
40 }
LuminosityBlockID id() const
double filterEfficiency(int idwtup=+3) const
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
GenFilterEfficiencyAnalyzer(const edm::ParameterSet &)
bool mergeProduct(GenFilterInfo const &other)
double sumPassWeights() const
Definition: GenFilterInfo.h:34
double filterEfficiencyError(int idwtup=+3) const
tuple cout
Definition: gather_cfg.py:121
double sumWeights() const
Definition: GenFilterInfo.h:40
bool getByType(Handle< PROD > &result) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)