DESY Hbb Analysis Framework
EventInfo.h
Go to the documentation of this file.
1 #ifndef Analysis_Ntuplizer_EventInfo_h
2 #define Analysis_Ntuplizer_EventInfo_h 1
3 
4 // -*- C++ -*-
5 //
6 // Package: Analysis/Ntuplizer
7 // Class: EventInfo
8 //
16 //
17 // Original Author: Roberval Walsh Bastos Rangel
18 // Created: Mon, 20 Oct 2014 14:24:08 GMT
19 //
20 //
21 
22 // system include files
23 #include <memory>
24 //
25 // user include files
26 #include "FWCore/Framework/interface/Event.h"
27 #include "FWCore/ParameterSet/interface/ParameterSet.h"
28 #include "FWCore/Framework/interface/EventSetup.h"
29 #include "FWCore/Framework/interface/LuminosityBlock.h"
30 #include "DataFormats/Common/interface/TriggerResults.h"
31 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
32 
33 #include "FWCore/ServiceRegistry/interface/Service.h"
34 #include "CommonTools/UtilAlgos/interface/TFileService.h"
35 
36 #include "TTree.h"
37 
38 //
39 // class declaration
40 //
41 
42 namespace analysis {
43  namespace ntuple {
44 
45  class EventInfo {
46  public:
47  EventInfo();
48  EventInfo(edm::Service<TFileService> &);
49  EventInfo(TFileDirectory &);
50  ~EventInfo();
51  void Fill(const edm::Event&);
52  void Init();
53  void PileupInfo(const edm::InputTag&);
54  void GenEventInfo(const edm::InputTag&);
55  void LumiScalersInfo(const edm::InputTag&);
56  void ReadPileupInfo(const edm::Event&);
57  void ReadGenEventInfo(const edm::Event&);
58  void ReadLumiScalers(const edm::Event&);
59  void FixedGridRhoInfo(const edm::InputTag&);
60  void ReadFixedGridRhoInfo(const edm::Event&);
61  TTree * Tree();
62 
63  private:
64  // ----------member data ---------------------------
65 
66  // event information
67  int event_;
68  int run_;
69  int lumi_;
70  int bx_;
71  int orbit_;
72 
73  // Output tree
74  TTree * tree_;
75 
76  // PileupInfo
77  edm::InputTag puInfo_;
78  bool do_pu_;
79  int n_pu_;
80  float n_true_pu_;
81 
82  // GenEventInfo
83  edm::InputTag genInfo_;
84  bool do_gen_;
85  double genWeight_;
86  double genScale_;
87  int pdfid1_;
88  int pdfid2_;
89  double pdfx1_;
90  double pdfx2_;
91 
92  // Lumi scalers
93  bool do_lumi_;
94  edm::InputTag lumiScalers_;
95  float instLumi_;
96  float lumiPU_;
97 
98  // FixedGridRho
99  bool do_rho_;
100  edm::InputTag rho_collection_;
101  double rho_;
102  };
103  }
104 }
105 
106 #endif // Analysis_Ntuplizer_EventInfo_h
void ReadGenEventInfo(const edm::Event &)
Definition: EventInfo.cc:203
void ReadLumiScalers(const edm::Event &)
Definition: EventInfo.cc:235
void ReadFixedGridRhoInfo(const edm::Event &)
Definition: EventInfo.cc:254
void ReadPileupInfo(const edm::Event &)
Definition: EventInfo.cc:169
edm::InputTag lumiScalers_
Definition: EventInfo.h:94
void Fill(const edm::Event &)
Definition: EventInfo.cc:95
void PileupInfo(const edm::InputTag &)
Definition: EventInfo.cc:158
void LumiScalersInfo(const edm::InputTag &)
Definition: EventInfo.cc:224
void GenEventInfo(const edm::InputTag &)
Definition: EventInfo.cc:188
edm::InputTag rho_collection_
Definition: EventInfo.h:100
edm::InputTag genInfo_
Definition: EventInfo.h:83
void FixedGridRhoInfo(const edm::InputTag &)
Definition: EventInfo.cc:245