Changeset 7442 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 12/05/05 16:36:41 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r7392 r7442 47 47 48 48 #include <TRandom.h> 49 #include <TFeldmanCousins.h> 49 50 50 51 #include <TLine.h> … … 256 257 257 258 return kTRUE; 259 } 260 261 // -------------------------------------------------------------------------- 262 // 263 // Calculate the upper limit for fEventsSignal number of observed events 264 // and fEventsBackground number of background events. 265 // 266 // Therefor TFeldmanCousin is used. 267 // 268 // The Feldman-Cousins method as described in PRD V57 #7, p3873-3889 269 // 270 Double_t MAlphaFitter::CalcUpperLimit() const 271 { 272 // get a FeldmanCousins calculation object with the default limits 273 // of calculating a 90% CL with the minimum signal value scanned 274 // = 0.0 and the maximum signal value scanned of 50.0 275 TFeldmanCousins f; 276 f.SetMuStep(0.05); 277 f.SetMuMax(100); 278 return f.CalculateUpperLimit(fEventsSignal, fEventsBackground); 258 279 } 259 280 … … 315 336 TF1 *fcn = f.fFunc; 316 337 f.fFunc = new TF1(*fFunc); 338 f.fFunc->SetName("Dummy"); 317 339 gROOT->GetListOfFunctions()->Remove(f.fFunc); 318 f.fFunc->SetName("Dummy");319 340 delete fcn; 320 341 } -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h
r7392 r7442 53 53 SignalFunc_t fSignalFunc; // Type of signal function 54 54 // Result 55 Double_t fSignificance; // significance of signal56 Double_t fSignificanceExc; // significance of excess55 Double_t fSignificance; // significance of an unknown signal (Li/Ma 17) 56 Double_t fSignificanceExc; // significance of a known excess (Li/Ma 5) 57 57 Double_t fEventsExcess; // calculated number of excess events (signal-bg) 58 58 Double_t fEventsSignal; // calculated number of signal events … … 88 88 fTitle = title ? title : "Fit alpha"; 89 89 90 fFunc->SetName("Dummy"); 90 91 gROOT->GetListOfFunctions()->Remove(fFunc); 91 fFunc->SetName("Dummy");92 92 93 93 Clear(); … … 147 147 } 148 148 fSignalFunc=func; 149 fFunc->SetName("Dummy"); 149 150 gROOT->GetListOfFunctions()->Remove(fFunc); 150 fFunc->SetName("Dummy");151 151 fCoefficients.Set(3+fPolynomOrder+1); 152 152 fCoefficients.Reset(); … … 175 175 Double_t Eval(Double_t d) const { return fFunc ? fFunc->Eval(d) : 0; } 176 176 177 Double_t CalcUpperLimit() const; 178 177 179 // Interface to fit 178 180 Bool_t Fit(TH1D &h, Bool_t paint=kFALSE);
Note:
See TracChangeset
for help on using the changeset viewer.