CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GenXSecAnalyzer.h
Go to the documentation of this file.
1 #ifndef GENXSECANALYZER_H
2 #define GENXSECANALYZER_H
3 
4 // $Revision://
5 
6 // analyzer of a summary information product on filter efficiency for a user specified path
7 // meant for the generator filter efficiency calculation
8 
9 
10 // system include files
11 #include <memory>
12 #include <vector>
13 
14 // user include files
17 
26 //
27 // class declaration
28 //
29 
30 class GenXSecAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchLuminosityBlocks> {
31 
32 
33 public:
34  explicit GenXSecAnalyzer(const edm::ParameterSet&);
36  const double final_xsec_value() const {return xsec_.value();}
37  const double final_xsec_error() const {return xsec_.error();}
38 
39 private:
40 
41  virtual void beginJob() override;
42  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
43  virtual void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
44  virtual void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
45  virtual void endJob() override;
46  void compute();
47 
51 
52  // ----------member data --------------------------
53 
55  unsigned int theProcesses_size;
57 
58  // final cross sections
60  // statistics from additional generator filter
62 
63  // statistics from HepMC filter
65 
66  // statistics for event level efficiency, the size is the number of processes + 1
67  std::vector<GenFilterInfo> eventEffStat_;
68  // statistics from jet matching, the size is the number of processes + 1
69  std::vector<GenFilterInfo> jetMatchEffStat_;
70  // uncertainty-averaged cross sections before matching, the size is the number of processes + 1
71  std::vector<GenLumiInfoProduct::XSec> xsecBeforeMatching_;
72  // uncertainty-averaged cross sections after matching, the size is the number of processes + 1
73  std::vector<GenLumiInfoProduct::XSec> xsecAfterMatching_;
74  // the size depends on the number of MC with different LHE information
75  std::vector<GenLumiInfoProduct> products_;
76 
77 };
78 
79 #endif
std::vector< GenLumiInfoProduct::XSec > xsecBeforeMatching_
std::vector< GenFilterInfo > jetMatchEffStat_
std::vector< GenLumiInfoProduct > products_
virtual void endJob() override
edm::EDGetTokenT< GenFilterInfo > hepMCFilterInfoToken_
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
GenFilterInfo filterOnlyEffStat_
edm::EDGetTokenT< GenLumiInfoProduct > genLumiInfoToken_
const double final_xsec_error() const
unsigned int theProcesses_size
GenLumiInfoProduct::XSec xsec_
GenFilterInfo hepMCFilterEffStat_
const double final_xsec_value() const
std::vector< GenFilterInfo > eventEffStat_
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
virtual void beginJob() override
edm::EDGetTokenT< GenFilterInfo > genFilterInfoToken_
GenXSecAnalyzer(const edm::ParameterSet &)
std::vector< GenLumiInfoProduct::XSec > xsecAfterMatching_