I am using RooMCStudy to do the toy Monte Carlo study. It works well with ROOT 5.12.00, but it crashed with ROOT 5.14.00f and 5.16.00. It is strange for me. I also found a similar bug report:
sourceforge.net/tracker/index.ph … tid=491900
You could find the prototype of my codes here:
twiki.cern.ch/twiki/pub/LHCb/Li … fetime3.cc
What I modified are:
1)change the name to lifetime3.C
2)add two lines in void lifetime3(int nEvents=10000, double SoB=0.3) {}:
gSystem->Load(“libRooFit”);
using namespace RooFit;
and delete the line “using namespace RooFit;” in the very beginning.
Then it works with ROOT 5.14.00f and 5.16.00 ( % root -l lifetime3.C ).
But If I tried to do the RooMCStudy and add the following before the line:
RooDataSet *toyData = pdf->generate(RooArgSet(*observables),Verbose(false),NumEvents(10000));
RooMCStudy *mgr = new RooMCStudy(*pdf_wrong, *pdf_wrong, *observables, “q”, “mhr”);
mgr->generateAndFit( 10, 100);
It crashed. What’s wrong here? Thanks a lot.
Processing lifetime3.C…
RooFit v2.11 – Developed by Wouter Verkerke and David Kirkby
Copyright © 2000-2005 NIKHEF, University of California & Stanford University
All rights reserved, please read roofit.sourceforge.net/license.txt
RooRealVar::setRange(m) new range named ‘lowersideband’ created with bounds [5.13,5.205]
RooRealVar::setRange(m) new range named ‘signal’ created with bounds [5.205,5.31]
RooRealVar::setRange(m) new range named ‘uppersideband’ created with bounds [5.355,5.43]
RooMCStudy::run: Generating and fitting sample 9
*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library “/lib/tls/libthread_db.so.1”.
Attaching to program: /proc/8142/exe, process 8142
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled]
[New Thread -1218586080 (LWP 8142)]
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
0x0037023e in __waitpid_nocancel () from /lib/tls/libc.so.6
Thread 1 (Thread -1218586080 (LWP 8142)):
#0 0x0037023e in __waitpid_nocancel () from /lib/tls/libc.so.6
#1 0x00304fa4 in do_system () from /lib/tls/libc.so.6
#2 0x001f9c3f in system () from /lib/tls/libpthread.so.0
#3 0x00608d67 in TUnixSystem::Exec () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCore.so
#4 0x0060916b in TUnixSystem::StackTrace () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCore.so
#5 0x00606fa1 in TUnixSystem::DispatchSignals () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCore.so
#6 0x006050d1 in SigHandler () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCore.so
#7 0x0060b8e1 in sighandler () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCore.so
#8
#9 0x06ee9bb2 in RooLinkedList::iterator () from /projects/lhcb/hejb/software/root/root_5.16/lib/libRooFitCore.so
#10 0x06e6f178 in RooAbsCollection::operator= () from /projects/lhcb/hejb/software/root/root_5.16/lib/libRooFitCore.so
#11 0x06ef427d in RooMCStudy::run () from /projects/lhcb/hejb/software/root/root_5.16/lib/libRooFitCore.so
#12 0x06ef4581 in RooMCStudy::generateAndFit () from /projects/lhcb/hejb/software/root/root_5.16/lib/libRooFitCore.so
#13 0x070b0f22 in G__G__RooFitCore3_173_0_4 () from /projects/lhcb/hejb/software/root/root_5.16/lib/libRooFitCore.so
#14 0x00d0cd9b in Cint::G__ExceptionWrapper () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#15 0x00dae0e9 in G__call_cppfunc () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#16 0x00d9d493 in G__interpret_func () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#17 0x00d88cc8 in G__getfunction () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#18 0x00e16e90 in G__getstructmem () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#19 0x00e16535 in G__getvariable () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#20 0x00d7fdb5 in G__getitem () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#21 0x00d760a7 in G__getexpr () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#22 0x00dc7adb in G__exec_function () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#23 0x00dcec35 in G__exec_statement () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#24 0x00d9b769 in G__interpret_func () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#25 0x00d89e5d in G__getfunction () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#26 0x00d8010e in G__getitem () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#27 0x00d760a7 in G__getexpr () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#28 0x00d75422 in G__calc_internal () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#29 0x00dd8229 in G__process_cmd () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCint.so
#30 0x005dcb4e in TCint::ProcessLine () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCore.so
#31 0x005dcccf in TCint::ProcessLineSynch () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCore.so
#32 0x00557eca in TApplication::ProcessFile () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCore.so
#33 0x005576f4 in TApplication::ProcessLine () from /projects/lhcb/hejb/software/root/root_5.16/lib/libCore.so
#34 0x00c696a8 in TRint::Run () from /projects/lhcb/hejb/software/root/root_5.16/lib/libRint.so
#35 0x080488be in main ()
Root > Function lifetime3() busy flag cleared