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.27 by buchmann, Thu Sep 1 15:41:32 2011 UTC vs.
Revision 1.29 by buchmann, Wed Sep 7 06:42:21 2011 UTC

# Line 328 | Line 328 | void MCefficiency(TTree *events,float &r
328          delete effh;
329   }
330  
331 +
332 + //____________________________________________________________________________________
333 + // Total selection efficiency (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 459 | Line 475 | void do_systematics_for_one_file(TTree *
475    float JetEnergyScaleUncert=0.1;
476    float JZBScaleUncert=0.1;
477    mcjzbexpression=mcjzb;
478 <  float triggereff=4.0/100;// in range [0,1]
478 >  float triggereff=5.0/100;// in range [0,1]
479    dout << "Trigger efficiency not implemented in this script  yet, still using external one" << endl;
480    float leptonseleff=2.0/100;// in range [0,1]
481    dout << "Lepton selection efficiency not implemented in this script  yet, still using external one" << endl;
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