35 MinMassChi2CombJigsaw::MinMassChi2CombJigsaw(
const std::string& sname,
36 const std::string& stitle,
37 int N_comb,
int N_mass)
38 : CombinatoricJigsaw(sname, stitle, N_comb, N_mass),
39 m_Ncomb(N_comb), m_Nmass(N_mass)
41 for(
int i = 0; i < m_Nmass; i++){
43 m_Sigma.push_back(1.);
47 MinMassChi2CombJigsaw::~MinMassChi2CombJigsaw() {}
49 void MinMassChi2CombJigsaw::SetMass(
double mass,
int i){
50 if(i < 0 || i >= m_Nmass)
53 m_Mass[i] = std::max(mass, 0.);
56 void MinMassChi2CombJigsaw::SetSigma(
double sigma,
int i){
57 if(i < 0 || i >= m_Nmass)
65 bool MinMassChi2CombJigsaw::EvaluateMetric(
double& metric)
const {
69 for(
int i = 0; i < m_Nmass; i++){
70 mass = GetDependancyStates(i).GetFourVector().M();
71 chi2 += (mass-m_Mass[i])*(mass-m_Mass[i])/m_Sigma[i]/m_Sigma[i];