ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/interface/TtLJetsAnalyzer.h
Revision: 1.4
Committed: Wed Dec 10 16:44:48 2008 UTC (16 years, 5 months ago) by kukartse
Content type: text/plain
Branch: MAIN
CVS Tags: V00-00-06, V00-00-05, V00-00-04, V00-01-03, V00-00-02, V00-00-01
Changes since 1.3: +90 -34 lines
Log Message:
updates to the TtLJetsAnalyzer

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