source: branches/Mars_McMismatchStudy/mtools/MRolke.h@ 18233

Last change on this file since 18233 was 8087, checked in by meyer, 18 years ago
*** empty log message ***
File size: 4.0 KB
Line 
1// @(#)root/physics:$Name: not supported by cvs2svn $:$Id: MRolke.h,v 1.1 2006-10-17 12:52:15 meyer Exp $
2// Author: Jan Conrad 9/2/2004
3
4/*************************************************************************
5 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef MARS_MRolke
13#define MARS_MRolke
14
15#ifndef ROOT_TObject
16#include "TObject.h"
17#endif
18
19class MRolke : public TObject {
20
21protected:
22 Double_t fCL; // confidence level as a fraction [e.g. 90% = 0.9]
23 Double_t fUpperLimit; // the calculated upper limit
24 Double_t fLowerLimit; // the calculated lower limit
25 Int_t fSwitch; // 0: for unbounded likelihood
26 // 1: for bounded likelihood
27
28 // The Calculator
29
30 Double_t Interval(Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b,Int_t m);
31
32 // LIKELIHOOD ROUTINE
33
34 Double_t Likelihood(Double_t mu, Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b, Int_t m, Int_t what);
35
36 //MODEL 1
37 Double_t EvalLikeMod1(Double_t mu, Int_t x, Int_t y, Int_t z, Double_t e, Double_t tau, Double_t b, Int_t m, Int_t what);
38 Double_t LikeMod1(Double_t mu,Double_t b, Double_t e, Int_t x, Int_t y, Int_t z, Double_t tau, Int_t m);
39 void ProfLikeMod1(Double_t mu,Double_t &b, Double_t &e,Int_t x,Int_t y, Int_t z,Double_t tau,Int_t m);
40 Double_t LikeGradMod1(Double_t e, Double_t mu, Int_t x,Int_t y,Int_t z,Double_t tau,Int_t m);
41
42 //MODEL 2
43 Double_t EvalLikeMod2(Double_t mu, Int_t x, Int_t y, Double_t em, Double_t e,Double_t sde, Double_t tau, Double_t b, Int_t what);
44
45 Double_t LikeMod2(Double_t mu, Double_t b, Double_t e,Int_t x,Int_t y,Double_t em,Double_t tau, Double_t v);
46
47 //MODEL 3
48 Double_t EvalLikeMod3(Double_t mu, Int_t x, Double_t bm, Double_t em, Double_t e, Double_t sde, Double_t sdb, Double_t b, Int_t what);
49 Double_t LikeMod3(Double_t mu,Double_t b,Double_t e,Int_t x,Double_t bm,Double_t em,Double_t u,Double_t v);
50
51 //MODEL 4
52 Double_t EvalLikeMod4(Double_t mu, Int_t x, Int_t y, Double_t tau, Double_t b, Int_t what);
53 Double_t LikeMod4(Double_t mu,Double_t b,Int_t x,Int_t y,Double_t tau);
54
55 //MODEL 5
56 Double_t EvalLikeMod5(Double_t mu, Int_t x, Double_t bm, Double_t sdb, Double_t b, Int_t what);
57 Double_t LikeMod5(Double_t mu,Double_t b,Int_t x,Double_t bm,Double_t u);
58
59 //MODEL 6
60 Double_t EvalLikeMod6(Double_t mu, Int_t x, Int_t z, Double_t e, Double_t b, Int_t m, Int_t what);
61 Double_t LikeMod6(Double_t mu,Double_t b,Double_t e,Int_t x,Int_t z,Int_t m);
62
63 //MODEL 7
64 Double_t EvalLikeMod7(Double_t mu, Int_t x, Double_t em, Double_t e, Double_t sde, Double_t b, Int_t what);
65 Double_t LikeMod7(Double_t mu,Double_t b,Double_t e,Int_t x,Double_t em,Double_t v);
66
67 //MISC
68 static Double_t EvalPolynomial(Double_t x, const Int_t coef[], Int_t N);
69 static Double_t EvalMonomial (Double_t x, const Int_t coef[], Int_t N);
70
71 Double_t LogFactorial(Int_t n);
72
73
74public:
75
76 MRolke(Double_t CL=0.9, Option_t *option = "");
77
78 virtual ~MRolke();
79
80 Double_t CalculateInterval(Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b,Int_t m);
81 Double_t GetUpperLimit(void) const { return fUpperLimit;}
82 Double_t GetLowerLimit(void) const { return fLowerLimit;}
83 Int_t GetSwitch(void) const { return fSwitch;}
84 void SetSwitch(Int_t sw) { fSwitch = sw; }
85 Double_t GetCL(void) const { return fCL;}
86 void SetCL(Double_t CL) { fCL = CL; }
87
88 ClassDef(MRolke,1) //calculate confidence limits using the Rolke method
89};
90#endif
91
Note: See TracBrowser for help on using the repository browser.