ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/interface/TtLJetsAnalyzer.h
Revision: 1.6
Committed: Tue Jan 27 20:50:49 2009 UTC (16 years, 3 months ago) by jindal
Content type: text/plain
Branch: MAIN
CVS Tags: gak022309, gak021209, gak040209, gak012809, V00-01-09
Changes since 1.5: +2 -2 lines
Log Message:
changing selection cut from jet_et to jet_pt

File Contents

# Content
1 // -*- C++ -*-
2 //
3 // Package: TtLJetsAnalyzer
4 // Class: TtLJetsAnalyzer
5 //
6 /**\class TtLJetsAnalyzer TtLJetsAnalyzer.cc RecoBTag/TtLJetsAnalyzer/src/TtLJetsAnalyzer.cc
7
8 Description: Likelihood variables for ttbar events
9
10 Implementation:
11 Ttbar cross section without b tagging. Likelihood quantities.
12 */
13 //
14 // Original Author: Gena Kukartsev, kukarzev@fnal.gov
15 // Created: Fri Jun 20 06:19:59 CDT 2008
16 // $Id: TtLJetsAnalyzer.h,v 1.5 2008/12/19 07:32:06 kukartse Exp $
17 //
18 //
19
20 #include <memory>
21 #include <string>
22
23 #include "FWCore/Framework/interface/Frameworkfwd.h"
24 #include "FWCore/Framework/interface/EDAnalyzer.h"
25 #include "FWCore/Framework/interface/Event.h"
26 #include "FWCore/Framework/interface/MakerMacros.h"
27 #include "FWCore/ParameterSet/interface/ParameterSet.h"
28 #include "LJMet/MultivariateAnalysis/interface/RooGKCounter.h"
29
30 #include "TFile.h"
31 #include "TTree.h"
32 #include "Rtypes.h"
33
34 class TtLJetsAnalyzer : public edm::EDAnalyzer {
35 public:
36 explicit TtLJetsAnalyzer(const edm::ParameterSet&);
37 ~TtLJetsAnalyzer();
38
39
40 private:
41
42 virtual void beginJob(const edm::EventSetup&);
43 virtual void analyze(const edm::Event&, const edm::EventSetup&);
44 virtual void endJob(void);
45
46 // _____ quantities read from the config file _________________________
47 std::string _jetSource, _electronSource, _muonSource, _METSource;
48 std::string _outFile;
49 int nCaloJets_min;
50 int nLepton_min;
51 double jet_pt_min ;
52 double jet_eta_max ;
53 double muon_pt_min ;
54 double muon_eta_max ;
55 double muon_trackIso_max ;
56 double muon_caloIso_max ;
57 double electron_pt_min ;
58 double electron_eta_max ;
59 double electron_trackIso_max ;
60 double electron_caloIso_max ;
61 double met_et_min ;
62
63 RooGKCounter eventCounter;
64 RooGKCounter selectedEvents;
65
66 TFile * _file;
67 TTree * _tree;
68
69 //
70 // _____ output tree variables ________________________________________
71 Int_t _event;
72 Int_t _process_id;
73 Int_t _n_jets;
74 Int_t _n_met;
75 Int_t _n_muons;
76 Int_t _n_electrons;
77 Int_t _lepton_is_muon;
78 Double_t _event_weight;
79 Double_t _lepton_et;
80 Double_t _lepton_pt;
81 Double_t _lepton_eta;
82 Double_t _lepton_phi;
83 Double_t _lepton_energy;
84 Double_t _muon_track_chi2;
85 Double_t _muon_track_ndof;
86 Double_t _muon_track_nChi2;
87 Double_t _muon_outerTrack_chi2;
88 Double_t _muon_outerTrack_ndof;
89 Double_t _muon_outerTrack_nChi2;
90 Double_t _muon_globalTrack_chi2;
91 Double_t _muon_globalTrack_ndof;
92 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;
98 Double_t _met_et;
99 Double_t _met_pt;
100 Double_t _met_eta;
101 Double_t _met_phi;
102 Double_t _met_energy;
103 Double_t _jet1_et;
104 Double_t _jet1_pt;
105 Double_t _jet1_eta;
106 Double_t _jet1_phi;
107 Double_t _jet1_energy;
108 Double_t _jet2_et;
109 Double_t _jet2_pt;
110 Double_t _jet2_eta;
111 Double_t _jet2_phi;
112 Double_t _jet2_energy;
113 Double_t _jet3_et;
114 Double_t _jet3_pt;
115 Double_t _jet3_eta;
116 Double_t _jet3_phi;
117 Double_t _jet3_energy;
118 Double_t _jet4_et;
119 Double_t _jet4_pt;
120 Double_t _jet4_eta;
121 Double_t _jet4_phi;
122 Double_t _jet4_energy;
123 Double_t _aplanarity ;
124 Double_t _centrality ;
125 Double_t _sphericity ;
126 Double_t _ht ;
127 Double_t _htPlusLepton ;
128 Double_t _metHtPlusLepton ;
129 Double_t _h ;
130 Double_t _ktMinPrime ;
131 Double_t _dPhiLMet ;
132 Double_t _minDijetMass ;
133 Double_t _maxJetEta ;
134 Double_t _et3 ;
135 Double_t _minDiJetDeltaR ;
136 Double_t _leptonJetDeltaR ;
137 Double_t _ht2p ;
138 Double_t _jet1Jet2DeltaR ;
139 Double_t _jet1Jet2DeltaPhi ;
140 Double_t _jet1Jet2_M ;
141 Double_t _jet1Jet2_Pt ;
142 Double_t _jet1Jet2W_M ;
143 Double_t _jet1Jet2W_Pt ;
144 Double_t _hz ;
145 Double_t _HT2 ;
146 Double_t _HT2prime ;
147 Double_t _W_MT ;
148 Double_t _W_M ;
149 Double_t _W_Pt ;
150 Double_t _DphiJMET ;
151 // Ht
152 Double_t _getHt ;
153 Double_t _getHtp ;
154 Double_t _getHtpp ;
155 Double_t _getHt2 ;
156 Double_t _getHt2p ;
157 Double_t _getHt2pp ;
158 Double_t _getHt3 ;
159 Double_t _getHt3p ;
160 Double_t _getHt3pp ;
161 Double_t _getCen ;
162 Double_t _getNJW ;
163 Double_t _getJetEtaMax ;
164 Double_t _getMdijetMin ;
165 Double_t _getMtjets ;
166 Double_t _getSqrtsT ;
167 Double_t _getMtAurelio ;
168 Double_t _getPzOverHT ;
169 Double_t _getMevent ;
170 Double_t _getM123inv ;
171 Double_t _getEta2Sum ;
172 Double_t _getMwRec ;
173 Double_t _getH ;
174 // event topo
175 Double_t _getSph ;
176 Double_t _getApl ;
177 Double_t _getAplMu ;
178 // Kt
179 Double_t _getKtminp ;
180 Double_t _getKtminpReduced ;
181 Double_t _getDrMinJetJet ;
182 // mT
183 Double_t _getDphiMuMet ;
184 Double_t _getMt ;
185 //
186 //
187 //_____ b tagging ______________________________________________
188 vector<string> * _b_tagger_label;
189 vector<float> * _b_tagger_discr;
190 TBranch * b_b_tagger_label;
191 TBranch * b_b_tagger_discr;
192 Int_t _n_tagged_jets_trackCounting_loose;
193 Int_t _n_tagged_jets_trackCounting_medium;
194 Int_t _n_tagged_jets_trackCounting_tight;
195 Int_t _n_tagged_jets_jetProb_loose;
196 Int_t _n_tagged_jets_jetProb_medium;
197 Int_t _n_tagged_jets_jetProb_tight;
198
199 //
200 //
201 //_____ electron quality _______________________________________
202 Float_t _eidLoose;
203 Float_t _eidRobustHighEnergy;
204 Float_t _eidRobustLoose;
205 Float_t _eidRobustTight;
206 Float_t _eidTight;
207 Int_t _GsfElectron_classification;
208 Double_t _GsfElectron_hadronicOverEm;
209 Double_t _GsfElectron_caloEnergyError;
210 Double_t _GsfElectron_trackMomentumError;
211 Int_t _GsfElectron_numberOfClusters;
212 Double_t _GsfElectron_caloEnergy; // the super cluster energy corrected by EnergyScaleFactor
213 Double_t _GsfElectron_eSuperClusterOverP; // the supercluster energy / track momentum at impact point
214 Double_t _GsfElectron_eSeedClusterOverPout; // the seed cluster energy / track momentum at calo from outermost state
215 Double_t _GsfElectron_deltaEtaSuperClusterTrackAtVtx; // the supercluster eta - track eta from helix extrapolation from impact point
216 Double_t _GsfElectron_deltaEtaSeedClusterTrackAtCalo; // the seed cluster eta - track eta at calo from outermost state
217 Double_t _GsfElectron_deltaPhiSuperClusterTrackAtVtx; // the supercluster phi - track phi from helix extrapolation from impact point
218 Double_t _GsfElectron_deltaPhiSeedClusterTrackAtCalo; // the seed cluster phi - track phi at calo from outermost state
219 // ____ branches
220 TBranch * b_eidLoose;
221 TBranch * b_eidRobustHighEnergy;
222 TBranch * b_eidRobustLoose;
223 TBranch * b_eidRobustTight;
224 TBranch * b_eidTight;
225 TBranch * b_GsfElectron_classification;
226 TBranch * b_GsfElectron_hadronicOverEm;
227 TBranch * b_GsfElectron_caloEnergyError;
228 TBranch * b_GsfElectron_trackMomentumError;
229 TBranch * b_GsfElectron_numberOfClusters;
230 TBranch * b_GsfElectron_caloEnergy; // the super cluster energy corrected by EnergyScaleFactor
231 TBranch * b_GsfElectron_eSuperClusterOverP; // the supercluster energy / track momentum at impact point
232 TBranch * b_GsfElectron_eSeedClusterOverPout; // the seed cluster energy / track momentum at calo from outermost state
233 TBranch * b_GsfElectron_deltaEtaSuperClusterTrackAtVtx; // the supercluster eta - track eta from helix extrapolation from impact point
234 TBranch * b_GsfElectron_deltaEtaSeedClusterTrackAtCalo; // the seed cluster eta - track eta at calo from outermost state
235 TBranch * b_GsfElectron_deltaPhiSuperClusterTrackAtVtx; // the supercluster phi - track phi from helix extrapolation from impact point
236 TBranch * b_GsfElectron_deltaPhiSeedClusterTrackAtCalo; // the seed cluster phi - track phi at calo from outermost state
237 //
238 //
239 //_____ muon quality _______________________________________
240 bool _muon_isGood_All; // dummy options - always true
241 bool _muon_isGood_AllGlobalMuons; // checks isGlobalMuon flag
242 bool _muon_isGood_AllStandAloneMuons; // checks isStandAloneMuon flag
243 bool _muon_isGood_AllTrackerMuons; // checks isTrackerMuon flag
244 bool _muon_isGood_TrackerMuonArbitrated; // resolve ambiguity of sharing segments
245 bool _muon_isGood_AllArbitrated; // all muons with the tracker muon arbitrated
246 bool _muon_isGood_GlobalMuonPromptTight; // global muons with tighter fit requirements
247 bool _muon_isGood_TMLastStationLoose; // penetration depth loose selector
248 bool _muon_isGood_TMLastStationTight; // penetration depth tight selector
249 bool _muon_isGood_TM2DCompatibilityLoose; // likelihood based loose selector
250 bool _muon_isGood_TM2DCompatibilityTight; // likelihood based tight selector
251 bool _muon_isGood_TMOneStationLoose; // require one well matched segment
252 bool _muon_isGood_TMOneStationTight; // require one well matched segment
253 bool _muon_isGood_TMLastStationOptimizedLowPtLoose; // combination of TMLastStation and TMOneStation
254 bool _muon_isGood_TMLastStationOptimizedLowPtTight; // combination of TMLastStation and TMOneStation
255 //____ branches
256 TBranch * b_muon_isGood_All; // dummy options - always true
257 TBranch * b_muon_isGood_AllGlobalMuons; // checks isGlobalMuon flag
258 TBranch * b_muon_isGood_AllStandAloneMuons; // checks isStandAloneMuon flag
259 TBranch * b_muon_isGood_AllTrackerMuons; // checks isTrackerMuon flag
260 TBranch * b_muon_isGood_TrackerMuonArbitrated; // resolve ambiguity of sharing segments
261 TBranch * b_muon_isGood_AllArbitrated; // all muons with the tracker muon arbitrated
262 TBranch * b_muon_isGood_GlobalMuonPromptTight; // global muons with tighter fit requirements
263 TBranch * b_muon_isGood_TMLastStationLoose; // penetration depth loose selector
264 TBranch * b_muon_isGood_TMLastStationTight; // penetration depth tight selector
265 TBranch * b_muon_isGood_TM2DCompatibilityLoose; // likelihood based loose selector
266 TBranch * b_muon_isGood_TM2DCompatibilityTight; // likelihood based tight selector
267 TBranch * b_muon_isGood_TMOneStationLoose; // require one well matched segment
268 TBranch * b_muon_isGood_TMOneStationTight; // require one well matched segment
269 TBranch * b_muon_isGood_TMLastStationOptimizedLowPtLoose; // combination of TMLastStation and TMOneStation
270 TBranch * b_muon_isGood_TMLastStationOptimizedLowPtTight; // combination of TMLastStation and TMOneStation
271 //____ output tree variables
272 TBranch * b_event;
273 TBranch * b_process_id;
274 TBranch * b_n_jets;
275 TBranch * b_n_met;
276 TBranch * b_n_muons;
277 TBranch * b_n_electrons;
278 TBranch * b_lepton_is_muon;
279 TBranch * b_event_weight;
280 TBranch * b_lepton_et;
281 TBranch * b_lepton_pt;
282 TBranch * b_lepton_eta;
283 TBranch * b_lepton_phi;
284 TBranch * b_lepton_energy;
285 TBranch * b_muon_track_chi2;
286 TBranch * b_muon_track_ndof;
287 TBranch * b_muon_track_nChi2;
288 TBranch * b_muon_outerTrack_chi2;
289 TBranch * b_muon_outerTrack_ndof;
290 TBranch * b_muon_outerTrack_nChi2;
291 TBranch * b_muon_globalTrack_chi2;
292 TBranch * b_muon_globalTrack_ndof;
293 TBranch * b_muon_globalTrack_nChi2;
294 TBranch * b_lepton_track_iso;
295 TBranch * b_lepton_calo_iso;
296 TBranch * b_lepton_ecal_iso;
297 TBranch * b_lepton_hcal_iso;
298 TBranch * b_lepton_user_iso;
299 TBranch * b_met_et;
300 TBranch * b_met_pt;
301 TBranch * b_met_eta;
302 TBranch * b_met_phi;
303 TBranch * b_met_energy;
304 TBranch * b_jet1_et;
305 TBranch * b_jet1_pt;
306 TBranch * b_jet1_eta;
307 TBranch * b_jet1_phi;
308 TBranch * b_jet1_energy;
309 TBranch * b_jet2_et;
310 TBranch * b_jet2_pt;
311 TBranch * b_jet2_eta;
312 TBranch * b_jet2_phi;
313 TBranch * b_jet2_energy;
314 TBranch * b_jet3_et;
315 TBranch * b_jet3_pt;
316 TBranch * b_jet3_eta;
317 TBranch * b_jet3_phi;
318 TBranch * b_jet3_energy;
319 TBranch * b_jet4_et;
320 TBranch * b_jet4_pt;
321 TBranch * b_jet4_eta;
322 TBranch * b_jet4_phi;
323 TBranch * b_jet4_energy;
324 TBranch * b_n_tagged_jets_trackCounting_loose;
325 TBranch * b_n_tagged_jets_trackCounting_medium;
326 TBranch * b_n_tagged_jets_trackCounting_tight;
327 TBranch * b_n_tagged_jets_jetProb_loose;
328 TBranch * b_n_tagged_jets_jetProb_medium;
329 TBranch * b_n_tagged_jets_jetProb_tight;
330 // ____
331 TBranch * b_aplanarity ;
332 TBranch * b_centrality ;
333 TBranch * b_sphericity ;
334 TBranch * b_ht ;
335 TBranch * b_htPlusLepton ;
336 TBranch * b_metHtPlusLepton ;
337 TBranch * b_h ;
338 TBranch * b_ktMinPrime ;
339 TBranch * b_dPhiLMet ;
340 TBranch * b_minDijetMass ;
341 TBranch * b_maxJetEta ;
342 TBranch * b_et3 ;
343 TBranch * b_minDiJetDeltaR ;
344 TBranch * b_leptonJetDeltaR ;
345 TBranch * b_ht2p ;
346 TBranch * b_jet1Jet2DeltaR ;
347 TBranch * b_jet1Jet2DeltaPhi ;
348 TBranch * b_jet1Jet2_M ;
349 TBranch * b_jet1Jet2_Pt ;
350 TBranch * b_jet1Jet2W_M ;
351 TBranch * b_jet1Jet2W_Pt ;
352 TBranch * b_hz ;
353 TBranch * b_HT2;
354 TBranch * b_HT2prime;
355 TBranch * b_W_MT;
356 TBranch * b_W_M ;
357 TBranch * b_W_Pt ;
358 TBranch * b_DphiJMET ;
359 // Ht
360 TBranch * b_getHt ;
361 TBranch * b_getHtp ;
362 TBranch * b_getHtpp ;
363 TBranch * b_getHt2 ;
364 TBranch * b_getHt2p ;
365 TBranch * b_getHt2pp ;
366 TBranch * b_getHt3 ;
367 TBranch * b_getHt3p ;
368 TBranch * b_getHt3pp ;
369 TBranch * b_getCen ;
370 TBranch * b_getNJW ;
371 TBranch * b_getJetEtaMax ;
372 TBranch * b_getMdijetMin ;
373 TBranch * b_getMtjets ;
374 TBranch * b_getSqrtsT ;
375 TBranch * b_getMtAurelio ;
376 TBranch * b_getPzOverHT ;
377 TBranch * b_getMevent ;
378 TBranch * b_getM123inv ;
379 TBranch * b_getEta2Sum ;
380 TBranch * b_getMwRec ;
381 TBranch * b_getH ;
382 // event topo
383 TBranch * b_getSph ;
384 TBranch * b_getApl ;
385 TBranch * b_getAplMu ;
386 // Kt
387 TBranch * b_getKtminp ;
388 TBranch * b_getKtminpReduced ;
389 TBranch * b_getDrMinJetJet ;
390 // mT
391 TBranch * b_getDphiMuMet ;
392 TBranch * b_getMt ;
393
394
395 };