Revision 34b2fa9d2bba4716af8f9b5cf9bcc99719401532 authored by Rene Brun on 27 February 2004, 20:18:35 UTC, committed by Rene Brun on 27 February 2004, 20:18:35 UTC
This patch repair cases where TTreeFormula was looking up the current
TStreamerInfo instead of looking the actual streamerInfo used by
the branch.


git-svn-id: http://root.cern.ch/svn/root/trunk@8315 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent c9a86a1
Raw File
FeldmanCousins.C

void FeldmanCousins()
{
 // Example macro of using the TFeldmanCousins class in root.
 // Author : Adrian John Bevan <bevan@SLAC.Stanford.EDU>
 //
 // get a FeldmanCousins calculation object with the default limits
 // of calculating a 90% CL with the minimum signal value scanned 
 // = 0.0 and the maximum signal value scanned of 50.0
  
 if (!gROOT->GetClass("TFeldmanCousins")) gSystem->Load("libPhysics");
 
 TFeldmanCousins f;

  // calculate either the upper or lower limit for 10 observerd
  // events with an estimated background of 3.  The calculation of
  // either upper or lower limit will return that limit and fill
  // data members with both the upper and lower limit for you.
  Double_t Nobserved   = 10.0;
  Double_t Nbackground = 3.0;

  Double_t ul = f.CalculateUpperLimit(Nobserved, Nbackground);
  Double_t ll = f.GetLowerLimit();

  cout << "For " <<  Nobserved << " data observed with and estimated background"<<endl;
  cout << "of " << Nbackground << " candidates, the Feldman-Cousins method of "<<endl;
  cout << "calculating confidence limits gives:"<<endl;
  cout << "\tUpper Limit = " <<  ul << endl;
  cout << "\tLower Limit = " <<  ll << endl;
  cout << "at the 90% CL"<< endl;
}

back to top