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 ; |
65 |
|
double electron_trackIso_max ; |
66 |
|
double electron_caloIso_max ; |
67 |
|
double met_et_min ; |
68 |
+ |
double min_dr_jet_lepton ; |
69 |
|
|
70 |
|
RooGKCounter eventCounter; |
71 |
|
RooGKCounter selectedEvents; |
72 |
|
|
66 |
– |
TFile * _file; |
73 |
|
TTree * _tree; |
74 |
|
|
75 |
|
// |
77 |
|
Int_t _event; |
78 |
|
Int_t _process_id; |
79 |
|
Int_t _n_jets; |
80 |
+ |
Int_t _n_removed_jets; |
81 |
|
Int_t _n_met; |
82 |
|
Int_t _n_muons; |
83 |
|
Int_t _n_electrons; |
87 |
|
Double_t _lepton_pt; |
88 |
|
Double_t _lepton_eta; |
89 |
|
Double_t _lepton_phi; |
90 |
+ |
Double_t _lepton_jet_min_dr; |
91 |
+ |
Double_t _lepton_ptrel; // relative to the nearest jet |
92 |
+ |
Double_t _lepton_d0; // relative to the beam spot |
93 |
+ |
Double_t _lepton_d0_err; // relative to the beam spot |
94 |
+ |
Double_t _lepton_d0_significance; // relative to the beam spot |
95 |
|
Double_t _lepton_energy; |
96 |
+ |
Double_t _lepton_track_iso; |
97 |
+ |
Double_t _lepton_calo_iso; |
98 |
+ |
Double_t _lepton_ecal_iso; |
99 |
+ |
Double_t _lepton_hcal_iso; |
100 |
+ |
Double_t _lepton_user_iso; |
101 |
+ |
Double_t _lepton_IsoDeposit_em; |
102 |
+ |
Double_t _lepton_IsoDeposit_had; |
103 |
|
Double_t _muon_track_chi2; |
104 |
|
Double_t _muon_track_ndof; |
105 |
|
Double_t _muon_track_nChi2; |
109 |
|
Double_t _muon_globalTrack_chi2; |
110 |
|
Double_t _muon_globalTrack_ndof; |
111 |
|
Double_t _muon_globalTrack_nChi2; |
93 |
– |
Double_t _lepton_track_iso; |
94 |
– |
Double_t _lepton_calo_iso; |
95 |
– |
Double_t _lepton_ecal_iso; |
96 |
– |
Double_t _lepton_hcal_iso; |
97 |
– |
Double_t _lepton_user_iso; |
112 |
|
Double_t _met_et; |
113 |
|
Double_t _met_pt; |
114 |
|
Double_t _met_eta; |
199 |
|
// |
200 |
|
// |
201 |
|
//_____ b tagging ______________________________________________ |
202 |
+ |
vector<double> * _jet_pt; |
203 |
+ |
vector<double> * _jet_pz; |
204 |
+ |
vector<double> * _jet_eta; |
205 |
+ |
vector<double> * _jet_phi; |
206 |
+ |
vector<double> * _jet_et; |
207 |
+ |
vector<double> * _jet_energy; |
208 |
+ |
vector<int> * _jet_flavor; |
209 |
+ |
// |
210 |
+ |
vector<double> * _muon_pt; |
211 |
+ |
vector<double> * _muon_pz; |
212 |
+ |
vector<double> * _muon_eta; |
213 |
+ |
vector<double> * _muon_phi; |
214 |
+ |
vector<double> * _muon_et; |
215 |
+ |
vector<double> * _muon_energy; |
216 |
+ |
vector<int> * _muon_flavor; |
217 |
+ |
// |
218 |
+ |
vector<double> * _electron_pt; |
219 |
+ |
vector<double> * _electron_pz; |
220 |
+ |
vector<double> * _electron_eta; |
221 |
+ |
vector<double> * _electron_phi; |
222 |
+ |
vector<double> * _electron_et; |
223 |
+ |
vector<double> * _electron_energy; |
224 |
+ |
vector<int> * _electron_flavor; |
225 |
+ |
/* FIXME: add vectors of these: |
226 |
+ |
Double_t _lepton_track_iso; |
227 |
+ |
Double_t _lepton_calo_iso; |
228 |
+ |
Double_t _lepton_ecal_iso; |
229 |
+ |
Double_t _lepton_hcal_iso; |
230 |
+ |
Double_t _lepton_user_iso; |
231 |
+ |
Double_t _lepton_IsoDeposit_em; |
232 |
+ |
Double_t _lepton_IsoDeposit_had; |
233 |
+ |
*/ |
234 |
+ |
TBranch * b_jet_pt; |
235 |
+ |
TBranch * b_jet_pz; |
236 |
+ |
TBranch * b_jet_eta; |
237 |
+ |
TBranch * b_jet_phi; |
238 |
+ |
TBranch * b_jet_et; |
239 |
+ |
TBranch * b_jet_energy; |
240 |
+ |
TBranch * b_jet_flavor; |
241 |
+ |
// |
242 |
+ |
TBranch * b_lepton_pt; |
243 |
+ |
TBranch * b_lepton_pz; |
244 |
+ |
TBranch * b_lepton_eta; |
245 |
+ |
TBranch * b_lepton_phi; |
246 |
+ |
TBranch * b_lepton_et; |
247 |
+ |
TBranch * b_lepton_energy; |
248 |
+ |
TBranch * b_lepton_flavor; |
249 |
+ |
TBranch * b_lepton_jet_min_dr; |
250 |
+ |
TBranch * b_lepton_ptrel; |
251 |
+ |
TBranch * b_lepton_d0; |
252 |
+ |
TBranch * b_lepton_d0_err; |
253 |
+ |
TBranch * b_lepton_d0_significance; |
254 |
+ |
// |
255 |
|
vector<string> * _b_tagger_label; |
256 |
|
vector<float> * _b_tagger_discr; |
257 |
|
TBranch * b_b_tagger_label; |
339 |
|
TBranch * b_event; |
340 |
|
TBranch * b_process_id; |
341 |
|
TBranch * b_n_jets; |
342 |
+ |
TBranch * b_n_removed_jets; |
343 |
|
TBranch * b_n_met; |
344 |
|
TBranch * b_n_muons; |
345 |
|
TBranch * b_n_electrons; |
346 |
|
TBranch * b_lepton_is_muon; |
347 |
|
TBranch * b_event_weight; |
348 |
< |
TBranch * b_lepton_et; |
349 |
< |
TBranch * b_lepton_pt; |
350 |
< |
TBranch * b_lepton_eta; |
351 |
< |
TBranch * b_lepton_phi; |
352 |
< |
TBranch * b_lepton_energy; |
348 |
> |
// |
349 |
> |
TBranch * b_muon_et; |
350 |
> |
TBranch * b_muon_pt; |
351 |
> |
TBranch * b_muon_pz; |
352 |
> |
TBranch * b_muon_eta; |
353 |
> |
TBranch * b_muon_phi; |
354 |
> |
TBranch * b_muon_energy; |
355 |
> |
TBranch * b_muon_flavor; |
356 |
> |
// |
357 |
> |
TBranch * b_electron_et; |
358 |
> |
TBranch * b_electron_pt; |
359 |
> |
TBranch * b_electron_pz; |
360 |
> |
TBranch * b_electron_eta; |
361 |
> |
TBranch * b_electron_phi; |
362 |
> |
TBranch * b_electron_energy; |
363 |
> |
TBranch * b_electron_flavor; |
364 |
> |
// |
365 |
|
TBranch * b_muon_track_chi2; |
366 |
|
TBranch * b_muon_track_ndof; |
367 |
|
TBranch * b_muon_track_nChi2; |
376 |
|
TBranch * b_lepton_ecal_iso; |
377 |
|
TBranch * b_lepton_hcal_iso; |
378 |
|
TBranch * b_lepton_user_iso; |
379 |
+ |
TBranch * b_lepton_IsoDeposit_em; |
380 |
+ |
TBranch * b_lepton_IsoDeposit_had; |
381 |
|
TBranch * b_met_et; |
382 |
|
TBranch * b_met_pt; |
383 |
|
TBranch * b_met_eta; |