nasim | 1 Feb 2008 16:14
Picon
Picon

[ROOT] finding the exact cordinate of the bins in Xaxis

Hi,
I am trying to find an exact (root) coordinate of my each point (bin) in my 
Xaxis. The reason I need this is to overlap the Xaxis of my inset 
plot to my main plot (plot is attached). Is there anyway to to this?
Many thanks,
Nasim
Rene Brun | 1 Feb 2008 23:39
Picon
Picon

Re: [ROOT] finding the exact cordinate of the bins in Xaxis

myhist->GetXaxis()->GetBinCenter(bin);

Rene Brun

nasim <at> hep.man.ac.uk wrote:
> Hi,
> I am trying to find an exact (root) coordinate of my each point (bin) 
> in my Xaxis. The reason I need this is to overlap the Xaxis of my 
> inset plot to my main plot (plot is attached). Is there anyway to to 
> this?
> Many thanks,
> Nasim
>
> ------------------------------------------------------------------------
>

Anil Singh | 2 Feb 2008 04:19
Favicon

[ROOT] Combining rootfiles with different weights


   Dear Rooters,

                      I am trying to combine events from two root files. One corresponds to one channel and other to another one. I
want to create a cumulative file containing events from both channels in proportion to their
crossections. Is it possible to do some jugglery with hadd macro and 
make it to do "weighted addition" or some thing similar??

                                  Any help will be grately appreciated.

A.  Singh
LPC, Fermi Lab

Lorenzo Moneta | 2 Feb 2008 10:53
Picon
Picon

[ROOT] Re: [ROOTDEV] how to use MathMore ?

Hello Christian,

  you need first to configure root with mathmore, to do that you need  
to specify in the configure the location of gsl in case it is not  
installed
in your system. A GSL version >= 1.8 is required.
You can do that by putting the gsl-config in your path or by  
specifying the include and lib dir location of GSL :
./configure --with-gsl-incdir --with-gsl-libdir

Then you need to add in your Makefile -lMathMore.

Furthermore, I reccomend to use the class ROOT::Math::Random insted of  
ROOT::Math::GSLRandomEngine. In the latter case you would need to call  
the method Initialize().

An example exists in mathmore/test/testRandom.cxx (or  
testRandomDist.cxx)

See anyway the attached tr file with the corrections,

  Cheers

  Lorenzo
Attachment (GSLTEST.tgz): application/octet-stream, 1697 bytes

On Feb 1, 2008, at 7:03 PM, Christian Hansen wrote:

>
(Continue reading)

Dr P Dupre | 3 Feb 2008 03:49
Picon
Favicon

[ROOT] I do not unerstand

Hello,

I am trying to link my code (after compilation) on a Fedora 6 machine 
where I compiled root version 5_18 and I get an error message.
NLFitting.o: In function `Fitting::Fit(TString, unsigned int, float, 
int)':
NLFitting.C:(.text+0x120b): undefined reference to `TFitter::TFitter(int)'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libf2c.so: undefined 
reference to `MAIN__'
collect2: ld returned 1 exit status
make: *** [multiline] Error 1

The compilation is OK on another machine (FC7) with the version 5.16 !

What am I missing ?

Regards

--

-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Patrick Dupré                                             pd520 <at> york.ac.uk
University of York                                 Department of Chemistry
Heslington, York              YO10 5DD                      United Kingdom
Phone: +44-(0)-1904-434384                        Fax: +44-(0)-1904-432516
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Antonio Bulgheroni | 4 Feb 2008 10:48
Picon
Gravatar

[ROOT] TH1::GetNormFactor() what's for?

Dear ROOTers,

      In these days I'm playing with normalized histograms and I was surprised by the behavior of GetNormFactor. The documentation is not very useful (sigh!) and I don't understand what is for. I though it was returning the value used to scale the bin contents, but I can't get any numbers different from 0.

Attached an example.

Thanks for the clarification!

Antonio

--
Antonio Bulgheroni, PhD

Computers have a lot in common with air conditioners:
Once you open WINDOWS, they stop working properly.

Attachment (test.C): text/x-c++src, 408 bytes
Antonio Bulgheroni | 4 Feb 2008 11:48
Picon
Gravatar

Re: [ROOT] TH1::GetNormFactor() what's for?

Thanks for helping!

On Feb 4, 2008 11:45 AM, Rene Brun <Rene.Brun <at> cern.ch> wrote:
TH1::GetNormFactor returns what was set via TH1::SetNormFactor(double
factor).
This normalization factor is stored as a TH1 data member. When set, this
factor is used to scale
automatically the picture at drawing time without modifying the
histogram contents.
On the other hand, when calling TH1::Scale, the bin contents are
modified accordingly and there is
no way to remember what was the argument to TH1::Scale

Rene Brun

Antonio Bulgheroni wrote:
> Dear ROOTers,
>
>       In these days I'm playing with normalized histograms and I was
> surprised by the behavior of GetNormFactor. The documentation is not
> very useful (sigh!) and I don't understand what is for. I though it
> was returning the value used to scale the bin contents, but I can't
> get any numbers different from 0.
>
> Attached an example.
>
> Thanks for the clarification!
>
> Antonio
>
> --
> Antonio Bulgheroni, PhD
>
> Computers have a lot in common with air conditioners:
> Once you open WINDOWS, they stop working properly.




--
Antonio Bulgheroni, PhD

Computers have a lot in common with air conditioners:
Once you open WINDOWS, they stop working properly.
Christian Holm Christensen | 4 Feb 2008 12:04
Picon
Favicon

Re: [ROOT] I do not unerstand

Hi Rene and Dupre,

On Sun, 2008-02-03 at 08:33 +0100, Rene Brun wrote:
> It looks like you forgot to link with -lMinuit

One should not write code that needs explicit linking against libMinuit.
See also this thread: 

        http://root.cern.ch/root/roottalk/roottalk06/0120.html

for why it is a _bad_ idea. 

It would be really cool if this was reflected more in the library names
and directory structure used by ROOT. 

Yours,

--

-- 
 ___  |  Christian Holm Christensen 
  |_| |  -------------------------------------------------------------
    | |  Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
     _|           DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
    _|            Denmark                    Office: (+45) 353  25 447
 ____|   Email:   cholm <at> nbi.dk               Web:    www.nbi.dk/~cholm
 | |

Dr P Dupre | 4 Feb 2008 12:06
Picon
Favicon

Re: [ROOT] I do not unerstand


Hello,

In fact the problem is with libf2c.so. This library is still bugged
although libf2c.a is OK. It is like for a very long time !

Regards.

> Hi Rene and Dupre,
>
> On Sun, 2008-02-03 at 08:33 +0100, Rene Brun wrote:
>> It looks like you forgot to link with -lMinuit
>
> One should not write code that needs explicit linking against libMinuit.
> See also this thread:
>
>        http://root.cern.ch/root/roottalk/roottalk06/0120.html
>
> for why it is a _bad_ idea.
>
> It would be really cool if this was reflected more in the library names
> and directory structure used by ROOT.
>
> Yours,
>
>

--

-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Patrick Dupré                                             pd520 <at> york.ac.uk
University of York                                 Department of Chemistry
Heslington, York              YO10 5DD                      United Kingdom
Phone: +44-(0)-1904-434384                        Fax: +44-(0)-1904-432516
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Christian Holm Christensen | 4 Feb 2008 12:32
Picon
Favicon

Re: [ROOT] I do not unerstand

Hi Dupre,

On Mon, 2008-02-04 at 11:06 +0000, Dr P Dupre wrote:
> Hello,
> 
> In fact the problem is with libf2c.so. This library is still bugged
> although libf2c.a is OK. It is like for a very long time !

Erhm, why are you linking against libf2c?   I assume you're using G77 or
GFortran.  In either case, you should use the appropriate library for
that compiler: libg2c for G77 and libgfortran (possibly also
libgfortranbegin) for GFortran.  

If you use Autotools for your build system, then "configure" will figure
these things out automatically for you.  A quick search on ROOTTalk will
give you pointers to examples. 

If you rolled your own build system - which I certainly would not
recommend - then you need to make proper checks yourself - see for
example the ROOT build system. 

Note, that you should not link against an archive (aka static library -
normally ending in ".a") when building libraries (aka shared library -
normally containing ".so" and ending in a version number), since the
archive does not contain position independent code (PIC).  If you're
building an executable via archives, then you need to be a bit careful
with the link order (most derived first). 

Yours,

--

-- 
 ___  |  Christian Holm Christensen 
  |_| |  -------------------------------------------------------------
    | |  Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
     _|           DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
    _|            Denmark                    Office: (+45) 353  25 447
 ____|   Email:   cholm <at> nbi.dk               Web:    www.nbi.dk/~cholm
 | |


Gmane