Revision: | 1.1 |
Committed: | Wed Jan 21 18:36:09 2009 UTC (16 years, 3 months ago) by kukartse |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | V00-03-01, ZMorph_BASE_20100408, gak040610_morphing, V00-02-02, gak011410, gak010310, ejterm2010_25nov2009, V00-02-01, V00-02-00, gak112409, CMSSW_22X_branch_base, segala101609, V00-01-15, V00-01-14, V00-01-13, V00-01-12, V00-01-11, V00-01-10, gak031009, gak030509, gak022309, gak021209, gak040209, gak012809, V00-01-09, V00-01-08, V00-01-07, V00-01-06, V00-01-05, V00-01-04, HEAD |
Branch point for: | ZMorph-V00-03-01, CMSSW_22X_branch |
Log Message: | after JTerm status update |
# | User | Rev | Content |
---|---|---|---|
1 | kukartse | 1.1 | { |
2 | TChain chain("TestTree"); | ||
3 | chain . Add("./tmva_training-20nov2008.root"); | ||
4 | |||
5 | TCut the_cut = ""; | ||
6 | |||
7 | // when copying, include all branches | ||
8 | chain . SetBranchStatus("*",0); | ||
9 | chain . SetBranchStatus("MVA_Likelihood",1); | ||
10 | |||
11 | // create new TTrees from the input | ||
12 | TTree * _sig = chain . CopyTree(the_cut); | ||
13 | |||
14 | // define new TTree names | ||
15 | _sig.SetName("ttbar"); | ||
16 | |||
17 | // output file | ||
18 | TFile * out_file = new TFile("rarfit_data-09dec2008.root", "RECREATE"); | ||
19 | out_file->cd(); | ||
20 | _sig->Write(); | ||
21 | |||
22 | out_file->Write(); | ||
23 | delete out_file; | ||
24 | } | ||
25 |