00001
00002 void FeldmanCousins()
00003 {
00004
00005
00006
00007
00008
00009
00010
00011 if (!gROOT->GetClass("TFeldmanCousins")) gSystem->Load("libPhysics");
00012
00013 TFeldmanCousins f;
00014
00015
00016
00017
00018
00019 Double_t Nobserved = 10.0;
00020 Double_t Nbackground = 3.0;
00021
00022 Double_t ul = f.CalculateUpperLimit(Nobserved, Nbackground);
00023 Double_t ll = f.GetLowerLimit();
00024
00025 cout << "For " << Nobserved << " data observed with and estimated background"<<endl;
00026 cout << "of " << Nbackground << " candidates, the Feldman-Cousins method of "<<endl;
00027 cout << "calculating confidence limits gives:"<<endl;
00028 cout << "\tUpper Limit = " << ul << endl;
00029 cout << "\tLower Limit = " << ll << endl;
00030 cout << "at the 90% CL"<< endl;
00031 }
00032