ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/AnalysisFramework/miscFR/countOSOF.C
Revision: 1.1
Committed: Fri Jun 24 07:44:49 2011 UTC (13 years, 10 months ago) by fronga
Content type: text/plain
Branch: MAIN
CVS Tags: cbaf_4_98ifb_paper, cbaf_4p7ifb, Honeypot, cbaf_2p1ifb, HEAD
Log Message:
First commit of various scripts used in the first 2011 analyses.

File Contents

# User Rev Content
1 fronga 1.1 // Simple counting to check ttbar contribution
2     // Count events in region 50 < JZB < 100 in SS and OS
3     // (dominated by ttbar)
4     {
5    
6     TFile* f = TFile::Open("/scratch/fronga/JSON_160404-163869_v1.29/AllCertified191_v1.29.root");
7     TTree* events = (TTree*)f->Get("events");
8    
9     TCut kbase("pfJetGoodNum>=3&&pfJetGoodID[0]&&pfJetGoodID[1]&&(passed_triggers||genZPt>0)&&abs(mll-91.2)<20");
10     TCut kSF("id1==id2");
11     TString jzb("jzb[1]+1.12");
12     TCut kSR(jzb+">50&&"+jzb+"<100");
13     TCut kCR(jzb+"<-50&&"+jzb+">-100");
14    
15     // Signal region
16     Long_t nOFSR = events->Draw(jzb,kbase&&!kSF&&kSR,"goff");
17     Long_t nSFSR = events->Draw(jzb,kbase&&kSF&&kSR,"goff");
18    
19     // Control region
20     Long_t nOFCR = events->Draw(jzb,kbase&&!kSF&&kCR,"goff");
21     Long_t nSFCR = events->Draw(jzb,kbase&&kSF&&kCR,"goff");
22    
23     std::cout << "nOFSR = " << nOFSR << std::endl;
24     std::cout << "nSFSR = " << nSFSR << std::endl;
25     std::cout << "nOFCR = " << nOFCR << std::endl;
26     std::cout << "nSFCR = " << nSFCR << std::endl;
27    
28     std::cout << "Comparison: " << nOFSR << " vs. " << nSFSR - (nSFCR-nOFCR) << std::endl;
29    
30     }