ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/interface/samples.hpp
(Generate patch)

Comparing UserCode/VHbb/interface/samples.hpp (file contents):
Revision 1.1 by bortigno, Wed May 2 19:20:07 2012 UTC vs.
Revision 1.2 by bortigno, Tue Jun 5 09:10:00 2012 UTC

# Line 22 | Line 22 | Sample( float xs, std::string n, std::st
22    float lumi() {  if(data) return luminosity; else return numberOfEvents()/xsec; }
23    float lumi(double fA, double fB) {  if(data) return luminosity; else return numberOfEvents(fA,fB)/xsec; }
24    float scale(float l) { if(lumi()>0) return l/lumi(); else return 0;}
25 +  float scale(float l, double *SF) {
26 +    std::string DYL("DYL");
27 +    std::string DYC("DYC");
28 +    std::string DYNoB("DYNoB");
29 +    std::string DYB("DYB");
30 +    std::string TTbar("TTbar");
31 +    if(lumi()>0){
32 +      if(name == DYL || name == DYC || name == DYNoB)
33 +        return SF[0]*l/lumi();
34 +      else if(name == TTbar)
35 +        return SF[1]*l/lumi();
36 +      else if(name == DYB)
37 +        return SF[2]*l/lumi();
38 +      else
39 +        return scale(l);
40 +    }
41 +    else
42 +      return 0; }
43 +
44    float scale(float l, double fA, double fB) { if(lumi(fA,fB)>0) return l/lumi(fA,fB); else return 0;}
45    float scale(float l, double fA, double fB, double *SF) {
46      std::string DYL("DYL");
# Line 63 | Line 82 | Sample( float xs, std::string n, std::st
82      if(nevents !=-1) return nevents;
83      else
84        {
85 <        return ((TH1F*)file()->Get("Count"))->GetBinContent(1);
85 >        //      return ((TH1F*)file()->Get("Count"))->GetBinContent(1);
86 >        return  ((TH1F*)file()->Get("CountWithPU"))->GetBinContent(1);
87        }
88    }  
89  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines