331 |
|
resulterr=TMath::Sqrt(sel/tot*(1+sel/tot)/tot); |
332 |
|
result_wo_signalcont=Value(result,resulterr); |
333 |
|
} |
334 |
< |
if(!automatized && k>0 ) dout << "PDF assessment: "; |
334 |
> |
if(!automatized && k>0 ) dout << "PDF assessment (" << k << ") : "; |
335 |
|
if(!automatized) dout << " MC efficiency: " << result << "+-" << resulterr << " ( JZB>" << jzbSel << " : " << sel << " , JZB<-" << jzbSel << " : " << nsel << " and nevents=" << tot << ") with normFact=" << normFactor << std::endl; |
336 |
|
delete effh; |
337 |
+ |
return result_wo_signalcont; |
338 |
|
} |
339 |
|
|
340 |
|
|
502 |
|
|
503 |
|
float mceff,mcefferr,jzbeff,jzbefferr; |
504 |
|
if(!automatized) dout << "MC efficiencies:" << endl; |
505 |
< |
MCefficiency(events,mceff,mcefferr,mcjzb,requireZ,Neventsinfile,addcut,-1); |
505 |
> |
Value mceff_nosigcont = MCefficiency(events,mceff,mcefferr,mcjzb,requireZ,Neventsinfile,addcut,-1); |
506 |
> |
if(!automatized) cout << " Without signal contamination, we find an efficiency of " << mceff_nosigcont << endl; |
507 |
> |
|
508 |
|
if(PlottingSetup::computeJZBefficiency) JZBefficiency(events,informalname,jzbeff,jzbefferr,requireZ,addcut); |
509 |
|
if(!automatized) dout << "JZB efficiency: " << jzbeff << "+/-" << jzbefferr << endl; |
510 |
|
|
511 |
+ |
|
512 |
+ |
if(!(mceff>0)) write_warning(__FUNCTION__,"Efficiency is zero - the systematics will not be computed!"); |
513 |
+ |
|
514 |
+ |
|
515 |
|
if(!automatized) dout << "Error from Peak position:" << endl; |
516 |
|
float sysfrompeak=0; |
517 |
< |
PeakError(events,sysfrompeak,mcjzb,peakerror,addcut); |
517 |
> |
if(mceff>0) PeakError(events,sysfrompeak,mcjzb,peakerror,addcut); |
518 |
> |
else dout << "Not computed." << endl; |
519 |
|
|
520 |
|
if(!automatized) dout << "Jet energy scale: " << std::endl; |
521 |
< |
float jesup,jesdown; |
522 |
< |
JZBjetScale(events,jesdown,jesup,informalname,requireZ,addcut,JetEnergyScaleUncert); |
521 |
> |
float jesup=0,jesdown=0; |
522 |
> |
if(mceff>0) JZBjetScale(events,jesdown,jesup,informalname,requireZ,addcut,JetEnergyScaleUncert); |
523 |
> |
else dout << "Not computed." << endl; |
524 |
|
|
525 |
|
if(!automatized) dout << "JZB scale: " << std::endl; |
526 |
< |
float scaleup,scaledown,scalesyst; |
527 |
< |
doJZBscale(events,scaledown,scaleup,scalesyst,JZBScaleUncert,informalname,requireZ,addcut); |
526 |
> |
float scaleup=0,scaledown=0,scalesyst=0; |
527 |
> |
if(mceff>0) doJZBscale(events,scaledown,scaleup,scalesyst,JZBScaleUncert,informalname,requireZ,addcut); |
528 |
> |
else dout << "Not computed." << endl; |
529 |
|
|
530 |
|
if(!automatized) dout << "JZB response: " << std::endl; |
531 |
< |
float resp,resperr; |
532 |
< |
if(PlottingSetup::computeJZBresponse) { |
531 |
> |
float resp=0,resperr=0; |
532 |
> |
if(PlottingSetup::computeJZBresponse && mceff>0) { |
533 |
|
if(!automatized) dout << "JZB response: " << std::endl; |
534 |
|
JZBresponse(events,requireZ,resp,resperr,addcut); |
535 |
|
} |
536 |
|
|
537 |
|
if(!automatized) dout << "Pileup: " << std::endl; |
538 |
< |
float resolution; |
539 |
< |
resolution=pileup(events,requireZ,informalname,addcut); |
538 |
> |
float resolution=0; |
539 |
> |
if(mceff>0) resolution=pileup(events,requireZ,informalname,addcut); |
540 |
> |
else dout << "Not computed." << endl; |
541 |
|
|
542 |
|
float PDFuncert=0; |
543 |
< |
if(!automatized) dout << "Assessing PDF uncertainty: " << std::endl; |
544 |
< |
if(ismSUGRA) PDFuncert = get_pdf_uncertainty(events, mcjzb, requireZ, Neventsinfile, NPdfs, addcut); |
543 |
> |
if(!automatized&&mceff>0) dout << "Assessing PDF uncertainty: " << std::endl; |
544 |
> |
if(ismSUGRA&&mceff>0) PDFuncert = get_pdf_uncertainty(events, mcjzb, requireZ, Neventsinfile, NPdfs, addcut); |
545 |
|
|
546 |
|
dout << "_______________________________________________" << endl; |
547 |
|
dout << " SUMMARY FOR " << informalname << " with JZB>" << jzbSel << " (all in %) "; |
572 |
|
|
573 |
|
dout << "FINAL RESULT : " << 100*mceff << " +/- "<< 100*mcefferr << " (stat) +/- " << 100*systerr << " (syst) %" << endl; |
574 |
|
dout << " we thus use the sqrt of the sum of the squares of the stat & syst err, which is : " << 100*toterr << endl; |
575 |
+ |
dout << "_______________________________________________" << endl; |
576 |
|
|
577 |
|
//Do not modify the lines below or mess with the order; this order is expected by all limit calculating functions! |
578 |
|
vector<float> res; |
584 |
|
if(fabs(jesup)>fabs(jesdown)) res.push_back(fabs(jesup)); else res.push_back(fabs(jesdown)); |
585 |
|
if(fabs(scaleup)>fabs(scaledown)) res.push_back(fabs(scaleup)); else res.push_back(fabs(scaledown)); |
586 |
|
res.push_back(fabs(resolution)); |
587 |
+ |
res.push_back(mceff_nosigcont.getValue()); |
588 |
+ |
res.push_back(mceff_nosigcont.getError()); |
589 |
|
if(ismSUGRA) res.push_back(PDFuncert); |
590 |
|
results.push_back(res); |
591 |
|
} |