65 if (options.Contains(
"q"))
fQUICK = 1;
109 Double_t min = -999.0;
131 Double_t quickJump = 0.0;
133 if (quickJump < 0.0) quickJump = 0.0;
135 for(i = iLower+1; i <=
fNMuStep; i++) {
136 mu = fMuMin + (Double_t)i*
fMuStep + quickJump;
157 Double_t *p =
new Double_t[
fNMax];
158 Double_t *r =
new Double_t[
fNMax];
159 Int_t *rank =
new Int_t[
fNMax];
160 Double_t *muBest =
new Double_t[
fNMax];
161 Double_t *probMuBest =
new Double_t[
fNMax];
165 for(i = 0; i <
fNMax; i++) {
167 if(muBest[i]<0.0) muBest[i] = 0.0;
170 if(probMuBest[i] == 0.0) r[i] = 0.0;
171 else r[i] = p[i]/probMuBest[i];
179 Int_t iMax = rank[0];
180 Int_t iMin = rank[0];
181 for(i = 0; i <
fNMax; i++) {
183 if(iMax < rank[i]) iMax = rank[i];
184 if(iMin > rank[i]) iMin = rank[i];
185 if(sum >=
fCL)
break;
192 delete [] probMuBest;
212 fNMax = (Int_t)newMax;
221 if(newMuStep == 0.0) {
222 std::cout <<
"TFeldmanCousins::SetMuStep ERROR New step size is zero - unable to change value"<< std::endl;
TFeldmanCousins(Double_t newCL=0.9, TString options="")
Constructor.
void SetMuStep(Double_t newMuStep=0.005)
Set the step in signal to use when generating tables.
virtual ~TFeldmanCousins()
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
Sort the n elements of the array a of generic templated type Element.
Int_t FindLimitsFromTable(Double_t mu)
calculate the probability table for a given mu for n = 0, NMAX and return 1 if the number of observed...
void SetMuMin(Double_t newMin=0.0)
Double_t Poisson(Double_t x, Double_t par)
Compute the Poisson distribution function for (x,par) The Poisson PDF is implemented by means of Eule...
Double_t Prob(Int_t N, Double_t mu, Double_t B)
Calculate the poissonian probability for a mean of mu+B events with a variance of N...
void SetMuMax(Double_t newMax=50.0)
Set maximum value of signal to use in calculating the tables.
Double_t CalculateLowerLimit(Double_t Nobserved, Double_t Nbackground)
given Nobserved and Nbackground, try different values of mu that give lower limits that are consisten...
Class to calculate the CL upper limit using the Feldman-Cousins method as described in PRD V57 #7...
Double_t CalculateUpperLimit(Double_t Nobserved, Double_t Nbackground)
given Nobserved and Nbackground, try different values of mu that give upper limits that are consisten...