Roofit problem: crash with RooMCStudy

Hello,

I am currently using Roofit v2.31 through Root 5.18 and I want to perform toys MC studies.
I am thus trying to use the RooMCstudy class feed with RooProdpdf’s as shown in the joined piece of code in attachement (It is the simplest version which introduces a crash at the execution :
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[#1] INFO:Generation – RooMCStudy::run: Generating and fitting sample 18

*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library “/lib64/tls/libthread_db.so.1”.
Attaching to program: /proc/24798/exe, process 24798
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled] …
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
)
A curious thing is that I can perform successfully more complicated things (adding pdf of background & and extended way…) within root 5.14 without problem but ONLY if I consider generation pdf identical to fit pdf (passed both as unique argument in Roomcstudy), distinguish generation and fit pdf’s brings also trouble and my first idea was thus to move to a more recent version of roofit … but the problem is still remaining

I can’t see where my approach is wrong

Many thanks in advance for help !
Cheers,
Arnaud
main.cpp (4.97 KB)

Hi Arnaud,

There was a bug in RooMCStudy that was fixed in ROOT 5.19. If you pick up ROOT 5.19 this problem should go away.

Wouter

Hi Wouter,

Many thanks for the quick reply, I will migrate in ROOT version

Cheers,

Arnaud