17 |
|
// |
18 |
|
// |
19 |
|
|
20 |
+ |
#include "DataFormats/BeamSpot/interface/BeamSpot.h" |
21 |
+ |
|
22 |
|
#include "LJMet/MultivariateAnalysis/interface/RooGKCounter.h" |
23 |
|
|
24 |
|
#include <memory> |
25 |
|
#include <string> |
26 |
< |
#include "TFile.h" |
26 |
> |
//#include "TFile.h" |
27 |
|
#include "TTree.h" |
28 |
|
#include "Rtypes.h" |
29 |
|
#include "FWCore/Framework/interface/Frameworkfwd.h" |
32 |
|
#include "FWCore/Framework/interface/MakerMacros.h" |
33 |
|
#include "FWCore/ParameterSet/interface/ParameterSet.h" |
34 |
|
|
35 |
+ |
#include "DataFormats/Math/interface/LorentzVector.h" |
36 |
+ |
#include "DataFormats/Common/interface/View.h" |
37 |
+ |
#include "DataFormats/PatCandidates/interface/Electron.h" |
38 |
+ |
#include "DataFormats/TrackReco/interface/Track.h" |
39 |
+ |
|
40 |
|
class TtLJetsAnalyzer : public edm::EDAnalyzer { |
41 |
|
public: |
42 |
|
explicit TtLJetsAnalyzer(const edm::ParameterSet&); |
49 |
|
virtual void analyze(const edm::Event&, const edm::EventSetup&); |
50 |
|
virtual void endJob(void); |
51 |
|
|
52 |
+ |
// returns pair<dist,dcot> |
53 |
+ |
pair<float, float> getConversionInfo(const pat::Electron & el, |
54 |
+ |
const reco::Track & track, |
55 |
+ |
const reco::BeamSpot::Point _bs, |
56 |
+ |
float bField); |
57 |
+ |
|
58 |
+ |
bool ConversionAlgo(const pat::Electron& e, edm::Handle<edm::View<reco::Track> > track_h); |
59 |
+ |
double DelRTrackEle(const pat::Electron& e,const reco::Track& tk); |
60 |
+ |
|
61 |
+ |
bool first_event; |
62 |
+ |
|
63 |
|
// _____ quantities read from the config file _________________________ |
64 |
< |
std::string _jetSource, _electronSource, _muonSource, _METSource; |
64 |
> |
std::string _jetSource, _electronSource, _muonSource, _METSource, |
65 |
> |
_beamSpotSource, _trigger_source, _track_source; |
66 |
> |
std::string pdfWeightTag_; |
67 |
> |
bool _lepton_flavor_is_muon; |
68 |
|
std::string _outFile; |
69 |
|
bool _is_mc; |
70 |
|
int nCaloJets_min; |
81 |
|
double electron_caloIso_max ; |
82 |
|
double met_et_min ; |
83 |
|
double min_dr_jet_lepton ; |
84 |
+ |
double _bfield; |
85 |
+ |
double _dist_min; |
86 |
+ |
double _dist_max; |
87 |
+ |
double _abs_dcot_max; |
88 |
+ |
double _e_track_dr; |
89 |
|
|
90 |
|
RooGKCounter eventCounter; |
91 |
|
RooGKCounter selectedEvents; |
92 |
|
|
67 |
– |
TFile * _file; |
93 |
|
TTree * _tree; |
94 |
|
|
95 |
|
// |
96 |
|
// _____ output tree variables ________________________________________ |
97 |
< |
Int_t _event; |
97 |
> |
// |
98 |
> |
Int_t _event, ilumi, irun; |
99 |
|
Int_t _process_id; |
100 |
|
Int_t _n_jets; |
101 |
|
Int_t _n_removed_jets; |
103 |
|
Int_t _n_muons; |
104 |
|
Int_t _n_electrons; |
105 |
|
Int_t _lepton_is_muon; |
106 |
+ |
// |
107 |
+ |
//_____ photon conversion _____________________________________________ |
108 |
+ |
// |
109 |
+ |
vector<double> * _e_dist; |
110 |
+ |
vector<double> * _e_dcot; |
111 |
+ |
bool _is_conv; |
112 |
+ |
// |
113 |
+ |
//_____ PDF weights ___________________________________________________ |
114 |
+ |
// |
115 |
+ |
vector<double> * _pdf_weights; |
116 |
+ |
Double_t _weight_pdf_pos; |
117 |
+ |
Double_t _weight_pdf_neg; |
118 |
+ |
// |
119 |
+ |
//_____ trigger _______________________________________________________ |
120 |
+ |
// |
121 |
+ |
std::map<std::string,bool> _hlt; |
122 |
+ |
//vector<TBranch> b_hlt; |
123 |
+ |
// |
124 |
|
Double_t _event_weight; |
125 |
|
Double_t _lepton_et; |
126 |
|
Double_t _lepton_pt; |
127 |
|
Double_t _lepton_eta; |
128 |
|
Double_t _lepton_phi; |
129 |
+ |
Double_t _lepton_jet_min_dr; |
130 |
+ |
Double_t _lepton_ptrel; // relative to the nearest jet |
131 |
+ |
Double_t _lepton_d0; // relative to the beam spot |
132 |
+ |
Double_t _lepton_d0_err; // relative to the beam spot |
133 |
+ |
Double_t _lepton_d0_significance; // relative to the beam spot |
134 |
|
Double_t _lepton_energy; |
135 |
+ |
Double_t _lepton_track_iso; |
136 |
+ |
Double_t _lepton_calo_iso; |
137 |
+ |
Double_t _lepton_ecal_iso; |
138 |
+ |
Double_t _lepton_hcal_iso; |
139 |
+ |
Double_t _lepton_user_iso; |
140 |
+ |
Double_t _lepton_IsoDeposit_em; |
141 |
+ |
Double_t _lepton_IsoDeposit_had; |
142 |
+ |
Int_t _muon_track_nhits; |
143 |
|
Double_t _muon_track_chi2; |
144 |
|
Double_t _muon_track_ndof; |
145 |
|
Double_t _muon_track_nChi2; |
149 |
|
Double_t _muon_globalTrack_chi2; |
150 |
|
Double_t _muon_globalTrack_ndof; |
151 |
|
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; |
100 |
– |
Double_t _lepton_IsoDeposit_em; |
101 |
– |
Double_t _lepton_IsoDeposit_had; |
152 |
|
Double_t _met_et; |
153 |
|
Double_t _met_pt; |
154 |
|
Double_t _met_eta; |
286 |
|
TBranch * b_lepton_et; |
287 |
|
TBranch * b_lepton_energy; |
288 |
|
TBranch * b_lepton_flavor; |
289 |
+ |
TBranch * b_lepton_jet_min_dr; |
290 |
+ |
TBranch * b_lepton_ptrel; |
291 |
+ |
TBranch * b_lepton_d0; |
292 |
+ |
TBranch * b_lepton_d0_err; |
293 |
+ |
TBranch * b_lepton_d0_significance; |
294 |
|
// |
295 |
|
vector<string> * _b_tagger_label; |
296 |
|
vector<float> * _b_tagger_discr; |