257 |
|
addcut << "(TMath::Abs("<<massgluname<<"-"<<mglu<<")<5)&&(TMath::Abs("<<massLSPname<<"-"<<mlsp<<")<5)"; |
258 |
|
(scansample.collection)[0].events->Draw("eventNum",addcut.str().c_str(),"goff"); |
259 |
|
float nevents = (scansample.collection)[0].events->GetSelectedRows(); |
260 |
+ |
if(nevents==0) continue; |
261 |
|
vector<vector<float> > systematics; |
262 |
< |
MCefficiency((scansample.collection)[0].events,result,resulterr,mcjzb,requireZ,nevents,addcut.str()); |
263 |
< |
if(result!=result||resulterr!=resulterr) { |
264 |
< |
dout << "Limits can't be calculated for this configuration (mglu="<<mglu<<" , mlsp="<<mlsp << ") as either the efficiency or its error are not numbers! (result="<<result<<" and resulterr="<<resulterr<<")"<< endl; |
262 |
> |
if(nevents!=0) MCefficiency((scansample.collection)[0].events,result,resulterr,mcjzb,requireZ,nevents,addcut.str()); |
263 |
> |
if(nevents==0||result!=result||resulterr!=resulterr) { |
264 |
> |
dout << "Limits can't be calculated for this configuration (mglu="<<mglu<<" , mlsp="<<mlsp << ") as either the efficiency or its error are not numbers or the number of events is zero! (result="<<result<<" and resulterr="<<resulterr<<"; Nevents=" << nevents << ")"<< endl; |
265 |
|
continue; |
266 |
|
} else { |
267 |
|
dout << "Configuration (mglu="<<mglu<<" , mlsp="<<mlsp << ") passed the mcefficiency test." << endl; |
281 |
|
|
282 |
|
// cout << "EXTRACTED THE FOLLOWING INFORMATION: mceff=" << mceff << " , toterr=" << toterr << " , sys_jes=" << sys_jes << " , sys_jsu=" << sys_jsu << " , sys_res = " << sys_res << endl; |
283 |
|
|
284 |
< |
if(mceff!=mceff||toterr!=toterr) { |
285 |
< |
dout << "Limits can't be calculated for this configuration (mglu="<<mglu<<" , mlsp="<<mlsp << ") as either the efficiency or its error are not numbers! (mceff="<<mceff<<" and toterr="<<toterr<<")"<< endl; |
284 |
> |
if(mceff!=mceff||toterr!=toterr||mceff<0) { |
285 |
> |
dout << "Limits can't be calculated for this configuration (mglu="<<mglu<<" , mlsp="<<mlsp << ") as either the efficiency or its error are not positive numbers! (mceff="<<mceff<<" and toterr="<<toterr<<")"<< endl; |
286 |
|
continue; |
287 |
|
} else { |
288 |
|
if(!systematicsonly&&!efficiencyonly) { |
301 |
|
sysjsumap->Fill(mglu,mlsp,sys_jsu); |
302 |
|
sysresmap->Fill(mglu,mlsp,sys_res); |
303 |
|
} |
304 |
< |
} |
304 |
> |
}//efficiency is valid |
305 |
|
} |
306 |
|
} |
307 |
|
|