Re: About the TF1

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Mon, 4 Oct 2010 17:01:42 +0200


  It is up to you. We can help if you provide a very short script that we use to reproduce your problem.

Rene Brun

On 04/10/2010 16:13, yczhang_at_ihep.ac.cn wrote:
> I just use CMT to compile the codes and generate a .exe file and then use ./.exe -i input.root -o output.root to finish my work.
> I am afraid that reproducing my problem requests the CMT package and data. What's more, an interface between CMT and ROOT.
> So, should I send the package or just the codes and data?
>
>> -----原始邮件-----
>> 发件人: "Rene Brun"<Rene.Brun_at_cern.ch>
>> 发送时间: 2010年10月4日 星期一
>> 收件人: yczhang_at_ihep.ac.cn
>> 抄送: ROOT<roottalk_at_root.cern.ch>
>> 主题: Re: [ROOT] About the TF1
>>
>> Could you send the shortest possible running script reproducing your
>> problem ?
>>
>> Rene Brun
>>
>> yczhang_at_ihep.ac.cn wrote:
>>> Hi rooters,
>>> I've met a strange problem:
>>> I wrote a function called changedfitf to do PMT calibration. When I set the TH1F's range from 0 to 300 and then use:
>>> TF1 *myfunc = new TF1("myfunc",changedfitf,0,300,9);
>>> It can work very well:
>>> ------------------------Changed Pmt Full Model Fit-------------------------
>>> The zero bin num is 10 the max non zero bin is 198
>>> the max_content_bin_X=44.5
>>> xlow=0 larger than 3sigma(3.85062) of Q0(0)
>>> the corrected mu=0.133396(the raw mu=0.133396)
>>> the data mu = 0.133396
>>> the p.e. maximum for fitting is : 6
>>> the fitting range is:(0, 197)
>>> mu = 0.133396
>>> Q0 = 0
>>> Delta0 = 3.85062
>>> Q1 = 45.0928
>>> Delta1 = 13.5278
>>> w = 0.02
>>> A = 0.015
>>> Threshold = 6.01237
>>> Thresigma = 1.33608
>>> ===============================Fitting==========================
>>> =================================TF1==========================
>>> FCN=168.433 FROM MIGRAD STATUS=CONVERGED 1313 CALLS 1314 TOTAL
>>> EDM=3.6852e-11 STRATEGY= 1 ERROR MATRIX UNCERTAINTY 2.3 per cent
>>> EXT PARAMETER STEP FIRST
>>> NO. NAME VALUE ERROR SIZE DERIVATIVE
>>> 1 #mu 1.09114e-01 2.87723e-03 -6.40448e-08 -6.05769e-03
>>> 2 Q_{0} 0.00000e+00 fixed
>>> 3 #sigma_{0} 3.85062e+00 fixed
>>> 4 Q_{1} 4.50307e+01 1.80311e-01 2.74274e-06 -1.42659e-04
>>> 5 #sigma_{1} 1.34602e+01 3.09561e-02 7.94038e-05** at limit **
>>> 6 W 7.63768e-02 5.74221e-03 -5.65470e-07 -6.53761e-05
>>> 7 #alpha 9.43000e-02 6.93699e-03 6.21250e-08 6.44549e-04
>>> 8 Thre 1.43637e+01 2.69871e-01 -1.03166e-06 -2.27925e-05
>>> 9 #sigma_{Thre} 3.03582e+00 1.31803e-01 -6.48437e-07 5.15239e-05
>>> ---------------------------------Completed!---------------------------------
>>>
>>> But when I set the TH1F's range from 0 to 1000 and then use:
>>> TF1 *myfunc = new TF1("myfunc",changedfitf,0,1000,9);
>>> It will not work:
>>> ===============================Fitting==========================
>>> =================================TF1==========================
>>> *** glibc detected *** malloc(): memory corruption: 0x097bce60 ***
>>> It will break when reaching "TF1 *myfunc = new TF1("myfunc",changedfitf,0,1000,9)"
>>> I was very confused with this problem
>>> Can anyone help me? Thanks a lot!
>>>
>>> --
>>> Best regards,
>>> ZhangYiChun
>>> Institute of High Energy Physics
>>> Yuquan street 19, Shijingshan district, Beijing, China
>>> EMail: yczhang_at_ihep.ac.cn
>>>
>>>
Received on Mon Oct 04 2010 - 17:01:48 CEST

This archive was generated by hypermail 2.2.0 : Tue Oct 05 2010 - 05:50:02 CEST