CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFJetBenchmark.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_Benchmark_PFJetBenchmark_h
2 #define RecoParticleFlow_Benchmark_PFJetBenchmark_h
3 
5 
18 
21 
22 //#include "FWCore/ServiceRegistry/interface/Service.h"
24 #include "TH1F.h"
25 #include "TH2F.h"
26 #include <string>
27 #include <TFile.h>
28 #include <vector>
29 
30 
31 class PFJetBenchmark;
32 
33 class TH1F;
34 class TH2F;
35 
36 //class DQMStore; // CMSSW_2_X_X not needed here?
37 
39 
40  public:
41 
43  virtual ~PFJetBenchmark();
44 
45  void setup(
46  std::string Filename,
47  bool debug,
48  bool plotAgainstReco=0,
49  bool onlyTwoJets=1,
50  double deltaRMax=0.1,
51  std::string benchmarkLabel_ = "ParticleFlow",
52  double recPt = -1,
53  double maxEta = -1,
54  DQMStore * dbe_store = NULL
55  );
57  void gettrue (const reco::GenJet* truth, double& true_ChargedHadEnergy,
58  double& true_NeutralHadEnergy, double& true_NeutralEmEnergy);
59  void printPFJet (const reco::PFJet*);
60  void printGenJet (const reco::GenJet*);
61  double resPtMax() const {return resPtMax_;};
65 // void save();
66  void write();
67 
68  private:
69 
70  TFile *file_;
71 
72  // histograms
73  // Jets inclusive distributions (Pt > 20 GeV)
74  TH1F *hNjets;
75  TH1F *hjetsPt;
76  TH1F *hjetsEta;
77  TH2F *hRPtvsEta ;
78  TH2F *hDEtavsEta ;
79  TH2F *hDPhivsEta ;
80  TH2F *hRNeutvsEta ;
81  TH2F *hRNEUTvsEta ;
82  TH2F *hRNONLvsEta ;
83  TH2F *hRHCALvsEta ;
84  TH2F *hRHONLvsEta ;
85  TH2F *hRCHEvsEta ;
86  TH2F *hNCHvsEta;
87  TH2F* hNCH0vsEta;
88  TH2F* hNCH1vsEta;
89  TH2F* hNCH2vsEta;
90  TH2F* hNCH3vsEta;
91  TH2F* hNCH4vsEta;
92  TH2F* hNCH5vsEta;
93  TH2F* hNCH6vsEta;
94  TH2F* hNCH7vsEta;
95 
96  // delta Pt or E quantities for Barrel
97  TH1F *hBRPt;
98  TH1F *hBRPt20_40;
99  TH1F *hBRPt40_60;
100  TH1F *hBRPt60_80;
101  TH1F *hBRPt80_100;
112  TH1F *hBRCHE;
113  TH1F *hBRNHE;
114  TH1F *hBRNEE;
115  TH1F *hBRneut;
116  TH2F *hBRPtvsPt ;
117  TH2F *hBRCHEvsPt ;
118  TH2F *hBRNHEvsPt;
119  TH2F *hBRNEEvsPt;
120  TH2F *hBRneutvsPt;
121  TH2F *hBRNEUTvsP;
122  TH2F *hBRNONLvsP;
123  TH2F *hBRHCALvsP;
124  TH2F *hBRHONLvsP;
125  TH2F *hBDEtavsPt;
126  TH2F *hBDPhivsPt;
127  TH2F *hBNCHvsPt;
128  TH1F *hBNCH;
129  TH2F* hBNCH0vsPt;
130  TH2F* hBNCH1vsPt;
131  TH2F* hBNCH2vsPt;
132  TH2F* hBNCH3vsPt;
133  TH2F* hBNCH4vsPt;
134  TH2F* hBNCH5vsPt;
135  TH2F* hBNCH6vsPt;
136  TH2F* hBNCH7vsPt;
137 
138  // delta Pt or E quantities for Endcap
139  TH1F *hERPt ;
140  TH1F *hERPt20_40;
141  TH1F *hERPt40_60;
142  TH1F *hERPt60_80;
143  TH1F *hERPt80_100;
154  TH1F *hERCHE;
155  TH1F *hERNHE;
156  TH1F *hERNEE;
157  TH1F *hERneut;
158  TH2F *hERPtvsPt ;
159  TH2F *hERCHEvsPt;
160  TH2F *hERNHEvsPt ;
161  TH2F *hERNEEvsPt;
162  TH2F *hERneutvsPt;
163  TH2F *hERNEUTvsP;
164  TH2F *hERNONLvsP;
165  TH2F *hERHCALvsP;
166  TH2F *hERHONLvsP;
167  TH2F *hEDEtavsPt;
168  TH2F *hEDPhivsPt;
169  TH2F *hENCHvsPt;
170  TH1F *hENCH;
171  TH2F* hENCH0vsPt;
172  TH2F* hENCH1vsPt;
173  TH2F* hENCH2vsPt;
174  TH2F* hENCH3vsPt;
175  TH2F* hENCH4vsPt;
176  TH2F* hENCH5vsPt;
177  TH2F* hENCH6vsPt;
178  TH2F* hENCH7vsPt;
179 
180  // delta Pt or E quantities for Forward
181  TH1F *hFRPt ;
182  TH1F *hFRPt20_40;
183  TH1F *hFRPt40_60;
184  TH1F *hFRPt60_80;
185  TH1F *hFRPt80_100;
196  TH1F *hFRCHE;
197  TH1F *hFRNHE;
198  TH1F *hFRNEE;
199  TH1F *hFRneut;
200  TH2F *hFRPtvsPt ;
201  TH2F *hFRCHEvsPt;
202  TH2F *hFRNHEvsPt ;
203  TH2F *hFRNEEvsPt;
204  TH2F *hFRneutvsPt;
205  TH2F *hFRNEUTvsP;
206  TH2F *hFRNONLvsP;
207  TH2F *hFRHCALvsP;
208  TH2F *hFRHONLvsP;
209  TH2F *hFDEtavsPt;
210  TH2F *hFDPhivsPt;
211  TH2F *hFNCHvsPt;
212  TH1F *hFNCH;
213  TH2F* hFNCH0vsPt;
214  TH2F* hFNCH1vsPt;
215  TH2F* hFNCH2vsPt;
216  TH2F* hFNCH3vsPt;
217  TH2F* hFNCH4vsPt;
218  TH2F* hFNCH5vsPt;
219  TH2F* hFNCH6vsPt;
220  TH2F* hFNCH7vsPt;
221 
223  protected:
224 
226  bool debug_;
229  double deltaRMax_;
230  double resPtMax_;
234  double recPt_cut;
235  double maxEta_cut;
236  unsigned int entry_;
238 };
239 
240 #endif // RecoParticleFlow_Benchmark_PFJetBenchmark_h
bool onlyTwoJets
double deltaRMax
std::vector< GenJet > GenJetCollection
collection of GenJet objects
#define NULL
Definition: scimark2.h:8
double maxEta
Jets made from PFObjects.
Definition: PFJet.h:22
unsigned int entry_
DQMStore * dbe_
virtual ~PFJetBenchmark()
void gettrue(const reco::GenJet *truth, double &true_ChargedHadEnergy, double &true_NeutralHadEnergy, double &true_NeutralEmEnergy)
void setup(std::string Filename, bool debug, bool plotAgainstReco=0, bool onlyTwoJets=1, double deltaRMax=0.1, std::string benchmarkLabel_="ParticleFlow", double recPt=-1, double maxEta=-1, DQMStore *dbe_store=NULL)
Jets made from MC generator particles.
Definition: GenJet.h:25
std::string outputFile_
double resPtMax() const
string benchmarkLabel_
double resNeutralEmEnergyMax() const
double resNeutralHadEnergyMax() const
PFBenchmarkAlgo * algo_
void process(const reco::PFJetCollection &, const reco::GenJetCollection &)
bool plotAgainstReco
double resChargedHadEnergyMax_
double resChargedHadEnergyMax() const
std::vector< PFJet > PFJetCollection
collection of PFJet objects
double resNeutralHadEnergyMax_
void printPFJet(const reco::PFJet *)
double recPt
double resNeutralEmEnergyMax_
#define debug
Definition: MEtoEDMFormat.h:34
void printGenJet(const reco::GenJet *)