10#ifndef __BUMP_HUNTER_H__
11#define __BUMP_HUNTER_H__
27#include <TFitResult.h>
28#include <TFitResultPtr.h>
36#include <Math/ProbFunc.h>
37#include <Math/MinimizerOptions.h>
62 int res_factor,
double res_scale = 1.00,
bool asymptotic_limit =
true);
89 void initialize(TH1* histogram,
double &mass_hypothesis);
110 void setBounds(
double low_bound,
double high_bound);
192 std::vector<TH1*>
generateToys(TH1* histogram,
double n_toys,
int seed,
int toy_sig_samples,
193 int bkg_mult = 1, TH1* signal_hist =
nullptr);
224 return res_scale * (0.000379509 + (0.0416842 * mass) - (0.271364 * mass * mass) + (3.49537 * mass * mass * mass) - (11.1153 * mass * mass * mass * mass));
250 void getChi2Prob(
double min_nll_null,
double min_nll,
double &q0,
double &p_value);
void getChi2Prob(double min_nll_null, double min_nll, double &q0, double &p_value)
description
void setWindowSizeUsesResScale(bool window_use_res_scale)
Sets whether the window size is scaled according to the resolution scaling factor.
void printDebug(std::string message)
Print debug statement.
double correctMass(double mass)
description
void calculatePValue(HpsFitResult *result)
description
double getMassResolution(double mass, double res_scale)
Get Mass Resolution.
void getUpperLimitPower(TH1 *histogram, HpsFitResult *result)
description
void getUpperLimitAsymptotic(TH1 *histogram, HpsFitResult *result)
description
void getUpperLimitAsymCLs(TH1 *histogram, HpsFitResult *result)
description
HpsFitResult * bkg_only_result_
void initialize(TH1 *histogram, double &mass_hypothesis)
Given the mass of interest, setup the window parameters and initialize the fit parameters.
double getMassResolution(double mass)
void runBatchMode(bool batch=true)
Enable batch running.
void setResolutionScale(double res_scale)
Set the resolution after instantiation.
void enableDebug(bool debug=true)
Enable/disable debug.
bool window_use_res_scale_
void writeResults(bool write_results=true)
Write the fit results to a text file.
FitFunction::BkgModel bkg_model_
void fitBkgOnly()
Fit using a background only model.
void setBounds(double low_bound, double high_bound)
Set the histogram bounds.
std::vector< TH1 * > generateToys(TH1 *histogram, double n_toys, int seed, int toy_sig_samples, int bkg_mult=1, TH1 *signal_hist=nullptr)
description
void getUpperLimit(TH1 *histogram, HpsFitResult *result)
Get the signal upper limit.
HpsFitResult * performSearch(TH1 *histogram, double mass_hypothesis, bool skip_bkg_fit, bool skip_ul)
Perform a search for a resonance at the given mass hypothesis.