[Eg6_analysis] [Lowq] DC calibration issues
Lamiaa El Fassi
lamiomar at gmail.com
Wed Dec 22 16:24:14 EST 2010
Hi Seema and all,
As a follow-up to the DC discussion and since I gets confused with the
comments on
user_erun.F and calb.ddl about "with and without DC local angle cuts", I
looked again
to different routines on ana and user_ana packages to clarify this point.
The conclusion
is the following:
- by looking into dctrk_book.F and dctrk_fill.F, it turned out that the
ANAHIST DC residuals
histograms that are filled with the local angle cuts are labeled with
ID1=i*1000+k*100+45
(i*1000+45) for each superlayer and sector (all sector) where i&k=1,6.
However, The histograms
which are filled without cuts are labeled with ID2=i*1000+k*100+46
(i*1000+46) for each superlayer and sector (all sector) where i&k=1,6.
- user_erun.F contains ONLY the fit of the first set of histograms (ID1)
including the local angle
cuts. Those histograms are fitted twice (which is not clear why?).
After the first fit attempt, the weighted means and sigmas are calculated
using the formulas that I sent in my email below which are similar to dc3
program. I don't think the absolute value will make any difference between
the two results!
After these calculations, the set of weighted means and sigmas are written
to the CSQL database.
After initializing all the fit parameters one more time, those histograms
(ID1) are fitted again and
their fit results are written the CSQL database as SMALL MEAN & SIGMA
mentioned in my email below.
As a consequence, to prevent any further confusion, I have changed the
comments on user_ana/user_erun.F and bankdefs/calb.ddl uder
"~claseg6/pack_helps0v1" packages:
user_erun.F : - Removed the "DC residuals without cuts" comment
- Marked the first residuals fits: "DC residuals with
cuts: weighted method"
- Marked the second residuals fits: "DC residuals with
cuts: Fit results"
calb.ddl : - I kept the "with cuts" comment for all the CSQL
variables (from var. 125 till
var. 208 ) that are coming directly from the fit.
- I added the comment "with cuts and weights" to the
CSQL variables starting
from var. 41 till var. 124.
Therefore, in all dc3 and user_ana comparisons we must use the weighted mean
and sigma
which are consistent!
Best regards,
Lamiaa
************************************************************
* Lamiaa El Fassi email: elfassi at jlab.org
* Research Associate @ Rutgers University
* Phone: (757) 269-7011 // Fax: (757) 269-5703
* Jefferson Lab., 12000 Jefferson Ave.
* Suite# 4, MS 12H3
* Newport News, VA. 23606
************************************************************
On Sun, Dec 12, 2010 at 9:52 AM, Lamiaa El Fassi <lamiomar at gmail.com> wrote:
> Hi Seema,
>
> Since in user_ana we are monitoring the DC means and sigmas with and
> without the local angle cuts, we are calculating these variables in two
> steps.
> In the first step (without cuts) the DC residuals mean and sigmas (noted as
>
> weighted mean and sigma in the monitoring web page) are calculated for each
>
> superlayer and sector as:
>
> weighted mean=
> (abs(ggpar(1)*ggpar(3))*ggpar(2)+abs(ggpar(4)*ggpar(6))*ggpar(5))
>
> /(abs(ggpar(1)*ggpar(3))+abs(ggpar(4)*ggpar(6)))*10000
>
> whith an extra sign adjustment which is not used on dc3 formula.
>
> weighted sigma=
> (abs(ggpar(1)*ggpar(3))*abs(ggpar(3))+abs(ggpar(4)*ggpar(6))*abs(ggpar(6)))
>
> /(abs(ggpar(1)*ggpar(3))+abs(ggpar(4)*ggpar(6)))*10000
>
> where gpar is the fit parameter's vector.
>
> However, with the local angle cuts, the residuals means and sigmas (noted
> as small mean and
> sigma in the monitoring page) are written to the CSQL database with the
> following requirement:
>
> if(abs(ggpar(2)).lt.abs(ggpar(5))) then ! Comparing a narrow and
> wide means like on dc3
> "small mean"= ggpar(2)*10000
> else ! Always take
> the smallest mean
> "small mean"= ggpar(5)*10000
> endif
>
> if(abs(ggpar(3)).lt.abs(ggpar(6))) then ! Comparing a narrow and
> wide sigmas
> "small mean"= ggpar(3)*10000
> else ! Always take
> the smallest sigma
> "small sigma"= ggpar(6)*10000
> endif
>
> 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
> compare with your DC results. I think since the dc calibration includes
> similar cuts we may
> 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.
>
>
> Best regards,
>
> Lamiaa
>
> ************************************************************
> * Lamiaa El Fassi email: elfassi at jlab.org
> * Research Associate @ Rutgers University
> * Phone: (757) 269-7011 // Fax: (757) 269-5703
> * Jefferson Lab., 12000 Jefferson Ave.
> * Suite# 4, MS 12H3
> * Newport News, VA. 23606
> ************************************************************
>
>
> On Wed, Dec 8, 2010 at 4:01 PM, <seema at jlab.org> wrote:
>
>> Hello Everyone,
>> Please have a look at the attached file dc_mean.pdf. This table compares
>> the time residual means for run number 61695. The numbers in the
>> parentheses are from dc3 software. These are the numbers from my last
>> iteration. I could not run trk_mon on this new cooked file because TBLA
>> bank was not there in this new version of dc cooking. We still have some
>> disagreement. In dc3 software we have one more constraint before
>> calculating the mean and that is :
>> // Make sure narrow and wide didn't switch
>> if(PAR[2]>PAR[5]){
>> for(i=0;i<3;i++){
>> tmp=PAR[i];
>> PAR[i]=PAR[i+3];
>> PAR[i+3]=tmp;
>> }
>> }
>>
>> *sigma_narrow = 1.0E4*PAR[2];
>> *sigma_wide = 1.0E4*PAR[5];
>> *amplitude_ratio = PAR[0]/PAR[3];
>> *mean = ((PAR[0]*PAR[1]*PAR[2]) + (PAR[3]*PAR[4]*PAR[5]))
>> /((PAR[0]*PAR[2])
>> +(PAR[3]*PAR[5]));
>> I am not sure if we have this condition implemented in user_ana.
>> Please let me know if you have any questions.
>> Best regards,
>> Seema
>>
>>
>> > Hi Seema,
>> >
>> > This can have significant effect.
>> > What are the values in pmin and pmax arrays?
>> > The initial parameters are close enough, the ratio of the first and
>> > fourth parameters should be same,
>> > the other parameters should start
>> > with the same values. Also I am
>> > not sure if the number of parameters
>> > matters in these calls, but I would make them identical too.
>> >
>> > I would suggest changing user_ana
>> > to match the calibration procedure source.
>> >
>> > Hovanes
>> >
>> >
>> >
>> > Sent from my iPhone
>> >
>> > On Dec 5, 2010, at 5:01 PM, seema at jlab.org wrote:
>> >
>> >> Hello Everyone,
>> >> I have checked once again the fitting function used in dc3 and
>> user_ana
>> >> software. Although double gaussian is used in each case but the
>> starting
>> >> parameters are not allowed to vary freely in user_ana and that may be
>> >> the
>> >> reason for inconsistency in time residual means.
>> >>
>> >> Functional form used in user_ana
>> >>
>> >> call hfithn(hid,'G+G','QB',0,ggpar,step,pmin,pmax,eggpar,chi2)
>> >> ggpar(1) = 50000
>> >> ggpar(2) = 0.
>> >> ggpar(3) = 0.02
>> >> ggpar(4) = 10000
>> >> ggpar(5) = 0.
>> >> ggpar(6) = 0.1
>> >>
>> >> Functional form used in dc3
>> >>
>> >> hfithn(HID,"g+g","Q",6,PAR,STEP,PMIN,PMAX,SIGPAR,&CHISQ);
>> >>
>> >> PAR[6] = {500.0, 0.0, 0.0300, 50.0, 0.0, 0.100}
>> >>
>> >> Please notice the extra 'B' option selected in user_ana and also the
>> >> starting parameters are different!
>> >>
>> >> Best regards,
>> >> Seema
>> >>
>> >>
>> >>> Dear all,
>> >>>
>> >>> due to various activities, Hall closing, PAC deadline and so on,
>> >>> tomorrow's eg6 meeting is canceled.
>> >>>
>> >>> Stepan
>> >>> _______________________________________________
>> >>> Lowq mailing list
>> >>> Lowq at jlab.org
>> >>> https://mailman.jlab.org/mailman/listinfo/lowq
>> >>>
>> >>
>> >>
>> >> _______________________________________________
>> >> Lowq mailing list
>> >> Lowq at jlab.org
>> >> https://mailman.jlab.org/mailman/listinfo/lowq
>> >
>>
>> _______________________________________________
>> Lowq mailing list
>> Lowq at jlab.org
>> https://mailman.jlab.org/mailman/listinfo/lowq
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.jlab.org/pipermail/eg6_analysis/attachments/20101222/f7705a4a/attachment-0001.html
More information about the Eg6_analysis
mailing list