hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HpsFitResult.cxx
Go to the documentation of this file.
1#include <HpsFitResult.h>
2
4 :
5 q0_(0),
6 p_value_(0),
7 upper_limit_(0) {
8}
9
11
13 double bkgRate = -1.0;
14 double fitParams[6];
15 double mass[1];
16 mass[0] = mass_hypo_;
17 for(int ipar = 0; ipar < poly_order_+1; ipar++) {
18 fitParams[ipar] = comp_result_->GetParams()[ipar];
19 }
20
21 // Determine the type of background fit model.
24
25 // Create the background function.
26 if(poly_order_ == 1 && isChebyshev) {
28 bkgRate = bkg_func(mass, fitParams);
29 } else if(poly_order_ == 1 && !isChebyshev) {
31 bkgRate = bkg_func(mass, fitParams);
32 } else if(poly_order_ == 3 && isChebyshev) {
34 bkgRate = bkg_func(mass, fitParams);
35 } else if(poly_order_ == 3 && !isChebyshev) {
37 bkgRate = bkg_func(mass, fitParams);
38 } else if(poly_order_ == 5 && isChebyshev) {
40 bkgRate = bkg_func(mass, fitParams);
41 } else {
43 bkgRate = bkg_func(mass, fitParams);
44 }
45
46 return bkgRate;
47}
48
50 return comp_result_->GetErrors()[0];
51}
double bin_width_
TFitResultPtr comp_result_
double poly_order_
double window_size_
double mass_hypo_
double getFullBkgRate()
Get the background rate obtained from the signal+background hit at the mass hypo.
FitFunction::BkgModel bkg_model_
double getFullBkgRateError()
Get the background rate error from the signal+background fit at the mass hypo.