ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/Development/Plotting/Modules/LimitCalculation.C
(Generate patch)

Comparing UserCode/cbrown/Development/Plotting/Modules/LimitCalculation.C (file contents):
Revision 1.1 by buchmann, Mon Jan 30 14:46:25 2012 UTC vs.
Revision 1.2 by buchmann, Thu Mar 15 20:35:39 2012 UTC

# Line 183 | Line 183 | ratio_binning.push_back(80);
183    
184   }
185  
186 < vector<float> compute_one_upper_limit(float mceff,float mcefferr, int ibin, string mcjzb, string plotfilename, bool doexpected, int flipped) {
186 > vector<float> compute_one_upper_limit(float mceff,float mcefferr, int ibin, string mcjzb, string plotfilename, bool doexpected, int flipped, bool doasymptotic=false) {
187    float sigma95=-9.9,sigma95A=-9.9;
188   /*
189   USAGE OF ROOSTATS_CL95
# Line 230 | Line 230 | USAGE OF ROOSTATS_CL95
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;
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;
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      dout << command.str() << endl;
236      
237      int retval = 256;
# Line 273 | Line 273 | USAGE OF ROOSTATS_CL95
273    }//end of mc efficiency is ok
274   }
275  
276 < void compute_upper_limits_from_counting_experiment(vector<vector<float> > uncertainties,vector<float> jzbcuts, string mcjzb, bool doexpected, int flipped) {
276 > vector<float> compute_upper_limits_from_counting_experiment(vector<vector<float> > uncertainties,vector<float> jzbcuts, string mcjzb, bool doexpected, int flipped) {
277    dout << "Doing counting experiment ... " << endl;
278    vector<vector<string> > limits;
279    vector<vector<float> > vlimits;
# Line 385 | Line 385 | void compute_upper_limits_from_counting_
385    }
386    allresults.Print();
387  
388 +  //---------------------------------------------
389    
390 +  vector<float> lowestULs;
391 +  for(int isample=0;isample<signalsamples.collection.size();isample++) {
392 +    float lowestUL=-1;
393 +    for(int icut=0;icut<jzbcuts.size();icut++) {
394 +      float currUL=Round((vlimits[isample][2*icut]),3);
395 +      if(currUL>0) {
396 +        if(lowestUL<0) lowestUL=currUL;
397 +        if(currUL<lowestUL) lowestUL=currUL;
398 +      }
399 +      lowestULs.push_back(lowestUL);
400 +    }
401 +  }
402 +  
403 +  //---------------------------------------------
404 +  return lowestULs;
405   }
406  
407  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines