Hi Seema,<br><br>Since in user_ana we are monitoring the DC means and sigmas with and <br>without the local angle cuts, we are calculating these variables in two steps.<br>In the first step (without cuts) the DC residuals mean and sigmas (noted as <br>
weighted mean and sigma in the monitoring web page) are calculated for each <br>superlayer and sector as:<br> <br>weighted mean= (abs(ggpar(1)*ggpar(3))*ggpar(2)+abs(ggpar(4)*ggpar(6))*ggpar(5))<br> /(abs(ggpar(1)*ggpar(3))+abs(ggpar(4)*ggpar(6)))*10000 <br>
<br>whith an extra sign adjustment which is not used on dc3 formula.<br><br> weighted sigma= (abs(ggpar(1)*ggpar(3))*abs(ggpar(3))+abs(ggpar(4)*ggpar(6))*abs(ggpar(6)))<br> /(abs(ggpar(1)*ggpar(3))+abs(ggpar(4)*ggpar(6)))*10000<br>
<br> where gpar is the fit parameter's vector. <br><br>However, with the local angle cuts, the residuals means and sigmas (noted as small mean and <br>sigma in the monitoring page) are written to the CSQL database with the following requirement:<br>
<br> if(abs(ggpar(2)).lt.abs(ggpar(5))) then ! Comparing a narrow and wide means like on dc3<br> "small mean"= ggpar(2)*10000<br> else ! Always take the smallest mean<br>
"small mean"= ggpar(5)*10000 <br> endif<br> <br> if(abs(ggpar(3)).lt.abs(ggpar(6))) then ! Comparing a narrow and wide sigmas<br> "small mean"= ggpar(3)*10000<br>
else ! Always take the smallest sigma<br> "small sigma"= ggpar(6)*10000 <br> endif <br><br>In this case the smallest mean and sigma are taken directly from the fit without any further calculation. So, I am not sure which set of parameters (weighted or small) you are using to <br>
compare with your DC results. I think since the dc calibration includes similar cuts we may <br>need to compare dc results with the small variables but even though we will still have some disagreement since we are not tuning the parameters anymore after the fit.<br>
<br>Best regards,<br><br>Lamiaa <br><br clear="all">************************************************************<br>
* Lamiaa El Fassi email: <a href="mailto:elfassi@jlab.org">elfassi@jlab.org</a><br>* Research Associate @ Rutgers University <br>* Phone: (757) 269-7011 // Fax: (757) 269-5703 <br>
* Jefferson Lab., 12000 Jefferson Ave. <br>* Suite# 4, MS 12H3<br>* Newport News, VA. 23606<br>************************************************************<br>
<br><br><div class="gmail_quote">On Wed, Dec 8, 2010 at 4:01 PM, <<a href="mailto:seema@jlab.org">seema@jlab.org</a>> wrote:<br><blockquote class="gmail_quote">
Hello Everyone,<br>
Please have a look at the attached file dc_mean.pdf. This table compares<br>
the time residual means for run number 61695. The numbers in the<br>
parentheses are from dc3 software. These are the numbers from my last<br>
iteration. I could not run trk_mon on this new cooked file because TBLA<br>
bank was not there in this new version of dc cooking. We still have some<br>
disagreement. In dc3 software we have one more constraint before<br>
calculating the mean and that is :<br>
// Make sure narrow and wide didn't switch<br>
if(PAR[2]>PAR[5]){<br>
for(i=0;i<3;i++){<br>
tmp=PAR[i];<br>
PAR[i]=PAR[i+3];<br>
PAR[i+3]=tmp;<br>
}<br>
}<br>
<br>
*sigma_narrow = 1.0E4*PAR[2];<br>
*sigma_wide = 1.0E4*PAR[5];<br>
*amplitude_ratio = PAR[0]/PAR[3];<br>
*mean = ((PAR[0]*PAR[1]*PAR[2]) + (PAR[3]*PAR[4]*PAR[5]))<br>
/((PAR[0]*PAR[2]) +(PAR[3]*PAR[5]));<br>
I am not sure if we have this condition implemented in user_ana.<br>
Please let me know if you have any questions.<br>
Best regards,<br>
Seema<br>
<div><div></div><div><br>
<br>
> Hi Seema,<br>
><br>
> This can have significant effect.<br>
> What are the values in pmin and pmax arrays?<br>
> The initial parameters are close enough, the ratio of the first and<br>
> fourth parameters should be same,<br>
> the other parameters should start<br>
> with the same values. Also I am<br>
> not sure if the number of parameters<br>
> matters in these calls, but I would make them identical too.<br>
><br>
> I would suggest changing user_ana<br>
> to match the calibration procedure source.<br>
><br>
> Hovanes<br>
><br>
><br>
><br>
> Sent from my iPhone<br>
><br>
> On Dec 5, 2010, at 5:01 PM, <a href="mailto:seema@jlab.org">seema@jlab.org</a> wrote:<br>
><br>
>> Hello Everyone,<br>
>> I have checked once again the fitting function used in dc3 and user_ana<br>
>> software. Although double gaussian is used in each case but the starting<br>
>> parameters are not allowed to vary freely in user_ana and that may be<br>
>> the<br>
>> reason for inconsistency in time residual means.<br>
>><br>
>> Functional form used in user_ana<br>
>><br>
>> call hfithn(hid,'G+G','QB',0,ggpar,step,pmin,pmax,eggpar,chi2)<br>
>> ggpar(1) = 50000<br>
>> ggpar(2) = 0.<br>
>> ggpar(3) = 0.02<br>
>> ggpar(4) = 10000<br>
>> ggpar(5) = 0.<br>
>> ggpar(6) = 0.1<br>
>><br>
>> Functional form used in dc3<br>
>><br>
>> hfithn(HID,"g+g","Q",6,PAR,STEP,PMIN,PMAX,SIGPAR,&CHISQ);<br>
>><br>
>> PAR[6] = {500.0, 0.0, 0.0300, 50.0, 0.0, 0.100}<br>
>><br>
>> Please notice the extra 'B' option selected in user_ana and also the<br>
>> starting parameters are different!<br>
>><br>
>> Best regards,<br>
>> Seema<br>
>><br>
>><br>
>>> Dear all,<br>
>>><br>
>>> due to various activities, Hall closing, PAC deadline and so on,<br>
>>> tomorrow's eg6 meeting is canceled.<br>
>>><br>
>>> Stepan<br>
>>> _______________________________________________<br>
>>> Lowq mailing list<br>
>>> <a href="mailto:Lowq@jlab.org">Lowq@jlab.org</a><br>
>>> <a href="https://mailman.jlab.org/mailman/listinfo/lowq">https://mailman.jlab.org/mailman/listinfo/lowq</a><br>
>>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Lowq mailing list<br>
>> <a href="mailto:Lowq@jlab.org">Lowq@jlab.org</a><br>
>> <a href="https://mailman.jlab.org/mailman/listinfo/lowq">https://mailman.jlab.org/mailman/listinfo/lowq</a><br>
><br>
</div></div><br>_______________________________________________<br>
Lowq mailing list<br>
<a href="mailto:Lowq@jlab.org">Lowq@jlab.org</a><br>
<a href="https://mailman.jlab.org/mailman/listinfo/lowq">https://mailman.jlab.org/mailman/listinfo/lowq</a><br></blockquote></div><br>