228 |
|
|
229 |
|
if(flipped==0) dout << "Calling limit capsule instead of calling : CL95(" << luminosity << "," << lumiuncert*luminosity << "," << mceff << "," << mcefferr << "," << Npred[ibin] << "," << Nprederr[ibin] << "," << Nobs[ibin] << "," << false << "," << nuisancemodel<< ") " << endl; |
230 |
|
if(flipped>0) dout << "Calling limit capsule instead of calling : CL95(" << luminosity << "," << lumiuncert*luminosity << "," << mceff << "," << mcefferr << "," << flippedNpred[ibin] << "," << flippedNprederr[ibin] << "," << flippedNobs[ibin] << "," << false << "," << nuisancemodel<< ") " << endl; |
231 |
+ |
|
232 |
+ |
stringstream command; |
233 |
+ |
if(flipped==0) command << PlottingSetup::cbafbasedir << "/DistributedModelCalculations/Limits/TimedLimitCapsule.exec " << repname.str() << " " << luminosity << " " << luminosity*lumiuncert << " " << mceff << " " << mcefferr << " " << Npred[ibin] << " " << Nprederr[ibin] << " " << Nobs[ibin] << " " << -1 << " " << PlottingSetup::basedirectory << "/" << plotfilename << " " << doexpected << " " << doasymptotic; |
234 |
+ |
if(flipped>0) command << PlottingSetup::cbafbasedir << "/DistributedModelCalculations/Limits/TimedLimitCapsule.exec " << repname.str() << " " << luminosity << " " << luminosity*lumiuncert << " " << mceff << " " << mcefferr << " " << flippedNpred[ibin] << " " << flippedNprederr[ibin] << " " << flippedNobs[ibin] << " " << -1 << " " << PlottingSetup::basedirectory << "/" << plotfilename << " " << doexpected<< " " << doasymptotic; |
235 |
+ |
|
236 |
+ |
dout << command.str() << endl; |
237 |
|
|
238 |
< |
stringstream command; |
239 |
< |
if(flipped==0) command << PlottingSetup::cbafbasedir << "/DistributedModelCalculations/Limits/TimedLimitCapsule.exec " << repname.str() << " " << luminosity << " " << luminosity*lumiuncert << " " << mceff << " " << mcefferr << " " << Npred[ibin] << " " << Nprederr[ibin] << " " << Nobs[ibin] << " " << -1 << " " << PlottingSetup::basedirectory << "/" << plotfilename << " " << doexpected << " " << doasymptotic; |
240 |
< |
if(flipped>0) command << PlottingSetup::cbafbasedir << "/DistributedModelCalculations/Limits/TimedLimitCapsule.exec " << repname.str() << " " << luminosity << " " << luminosity*lumiuncert << " " << mceff << " " << mcefferr << " " << flippedNpred[ibin] << " " << flippedNprederr[ibin] << " " << flippedNobs[ibin] << " " << -1 << " " << PlottingSetup::basedirectory << "/" << plotfilename << " " << doexpected<< " " << doasymptotic; |
241 |
< |
dout << command.str() << endl; |
242 |
< |
|
237 |
< |
int retval = 256; |
238 |
< |
int attempts=0; |
239 |
< |
while(!(retval==0||attempts>=3)) {//try up to 3 times |
238 |
> |
if(doasymptotic) write_warning(__FUNCTION__, "DOING ASYMPTOTIC LIMIT!"); |
239 |
> |
|
240 |
> |
int retval = 256; |
241 |
> |
int attempts=0; |
242 |
> |
while(!(retval==0||attempts>=3)) {//try up to 3 times |
243 |
|
attempts++; |
244 |
|
dout << "Starting limit calculation (TimedLimitCapsule) now : Attempt " << attempts << endl; |
245 |
|
retval=gSystem->Exec(command.str().c_str()); |
258 |
|
remove(repname.str().c_str()); |
259 |
|
sigma95=limres.observed; |
260 |
|
|
258 |
– |
|
261 |
|
///------------------------------------------ < /NEW > ---------------------------------------------------------- |
262 |
|
vector<float> sigmas; |
263 |
|
sigmas.push_back(sigma95); |