105 |
|
// create a set of variables and declare them to the reader |
106 |
|
// - the variable names must corresponds in name and type to |
107 |
|
// those given in the weight file(s) that you use |
108 |
– |
Float_t _aplanarity; |
108 |
|
Float_t _getHt3; |
109 |
< |
Float_t _ktMinPrime; |
111 |
< |
Float_t _DphiJMET; |
109 |
> |
Float_t _aplanarity; |
110 |
|
Float_t _dPhiLMet; |
111 |
< |
Float_t _getMt; |
112 |
< |
reader->AddVariable("aplanarity", &_aplanarity); |
111 |
> |
Float_t _sphericity; |
112 |
> |
Float_t _jet1Jet2DeltaR; |
113 |
> |
Float_t _leptonJetDeltaR; |
114 |
> |
// |
115 |
> |
// ORDER of variables is important here! Must be the same as in the weights file!!! |
116 |
> |
// |
117 |
|
reader->AddVariable("getHt3", &_getHt3); |
118 |
< |
reader->AddVariable("ktMinPrime", &_ktMinPrime); |
119 |
< |
reader->AddVariable("DphiJMET", &_DphiJMET); |
120 |
< |
//reader->AddVariable("dPhiLMet", &_dPhiLMet); |
121 |
< |
reader->AddVariable("getMt", &_getMt); |
118 |
> |
reader->AddVariable("aplanarity", &_aplanarity); |
119 |
> |
reader->AddVariable("dPhiLMet", &_dPhiLMet); |
120 |
> |
reader->AddVariable("sphericity", &_sphericity); |
121 |
> |
reader->AddVariable("jet1Jet2DeltaR", &_jet1Jet2DeltaR); |
122 |
> |
reader->AddVariable("leptonJetDeltaR", &_leptonJetDeltaR); |
123 |
|
|
124 |
|
// |
125 |
|
// book the MVA methods |
196 |
|
// |
197 |
|
TFile *input(0); |
198 |
|
//TString fname = "/uscms_data/d1/lpcljm/MVA/Summer08/fake_data/tmva_fake_data_100pb-summer08-09jan2009.root"; |
199 |
< |
TString fname = "/uscms_data/d1/lpcljm/MVA/Summer08/fake_data/tmva_fake_data_100pb-summer08-09jan2009.root"; |
199 |
> |
//TString fname = "/uscms_data/d1/lpcljm/MVA/Summer08/fake_data/tmva_fake_data_20pb-summer08-25feb2009.root"; |
200 |
> |
//TString fname = "/uscms_data/d1/lpcljm/MVA/Summer08/training/tmva_training-summer08-25feb2009.root"; |
201 |
> |
//TString fname = "./tmva_fake_data_200pb-summer08-25feb2009.root"; |
202 |
> |
TString fname = "/uscms_data/d1/lpcljm/MVA/Summer08/fake_data/tmva_fake_data_20pb-summer08-25feb2009.root"; |
203 |
> |
|
204 |
|
if (!gSystem->AccessPathName( fname )) { |
205 |
|
// first we try to find tmva_example.root in the local directory |
206 |
|
cout << "--- accessing data file: " << fname << endl; |
226 |
|
// but of course you can use different ones and copy the values inside the event loop |
227 |
|
// |
228 |
|
TTree* theTree = (TTree*)input->Get("data"); |
229 |
+ |
//TTree* theTree = (TTree*)input->Get("ttbar"); |
230 |
+ |
//TTree* theTree = (TTree*)input->Get("wjets"); |
231 |
+ |
//TTree* theTree = (TTree*)input->Get("qcd"); |
232 |
|
cout << "--- select signal sample" << endl; |
233 |
|
//Float_t userVar1, userVar2; |
234 |
|
Double_t aplanarity; |
235 |
|
Double_t getHt3; |
236 |
< |
Double_t ktMinPrime; |
237 |
< |
Double_t DphiJMET; |
236 |
> |
Double_t sphericity; |
237 |
> |
Double_t jet1Jet2DeltaR; |
238 |
|
Double_t dPhiLMet; |
239 |
< |
Double_t getMt; |
239 |
> |
Double_t leptonJetDeltaR; |
240 |
|
theTree->SetBranchAddress( "aplanarity", &aplanarity ); |
241 |
|
theTree->SetBranchAddress( "getHt3", &getHt3 ); |
242 |
< |
theTree->SetBranchAddress( "ktMinPrime", &ktMinPrime ); |
243 |
< |
theTree->SetBranchAddress( "DphiJMET", &DphiJMET ); |
244 |
< |
//theTree->SetBranchAddress( "dPhiLMet", &dPhiLMet ); |
245 |
< |
theTree->SetBranchAddress( "getMt", &getMt ); |
242 |
> |
theTree->SetBranchAddress( "sphericity", &sphericity ); |
243 |
> |
theTree->SetBranchAddress( "jet1Jet2DeltaR", &jet1Jet2DeltaR ); |
244 |
> |
theTree->SetBranchAddress( "dPhiLMet", &dPhiLMet ); |
245 |
> |
theTree->SetBranchAddress( "leptonJetDeltaR", &leptonJetDeltaR ); |
246 |
|
|
247 |
|
// efficiency calculator for cut method |
248 |
|
Int_t nSelCuts = 0, nSelCutsD = 0, nSelCutsGA = 0; |
262 |
|
//var2 = userVar1 - userVar2; |
263 |
|
_aplanarity = (Float_t)aplanarity; |
264 |
|
_getHt3 = (Float_t)getHt3; |
265 |
< |
_ktMinPrime = (Float_t)ktMinPrime; |
266 |
< |
_DphiJMET = (Float_t)DphiJMET; |
267 |
< |
//_dPhiLMet = (Float_t)dPhiLMet; |
268 |
< |
_getMt = (Float_t)getMt; |
265 |
> |
_sphericity = (Float_t)sphericity; |
266 |
> |
_jet1Jet2DeltaR = (Float_t)jet1Jet2DeltaR; |
267 |
> |
_dPhiLMet = (Float_t)dPhiLMet; |
268 |
> |
_leptonJetDeltaR = (Float_t)leptonJetDeltaR; |
269 |
|
|
270 |
|
// |
271 |
|
// return the MVAs and fill to histograms |