CMS 3D CMS Logo

PFJetBenchmark.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_Benchmark_PFJetBenchmark_h
2 #define RecoParticleFlow_Benchmark_PFJetBenchmark_h
3 
5 
18 
19 //#include "FWCore/ServiceRegistry/interface/Service.h"
20 
21 #include "TH1F.h"
22 #include "TH2F.h"
24 #include <string>
25 #include <TFile.h>
26 #include <vector>
27 
29 public:
32 
34  virtual ~PFJetBenchmark();
35 
36  void setup(std::string Filename,
37  bool debug,
38  bool plotAgainstReco = false,
39  bool onlyTwoJets = true,
40  double deltaRMax = 0.1,
41  std::string benchmarkLabel_ = "ParticleFlow",
42  double recPt = -1,
43  double maxEta = -1,
44  DQMStore *dbe_store = nullptr);
46  void gettrue(const reco::GenJet *truth,
47  double &true_ChargedHadEnergy,
48  double &true_NeutralHadEnergy,
49  double &true_NeutralEmEnergy);
50  void printPFJet(const reco::PFJet *);
51  void printGenJet(const reco::GenJet *);
52  double resPtMax() const { return resPtMax_; };
53  double resChargedHadEnergyMax() const { return resChargedHadEnergyMax_; };
54  double resNeutralHadEnergyMax() const { return resNeutralHadEnergyMax_; };
55  double resNeutralEmEnergyMax() const { return resNeutralEmEnergyMax_; };
56  // void save();
57  void write();
58 
59 private:
60  TFile *file_;
61 
62  // histograms
63  // Jets inclusive distributions (Pt > 20 GeV)
64  TH1F *hNjets;
65  TH1F *hjetsPt;
66  TH1F *hjetsEta;
67  TH2F *hRPtvsEta;
68  TH2F *hDEtavsEta;
69  TH2F *hDPhivsEta;
70  TH2F *hRNeutvsEta;
71  TH2F *hRNEUTvsEta;
72  TH2F *hRNONLvsEta;
73  TH2F *hRHCALvsEta;
74  TH2F *hRHONLvsEta;
75  TH2F *hRCHEvsEta;
76  TH2F *hNCHvsEta;
77  TH2F *hNCH0vsEta;
78  TH2F *hNCH1vsEta;
79  TH2F *hNCH2vsEta;
80  TH2F *hNCH3vsEta;
81  TH2F *hNCH4vsEta;
82  TH2F *hNCH5vsEta;
83  TH2F *hNCH6vsEta;
84  TH2F *hNCH7vsEta;
85 
86  // delta Pt or E quantities for Barrel
87  TH1F *hBRPt;
88  TH1F *hBRPt20_40;
89  TH1F *hBRPt40_60;
90  TH1F *hBRPt60_80;
91  TH1F *hBRPt80_100;
92  TH1F *hBRPt100_150;
93  TH1F *hBRPt150_200;
94  TH1F *hBRPt200_250;
95  TH1F *hBRPt250_300;
96  TH1F *hBRPt300_400;
97  TH1F *hBRPt400_500;
98  TH1F *hBRPt500_750;
102  TH1F *hBRCHE;
103  TH1F *hBRNHE;
104  TH1F *hBRNEE;
105  TH1F *hBRneut;
106  TH2F *hBRPtvsPt;
107  TH2F *hBRCHEvsPt;
108  TH2F *hBRNHEvsPt;
109  TH2F *hBRNEEvsPt;
110  TH2F *hBRneutvsPt;
111  TH2F *hBRNEUTvsP;
112  TH2F *hBRNONLvsP;
113  TH2F *hBRHCALvsP;
114  TH2F *hBRHONLvsP;
115  TH2F *hBDEtavsPt;
116  TH2F *hBDPhivsPt;
117  TH2F *hBNCHvsPt;
118  TH1F *hBNCH;
119  TH2F *hBNCH0vsPt;
120  TH2F *hBNCH1vsPt;
121  TH2F *hBNCH2vsPt;
122  TH2F *hBNCH3vsPt;
123  TH2F *hBNCH4vsPt;
124  TH2F *hBNCH5vsPt;
125  TH2F *hBNCH6vsPt;
126  TH2F *hBNCH7vsPt;
127 
128  // delta Pt or E quantities for Endcap
129  TH1F *hERPt;
130  TH1F *hERPt20_40;
131  TH1F *hERPt40_60;
132  TH1F *hERPt60_80;
133  TH1F *hERPt80_100;
144  TH1F *hERCHE;
145  TH1F *hERNHE;
146  TH1F *hERNEE;
147  TH1F *hERneut;
148  TH2F *hERPtvsPt;
149  TH2F *hERCHEvsPt;
150  TH2F *hERNHEvsPt;
151  TH2F *hERNEEvsPt;
152  TH2F *hERneutvsPt;
153  TH2F *hERNEUTvsP;
154  TH2F *hERNONLvsP;
155  TH2F *hERHCALvsP;
156  TH2F *hERHONLvsP;
157  TH2F *hEDEtavsPt;
158  TH2F *hEDPhivsPt;
159  TH2F *hENCHvsPt;
160  TH1F *hENCH;
161  TH2F *hENCH0vsPt;
162  TH2F *hENCH1vsPt;
163  TH2F *hENCH2vsPt;
164  TH2F *hENCH3vsPt;
165  TH2F *hENCH4vsPt;
166  TH2F *hENCH5vsPt;
167  TH2F *hENCH6vsPt;
168  TH2F *hENCH7vsPt;
169 
170  // delta Pt or E quantities for Forward
171  TH1F *hFRPt;
172  TH1F *hFRPt20_40;
173  TH1F *hFRPt40_60;
174  TH1F *hFRPt60_80;
175  TH1F *hFRPt80_100;
186  TH1F *hFRCHE;
187  TH1F *hFRNHE;
188  TH1F *hFRNEE;
189  TH1F *hFRneut;
190  TH2F *hFRPtvsPt;
191  TH2F *hFRCHEvsPt;
192  TH2F *hFRNHEvsPt;
193  TH2F *hFRNEEvsPt;
194  TH2F *hFRneutvsPt;
195  TH2F *hFRNEUTvsP;
196  TH2F *hFRNONLvsP;
197  TH2F *hFRHCALvsP;
198  TH2F *hFRHONLvsP;
199  TH2F *hFDEtavsPt;
200  TH2F *hFDPhivsPt;
201  TH2F *hFNCHvsPt;
202  TH1F *hFNCH;
203  TH2F *hFNCH0vsPt;
204  TH2F *hFNCH1vsPt;
205  TH2F *hFNCH2vsPt;
206  TH2F *hFNCH3vsPt;
207  TH2F *hFNCH4vsPt;
208  TH2F *hFNCH5vsPt;
209  TH2F *hFNCH6vsPt;
210  TH2F *hFNCH7vsPt;
211 
213 
214 protected:
216  bool debug_;
219  double deltaRMax_;
220  double resPtMax_;
224  double recPt_cut;
225  double maxEta_cut;
226  unsigned int entry_;
227  DQMStore *dbe_;
228 };
229 
230 #endif // RecoParticleFlow_Benchmark_PFJetBenchmark_h
dqm::legacy::MonitorElement MonitorElement
bool onlyTwoJets
double deltaRMax
std::vector< GenJet > GenJetCollection
collection of GenJet objects
double maxEta
Jets made from PFObjects.
Definition: PFJet.h:20
unsigned int entry_
DQMStore * dbe_
virtual ~PFJetBenchmark()
void gettrue(const reco::GenJet *truth, double &true_ChargedHadEnergy, double &true_NeutralHadEnergy, double &true_NeutralEmEnergy)
TH1F * hBRPt750_1250
Jets made from MC generator particles.
Definition: GenJet.h:23
std::string outputFile_
double resPtMax() const
void setup(std::string Filename, bool debug, bool plotAgainstReco=false, bool onlyTwoJets=true, double deltaRMax=0.1, std::string benchmarkLabel_="ParticleFlow", double recPt=-1, double maxEta=-1, DQMStore *dbe_store=0)
string benchmarkLabel_
double resNeutralEmEnergyMax() const
double resNeutralHadEnergyMax() const
PFBenchmarkAlgo * algo_
void process(const reco::PFJetCollection &, const reco::GenJetCollection &)
bool plotAgainstReco
double resChargedHadEnergyMax_
#define debug
Definition: HDRShower.cc:19
double resChargedHadEnergyMax() const
std::vector< PFJet > PFJetCollection
collection of PFJet objects
double resNeutralHadEnergyMax_
void printPFJet(const reco::PFJet *)
double recPt
double resNeutralEmEnergyMax_
void printGenJet(const reco::GenJet *)
dqm::legacy::DQMStore DQMStore