Can't use RooConst

Hi,
I saw defination like RooArgLiast(RooConst(1),RooConst(2)) in some macros. But when I use this, it reminds me “Function RooConst(1) is not defined in current scope”. So was RooConst removed from root or did I misuse the defination?

Thanks,
Zhaozhou

Dear Zhaozhou,

the RooConst is in ROOT but in the RooFit namespace. If you want to use it, just add this line:

using namespace RooFit ;

or write down the namespace explicitly:

RooFit::RooConst(42)

Cheers,
Danilo

[quote=“dpiparo”]Dear Zhaozhou,

the RooConst is in ROOT but in the RooFit namespace. If you want to use it, just add this line:

using namespace RooFit ;

or write down the namespace explicitly:

RooFit::RooConst(42)

Cheers,
Danilo[/quote]
It works. Thank you!