Discussion:
Calling Mathematica functions from ROOT
Barbara Storaci
2014-10-13 09:19:15 UTC
Permalink
Dear ROOT-Experts,

I discovered the possibility of calling Mathematica functions from ROOT at this
link <http://root.cern.ch/drupal/content/how-use-mathematica-root>.
This sounds exactly what I need. On the other hand the documentation in this
page looked obsolete. Is there any more recent documentation? Does this work
with the recent Mathematica versions (i.e. 9) or only with the old 5.1?

In my case what I would like to do is to write a new root/roofit class (in fact a new pdf
in root that derives from the usual RooAbsPdf) and call some mathematica function
in this class. Normally I'm compiling this new class with ".L RooAbsBNQ.cp++"
command inside the interpreter. How can I can integrate Mathematica calls in
this context?

Thanks a lot in advance,

Barbara




=============================================================
Barbara Storaci
Universität Zürich

CERN, office 13-1-034
CH-1211 Geneve
Postbox: F26110

Tel: +41 (0) 227679942
Email: ***@cern.ch<mailto:***@cern.ch>
=============================================================
Barbara Storaci
2014-10-15 20:14:35 UTC
Permalink
Hi again

just to add a bit of context to my request, it looks like the HOWTO guide refers to
some old version of ROOT and some extremely old version of Mathematica
(I browsed the several directories of the parc project on AFS and found the MathLink
module only within the 5.x versions).

Cheers,
Barbara
________________________________________
Da: Barbara Storaci
Inviato: lunedì 13 ottobre 2014 11.19
A: roottalk (Mailing list for ROOT users.)
Oggetto: Calling Mathematica functions from ROOT

Dear ROOT-Experts,

I discovered the possibility of calling Mathematica functions from ROOT at this
link <http://root.cern.ch/drupal/content/how-use-mathematica-root>.
This sounds exactly what I need. On the other hand the documentation in this
page looked obsolete. Is there any more recent documentation? Does this work
with the recent Mathematica versions (i.e. 9) or only with the old 5.1?

In my case what I would like to do is to write a new root/roofit class (in fact a new pdf
in root that derives from the usual RooAbsPdf) and call some mathematica function
in this class. Normally I'm compiling this new class with ".L RooAbsBNQ.cp++"
command inside the interpreter. How can I can integrate Mathematica calls in
this context?

Thanks a lot in advance,

Barbara




=============================================================
Barbara Storaci
Universität Zürich

CERN, office 13-1-034
CH-1211 Geneve
Postbox: F26110

Tel: +41 (0) 227679942
Email: ***@cern.ch<mailto:***@cern.ch>
=============================================================
Pere Mato Vila
2014-10-15 20:22:15 UTC
Permalink
Dear Barbara,

Lorenzo will be back next week. I am sure he will be able to help you.
Cheers,

Pere
Post by Barbara Storaci
Hi again
just to add a bit of context to my request, it looks like the HOWTO guide refers to
some old version of ROOT and some extremely old version of Mathematica
(I browsed the several directories of the parc project on AFS and found the MathLink
module only within the 5.x versions).
Cheers,
Barbara
________________________________________
Da: Barbara Storaci
Inviato: lunedì 13 ottobre 2014 11.19
A: roottalk (Mailing list for ROOT users.)
Oggetto: Calling Mathematica functions from ROOT
Dear ROOT-Experts,
I discovered the possibility of calling Mathematica functions from ROOT at this
link <http://root.cern.ch/drupal/content/how-use-mathematica-root>.
This sounds exactly what I need. On the other hand the documentation in this
page looked obsolete. Is there any more recent documentation? Does this work
with the recent Mathematica versions (i.e. 9) or only with the old 5.1?
In my case what I would like to do is to write a new root/roofit class (in fact a new pdf
in root that derives from the usual RooAbsPdf) and call some mathematica function
in this class. Normally I'm compiling this new class with ".L RooAbsBNQ.cp++"
command inside the interpreter. How can I can integrate Mathematica calls in
this context?
Thanks a lot in advance,
Barbara
=============================================================
Barbara Storaci
Universität Zürich
CERN, office 13-1-034
CH-1211 Geneve
Postbox: F26110
Tel: +41 (0) 227679942
=============================================================
-------------------------------------------------------------
Pere Mato CERN, PH Department, CH 1211 Geneva 23, Switzerland
e-mail: ***@cern.ch tel: +41 22 76 78696
fax: +41 22 76 68792 gsm: +41 76 48 70855
moneta
2014-10-21 16:01:13 UTC
Permalink
Dear Barbara,

Yes, it is true the iROOT instructions to use Mathematica code in ROOT refers to old Mathematica versions. I did not try them since a long time. I see that now new versions of Mathematica (I think from version 8), have a new way to call Mathematica functions from compiled C/C++ code. See

https://reference.wolfram.com/language/guide/CLanguageInterface.html

However, I think the MathLink module should be still available in the new versions. I don't have a time to see how to make it work with the new Mathematica version. If you find a way to solve this, please let me know and I will update the documentation.

But, just for curiosity, why do you want to use Mathematica ? Are you missing a mathematical function or an algorithm in ROOT that you need to use in RooFit ?

Best Regards

Lorenzo
Post by Barbara Storaci
Hi again
just to add a bit of context to my request, it looks like the HOWTO guide refers to
some old version of ROOT and some extremely old version of Mathematica
(I browsed the several directories of the parc project on AFS and found the MathLink
module only within the 5.x versions).
Cheers,
Barbara
________________________________________
Da: Barbara Storaci
Inviato: lunedì 13 ottobre 2014 11.19
A: roottalk (Mailing list for ROOT users.)
Oggetto: Calling Mathematica functions from ROOT
Dear ROOT-Experts,
I discovered the possibility of calling Mathematica functions from ROOT at this
link <http://root.cern.ch/drupal/content/how-use-mathematica-root>.
This sounds exactly what I need. On the other hand the documentation in this
page looked obsolete. Is there any more recent documentation? Does this work
with the recent Mathematica versions (i.e. 9) or only with the old 5.1?
In my case what I would like to do is to write a new root/roofit class (in fact a new pdf
in root that derives from the usual RooAbsPdf) and call some mathematica function
in this class. Normally I'm compiling this new class with ".L RooAbsBNQ.cp++"
command inside the interpreter. How can I can integrate Mathematica calls in
this context?
Thanks a lot in advance,
Barbara
=============================================================
Barbara Storaci
Universität Zürich
CERN, office 13-1-034
CH-1211 Geneve
Postbox: F26110
Tel: +41 (0) 227679942
=============================================================
Continue reading on narkive:
Loading...