From $ROOTSYS/tutorials/math/FeldmanCousins.C


void FeldmanCousins()
{
 // Example macro of using the TFeldmanCousins class in root.
 //
 // 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
 //Author : Adrian John Bevan <bevan@SLAC.Stanford.EDU>

 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;
}

 FeldmanCousins.C:1
 FeldmanCousins.C:2
 FeldmanCousins.C:3
 FeldmanCousins.C:4
 FeldmanCousins.C:5
 FeldmanCousins.C:6
 FeldmanCousins.C:7
 FeldmanCousins.C:8
 FeldmanCousins.C:9
 FeldmanCousins.C:10
 FeldmanCousins.C:11
 FeldmanCousins.C:12
 FeldmanCousins.C:13
 FeldmanCousins.C:14
 FeldmanCousins.C:15
 FeldmanCousins.C:16
 FeldmanCousins.C:17
 FeldmanCousins.C:18
 FeldmanCousins.C:19
 FeldmanCousins.C:20
 FeldmanCousins.C:21
 FeldmanCousins.C:22
 FeldmanCousins.C:23
 FeldmanCousins.C:24
 FeldmanCousins.C:25
 FeldmanCousins.C:26
 FeldmanCousins.C:27
 FeldmanCousins.C:28
 FeldmanCousins.C:29
 FeldmanCousins.C:30
 FeldmanCousins.C:31
 FeldmanCousins.C:32
 FeldmanCousins.C:33