-
-
Save mgmarino/906056 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 | |
amodel = model( 0.1, | |
0.1, | |
0.1, | |
0.1, | |
0.1, | |
0.1, | |
0.1, | |
0.1, | |
3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment