[d2n-analysis-talk] S1 and S2m Time Averages: Problems With the SetAlias Method?

David Flay flay at jlab.org
Wed Sep 22 11:33:48 EDT 2010


On Tue, Sep 21, 2010 at 12:10 PM, David Flay <flay at jlab.org> wrote:

>
>
> On Tue, Sep 21, 2010 at 12:04 PM, Brad Sawatzky <brads at jlab.org> wrote:
>
>>
>> On Mon, 20 Sep 2010, David Flay wrote:
>>
>> > I have been trying to construct S1 and S2m time average root variables
>> > using the SetAlias method.  However, I have run into some odd issues:
>> >
>> > To obtain the S1 time average, for instance, my code is:
>> >
>> >     //construct the time averages:
>> > ch->SetAlias("S1TAvg_0","0.5e+09*(L.s1.lt_c[0]+L.s1.rt_c[0])");
>> > ch->SetAlias("S1TAvg_1","0.5e+09*(L.s1.lt_c[1]+L.s1.rt_c[1])");
>> > ch->SetAlias("S1TAvg_2","0.5e+09*(L.s1.lt_c[2]+L.s1.rt_c[2])");
>> > ch->SetAlias("S1TAvg_3","0.5e+09*(L.s1.lt_c[3]+L.s1.rt_c[3])");
>> > ch->SetAlias("S1TAvg_4","0.5e+09*(L.s1.lt_c[4]+L.s1.rt_c[4])");
>> > ch->SetAlias("S1TAvg_5","0.5e+09*(L.s1.lt_c[5]+L.s1.rt_c[5])");
>> >
>> ch->SetAlias("S1TimeAvg","(1.0/6.0)*(S1TAvg_0+S1TAvg_1+S1TAvg_2+S1TAvg_3+S1TAvg_4+S1TAvg_5)");
>>
>> The bad plots look like they are accessing the uncorrected variable
>> data, but I do not see how that is possible from the code you quote...
>> Any chance the you're not drawing the histo you think you are?  ie.
>> Copy-and-paste type error that you're unintentionally repeating when you
>> were testing (ie. commenting and uncommenting different blocks of lines
>> that should be identical, but really aren't).  Or some low-level
>> weirdness due to multiple object instantiations sharing the same name,
>> or a 'generic' histo pointer falls out of scope and isn't pointing to
>> the object you think it is...  That's what seems to be the most likely
>> culprit.
>>
>
> hmm, I'll check this out..
>

As far as I can see, I don't see any issues with repeats of code that
doesn't make sense...


>
>
>> Hmm, as an additional observation, the event counts in the histograms
>> don't seem to add up.  The 'Entries' line claims 1.2M events, but if I
>> add the bins up by eye I only get ~400k tops.  Where are the other 800k
>> events?
>>
>
> Good question... I'll have to investigate this
>
>
>
> Again, the Entries
>> number and the integrated counts in the visible bins don't seem to add
>> up, so perhaps you're just looking at a peak that was outside your histo
>> bounds when you divided by 1/6?
>>
>
> I should open up the bounds of the plot and see what it looks like with and
> without the 1/6 factor
>

I zoomed out on these various plots and I got some (odd) things going on
here.

The first plot is the sum <without> the factor of 1/6 or 1/16 (for S2m).

The second plot is <with> the factor.  This second plot seems to give a
'somewhat' more believable result... kind of.

The third plot uses the definitions for the time averages:


ch->SetAlias("S1TimeAvgTPads","0.5e+09*(L.s1.lt_c[L.s1.t_pads[0]]+L.s1.rt_c[L.s1.t_pads[0]])");

ch->SetAlias("S2mTimeAvgTPads","0.5e+09*(L.s2.lt_c[L.s2.t_pads[0]]+L.s2.rt_c[L.s2.t_pads[0]])");


This gives the most consistent and expected result of the three plots, at
least for S2m.
Further, if I consider the difference of these two variables (S2m - S1, as
defined at the top of this message) plotted vs. track-x, I get the fourth
plot.
Zooming in on the lower bright band, I get a structure that is identical to
beta vs. track-x
(the bumps are inverted, of course, since this is the time difference, not
1/t_diff vs track-x).

If I compare this to the same time difference, but using t_pads as the
argument, I obtain the last plot -- I zoomed in here,
because this was the only bright spot on the plot.



-- 
-----------------------------------------------------------
David Flay
Physics Department
Temple University
Philadelphia, PA 19122

office: Barton Hall, BA319
phone: (215) 204-1331

e-mail: flay at jlab.org
            flay at temple.edu

website: http://www.jlab.org/~flay <http://www.jlab.org/%7Eflay>
              http://quarks.temple.edu
-----------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.jlab.org/pipermail/d2n-analysis-talk/attachments/20100922/93180d2c/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s1-s2m_t-avgs-my-sum-zoom-out_20676_9_21_10.png
Type: image/png
Size: 21646 bytes
Desc: not available
Url : https://mailman.jlab.org/pipermail/d2n-analysis-talk/attachments/20100922/93180d2c/attachment-0005.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s1-s2m_t-avgs-my-sum-div-zoom-out_20676_9_21_10.png
Type: image/png
Size: 19970 bytes
Desc: not available
Url : https://mailman.jlab.org/pipermail/d2n-analysis-talk/attachments/20100922/93180d2c/attachment-0006.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s1-s2m_t-avgs-t-pads-zoom-out_20676_9_21_10.png
Type: image/png
Size: 23654 bytes
Desc: not available
Url : https://mailman.jlab.org/pipermail/d2n-analysis-talk/attachments/20100922/93180d2c/attachment-0007.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: time-diff_20676_9_21_10.png
Type: image/png
Size: 43759 bytes
Desc: not available
Url : https://mailman.jlab.org/pipermail/d2n-analysis-talk/attachments/20100922/93180d2c/attachment-0008.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s1-s2m_t-diff_t-pads_20676_9_22_10.png
Type: image/png
Size: 32921 bytes
Desc: not available
Url : https://mailman.jlab.org/pipermail/d2n-analysis-talk/attachments/20100922/93180d2c/attachment-0009.png 


More information about the d2n-analysis-talk mailing list