281 |
|
//returns the efficiency WITHOUT signal contamination, and the result and resulterr contain the result and the corresponding error |
282 |
|
Value MCefficiency(TTree *events,float &result, float &resulterr,string mcjzb,bool requireZ,int Neventsinfile, string addcut="", int k = 0) { |
283 |
|
|
284 |
+ |
if(!events) { |
285 |
+ |
write_error(__FUNCTION__,"Tree passed for efficiency calculation is invalid!"); |
286 |
+ |
result=0;resulterr=0; |
287 |
+ |
return Value(0,0); |
288 |
+ |
} |
289 |
|
char jzbSelStr[256]; sprintf(jzbSelStr,"%f",jzbSel); |
290 |
|
// All acceptance cuts at gen. level |
291 |
|
//TCut kbase("abs(genMll-91.2)<20&&genNjets>2&&genZPt>0&&genJZB"+geq_or_leq()+TString(jzbSelStr)+"&&genId1==-genId2"); |