ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/interface/TtLJetsAnalyzer.h
Revision: 1.3
Committed: Thu Nov 20 22:34:48 2008 UTC (16 years, 5 months ago) by kukartse
Content type: text/plain
Branch: MAIN
Changes since 1.2: +19 -7 lines
Log Message:
created /macros with TMVA scripts in it

File Contents

# User Rev Content
1 kukartse 1.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 kukartse 1.3 // $Id: TtLJetsAnalyzer.h,v 1.2 2008/11/20 17:27:21 kukartse Exp $
17 kukartse 1.1 //
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     std::string _jetSource, _electronSource, _muonSource, _METSource;
42     std::string _outFile;
43     int nCaloJets_min;
44     int nLepton_min;
45     double jet_pt_min ;
46     double jet_eta_max ;
47     double muon_pt_min ;
48     double muon_eta_max ;
49     double muon_trackIso_max ;
50     double muon_caloIso_max ;
51     double electron_pt_min ;
52     double electron_eta_max ;
53     double electron_trackIso_max ;
54     double electron_caloIso_max ;
55     double met_et_min ;
56    
57     RooGKCounter eventCounter;
58     RooGKCounter selectedEvents;
59    
60     TFile * _file;
61     TTree * _tree;
62    
63     Int_t _event;
64     Int_t _process_id;
65     Int_t _n_jets;
66     Int_t _n_met;
67     Int_t _n_muons;
68     Int_t _n_electrons;
69     Int_t _lepton_is_muon;
70     Double_t _event_weight;
71     Double_t _lepton_pt;
72     Double_t _lepton_eta;
73     Double_t _lepton_phi;
74     Double_t _lepton_energy;
75 kukartse 1.3 Double_t _muon_track_chi2;
76     Double_t _muon_track_ndof;
77     Double_t _muon_track_nChi2;
78     Double_t _muon_outerTrack_chi2;
79     Double_t _muon_outerTrack_ndof;
80     Double_t _muon_outerTrack_nChi2;
81     Double_t _muon_globalTrack_chi2;
82     Double_t _muon_globalTrack_ndof;
83     Double_t _muon_globalTrack_nChi2;
84 kukartse 1.1 Double_t _lepton_track_iso;
85     Double_t _lepton_calo_iso;
86 kukartse 1.2 Double_t _lepton_ecal_iso;
87     Double_t _lepton_hcal_iso;
88     Double_t _lepton_user_iso;
89 kukartse 1.1 Double_t _met_pt;
90     Double_t _met_et;
91     Double_t _met_eta;
92     Double_t _met_phi;
93     Double_t _met_energy;
94     Double_t _jet1_pt;
95     Double_t _jet1_eta;
96     Double_t _jet1_phi;
97     Double_t _jet1_energy;
98     Double_t _jet2_pt;
99     Double_t _jet2_eta;
100     Double_t _jet2_phi;
101     Double_t _jet2_energy;
102     Double_t _jet3_pt;
103     Double_t _jet3_eta;
104     Double_t _jet3_phi;
105     Double_t _jet3_energy;
106     Double_t _jet4_pt;
107     Double_t _jet4_eta;
108     Double_t _jet4_phi;
109     Double_t _jet4_energy;
110    
111     Double_t _aplanarity ;
112     Double_t _centrality ;
113     Double_t _sphericity ;
114     Double_t _ht ;
115     Double_t _htPlusLepton ;
116     Double_t _metHtPlusLepton ;
117     Double_t _h ;
118     Double_t _ktMinPrime ;
119     Double_t _dPhiLMet ;
120     Double_t _minDijetMass ;
121     Double_t _maxJetEta ;
122     Double_t _et3 ;
123     Double_t _minDiJetDeltaR ;
124     Double_t _leptonJetDeltaR ;
125     Double_t _ht2p ;
126     Double_t _jet1Jet2DeltaR ;
127     Double_t _jet1Jet2DeltaPhi ;
128     Double_t _jet1Jet2_M ;
129     Double_t _jet1Jet2_Pt ;
130     Double_t _jet1Jet2W_M ;
131     Double_t _jet1Jet2W_Pt ;
132    
133     Double_t _hz ;
134     Double_t _HT2 ;
135     Double_t _HT2prime ;
136     Double_t _W_MT ;
137     Double_t _W_M ;
138     Double_t _W_Pt ;
139     Double_t _DphiJMET ;
140    
141     // Ht
142     Double_t _getHt ;
143     Double_t _getHtp ;
144     Double_t _getHtpp ;
145     Double_t _getHt2 ;
146     Double_t _getHt2p ;
147     Double_t _getHt2pp ;
148     Double_t _getHt3 ;
149     Double_t _getHt3p ;
150     Double_t _getHt3pp ;
151     Double_t _getCen ;
152     Double_t _getNJW ;
153     Double_t _getJetEtaMax ;
154     Double_t _getMdijetMin ;
155     Double_t _getMtjets ;
156     Double_t _getSqrtsT ;
157     Double_t _getMtAurelio ;
158     Double_t _getPzOverHT ;
159     Double_t _getMevent ;
160     Double_t _getM123inv ;
161     Double_t _getEta2Sum ;
162     Double_t _getMwRec ;
163     Double_t _getH ;
164    
165     // event topo
166     Double_t _getSph ;
167     Double_t _getApl ;
168     Double_t _getAplMu ;
169    
170     // Kt
171     Double_t _getKtminp ;
172     Double_t _getKtminpReduced ;
173     Double_t _getDrMinJetJet ;
174    
175     // mT
176     Double_t _getDphiMuMet ;
177     Double_t _getMt ;
178    
179     Double_t _lepton_id;
180     Double_t _electron_id_robust;
181     Double_t _electron_id_loose;
182     Double_t _electron_id_tight;
183     Double_t _electron_tdrid_medium;
184     Double_t _electron_tdrid_loose;
185     Double_t _electron_tdrid_tight;
186     Int_t _n_tagged_jets_trackCounting_loose;
187     Int_t _n_tagged_jets_trackCounting_medium;
188     Int_t _n_tagged_jets_trackCounting_tight;
189     Int_t _n_tagged_jets_jetProb_loose;
190     Int_t _n_tagged_jets_jetProb_medium;
191     Int_t _n_tagged_jets_jetProb_tight;
192    
193     TBranch * b_event;
194     TBranch * b_process_id;
195     TBranch * b_n_jets;
196     TBranch * b_n_met;
197     TBranch * b_n_muons;
198     TBranch * b_n_electrons;
199     TBranch * b_lepton_is_muon;
200     TBranch * b_event_weight;
201     TBranch * b_lepton_pt;
202     TBranch * b_lepton_eta;
203     TBranch * b_lepton_phi;
204     TBranch * b_lepton_energy;
205 kukartse 1.3 TBranch * b_muon_track_chi2;
206     TBranch * b_muon_track_ndof;
207     TBranch * b_muon_track_nChi2;
208     TBranch * b_muon_outerTrack_chi2;
209     TBranch * b_muon_outerTrack_ndof;
210     TBranch * b_muon_outerTrack_nChi2;
211     TBranch * b_muon_globalTrack_chi2;
212     TBranch * b_muon_globalTrack_ndof;
213     TBranch * b_muon_globalTrack_nChi2;
214 kukartse 1.1 TBranch * b_lepton_track_iso;
215     TBranch * b_lepton_calo_iso;
216 kukartse 1.2 TBranch * b_lepton_ecal_iso;
217     TBranch * b_lepton_hcal_iso;
218     TBranch * b_lepton_user_iso;
219 kukartse 1.1 TBranch * b_met_pt;
220     TBranch * b_met_et;
221     TBranch * b_met_eta;
222     TBranch * b_met_phi;
223     TBranch * b_met_energy;
224     TBranch * b_jet1_pt;
225     TBranch * b_jet1_eta;
226     TBranch * b_jet1_phi;
227     TBranch * b_jet1_energy;
228     TBranch * b_jet2_pt;
229     TBranch * b_jet2_eta;
230     TBranch * b_jet2_phi;
231     TBranch * b_jet2_energy;
232     TBranch * b_jet3_pt;
233     TBranch * b_jet3_eta;
234     TBranch * b_jet3_phi;
235     TBranch * b_jet3_energy;
236     TBranch * b_jet4_pt;
237     TBranch * b_jet4_eta;
238     TBranch * b_jet4_phi;
239     TBranch * b_jet4_energy;
240     TBranch * b_lepton_id;
241     TBranch * b_electron_id_robust;
242     TBranch * b_electron_id_loose;
243     TBranch * b_electron_id_tight;
244     TBranch * b_electron_tdrid_medium;
245     TBranch * b_electron_tdrid_loose;
246     TBranch * b_electron_tdrid_tight;
247     TBranch * b_n_tagged_jets_trackCounting_loose;
248     TBranch * b_n_tagged_jets_trackCounting_medium;
249     TBranch * b_n_tagged_jets_trackCounting_tight;
250     TBranch * b_n_tagged_jets_jetProb_loose;
251     TBranch * b_n_tagged_jets_jetProb_medium;
252     TBranch * b_n_tagged_jets_jetProb_tight;
253    
254     TBranch * b_aplanarity ;
255     TBranch * b_centrality ;
256     TBranch * b_sphericity ;
257     TBranch * b_ht ;
258     TBranch * b_htPlusLepton ;
259     TBranch * b_metHtPlusLepton ;
260     TBranch * b_h ;
261     TBranch * b_ktMinPrime ;
262     TBranch * b_dPhiLMet ;
263     TBranch * b_minDijetMass ;
264     TBranch * b_maxJetEta ;
265     TBranch * b_et3 ;
266     TBranch * b_minDiJetDeltaR ;
267     TBranch * b_leptonJetDeltaR ;
268     TBranch * b_ht2p ;
269     TBranch * b_jet1Jet2DeltaR ;
270     TBranch * b_jet1Jet2DeltaPhi ;
271     TBranch * b_jet1Jet2_M ;
272     TBranch * b_jet1Jet2_Pt ;
273     TBranch * b_jet1Jet2W_M ;
274     TBranch * b_jet1Jet2W_Pt ;
275    
276     TBranch * b_hz ;
277     TBranch * b_HT2 ;
278     TBranch * b_HT2prime ;
279     TBranch * b_W_MT ;
280     TBranch * b_W_M ;
281     TBranch * b_W_Pt ;
282     TBranch * b_DphiJMET ;
283    
284     // Ht
285     TBranch * b_getHt ;
286     TBranch * b_getHtp ;
287     TBranch * b_getHtpp ;
288     TBranch * b_getHt2 ;
289     TBranch * b_getHt2p ;
290     TBranch * b_getHt2pp ;
291     TBranch * b_getHt3 ;
292     TBranch * b_getHt3p ;
293     TBranch * b_getHt3pp ;
294     TBranch * b_getCen ;
295     TBranch * b_getNJW ;
296     TBranch * b_getJetEtaMax ;
297     TBranch * b_getMdijetMin ;
298     TBranch * b_getMtjets ;
299     TBranch * b_getSqrtsT ;
300     TBranch * b_getMtAurelio ;
301     TBranch * b_getPzOverHT ;
302     TBranch * b_getMevent ;
303     TBranch * b_getM123inv ;
304     TBranch * b_getEta2Sum ;
305     TBranch * b_getMwRec ;
306     TBranch * b_getH ;
307    
308     // event topo
309     TBranch * b_getSph ;
310     TBranch * b_getApl ;
311     TBranch * b_getAplMu ;
312    
313     // Kt
314     TBranch * b_getKtminp ;
315     TBranch * b_getKtminpReduced ;
316     TBranch * b_getDrMinJetJet ;
317    
318     // mT
319     TBranch * b_getDphiMuMet ;
320     TBranch * b_getMt ;
321    
322     virtual void beginJob(const edm::EventSetup&) ;
323     virtual void analyze(const edm::Event&, const edm::EventSetup&);
324     virtual void endJob() ;
325     };