diff --git a/raremodel-tf.py b/raremodel-tf.py index 5bc1c90..2d368cb 100644 --- a/raremodel-tf.py +++ b/raremodel-tf.py @@ -80,7 +80,7 @@ def resonance(q, _mass, width, phase, scale): - q2 = tf.pow(x, 2) + q2 = tf.pow(q, 2) mmu = ztf.constant(pdg['muon_M']) @@ -115,9 +115,9 @@ def bifur_gauss(q, mean, sigma_L, sigma_R, scale): - x_left = tf.where(x < mean, x, False) + x_left = tf.where(q < mean, q, False) - x_right = tf.where(q >= mean, x, False) + x_right = tf.where(q >= mean, q, False) #Calculate the exponential part of the cusp @@ -239,10 +239,10 @@ def _unnormalized_pdf(self, x): def jpsi_res(q): - return resonace(q, _mass = self.params['jpsi_mass'], scale = self.params['jpsi_scale'], phase = self.params['jpsi_phase'], width = self.params['jpsi_width']) + return resonance(q, _mass = self.params['jpsi_mass'], scale = self.params['jpsi_scale'], phase = self.params['jpsi_phase'], width = self.params['jpsi_width']) def psi2s_res(q): - return resonace(q, _mass = self.params['psi2s_mass'], scale = self.params['psi2s_scale'], phase = self.params['psi2s_phase'], width = self.params['psi2s_width']) + return resonance(q, _mass = self.params['psi2s_mass'], scale = self.params['psi2s_scale'], phase = self.params['psi2s_phase'], width = self.params['psi2s_width']) def cusp(q): return bifur_gauss(q, mean = self.params['cusp_mass'], sigma_L = self.params['sigma_L'], sigma_R = self.params['sigma_R'], scale = self.params['cusp_scale'])