ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Jeng/scripts/skim.C
(Generate patch)

Comparing UserCode/Jeng/scripts/skim.C (file contents):
Revision 1.3 by jengbou, Mon Apr 20 23:41:31 2009 UTC vs.
Revision 1.4 by jengbou, Mon Apr 27 22:34:11 2009 UTC

# Line 16 | Line 16
16   #include <TTree.h>
17  
18   // Output file
19 < TString fileName = "skimmed/QCDbinall_NewRelIso.root";
19 > TString fileName = "skimmed226/QCDbin4_rebin_005.root";
20   bool FastSim = false;
21 + // Select New or Old reliso:
22   TString isoname = "New";
23   // Jet bin:
24 < Int_t jbin = 0; // 1-3, 4 for >=4. Put in number less than 5; 0 for all jets
25 < double binwidth = 0.01; // 0.02,0.02,0.05,0.1 for New RelIso
24 > Int_t jbin = 4; // 1-3, 4 for >=4. Put in number less than 5; 0 for all jets
25 > double binwidth = 0.5; // 0.02,0.02,0.05,0.1 for New RelIso
26 > // Which region (true for CD or false for AB)
27 > bool regionCD = false;
28 > double d0sigCut = 3.; // 3.
29   // Histo range
30   double xMin = 0.0;
31   double xMax = 0.0;
28 // Specify fitting function:
29 // Select New or Old reliso:
30 double d0sigCut = 3.;
32  
33   Int_t fjbin;
34   Double_t fna; // Num of QCD events in signal region
# Line 58 | Line 59 | void skim::Loop()
59      return;
60    }
61    cout << "nbin for histo = " << nbin << endl;
62 +  if ( regionCD ) cout << "==> Selecting Region CD." << endl;
63 +  
64    TTree *ftree = new TTree("myTree","myTree");
65    ftree->AutoSave();
66    ftree->Branch("jbin",&fjbin,"jbin/I");
# Line 85 | Line 88 | void skim::Loop()
88    else if ( isoname.Contains("New") ) {
89      // new
90      AX0 = 0.0;
91 <    AXf = 0.053; // default:0.053 ; loose:0.11
91 >    AXf = 0.05; // default:0.053 ; loose:0.11
92    }
93    
94    // Weights:
# Line 95 | Line 98 | void skim::Loop()
98      cout << "Full sim sample weights used " << endl;
99      // Full Sim
100      wttbar = 0.0101;
101 <    wqcd   = 1.3161;
102 <    wwjets = 0.0977;
103 <    wzjets = 0.078;
101 >    wqcd   = 0.3907;
102 >    wwjets = 0.0883;
103 >    wzjets = 0.0744;
104    }
105    else {
106      // Fast Sim
# Line 157 | Line 160 | void skim::Loop()
160        if ( top_njets == jbin ) { correctBin = true; }
161      }
162      
163 <    if ( d0sig < d0sigCut ) goodD0sig = true;
163 >    if ( !regionCD && (d0sig < d0sigCut) ) goodD0sig = true;
164 >    if ( regionCD && (d0sig > d0sigCut) ) goodD0sig = true;
165      
166      // Counting
167      if( correctBin && goodD0sig ) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines