Skip to content

Conversation

@DryRun
Copy link
Member

@DryRun DryRun commented Oct 17, 2017

Added a function that makes polynomials for TF1s:

def polyn_msd_pt(nrho, npt):
    def fun_msd_pt(x, par):
        rho = ROOT.TMath.Log((x[0]*x[0])/(x[1]*x[1]))
        pt = x[1]
        ret = 0.
        for i in xrange(nrho + 1):
            for j in xrange(npt + 1):
                par_index = i + nrho*j
                ret += par[par_index] * rho**i * pt**j
        return ret
    return fun_msd_pt

(similarly for rho/pt and rho functions)

Also, I converted all the indentation to four spaces. Sorry that it's impossible to read the PR because of this.

@DryRun DryRun force-pushed the generic-poly-function branch from 2cff35c to 448e6e5 Compare October 17, 2017 18:07
@DryRun
Copy link
Member Author

DryRun commented Oct 20, 2017

I don't know if this tags people automatically, so @jmduarte -- I made this PR to your script which makes it a bit easier to generate the polynomials. Unfortunately, the diff is impossible to read since I also converted the mixed tab/space indentation to 4-tab spacing... sorry about that. The generating functions themselves start on line 1215.

@jmduarte jmduarte self-requested a review June 26, 2018 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant