ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/AnalysisFramework/Plotting/Modules/Systematics.C
(Generate patch)

Comparing UserCode/cbrown/AnalysisFramework/Plotting/Modules/Systematics.C (file contents):
Revision 1.55 by buchmann, Thu Nov 24 08:15:39 2011 UTC vs.
Revision 1.56 by buchmann, Fri Nov 25 17:07:41 2011 UTC

# Line 644 | Line 644 | int get_npdfs(TTree *events) {
644   }
645    
646  
647 < void do_systematics_for_one_file(TTree *events,int Neventsinfile,string informalname, vector<vector<float> > &results,int flipped, string mcjzb,string datajzb,float peakerror,bool requireZ=false, string addcut="", bool ismSUGRA=false) {
647 > void do_systematics_for_one_file(TTree *events,int Neventsinfile,string informalname, vector<vector<float> > &results,int flipped, string mcjzb,string datajzb,float peakerror,bool requireZ=false, string addcut="", bool isscan=false) {
648    float JZBScaleUncert=0.05;
649    mcjzbexpression=mcjzb;
650    float triggereff=2.0/100;// in range [0,1]
# Line 654 | Line 654 | void do_systematics_for_one_file(TTree *
654    dout << "Lepton selection efficiency not implemented in this script  yet, still using external one" << endl;
655    
656    int NPdfs=0;
657 <  if(ismSUGRA) NPdfs = get_npdfs(events);
657 >  if(isscan) NPdfs = get_npdfs(events);
658    
659    float mceff,mcefferr,jzbeff,jzbefferr;
660    if(!automatized) dout << "MC efficiencies:" << endl;
# Line 681 | Line 681 | void do_systematics_for_one_file(TTree *
681    float resp,resperr;
682    if(PlottingSetup::computeJZBresponse) {
683          if(!automatized) dout << "JZB response: " << std::endl;
684 <        if(!ismSUGRA) JZBresponse(events,informalname,requireZ,resp,resperr,flipped,addcut);
684 >        if(!isscan) JZBresponse(events,informalname,requireZ,resp,resperr,flipped,addcut);
685    }
686  
687    if(!automatized) dout << "Pileup: " << std::endl;
# Line 690 | Line 690 | void do_systematics_for_one_file(TTree *
690  
691    float PDFuncert=0;
692    if(!automatized) dout << "Assessing PDF uncertainty: " << std::endl;
693 <  if(ismSUGRA) PDFuncert = get_pdf_uncertainty(events, flipped, mcjzb, requireZ, Neventsinfile, NPdfs, addcut);
693 >  if(isscan) PDFuncert = get_pdf_uncertainty(events, flipped, mcjzb, requireZ, Neventsinfile, NPdfs, addcut);
694  
695    dout << "_______________________________________________" << endl;
696    dout << "                 SUMMARY FOR " << informalname << " with JZB>" << jzbSel << "  (all in %) ";
# Line 703 | Line 703 | void do_systematics_for_one_file(TTree *
703    dout << "JZB Scale Uncert: " << scaledown << " " << scaleup << endl; // in range [0,1]
704   //  dout << "Resolution : " << resolution << endl; // in range [0,1]
705    dout << "From peak : " << sysfrompeak << endl; // in range [0,1]
706 <  if(ismSUGRA) dout << "PDF uncertainty  : " << PDFuncert << endl; // in range [0,1]
706 >  if(isscan) dout << "PDF uncertainty  : " << PDFuncert << endl; // in range [0,1]
707    if(PlottingSetup::computeJZBefficiency) dout << "JZB efficiency: " << jzbeff << "+/-" << jzbefferr << " (not yet included below) " << endl; // in range [0,1]
708    if(PlottingSetup::computeJZBresponse)dout << "JZB response  : " << resp << " +/-" << resperr << " (not yet included below) " << endl; // in range [0,1]
709    
# Line 714 | Line 714 | void do_systematics_for_one_file(TTree *
714    if(fabs(scaleup)>fabs(scaledown)) toterr+=(scaleup*scaleup); else toterr+=(scaledown*scaledown);
715   //  toterr+=(resolution*resolution);
716    toterr+=(sysfrompeak*sysfrompeak);
717 <  if(ismSUGRA) toterr+=(PDFuncert*PDFuncert);
717 >  if(isscan) toterr+=(PDFuncert*PDFuncert);
718    dout << "TOTAL SYSTEMATICS: " << TMath::Sqrt(toterr) << " --> " << TMath::Sqrt(toterr)*mceff << endl;
719    float systerr=TMath::Sqrt(toterr)*mceff;
720    toterr=TMath::Sqrt(toterr*mceff*mceff+mcefferr*mcefferr);//also includes stat err!
# Line 736 | Line 736 | void do_systematics_for_one_file(TTree *
736    res.push_back(0.0);
737    res.push_back(mceff_nosigcont.getValue());
738    res.push_back(mceff_nosigcont.getError());
739 <  if(ismSUGRA) res.push_back(PDFuncert);
739 >  if(isscan) res.push_back(PDFuncert);
740    results.push_back(res);
741   }
742  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines