ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/interface/TtLJetsAnalyzer.h
Revision: 1.7
Committed: Tue Feb 24 23:33:21 2009 UTC (16 years, 2 months ago) by kukartse
Content type: text/plain
Branch: MAIN
Changes since 1.6: +3 -1 lines
Log Message:
*** empty log message ***

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