Skip to content

Instantly share code, notes, and snippets.

Created April 6, 2011 17:04
Show Gist options
  • Save anonymous/906053 to your computer and use it in GitHub Desktop.
Save anonymous/906053 to your computer and use it in GitHub Desktop.
import ROOT
ROOT.gSystem.Load("libEXOROOT")
class model:
def __init__(self,RC_tau_1,RC_tau_2,CR_tau_1,CR_tau_2,CR_tau_3,baseline,lower_range,upper_range,size):
self.function = ROOT.TF1('function',self,lower_range,upper_range,size)
self.function.SetParName(0, 'number of signals')
self.cm = ROOT.EXOChannelManager()
self.cm.initialize(RC_tau_1,RC_tau_2,CR_tau_1,CR_tau_2,CR_tau_3)
self.cm.set_baseline(baseline)
def __call__(self, t, par):
val = 0.0
try:
val = self.cm.signal_sum(t,par)
except OverflowError:
return 0.0
return val
def GetTF1(self):
return self.function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment