ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/benhoob/HWW/Classify_HWW.C
(Generate patch)

Comparing UserCode/benhoob/HWW/Classify_HWW.C (file contents):
Revision 1.2 by benhoob, Mon Feb 14 12:39:14 2011 UTC vs.
Revision 1.4 by benhoob, Mon Feb 14 12:50:27 2011 UTC

# Line 192 | Line 192 | void Classify_HWW( TString myMethodList
192  
193      // --- Book the MVA methods
194  
195 +    //--------------------------------------------------------------------------------------
196 +    // tell Classify_HWW where to find the weights dir, which contains the trained MVA's.
197 +    // In this example, the weights dir is located at [path]/[dir]
198 +    // and the output root file is written to [path]/[output]
199 +    //--------------------------------------------------------------------------------------
200 +
201      //TString dir    = "weights/";
202      //TString path   = "Trainings/H130_WWTo2L2Nu/";
203      //TString path   = "Trainings/H130_WWTo2L2Nu_WJetsToLNu/";
# Line 268 | Line 274 | void Classify_HWW( TString myMethodList
274      // we'll later on use only the "signal" events for the test in this example.
275      //  
276  
277 <    char* iter = "v2";
277 >    char* prefix = "babies/v3";
278      TChain *ch = new TChain("Events");
279  
280      if( strcmp( samples.at(i) , "DY" ) == 0 ){
281 <      ch -> Add( Form("babies/%s/DYToMuMuM20_PU_testFinal_baby.root",iter) );
282 <      ch -> Add( Form("babies/%s/DYToMuMuM10To20_PU_testFinal_baby.root",iter) );
283 <      ch -> Add( Form("babies/%s/DYToEEM20_PU_testFinal_baby.root",iter) );
284 <      ch -> Add( Form("babies/%s/DYToEEM10To20_PU_testFinal_baby.root",iter) );
285 <      ch -> Add( Form("babies/%s/DYToTauTauM20_PU_testFinal_baby.root",iter) );
286 <      ch -> Add( Form("babies/%s/DYToTauTauM10To20_PU_testFinal_baby.root",iter) );
281 >      ch -> Add( Form("%s/DYToMuMuM20_PU_testFinal_baby.root",prefix) );
282 >      ch -> Add( Form("%s/DYToMuMuM10To20_PU_testFinal_baby.root",prefix) );
283 >      ch -> Add( Form("%s/DYToEEM20_PU_testFinal_baby.root",prefix) );
284 >      ch -> Add( Form("%s/DYToEEM10To20_PU_testFinal_baby.root",prefix) );
285 >      ch -> Add( Form("%s/DYToTauTauM20_PU_testFinal_baby.root",prefix) );
286 >      ch -> Add( Form("%s/DYToTauTauM10To20_PU_testFinal_baby.root",prefix) );
287      }
288      else if( strcmp( samples.at(i) , "Higgs130" ) == 0 ){
289 <      ch -> Add( Form("babies/%s/HToWWTo2L2NuM130_PU_testFinal_baby.root",iter) );
290 <      ch -> Add( Form("babies/%s/HToWWToLNuTauNuM130_PU_testFinal_baby.root",iter) );
291 <      ch -> Add( Form("babies/%s/HToWWTo2Tau2NuM130_PU_testFinal_baby.root",iter) );
289 >      ch -> Add( Form("%s/HToWWTo2L2NuM130_PU_testFinal_baby.root",prefix) );
290 >      ch -> Add( Form("%s/HToWWToLNuTauNuM130_PU_testFinal_baby.root",prefix) );
291 >      ch -> Add( Form("%s/HToWWTo2Tau2NuM130_PU_testFinal_baby.root",prefix) );
292      }
293      else if( strcmp( samples.at(i) , "Higgs160" ) == 0 ){
294 <      ch -> Add( Form("babies/%s/HToWWTo2L2NuM160_PU_testFinal_baby.root",iter) );
295 <      ch -> Add( Form("babies/%s/HToWWToLNuTauNuM160_PU_testFinal_baby.root",iter) );
296 <      ch -> Add( Form("babies/%s/HToWWTo2Tau2NuM160_PU_testFinal_baby.root",iter) );
294 >      ch -> Add( Form("%s/HToWWTo2L2NuM160_PU_testFinal_baby.root",prefix) );
295 >      ch -> Add( Form("%s/HToWWToLNuTauNuM160_PU_testFinal_baby.root",prefix) );
296 >      ch -> Add( Form("%s/HToWWTo2Tau2NuM160_PU_testFinal_baby.root",prefix) );
297      }
298      else if( strcmp( samples.at(i) , "Higgs200" ) == 0 ){
299 <      ch -> Add( Form("babies/%s/HToWWTo2L2NuM200_PU_testFinal_baby.root",iter) );
300 <      ch -> Add( Form("babies/%s/HToWWToLNuTauNuM200_PU_testFinal_baby.root",iter) );
301 <      ch -> Add( Form("babies/%s/HToWWTo2Tau2NuM200_PU_testFinal_baby.root",iter) );
299 >      ch -> Add( Form("%s/HToWWTo2L2NuM200_PU_testFinal_baby.root",prefix) );
300 >      ch -> Add( Form("%s/HToWWToLNuTauNuM200_PU_testFinal_baby.root",prefix) );
301 >      ch -> Add( Form("%s/HToWWTo2Tau2NuM200_PU_testFinal_baby.root",prefix) );
302      }
303      else{
304 <      ch -> Add( Form("babies/%s/%s_PU_testFinal_baby.root",iter,samples.at(i)) );
304 >      ch -> Add( Form("%s/%s_PU_testFinal_baby.root",prefix,samples.at(i)) );
305      }
306  
307  
# Line 362 | Line 368 | void Classify_HWW( TString myMethodList
368  
369        theTree->GetEntry(ievt);
370  
371 <      if( event_type_ == 2 && met_projpt_ < 20. )   continue;
372 <      if( event_type_ != 2 && met_projpt_ < 35. )   continue;
371 >      //-------------------------------------------------------
372 >      // event selection
373 >      //-------------------------------------------------------
374 >
375 >      //em
376 >      if( event_type_ == 1 || event_type == 2 ){
377 >        if( met_projpt_ < 20. )   continue;
378 >      }
379 >      //ee/mm
380 >      if( event_type_ == 0 || event_type == 3 ){
381 >        if( met_projpt_ < 35. )   continue;
382 >      }
383 >
384        if( lephard_pt_ < 20.    )                    continue;
385        //if( lepsoft_pt_ < 10.    )                    continue;
386        if( lepsoft_pt_ < 20.    )                    continue;
# Line 375 | Line 392 | void Classify_HWW( TString myMethodList
392  
393        float weight = event_scale1fb_ * 0.0355;
394  
395 +      //--------------------------------------------------------
396 +      // important: here we associate branches to MVA variables
397 +      //--------------------------------------------------------
398 +
399        lephard_pt = lephard_pt_;
400        lepsoft_pt = lepsoft_pt_;
401        dil_mass   = dil_mass_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines