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) |
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); |