Warning, file /include/root/TRolke.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef ROOT_TRolke
0027 #define ROOT_TRolke
0028
0029 #include "TObject.h"
0030 #include "TMath.h"
0031
0032
0033 class TRolke : public TObject
0034 {
0035
0036 private:
0037 Double_t fCL;
0038 Double_t fUpperLimit;
0039 Double_t fLowerLimit;
0040 bool fBounding;
0041
0042 Int_t fNumWarningsDeprecated1;
0043 Int_t fNumWarningsDeprecated2;
0044
0045
0046
0047 Int_t f_x;
0048 Int_t f_y;
0049 Int_t f_z;
0050 Double_t f_bm;
0051 Double_t f_em;
0052 Double_t f_e;
0053 Int_t f_mid;
0054 Double_t f_sde;
0055 Double_t f_sdb;
0056 Double_t f_tau;
0057 Double_t f_b;
0058 Int_t f_m;
0059
0060
0061
0062
0063 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);
0064
0065
0066 Double_t Likelihood(Double_t mu, Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b, Int_t m, Int_t what);
0067
0068
0069 Double_t EvalLikeMod1(Double_t mu, Int_t x, Int_t y, Int_t z, Double_t tau, Int_t m, Int_t what);
0070 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);
0071 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);
0072 Double_t LikeGradMod1(Double_t e, Double_t mu, Int_t x, Int_t y, Int_t z, Double_t tau, Int_t m);
0073
0074
0075 Double_t EvalLikeMod2(Double_t mu, Int_t x, Int_t y, Double_t em, Double_t sde, Double_t tau, Int_t what);
0076
0077 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);
0078
0079
0080 Double_t EvalLikeMod3(Double_t mu, Int_t x, Double_t bm, Double_t em, Double_t sde, Double_t sdb, Int_t what);
0081 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);
0082
0083
0084 Double_t EvalLikeMod4(Double_t mu, Int_t x, Int_t y, Double_t tau, Int_t what);
0085 Double_t LikeMod4(Double_t mu, Double_t b, Int_t x, Int_t y, Double_t tau);
0086
0087
0088 Double_t EvalLikeMod5(Double_t mu, Int_t x, Double_t bm, Double_t sdb, Int_t what);
0089 Double_t LikeMod5(Double_t mu, Double_t b, Int_t x, Double_t bm, Double_t u);
0090
0091
0092 Double_t EvalLikeMod6(Double_t mu, Int_t x, Int_t z, Double_t b, Int_t m, Int_t what);
0093 Double_t LikeMod6(Double_t mu, Double_t b, Double_t e, Int_t x, Int_t z, Int_t m);
0094
0095
0096 Double_t EvalLikeMod7(Double_t mu, Int_t x, Double_t em, Double_t sde, Double_t b, Int_t what);
0097 Double_t LikeMod7(Double_t mu, Double_t b, Double_t e, Int_t x, Double_t em, Double_t v);
0098
0099
0100 static Double_t EvalPolynomial(Double_t x, const Int_t coef[], Int_t N);
0101 static Double_t EvalMonomial(Double_t x, const Int_t coef[], Int_t N);
0102 Double_t LogFactorial(Int_t n);
0103
0104 Double_t ComputeInterval(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);
0105
0106 void SetModelParameters(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);
0107
0108 void SetModelParameters();
0109
0110 Double_t GetBackground();
0111
0112 public:
0113
0114
0115 TRolke(Double_t CL = 0.9, Option_t *option = "");
0116
0117
0118 ~TRolke() override;
0119
0120
0121 Double_t GetCL() const {
0122 return fCL;
0123 }
0124 void SetCL(Double_t CL) {
0125 fCL = CL;
0126 }
0127
0128
0129 void SetCLSigmas(Double_t CLsigmas) {
0130 fCL = TMath::Erf(CLsigmas / TMath::Sqrt(2.0)) ;
0131 }
0132
0133
0134
0135 void SetPoissonBkgBinomEff(Int_t x, Int_t y, Int_t z, Double_t tau, Int_t m);
0136
0137
0138 void SetPoissonBkgGaussEff(Int_t x, Int_t y, Double_t em, Double_t tau, Double_t sde);
0139
0140
0141 void SetGaussBkgGaussEff(Int_t x, Double_t bm, Double_t em, Double_t sde, Double_t sdb);
0142
0143
0144 void SetPoissonBkgKnownEff(Int_t x, Int_t y, Double_t tau, Double_t e);
0145
0146
0147 void SetGaussBkgKnownEff(Int_t x, Double_t bm, Double_t sdb, Double_t e);
0148
0149
0150 void SetKnownBkgBinomEff(Int_t x, Int_t z, Int_t m, Double_t b);
0151
0152
0153 void SetKnownBkgGaussEff(Int_t x, Double_t em, Double_t sde, Double_t b);
0154
0155
0156 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);
0157
0158
0159 bool GetLimits(Double_t& low, Double_t& high);
0160 Double_t GetUpperLimit();
0161 Double_t GetLowerLimit();
0162
0163
0164 bool GetSensitivity(Double_t& low, Double_t& high, Double_t pPrecision = 0.00001);
0165
0166
0167
0168 bool GetLimitsQuantile(Double_t& low, Double_t& high, Int_t& out_x, Double_t integral = 0.5);
0169
0170
0171 bool GetLimitsML(Double_t& low, Double_t& high, Int_t& out_x);
0172
0173
0174 bool GetCriticalNumber(Int_t& ncrit,Int_t maxtry=-1);
0175
0176
0177
0178 bool GetBounding() const {
0179 return fBounding;
0180 }
0181
0182
0183
0184 void SetBounding(const bool bnd) {
0185 fBounding = bnd;
0186 }
0187
0188
0189 void SetSwitch(bool bnd) ;
0190
0191
0192 void Print(Option_t*) const override;
0193
0194 ClassDefOverride(TRolke, 2)
0195 };
0196
0197
0198 #endif
0199