Parameter name length in RooFit

Hi,
There is a length limit for the name of parameters in RooFit (or in migrad). Here is the crash you observe when you cross this boundary:

Wed Feb 8 18:10:03 2012 =========================================================== Wed Feb 8 18:10:03 2012 There was a crash. Wed Feb 8 18:10:03 2012 This is the entire stack trace of all threads: Wed Feb 8 18:10:03 2012 =========================================================== Wed Feb 8 18:10:03 2012 #0 0x000000356d899fc5 in waitpid () from /lib64/libc.so.6 Wed Feb 8 18:10:03 2012 #1 0x000000356d83c331 in do_system () from /lib64/libc.so.6 Wed Feb 8 18:10:03 2012 #2 0x00002ab77a3659f6 in TUnixSystem::StackTrace() () from /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc5-gcc43-opt/17.5.0/LCGCMT/LCGCMT_62a/InstallArea/x86_64-slc5-gcc43-opt/lib/libCore.so Wed Feb 8 18:10:03 2012 #3 0x00002ab77a3652cc in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc5-gcc43-opt/17.5.0/LCGCMT/LCGCMT_62a/InstallArea/x86_64-slc5-gcc43-opt/lib/libCore.so Wed Feb 8 18:10:03 2012 #4 Wed Feb 8 18:10:03 2012 #5 0x00002ab779975385 in RooMinuit::migrad() () from /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc5-gcc43-opt/17.5.0/LCGCMT/LCGCMT_62a/InstallArea/x86_64-slc5-gcc43-opt/lib/libRooFitCore.so Wed Feb 8 18:10:03 2012 #6 0x00002ab77986a64b in RooAbsPdf::fitTo(RooAbsData&, RooLinkedList const&) () from /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc5-gcc43-opt/17.5.0/LCGCMT/LCGCMT_62a/InstallArea/x86_64-slc5-gcc43-opt/lib/libRooFitCore.so Wed Feb 8 18:10:03 2012 #7 0x00002ab779865e70 in RooAbsPdf::fitTo(RooAbsData&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&) () from /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc5-gcc43-opt/17.5.0/LCGCMT/LCGCMT_62a/InstallArea/x86_64-slc5-gcc43-opt/lib/libRooFitCore.so Wed Feb 8 18:10:03 2012 #8 0x00002ab779538f4d in BTagCombination::CombinationContext::Fit() () from /home/gwatts/athena/AtlasOffline-17.5.0/InstallArea/x86_64-slc5-gcc43-opt/lib/libCombination.so Wed Feb 8 18:10:03 2012 #9 0x00002ab7795006bc in BTagCombination::CombineAnalyses(BTagCombination::CalibrationInfo const&) () from /home/gwatts/athena/AtlasOffline-17.5.0/InstallArea/x86_64-slc5-gcc43-opt/lib/libCombination.so Wed Feb 8 18:10:03 2012 #10 0x00000000004046ab in main () Wed Feb 8 18:10:03 2012 ===========================================================

At some point the parameters must be copied into a fixed length buffer without protection. It would be fantastic if a message was printed out before the crash, as it could potentially save hours of debugging.

Also, in 5.32 the length seems to be something around 140 characters (easy to hit when you automate the building of parameters), and somewhat less in 5.26 (though I’ve not tested it yet).

Cheers,
Gordon.

According to Kyle this has been fixed already in the head and just not made it into a release yet. Sweet!

Hi Gordon,

I think Kyle was referring to the limitations in the workspace factory, which was restricting expressions to 1024 character, which I have already earlier this year in the trunk.

Concerning the variable names I confirm that I still see the crash. I suspect it is somehow related to the old version of minuit, which is still used by default in RooFit. If I rerun the example while specifying Minimizer(“Minuit2”) on the fitTo() command line I see that everything works fine, so that is probably the best way forward for you.

Wouter

Great! Thanks. If the crash can’t be easily fixed, perhaps a warning?

Also, what are the differences between the two minimizers? I chose miniut by default…

Hi,

Gordon, I can certainly add a warning. Concerning the difference: Minuit is the original version
of Minuit from Fred James ported to C++ using F2C. Minuit2 is rewrite of the same algorithms in
C++ from scratch. It is has been very thoroughly validated meanwhile - and I think there is no reason
not to use it at this point (Lorenzo might be able to be more specific).

Wouter

Thanks! I will try switching and see if it passes all my tests, then!