17 |
|
// |
18 |
|
// |
19 |
|
|
20 |
+ |
#include "LJMet/MultivariateAnalysis/interface/RooGKCounter.h" |
21 |
+ |
|
22 |
|
#include <memory> |
23 |
|
#include <string> |
24 |
< |
|
24 |
> |
//#include "TFile.h" |
25 |
> |
#include "TTree.h" |
26 |
> |
#include "Rtypes.h" |
27 |
|
#include "FWCore/Framework/interface/Frameworkfwd.h" |
28 |
|
#include "FWCore/Framework/interface/EDAnalyzer.h" |
29 |
|
#include "FWCore/Framework/interface/Event.h" |
30 |
|
#include "FWCore/Framework/interface/MakerMacros.h" |
31 |
|
#include "FWCore/ParameterSet/interface/ParameterSet.h" |
28 |
– |
#include "LJMet/MultivariateAnalysis/interface/RooGKCounter.h" |
32 |
|
|
33 |
< |
#include "TFile.h" |
34 |
< |
#include "TTree.h" |
32 |
< |
#include "Rtypes.h" |
33 |
> |
#include "FWCore/ServiceRegistry/interface/Service.h" |
34 |
> |
#include "PhysicsTools/UtilAlgos/interface/TFileService.h" |
35 |
|
|
36 |
|
class TtLJetsAnalyzer : public edm::EDAnalyzer { |
37 |
|
public: |
45 |
|
virtual void analyze(const edm::Event&, const edm::EventSetup&); |
46 |
|
virtual void endJob(void); |
47 |
|
|
48 |
+ |
edm::Service<TFileService> fs; |
49 |
+ |
|
50 |
|
// _____ quantities read from the config file _________________________ |
51 |
< |
std::string _jetSource, _electronSource, _muonSource, _METSource; |
51 |
> |
std::string _jetSource, _electronSource, _muonSource, _METSource, _beamSpotSource; |
52 |
> |
bool _lepton_flavor_is_muon; |
53 |
|
std::string _outFile; |
54 |
+ |
bool _is_mc; |
55 |
|
int nCaloJets_min; |
56 |
|
int nLepton_min; |
57 |
|
double jet_pt_min ; |
70 |
|
RooGKCounter eventCounter; |
71 |
|
RooGKCounter selectedEvents; |
72 |
|
|
67 |
– |
TFile * _file; |
73 |
|
TTree * _tree; |
74 |
|
|
75 |
|
// |
87 |
|
Double_t _lepton_pt; |
88 |
|
Double_t _lepton_eta; |
89 |
|
Double_t _lepton_phi; |
90 |
+ |
Double_t _lepton_ptrel; // relative to the nearest jet |
91 |
+ |
Double_t _lepton_d0; // relative to the beam spot |
92 |
+ |
Double_t _lepton_d0_err; // relative to the beam spot |
93 |
+ |
Double_t _lepton_d0_significance; // relative to the beam spot |
94 |
|
Double_t _lepton_energy; |
95 |
+ |
Double_t _lepton_track_iso; |
96 |
+ |
Double_t _lepton_calo_iso; |
97 |
+ |
Double_t _lepton_ecal_iso; |
98 |
+ |
Double_t _lepton_hcal_iso; |
99 |
+ |
Double_t _lepton_user_iso; |
100 |
+ |
Double_t _lepton_IsoDeposit_em; |
101 |
+ |
Double_t _lepton_IsoDeposit_had; |
102 |
|
Double_t _muon_track_chi2; |
103 |
|
Double_t _muon_track_ndof; |
104 |
|
Double_t _muon_track_nChi2; |
108 |
|
Double_t _muon_globalTrack_chi2; |
109 |
|
Double_t _muon_globalTrack_ndof; |
110 |
|
Double_t _muon_globalTrack_nChi2; |
95 |
– |
Double_t _lepton_track_iso; |
96 |
– |
Double_t _lepton_calo_iso; |
97 |
– |
Double_t _lepton_ecal_iso; |
98 |
– |
Double_t _lepton_hcal_iso; |
99 |
– |
Double_t _lepton_user_iso; |
111 |
|
Double_t _met_et; |
112 |
|
Double_t _met_pt; |
113 |
|
Double_t _met_eta; |
198 |
|
// |
199 |
|
// |
200 |
|
//_____ b tagging ______________________________________________ |
201 |
+ |
vector<double> * _jet_pt; |
202 |
+ |
vector<double> * _jet_pz; |
203 |
+ |
vector<double> * _jet_eta; |
204 |
+ |
vector<double> * _jet_phi; |
205 |
+ |
vector<double> * _jet_et; |
206 |
+ |
vector<double> * _jet_energy; |
207 |
+ |
vector<int> * _jet_flavor; |
208 |
+ |
// |
209 |
+ |
vector<double> * _muon_pt; |
210 |
+ |
vector<double> * _muon_pz; |
211 |
+ |
vector<double> * _muon_eta; |
212 |
+ |
vector<double> * _muon_phi; |
213 |
+ |
vector<double> * _muon_et; |
214 |
+ |
vector<double> * _muon_energy; |
215 |
+ |
vector<int> * _muon_flavor; |
216 |
+ |
// |
217 |
+ |
vector<double> * _electron_pt; |
218 |
+ |
vector<double> * _electron_pz; |
219 |
+ |
vector<double> * _electron_eta; |
220 |
+ |
vector<double> * _electron_phi; |
221 |
+ |
vector<double> * _electron_et; |
222 |
+ |
vector<double> * _electron_energy; |
223 |
+ |
vector<int> * _electron_flavor; |
224 |
+ |
/* FIXME: add vectors of these: |
225 |
+ |
Double_t _lepton_track_iso; |
226 |
+ |
Double_t _lepton_calo_iso; |
227 |
+ |
Double_t _lepton_ecal_iso; |
228 |
+ |
Double_t _lepton_hcal_iso; |
229 |
+ |
Double_t _lepton_user_iso; |
230 |
+ |
Double_t _lepton_IsoDeposit_em; |
231 |
+ |
Double_t _lepton_IsoDeposit_had; |
232 |
+ |
*/ |
233 |
+ |
TBranch * b_jet_pt; |
234 |
+ |
TBranch * b_jet_pz; |
235 |
+ |
TBranch * b_jet_eta; |
236 |
+ |
TBranch * b_jet_phi; |
237 |
+ |
TBranch * b_jet_et; |
238 |
+ |
TBranch * b_jet_energy; |
239 |
+ |
TBranch * b_jet_flavor; |
240 |
+ |
// |
241 |
+ |
TBranch * b_lepton_pt; |
242 |
+ |
TBranch * b_lepton_pz; |
243 |
+ |
TBranch * b_lepton_eta; |
244 |
+ |
TBranch * b_lepton_phi; |
245 |
+ |
TBranch * b_lepton_et; |
246 |
+ |
TBranch * b_lepton_energy; |
247 |
+ |
TBranch * b_lepton_flavor; |
248 |
+ |
// |
249 |
|
vector<string> * _b_tagger_label; |
250 |
|
vector<float> * _b_tagger_discr; |
251 |
|
TBranch * b_b_tagger_label; |
333 |
|
TBranch * b_event; |
334 |
|
TBranch * b_process_id; |
335 |
|
TBranch * b_n_jets; |
336 |
+ |
TBranch * b_n_removed_jets; |
337 |
|
TBranch * b_n_met; |
338 |
|
TBranch * b_n_muons; |
339 |
|
TBranch * b_n_electrons; |
340 |
|
TBranch * b_lepton_is_muon; |
341 |
|
TBranch * b_event_weight; |
342 |
< |
TBranch * b_lepton_et; |
343 |
< |
TBranch * b_lepton_pt; |
344 |
< |
TBranch * b_lepton_eta; |
345 |
< |
TBranch * b_lepton_phi; |
346 |
< |
TBranch * b_lepton_energy; |
342 |
> |
// |
343 |
> |
TBranch * b_muon_et; |
344 |
> |
TBranch * b_muon_pt; |
345 |
> |
TBranch * b_muon_pz; |
346 |
> |
TBranch * b_muon_eta; |
347 |
> |
TBranch * b_muon_phi; |
348 |
> |
TBranch * b_muon_energy; |
349 |
> |
TBranch * b_muon_flavor; |
350 |
> |
// |
351 |
> |
TBranch * b_electron_et; |
352 |
> |
TBranch * b_electron_pt; |
353 |
> |
TBranch * b_electron_pz; |
354 |
> |
TBranch * b_electron_eta; |
355 |
> |
TBranch * b_electron_phi; |
356 |
> |
TBranch * b_electron_energy; |
357 |
> |
TBranch * b_electron_flavor; |
358 |
> |
// |
359 |
|
TBranch * b_muon_track_chi2; |
360 |
|
TBranch * b_muon_track_ndof; |
361 |
|
TBranch * b_muon_track_nChi2; |
370 |
|
TBranch * b_lepton_ecal_iso; |
371 |
|
TBranch * b_lepton_hcal_iso; |
372 |
|
TBranch * b_lepton_user_iso; |
373 |
+ |
TBranch * b_lepton_IsoDeposit_em; |
374 |
+ |
TBranch * b_lepton_IsoDeposit_had; |
375 |
|
TBranch * b_met_et; |
376 |
|
TBranch * b_met_pt; |
377 |
|
TBranch * b_met_eta; |