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

Comparing UserCode/cbrown/AnalysisFramework/Plotting/Modules/LimitCalculation.C (file contents):
Revision 1.24 by buchmann, Thu Sep 15 13:54:15 2011 UTC vs.
Revision 1.25 by buchmann, Mon Sep 26 15:48:20 2011 UTC

# Line 235 | Line 235 | USAGE OF ROOSTATS_CL95
235  
236      
237      ///------------------------------------------ < /NEW > ----------------------------------------------------------
238    //if(doexpected) nlimittoysused=nlimittoys;
239 //    nlimittoysused=nlimittoys;
240 //  dout << "Now calling : CL95(" << luminosity << "," <<  lumiuncert*luminosity << "," << mceff << "," << mcefferr << "," << Npred[ibin] << "," << Nprederr[ibin] << "," << Nobs[ibin] << "," << false << "," << nuisancemodel<< ") " << endl;
241 //  sigma95 = CL95(luminosity, lumiuncert*luminosity, mceff, mcefferr, Npred[ibin], Nprederr[ibin], Nobs[ibin], false, nuisancemodel);
242 //  sigma95 = CL95(luminosity, lumiuncert*luminosity, mceff, mcefferr, Npred[ibin], Nprederr[ibin], Nobs[ibin], false, nuisancemodel);
243  
244 /*  dout << "Now calling : roostats_cl95(" << luminosity << "," << lumiuncert*luminosity << ","<<mceff <<","<<mcefferr<<","<<Npred[ibin]<<","<<Nprederr[ibin] << ",n=" << nlimittoysused << ",gauss=" << false << ",nuisanceModel="<<nuisancemodel<<",method="<<limitmethod<<",plotfilename="<<plotfilename<<",seed=0) " << endl;
245 /*  dout << "Now calling : roostats_limit(" << luminosity << "," << lumiuncert*luminosity << ","<<mceff <<","<<mcefferr<<","<<Npred[ibin]<<","<<Nprederr[ibin] << ",n=" << nlimittoysused << ",gauss=" << false << ", nuisanceModel="<<nuisancemodel<<",method="<<limitmethod<<",plotfilename="<<plotfilename<<",seed=1) " << endl;
246  LimitResult limit = roostats_limit(luminosity,lumiuncert*luminosity,mceff,mcefferr,Npred[ibin],Nprederr[ibin],nlimittoysused,false,nuisancemodel,limitmethod,plotfilename,0);
247  dout << "Now interpreting and saving results ... " << endl;
238    vector<float> sigmas;
239 <  sigmas.push_back(limit.GetExpectedLimit());//expected
250 <  sigmas.push_back(limit.GetObservedLimit());//observed
251 <  //up to here for backward compatibility
252 <  sigmas.push_back(limit.GetOneSigmaHighRange());//expected, up
253 <  sigmas.push_back(limit.GetTwoSigmaHighRange());//expected, 2 up
254 <  sigmas.push_back(limit.GetOneSigmaLowRange());//expected, down
255 <  sigmas.push_back(limit.GetTwoSigmaLowRange());//expected, 2 down
256 < */
257 < //  float limit = roostats_cl95(luminosity,lumiuncert*luminosity,mceff,mcefferr,Npred[ibin],Nprederr[ibin],nlimittoysused,false,nuisancemodel,limitmethod,plotfilename,0);
239 >  sigmas.push_back(sigma95);
240    if(doexpected) {
241 < write_warning(__FUNCTION__,"EXPECTED LIMITS HAVE BEEN SWITCHED OFF TEMPORARILY");
242 < //    dout << "Now calling : CLA(" << luminosity << "," <<  lumiuncert*luminosity << "," << mceff << "," << mcefferr << "," << Npred[ibin] << "," << Nprederr[ibin] << "," << nuisancemodel<< ") " << endl;
243 < //    sigma95A = CLA(luminosity, lumiuncert*luminosity, mceff, mcefferr, Npred[ibin], Nprederr[ibin], nuisancemodel);
241 >    sigmas.push_back(limres.expected);
242 >    sigmas.push_back(limres.upper68);
243 >    sigmas.push_back(limres.lower68);
244 >    sigmas.push_back(limres.upper95);
245 >    sigmas.push_back(limres.lower95);
246    }
247 < //  vector<float> sigmas;
264 < //  sigmas.push_back(limit);
265 <  vector<float> sigmas;
266 <  sigmas.push_back(sigma95);
267 <  sigmas.push_back(sigma95A);
247 >  
248    return sigmas;
249    
250  
251 <  }
272 <  write_warning(__FUNCTION__,"STILL MISSING SIGMAS, LIMITS, EVERYTHING ...");
251 >  }//end of mc efficiency is ok
252   }
253  
254   void compute_upper_limits_from_counting_experiment(vector<vector<float> > uncertainties,vector<float> jzbcuts, string mcjzb, bool doexpected) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines