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&#39;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>         &quot;small mean&quot;= ggpar(2)*10000<br>        else                                               ! Always take the smallest mean<br>

          &quot;small mean&quot;= ggpar(5)*10000        <br>        endif<br>        <br>        if(abs(ggpar(3)).lt.abs(ggpar(6))) then ! Comparing a narrow and wide sigmas<br>         &quot;small mean&quot;= ggpar(3)*10000<br>

            else                                            ! Always take the smallest sigma<br>         &quot;small sigma&quot;= 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,  &lt;<a href="mailto:seema@jlab.org">seema@jlab.org</a>&gt; 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&#39;t switch<br>
   if(PAR[2]&gt;PAR[5]){<br>
      for(i=0;i&lt;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>
&gt; Hi Seema,<br>
&gt;<br>
&gt; This can have significant effect.<br>
&gt; What are the values in pmin and pmax arrays?<br>
&gt; The initial parameters are close enough, the ratio of the first and<br>
&gt; fourth parameters should be same,<br>
&gt; the other parameters should start<br>
&gt; with the same values. Also I  am<br>
&gt; not sure if the number of parameters<br>
&gt; matters in these calls, but I would make them identical too.<br>
&gt;<br>
&gt; I would suggest changing user_ana<br>
&gt; to match the calibration procedure source.<br>
&gt;<br>
&gt; Hovanes<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Sent from my iPhone<br>
&gt;<br>
&gt; On Dec 5, 2010, at 5:01 PM, <a href="mailto:seema@jlab.org">seema@jlab.org</a> wrote:<br>
&gt;<br>
&gt;&gt; Hello Everyone,<br>
&gt;&gt; I have checked once again the fitting function used in dc3  and user_ana<br>
&gt;&gt; software. Although double gaussian is used in each case but the starting<br>
&gt;&gt; parameters are not allowed to vary freely in user_ana and that may be<br>
&gt;&gt; the<br>
&gt;&gt; reason for inconsistency in time residual means.<br>
&gt;&gt;<br>
&gt;&gt; Functional form used in user_ana<br>
&gt;&gt;<br>
&gt;&gt; call hfithn(hid,&#39;G+G&#39;,&#39;QB&#39;,0,ggpar,step,pmin,pmax,eggpar,chi2)<br>
&gt;&gt; ggpar(1) = 50000<br>
&gt;&gt; ggpar(2) = 0.<br>
&gt;&gt; ggpar(3) = 0.02<br>
&gt;&gt; ggpar(4) = 10000<br>
&gt;&gt; ggpar(5) = 0.<br>
&gt;&gt; ggpar(6) = 0.1<br>
&gt;&gt;<br>
&gt;&gt; Functional form used in dc3<br>
&gt;&gt;<br>
&gt;&gt; hfithn(HID,&quot;g+g&quot;,&quot;Q&quot;,6,PAR,STEP,PMIN,PMAX,SIGPAR,&amp;CHISQ);<br>
&gt;&gt;<br>
&gt;&gt; PAR[6] = {500.0, 0.0, 0.0300, 50.0, 0.0, 0.100}<br>
&gt;&gt;<br>
&gt;&gt; Please notice the extra  &#39;B&#39; option selected in user_ana and also the<br>
&gt;&gt; starting parameters are different!<br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt; Seema<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; Dear all,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; due to various activities, Hall closing, PAC deadline and so on,<br>
&gt;&gt;&gt; tomorrow&#39;s eg6 meeting is canceled.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Stepan<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Lowq mailing list<br>
&gt;&gt;&gt; <a href="mailto:Lowq@jlab.org">Lowq@jlab.org</a><br>
&gt;&gt;&gt; <a href="https://mailman.jlab.org/mailman/listinfo/lowq">https://mailman.jlab.org/mailman/listinfo/lowq</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Lowq mailing list<br>
&gt;&gt; <a href="mailto:Lowq@jlab.org">Lowq@jlab.org</a><br>
&gt;&gt; <a href="https://mailman.jlab.org/mailman/listinfo/lowq">https://mailman.jlab.org/mailman/listinfo/lowq</a><br>
&gt;<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>