Created
April 6, 2011 17:04
-
-
Save anonymous/906053 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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