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.30 by buchmann, Wed Nov 16 14:50:33 2011 UTC vs.
Revision 1.31 by buchmann, Thu Nov 24 08:19:17 2011 UTC

# Line 293 | Line 293 | void compute_upper_limits_from_counting_
293        float toterr =uncertainties[isample*jzbcuts.size()+ibin][4];
294        float observed,observederr,null,result;
295        
296 //      fill_result_histos(observed,observederr, null,null,null,null,null,null,null,mcjzb,JZBcutat,14000,(int)5,result,(signalsamples.FindSample(signalsamples.collection[isample].filename)),signalsamples);
297 //      observed-=result;//this is the actual excess we see!
298 //      float expected=observed/luminosity;
296        string plotfilename=(string)(TString(signalsamples.collection[isample].samplename)+TString("___JZB_geq_")+TString(any2string(JZBcutat))+TString(".png"));
297        dout << "Sample: " << signalsamples.collection[isample].samplename << ", JZB>"<<JZBcutat<< " : " << mceff << " +/- " << staterr << " (stat) +/- " << systerr << " (syst) --> toterr = " << toterr << endl;
298        vector<float> sigmas = compute_one_upper_limit(mceff,toterr,ibin,mcjzb,plotfilename,doexpected,flipped);
299 <      
299 >
300 >      tripple LibraryUpperLimits;
301 >      LibraryUpperLimits.name=signalsamples.collection[isample].samplename;
302 >      LibraryUpperLimits.first=mceff*signalsamples.collection[isample].xs * PlottingSetup::luminosity;
303 >      LibraryUpperLimits.second=staterr*signalsamples.collection[isample].xs * PlottingSetup::luminosity;
304 >      int resultindex=PlottingSetup::allresults.Find(jzbcuts[ibin]);
305 >      (allresults.predictions[resultindex]).SignalYield.push_back(LibraryUpperLimits);
306 >
307        if(doexpected) {
304 //      rows.push_back(any2string(sigmas[0])+";"+any2string(sigmas[1])+";"+"("+any2string(expected)+")");
308          rows.push_back(any2string(sigmas[0])+";"+any2string(sigmas[1])+";"+"("+any2string(signalsamples.collection[isample].xs)+")");
309          vrows.push_back(sigmas[0]);
310          vrows.push_back(sigmas[1]);
308 //      vrows.push_back(expected);
311          vrows.push_back(signalsamples.collection[isample].xs);
312        }
313        else {
312 //      rows.push_back(any2string(sigmas[0])+"("+any2string(expected)+")");
314          rows.push_back(any2string(sigmas[0]));
315          vrows.push_back(sigmas[0]);
316          vrows.push_back(signalsamples.collection[isample].xs);
316 //      vrows.push_back(expected);
317        }
318      }//end of bin loop
319      limits.push_back(rows);
320      vlimits.push_back(vrows);
321    }//end of sample loop
322 +
323 +  dout << endl << endl << "_______________________________________________________________________________________" << endl;
324 +  dout << "Going to store upper limit on event yield in result library: " << endl;
325 +  for(int ibin=0;ibin<jzbcuts.size();ibin++) {
326 +      int resultindex=PlottingSetup::allresults.Find(jzbcuts[ibin]);
327 +      vector<float> Normsigmas = compute_one_upper_limit(1.0,0.0, resultindex, mcjzb, "UPPERLIMIT", false, 0);
328 +      (allresults.predictions[resultindex]).UpperLimit=Normsigmas[0]*PlottingSetup::luminosity;
329 +  }
330 +  dout << endl << "_______________________________________________________________________________________" << endl;
331 +
332    dout << endl << endl << endl << "_________________________________________________________________________________________________" << endl << endl;
333    dout << endl << endl << "PAS table 3:   (notation: limit [95%CL])" << endl << endl;
334    dout << "\t";
# Line 373 | Line 383 | void compute_upper_limits_from_counting_
383      }
384      dout << endl;
385    }
386 +  allresults.Print();
387 +
388 +  
389   }
390  
391  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines