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.28 by buchmann, Mon Sep 5 13:48:42 2011 UTC vs.
Revision 1.30 by buchmann, Wed Sep 7 06:43:24 2011 UTC

# Line 328 | Line 328 | void MCefficiency(TTree *events,float &r
328          delete effh;
329   }
330  
331 +
332 + //____________________________________________________________________________________
333 + // Selection efficiency for one process (MC)
334 + vector<float> processMCefficiency(TTree *events,string mcjzb,bool requireZ,int Neventsinfile, string addcut) {
335 +  vector<float> process_efficiencies;
336 +  for(int iprocess=0;iprocess<=10;iprocess++) {
337 +    float this_process_efficiency,efferr;
338 +    stringstream addcutplus;
339 +    addcutplus<<addcut<<"&&(process=="<<iprocess<<")";
340 +    MCefficiency(events,this_process_efficiency, efferr,mcjzb,requireZ,Neventsinfile, addcutplus.str(),-1);
341 +    process_efficiencies.push_back(this_process_efficiency);
342 +  }
343 +  return process_efficiencies;
344 + }
345 +        
346 +
347   void JZBefficiency(TTree *events, string informalname, float &jzbeff, float &jzbefferr, bool requireZ, string addcut="") {
348          TCut kbase("abs(genMll-91.2)<20&&genNjets>2&&genZPt>0&&abs(mll-91.2)<20&&((id1+1)*(id2+1)*ch1*ch2)!=-2");
349          if(addcut!="") kbase=kbase&&addcut.c_str();//this is mostly for SUSY scans (adding requirements on masses)
# Line 466 | Line 482 | void do_systematics_for_one_file(TTree *
482    
483    int NPdfs=0;
484    if(ismSUGRA) NPdfs = get_npdfs(events);
485 <
485 >  
486    float mceff,mcefferr,jzbeff,jzbefferr;
487    if(!automatized) dout << "MC efficiencies:" << endl;
488    MCefficiency(events,mceff,mcefferr,mcjzb,requireZ,Neventsinfile,addcut,-1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines