We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we have a model for double Gaussian? A double Gaussian is the sum of two Gaussians with the same mean. I tried the code below but it did not work.
class DoubleGauss(pyroofit.PDF): def __init__(self, observable, mean = (-1, 0, 1), sigma = (0, 1), sigma_ratio = (1, 10), name = 'double_gaussian', **kwds): # observable is the variable in the dataframe i.e. mass super(DoubleGauss, self).__init__(name = name, **kwds) x = self.add_observable(observable) # Add parameters mean = self.add_parameter(mean, "mean") sigma1 = self.add_parameter(sigma, "sigma1") s2overs1 = self.add_parameter(sigma_ratio, "s2overs1") sigma2 = ROOT.RooFormulaVar("sigma2", "sigma2", "@0 * @1", ROOT.RooArgList(sigma1, s2overs1)) sigma2 = self.add_parameter(sigma2, "sigma2") sig1 = Gauss(x, mean, sigma1, name = 'Narrow Gaussian') sig2 = Gauss(x, mean, sigma2, name = 'Wide Gaussian') total = sig1 + sig2 self.roo_pdf = total.roo_pdf
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Can we have a model for double Gaussian? A double Gaussian is the sum of two Gaussians with the same mean. I tried the code below but it did not work.
The text was updated successfully, but these errors were encountered: