372 |
|
// Total selection efficiency (MC) |
373 |
|
//returns the efficiency WITHOUT signal contamination, and the result and resulterr contain the result and the corresponding error |
374 |
|
Value MCefficiency(TTree *events,float &result, float &resulterr, int flipped, string mcjzb,bool requireZ,int Neventsinfile, string addcut="", int k = 0) { |
375 |
– |
if(k<1) write_warning(__FUNCTION__,"Setting automatized to off!"); automatized=false; // only do this once when computing pdf uncertainties |
375 |
|
if(!events) { |
376 |
|
write_error(__FUNCTION__,"Tree passed for efficiency calculation is invalid!"); |
377 |
|
result=0; |
653 |
|
if(!automatized) dout << "MC efficiencies:" << endl; |
654 |
|
Value flipefficiency; |
655 |
|
Value mceff_nosigcont = MCefficiency(events,mceff,mcefferr,flipped,mcjzb,requireZ,Neventsinfile,addcut,-1); |
657 |
– |
write_warning(__FUNCTION__,"Flipping business needs attention"); |
656 |
|
if(!automatized) cout << " Without signal contamination, we find an efficiency of " << mceff_nosigcont << endl; |
657 |
|
|
658 |
|
if(PlottingSetup::computeJZBefficiency) JZBefficiency(events,informalname,jzbeff,jzbefferr,flipped,requireZ,addcut); |