Re: MyHist_2D ->Draw() :: Intersting

From: <asaddiqu_at_ualberta.ca>
Date: Mon, 9 Aug 2010 14:01:09 -0600


I am not on lxplus server. It's cdf stuff. "dt" and "dx" are well defined in cdf coding, like

float dt = fCosmicBlock->DeltaTof();
float dx = d0Corr(track1);

But please don't forget that i can see these histograms in "TBrowser" . My only problem is "Draw()".
I also draw 1D histogram of "dx" which is fine. myhist_1D->Fill(fabs(dx));

If there is some problem in filling then i shouldn't be able to see in "TBrowser".

Cheers, Asif

Quoting "Marc Escalier" <escalier_at_lal.in2p3.fr>:

> Hi,
>
> the behaviour that you observe is strange.
>
> ==> Maybe you should put some printing in your code to see what dt
> and fabs(dx) are.
>
> maybe that fabs(dx) give you back a strange stuff : so printing it
> could help for the investigation
>
> i assume that dt and dx are not pointers and not vectors.
>
> and maybe provide a minimal code to check (if feasible)
>
> and provide some copy/paste of the line that define :
> myhist_2D
> myhist_2D_abs
> dt
> dx
>
> (or also, put your code in a public directory of lxplus (i don't
> find it in ~asaddiqu at lxplus)
>
> regards
>
> ====
> On Mon, 9 Aug 2010, asaddiqu_at_ualberta.ca wrote:
>
>> Thank you Stephan & Marc for your reply.
>>
>> I am pretty sure that there is no sub directory problem. I just
>> found an interesting thing which might explain my problem.
>> Let say i have two parameters time "dt"(which is always positive) &
>> distance from either side of a vertex"dx"(could be positive or
>> negative)to fill a 2D histogram. In first case i take absolute
>> value of "dx" and in second case i don't,
>>
>> Case1:
>> myhist_2D_abs->Fill(dt,fabs(dx));
>>
>> Case2 :
>> myhist_2D->Fill(dt,dx);
>>
>> So, "Draw()" command works for second case but does not work for
>> first case(for absolute value) and gives an error message that i
>> already mentioned.
>>
>>
>> Cheers, Asif
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Quoting asaddiqu_at_ualberta.ca:
>>
>>>
>>> Hi,
>>>
>>> I can view my 2D histogram by "TBrowser" but whenever i try to see
>>> it by "Draw()".
>>> It shows an error message which is following.
>>>
>>> ============================================
>>> root[1] myhist_2D->Draw()
>>> Error: Symbol myhist_2D is not defined in current scope
>>> FILE:(tmpfile) LINE:1
>>> Error: Failed to evaluate myhist_2D->Draw()Possible candidates are...
>>> filename line:size busy function type and name
>>> =============================================
>>>
>>> Unfortunately, i am using an older version of root{4.00/08
>>> December 2004 } but there should be no problem of version with
>>> this basic thing.
>>>
>>> Cheers, Asif
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
>
Received on Mon Aug 09 2010 - 22:01:23 CEST

This archive was generated by hypermail 2.2.0 : Mon Aug 09 2010 - 23:50:01 CEST