diff --git a/Makefile b/Makefile index 3e41f84ca3a86c1ae5d072bd1721458972bdfa39..d4224e4a1b059bff81917042b54300b982f1f3fb 100644 --- a/Makefile +++ b/Makefile @@ -130,6 +130,9 @@ endif ifeq ($(BUILDREFLEX),yes) MODULES += reflex endif +ifeq ($(BUILDMINUIT2),yes) +MODULES += minuit2 +endif ifeq ($(BUILDCINTEX),yes) MODULES += cintex endif diff --git a/build/unix/makestatic.sh b/build/unix/makestatic.sh index 5458c010a3d5110910b3b369b9f1921d1c7c2dbb..b29bed6a8eac7120ffeb04968be7121e244542f5 100755 --- a/build/unix/makestatic.sh +++ b/build/unix/makestatic.sh @@ -22,7 +22,7 @@ rm -f $ROOTALIB $ROOTAEXE $PROOFAEXE excl="main proofd rootd rootx pythia pythia6 venus mysql pgsql rfio sapdb \ hbook newdelete table utils srputils krb5auth chirp dcache x11ttf \ alien asimage ldap pyroot qt qtroot quadp ruby vmc xml xmlparser gl \ - roofit oracle netx auth rpdutils mathmore" + roofit oracle netx auth rpdutils mathmore minuit2" objs="" gobjs="" diff --git a/config/Makefile.depend b/config/Makefile.depend index dc28e193dfc681e2ba4d57463714448089596ddb..4e8df6c5f6b2f5087344a372e525e299d12fb711 100644 --- a/config/Makefile.depend +++ b/config/Makefile.depend @@ -38,6 +38,8 @@ HTMLLIBDEP = $(GRAFLIB) HTMLLIBEXTRA = lib/libGraf.lib MINUITLIBDEP = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB) MINUITLIBEXTRA = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib +MINUIT2LIBDEP = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB) +MINUIT2LIBEXTRA = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib FUMILILIBDEP = $(GRAFLIB) $(HISTLIB) FUMILILIBEXTRA = lib/libGraf.lib lib/libHist.lib TREEPLAYERLIBDEP = $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) @@ -132,6 +134,8 @@ HTMLLIBDEP = $(GRAFLIB) HTMLLIBEXTRA = -Llib -lGraf MINUITLIBDEP = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB) MINUITLIBEXTRA = -Llib -lGraf -lHist -lMatrix +MINUIT2LIBDEP = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB) +MINUIT2LIBEXTRA = -Llib -lGraf -lHist -lMatrix FUMILILIBDEP = $(GRAFLIB) $(HISTLIB) FUMILILIBEXTRA = -Llib -lGraf -lHist TREEPLAYERLIBDEP = $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) diff --git a/config/Makefile.in b/config/Makefile.in index 94e0c77d4c843bba6343d692e4adfe9f5ea65f1f..4cb05d515b508b4b10ceecb9b187857c08ed43b9 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -200,6 +200,10 @@ BUILDREFLEX := @buildreflex@ BUILDROOFIT := @buildroofit@ +BUILDROOFIT := @buildroofit@ + +BUILDMinuit2 := @buildminuit2@ + BUILDTABLE := @buildtable@ BUILDCLARENS := @buildclarens@ diff --git a/config/rootrc.in b/config/rootrc.in index 5fef2eec5a2028fc0dc2bcb99bbf69d9d248b290..de428b5b25c5118152b6ff7e75372c17526011f3 100644 --- a/config/rootrc.in +++ b/config/rootrc.in @@ -1,479 +1,481 @@ -# @(#)root/config:$Name: $:$Id: rootrc.in,v 1.114 2005/09/22 22:31:32 rdm Exp $ -# Author: Fons Rademakers 22/09/95 - -# ROOT Environment settings are handled via the class TEnv. To see -# which values are active do: gEnv->Print(). - -# Path used by dynamic loader to find shared libraries and macros. -# Paths are different for Unix and Windows. The example shows the defaults -# for all ROOT applications for either Unix or Windows. -Unix.*.Root.DynamicPath: .:@libdir@ -Unix.*.Root.MacroPath: .:@macrodir@ -WinNT.*.Root.DynamicPath: .;@bindir@;$(PATH) -WinNT.*.Root.MacroPath: .;@macrodir@ - -# Path where to look for TrueType fonts. -Unix.*.Root.UseTTFonts: true -*.*.Root.TTFontPath: @ttffontdir@ - -# Use Net* API functions. -WinNT.UseNetAPI: true - -# Use thread library (if exists). -Unix.*.Root.UseThreads: false - -# Select the compression algorithm (0=old zlib, 1=new zlib) -Root.ZipMode: 0 - -# Show where item is found in the specified path. -Root.ShowPath: false - -# Activate memory statistics (size and cnt is used to trap allocation of -# blocks of a certain size after cnt times). -Root.MemStat: 0 -Root.MemStat.size: -1 -Root.MemStat.cnt: -1 -Root.ObjectStat: 0 - -# Activate memory leak checker (use in conjunction with $ROOTSYS/bin/memprobe). -# Currently only works on Linux with gcc. -Root.MemCheck: 0 -Root.MemCheckFile: memcheck.out - -# Global debug mode. When >0 turns on progressively more details debugging. -Root.Debug: 0 -Root.Stacktrace: yes - -# Settings for X11 behaviour. -X11.Sync: no -X11.FindBestVisual: yes - -# Default editor. -Unix.*.Editor: vi -WinNT.*.Editor: notepad - -# Default 3d Viewer. -# By default 3-D views are shown in the pad, -# if the next line is activated, the default viewer will be OpenGL. -#Viewer3D.DefaultDrawOption: ogl - -# Default Fitter (current choices are Minuit and Fumili). -Root.Fitter: Minuit - -# Specify list of file endings which TTabCom (TAB completion) should ignore. -#TabCom.FileIgnore: .cpp:.h:.cmz - -# TCanvas specific settings. Opaque move and resize show full pad during -# the operation instead of only the outline. Especially for resize you'll -# need serious CPU power. UseScreenFactor=true means to size canvas according -# to size of screen, so a canvas still looks good on a low resolution -# laptop screen without having to change canvas size in macros. -# HighLightColor 2 = red. ShowEventStatus allows the event status bar to -# be turned on by default. AutoExec allows TExec objects to be executed -# on mouse and key events. -Canvas.MoveOpaque: false -Canvas.ResizeOpaque: false -Canvas.UseScreenFactor: true -Canvas.HighLightColor: 2 -Canvas.ShowEventStatus: false -Canvas.ShowToolBar: false -Canvas.ShowEditor: false -Canvas.AutoExec: true -Canvas.PrintDirectory . - -# Printer settings. -#WinNT.*.Print.Command: AcroRd32.exe -#Unix.*.Print.Command: a2ps -P%p --landscape --columns=2 --margin=30 -rf8.0 %f -#Print.Printer: 32-rb205-hp -#Print.Directory: . - -# Default histogram binnings for TTree::Draw(). -Hist.Binning.1D.x: 100 - -Hist.Binning.2D.x: 40 -Hist.Binning.2D.y: 40 -Hist.Binning.2D.Prof: 100 - -Hist.Binning.3D.x: 20 -Hist.Binning.3D.y: 20 -Hist.Binning.3D.z: 20 -Hist.Binning.3D.Profx: 100 -Hist.Binning.3D.Profy: 100 - -# THtml specific settings (for more see doc of THtml class). -Unix.*.Root.Html.SourceDir: .:src:include -WinNT.*.Root.Html.SourceDir: .;src;include -Root.Html.Root: http://root.cern.ch/root/html -#Root.Html.OutputDir: htmldoc/ -#Root.Html.Homepage: -#Root.Html.Header: -#Root.Html.Footer: -#Root.Html.Description: //____________________ -#Root.Html.Author: // Author: -#Root.Html.LastUpdate: // @(#) -#Root.Html.Copyright: * Copyright - -# GUI specific settings. -Gui.Backend: native -Gui.Factory: native -Gui.DefaultFont: -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1 -Gui.MenuFont: -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1 -Gui.MenuHiFont: -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1 -Gui.DocFixedFont: -adobe-courier-medium-r-*-*-12-*-*-*-*-*-iso8859-1 -Gui.DocPropFont: -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1 -Gui.IconFont: -adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1 -Gui.StatusFont: -adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1 -Gui.BackgroundColor: #c0c0c0 -Gui.ForegroundColor: black -Gui.SelectBackgroundColor: #000080 -Gui.SelectForegroundColor: white -Gui.DocumentBackgroundColor: white -Gui.DocumentForegroundColor: black -Gui.TooltipBackgroundColor: LightYellow -Gui.TooltipForegroundColor: black -Gui.IconPath: $(HOME)/icons:@iconpath@:. -Gui.MimeTypeFile: $(HOME)/.root.mimes -# If above does not exists defaults to this: -#Gui.MimeTypeFile: @etcdir@/root.mimes -# Can be either small, big, list, details -Browser.IconStyle: small -# Can be either name, type, size, date -Browser.SortBy: name -Browser.GroupView: 10000 -Browser.ShowHidden: no -Browser.AutoThumbnail: yes - -# Rint (interactive ROOT executable) specific alias, logon and logoff macros. -Rint.Load: rootalias.C -Rint.Logon: rootlogon.C -Rint.Logoff: rootlogoff.C -# Record session commands, set to "-" to turn off command recording. -Rint.History: $(HOME)/.root_hist - -# ACLiC customization. -# ACLiC.Linkdef specifies the suffix that will be added to the script name to -# try to locate a custom linkdef file when generating the dictionary. -ACLiC.Linkdef: _linkdef -# Set a top directory for storing the libraries produced by ACLiC. -#ACLiC.BuildDir: /where/I/would/like/my/compiled/scripts -# Add additional include directives for ACLiC compilations. -#ACLiC.IncludePaths: -I/where/the/includes/are - -# PROOF related variables -# -# PROOF debug options. -# Proof.DebugLevel: 0 -# Proof.DebugMask: -1 -# -# PROOF GDB hooks -# allows a debugger to be attached early in the startup phase of proofserv -# 0 - don't wait -# 1 - master proofserv enters wait loop -# 2 - slave proofserv enters wait loop -# 3 - any proofserv enters wait loop -# -# Proof.GdbHook: 0 -# -# -# On the master enable parallel startup of workers using threads -# Proof.ParallelStartup: yes -# -# Proof.StatsHist: no -# Proof.StatsTrace: no -# Proof.SlaveStatsTrace: no -# -# Proof.CondorHome: /opt/condor -# Proof.CondorConfig: /opt/condor/etc/condor_config -# -# PEAC.GmUrl: http://somewhere:8080/clarens/ -# PEAC.LmUrl: http://elsewhere:8080/clarens/ - -# Certificate and key -# Clarens.CertFile: $(HOME)/.globus/usercert.pem -# Clarens.KeyFile: $(HOME)/.globus/userkey.pem - -# Variables related to authentication to rootd and proofd. -# -# Default authentication method for rootd and proofd. -# These are supported for backward compatibility but have a very -# low priority. System defaults are generated by configure as a list -# in system.rootauthrc in $ROOTSYS/etc/ or /etc/root; the file -# $HOME/.rootauthrc can be used to override the system defaults. -# (0=UsrPwd, 1=SRP, 2=Krb5, 3=Globus,4=SSH, 5=UidGid) -Rootd.Authentication: 0 -Proofd.Authentication: 0 - -# Connection is shutdown at timeout expiration. Timeout is in seconds. -# Negotiation cannot be attempted at low level (i.e. inside -# TAuthenticate::Authenticate()) because of synchronization -# problems with the server. -# At higher level, TAuthenticate::HasTimedOut() gives information -# about timeout: 0 = no timeout; 1 = timeout, no methods left; -# 2 = timeout, still methods to be tried . -# Caller should decide about an additional attempt. -# Timeout disabled (< 0) by default. Can be changed on-the-fly -# with the static method TAuthenticate::SetTimeOut(to_value) -# -# Auth.Timeout: -1 - -# Password dialog box. -# Set to 0 if you do not want a dialog box to be popped-up -# when a password is requested. -# Default is 1. -# -# Auth.UsePasswdDialogBox: 0 - -# Set this to 1 if you want full SRP authentication in PROOF -# (Client-to-Master and Master-to-Slave). -Proofd.SendSRPPwd: 0 - -# Set this to 1 to use SSH authentication in PROOF servers -# (Master-to-Slave or Slaves-to-DataServers). This is switched -# off by default because credentials forwarding for SSH is not -# controlled by the system; however the user may have other -# ways to guarantee it, so it may want to switch it on. -ProofServ.UseSSH: 0 - -# Default login name (if not defined is taken from $(HOME)). -#UsrPwd.Login: qwerty -#SRP.Login: qwerty -#Krb5.Login: qwerty@LOCAL.DOM.AIN -#Globus.Login: cd:~/.globus cf:usercert.pem kf:userkey.pem ad:/etc/grid-security/certificates -#SSH.Login: qwerty -#UidGid.Login: qwerty - -# To be prompted for login information. -#UsrPwd.LoginPrompt: yes -#SRP.LoginPrompt: yes -#Krb5.LoginPrompt: yes -#Globus.LoginPrompt: yes -#SSH.LoginPrompt: yes -#UidGid.LoginPrompt: yes - -# To reuse established security context. -UsrPwd.ReUse: yes -SRP.ReUse: no -Krb5.ReUse: no -Globus.ReUse: yes -SSH.ReUse: yes - -# Duration validity of the sec context for UsrPwd, SRP and SSH. -# Format: <hours>:<minutes> (default 24:00) -#UsrPwd.Valid: 24:00 -#SRP.Valid: 24:00 -#SSH.Valid: 24:00 - -# To control password encryption for UsrPwd authentication. -UsrPwd.Crypt: yes - -# Globus miscellanea. -# Globus Proxy duration: HH:MM (ex 12:15 for 12 hours and 15 min) -# 'default' for system default. -Globus.ProxyDuration: default -#Globus.ProxyDuration: 14 -# Number of bits for the initial key. -Globus.ProxyKeyBits: 1024 - -# Path to alternative 'ssh' (to override $PATH if ever needed). -#SSH.ExecDir: /usr/bin - -# In case of error, SSH returns 1 (or 256 = 0x100). -# To trap those errors for which one should retry, error printouts -# must be parsed; any substring found under the Env SSH.ErrorRetry -# triggers a retry condition; strings can be added here -# in the form (including double quotes): -# +SSH.ErrorRetry: "<error_string>" -# This is what one usually gets if the server has reached the maximum -# number of sshd daemons (defined by MaxStartups in sshd_config); -# this is a typical case in which one should retry. -SSH.ErrorRetry: "Connection closed by remote host" -# Max number of retries for SSH in case of retry error (see above). -SSH.MaxRetry: 100 - -# Type of key to be used for RSA encryption: -# 0 = local; 1 = SSL (default if openssl available). -RSA.KeyType: 1 - -# In case of 'RSA.KeyType: 1' this specifies the number of bits to -# be used for the Blowfish key used to encrypt the exchanged information -# Default 256, minimum 128, maximum 15912. -#SSL.BFBits: 256 - -# Server authentication in TServerSocket. -# -# General: file with server access rules -#SrvAuth.DaemonRc: /etc/root/system.daemonrc -# -# UsrPwd: check of host equivalence via /etc/hosts.equiv or $HOME/.rhosts. -#SrvAuth.CheckHostsEquivalence: 1 -# -# SRP: pass file (default $HOME/.srootdpass). -#SrvAuth.SRPpassfile: $HOME/.srootdpass -# -# Globus/GSI: hostcert configuration file. -#SrvAuth.HostCert: /etc/root/hostcert.conf -# Globus/GSI: gridmap file. -#SrvAuth.GridMap: /etc/grid-security/grid-mapfile -# -# SSH: port for the sshd daemon. -#SrvAuth.SshdPort: 22 - -# Force file opening via TNetFile (TXNetFile) if a hostname is specified -# in the Url. -# By default, for local files TFile::Open() invokes directly TFile -#TFile.ForceRemote: yes - -# Special cases for the TUrl parser, where the special cases are parsed -# in a protocol + file part, like rfio:host:/path/file.root, -# castor:/path/file.root or /alien/path/file.root. -# In case the file namespace descriptor ends with - the namespace -# is not a part of the filename. -# Extend in private .rootrc with a +Url.Special line. -Url.Special: file: rfio: hpss: castor: dcache: dcap: /alien/- /castor/ - -# The following env vars are handled by TXNetFile and related classes -# (module netx, libNetx.so). -# -# XNet.ConnectTimeout - maximum time to wait before server's -# response on a connect [10 s] -# XNet.RequestTimeout - maximum time to wait before considering -# a read/write failure [60 s] -# XNet.ConnectDomainAllowRE -# - sequence of TRegexp regular expressions -# separated by a |. -# A domain is granted access to for the -# first connection if it matches one of these -# regexps. Example: -# slac.stanford.edu|pd.infn.it|fe.infn.it -# XNet.ConnectDomainDenyRE -# - sequence of TRegexp regular expressions -# separated by a |. -# A domain is denied access to for the -# first connection if it matches one of these -# regexps. Example: -# slac.stanford.edu|pd.infn.it|fe.infn.it -# XNet.RedirDomainAllowRE -# - sequence of TRegexp regular expressions -# separated by a |. -# A domain is granted access to for a -# redirection if it matches one of these -# regexps. Example: -# slac.stanford.edu|pd.infn.it|fe.infn.it -# XNet.RedirDomainDenyRE -# - sequence of TRegexp regular expressions -# separated by a |. -# A domain is denied access to for a -# redirection if it matches one of these -# regexps. Example: -# slac.stanford.edu|pd.infn.it|fe.infn.it -# XNet.MaxRedirectCount - maximum number of redirections from -# server [255] -# XNet.Debug - log verbosity level -# (0=nothing, -# 1=messages of interest to the user, -# 2=messages of interest to the developers -# (includes also user messages), -# 3=dump of all sent/received data buffers -# (includes also user and developers -# messages). [0] -# XNet.ReconnectTimeout - sleep-time before going back to the -# load balancer (or rebouncing to the same -# failing host) after a read/write error -# [10 s] -# XNet.StartGarbageCollectorThread - -# for test/development purposes. Normally -# nonzero (True), but as workaround for -# external causes someone could be -# interested in not having the garbage -# collector thread around. -# [experimental!] -# XNet.GoAsynchronous - Default is 0. When activated, XTNetFile -# works in async mode, allowing input -# buffering and unsolicited responses -# [experimental!] -# XNet.TryConnect - Number of tries connect to a single -# server before giving up -# XNet.TryConnectServersList -# - Number of connect retries to the whole -# server list given [240] -# XNet.PrintTAG - Print a particular string the developers -# can choose to quickly recognize the -# version at run time [0] - -# Plugin library handlers. -Plugin.TFile: ^rfio: TRFIOFile RFIO "TRFIOFile(const char*,Option_t*,const char*,Int_t)" -+Plugin.TFile: ^castor: TCastorFile RFIO "TCastorFile(const char*,Option_t*,const char*,Int_t,Int_t)" -+Plugin.TFile: ^dcache: TDCacheFile DCache "TDCacheFile(const char*,Option_t*,const char*,Int_t)" -+Plugin.TFile: ^dcap: TDCacheFile DCache "TDCacheFile(const char*,Option_t*,const char*,Int_t)" -+Plugin.TFile: ^chirp: TChirpFile Chirp "TChirpFile(const char*,Option_t*,const char*,Int_t)" -+Plugin.TFile: ^alien: TAlienFile RAliEn "TAlienFile(const char*,Option_t*,const char*,Int_t)" -+Plugin.TFile: .+[.]xml$ TXMLFile XMLIO "TXMLFile(const char*,Option_t*,const char*,Int_t)" -@hasnetx@+Plugin.TFile: ^root: TXNetFile Netx "TXNetFile(const char*,Option_t*,const char*,Int_t,Int_t)" -Plugin.TSystem: ^rfio: TRFIOSystem RFIO "TRFIOSystem()" -+Plugin.TSystem: ^castor: TRFIOSystem RFIO "TRFIOSystem()" -+Plugin.TSystem: ^dcache: TDCacheSystem DCache "TDCacheSystem()" -+Plugin.TSystem: ^dcap: TDCacheSystem DCache "TDCacheSystem()" -+Plugin.TSystem: ^alien: TAlienSystem RAliEn "TAlienSystem()" -Plugin.TArchiveFile: .+[.]zip$ TZIPFile Core "TZIPFile(const char*,const char*,TFile*)" -Plugin.TSQLServer: ^mysql: TMySQLServer MySQL "TMySQLServer(const char*,const char*,const char*)" -+Plugin.TSQLServer: ^pgsql: TPgSQLServer PgSQL "TPgSQLServer(const char*,const char*,const char*)" -+Plugin.TSQLServer: ^sapdb: TSapDBServer SapDB "TSapDBServer(const char*,const char*,const char*)" -+Plugin.TSQLServer: ^oracle: TOracleServer Oracle "TOracleServer(const char*,const char*,const char*)" -Plugin.TGrid: ^alien TAlien RAliEn "TAlien(const char*,const char*,const char*,const char*)" -Plugin.TVirtualAuth: Root TRootAuth RootAuth "TRootAuth()" -Plugin.TVirtualPad: * TPad Gpad "TPad()" -Plugin.TVirtualHistPainter: * THistPainter HistPainter "THistPainter()" -Plugin.TVirtualTreePlayer: * TTreePlayer TreePlayer "TTreePlayer()" -Plugin.TVirtualTreeViewer: * TTreeViewer TreeViewer "TTreeViewer(const TTree*)" -Plugin.TSessionViewer: * TSessionViewer TreeViewer "TSessionViewer()" -Plugin.TVirtualGeoPainter: * TGeoPainter GeomPainter "TGeoPainter(TGeoManager*)" -Plugin.TVirtualUtil3D: * TUtil3D Graf3d "TUtil3D()" -Plugin.TVirtualUtilHist: * TUtilHist Hist "TUtilHist()" -Plugin.TVirtualUtilPad: * TUtilPad Gpad "TUtilPad()" -Plugin.TVirtualFitter: Minuit TFitter Minuit "TFitter(Int_t)" -+Plugin.TVirtualFitter: Fumili TFumili Fumili "TFumili(Int_t)" -Plugin.TVirtualPS: ps TPostScript Postscript "TPostScript()" -+Plugin.TVirtualPS: svg TSVG Postscript "TSVG()" -+Plugin.TVirtualPS: pdf TPDF Postscript "TPDF()" -+Plugin.TVirtualPS: image TImageDump Postscript "TImageDump()" -Plugin.TViewerX3D: x11 TViewerX3D X3d "TViewerX3D(TVirtualPad*,Option_t*,const char*,UInt_t,UInt_t)" -+Plugin.TViewerX3D: qt TQtViewerX3D QtX3d "TQtViewerX3D(TVirtualPad*,Option_t*,const char*,UInt_t,UInt_t)" -Plugin.TMinuitGraph: * TGraph Graf "TGraph(Int_t,const Double_t*,const Double_t*)" -Plugin.TImage: * TASImage ASImage "TASImage()" -Plugin.TPaletteEditor: * TASPaletteEditor ASImageGui "TASPaletteEditor(TAttImage*,UInt_t,UInt_t)" -Plugin.TImagePlugin: ps TASPluginGS ASPluginGS "TASPluginGS(const char*)" -+Plugin.TImagePlugin: eps TASPluginGS ASPluginGS "TASPluginGS(const char*)" -+Plugin.TImagePlugin: pdf TASPluginGS ASPluginGS "TASPluginGS(const char*)" -Plugin.TFileDrawMap * TFileDrawMap TreePlayer "TFileDrawMap(const TFile*, const char*, const char*)" -Plugin.TVirtualX: x11 TGX11 GX11 "TGX11(const char*,const char*)" -+Plugin.TVirtualX: x11ttf TGX11TTF GX11TTF "TGX11TTF()" -+Plugin.TVirtualX: win32 TGWin32 Win32 "TGWin32(const char*,const char*)" -+Plugin.TVirtualX: win32gdk TGWin32 Win32gdk "TGWin32(const char*,const char*)" -+Plugin.TVirtualX: qt TGQt GQt "TGQt(const char*,const char*)" -Plugin.TGuiFactory: root TRootGuiFactory Gui "TRootGuiFactory()" -+Plugin.TGuiFactory: win32 TWin32GuiFactory Win32 "TWin32GuiFactory()" -+Plugin.TGuiFactory: qt TQtRootGuiFactory QtRoot "TQtRootGuiFactory()" -Plugin.TGPasswdDialog: * TGPasswdDialog Gui "TGPasswdDialog(const char*,char*,Int_t,UInt_t,UInt_t)" -Plugin.TVirtualProof: ^condor: TProofCondor Proof "TProofCondor(const char*,const char*,const char*,Int_t)" -+Plugin.TVirtualProof: ^sm: TProofSuperMaster Proof "TProofSuperMaster(const char*,const char*,const char*,Int_t)" -+Plugin.TVirtualProof: ^peac: TProofPEAC Peac "TProofPEAC(const char*,const char*,const char*,Int_t)" -+Plugin.TVirtualProof: * TProof Proof "TProof(const char*,const char*,const char*,Int_t)" -Plugin.TProofProgressDialog: * TProofProgressDialog ProofGui "TProofProgressDialog(TVirtualProof*,const char*,Int_t,Long64_t,Long64_t)" -Plugin.TDataProgressDialog: * TDataProgressDialog peacGui "TDataProgressDialog(TVirtualProof*,const char*,Int_t,Long64_t)" -Plugin.TVirtualPadEditor: GedOld TPadEditorOld GedOld "TPadEditorOld()" -+Plugin.TVirtualPadEditor: Ged TGedEditor Ged "TGedEditor(TCanvas*)" -Plugin.TVirtualViewer3D: x3d TViewerX3D X3d "TViewerX3D(TVirtualPad*)" -+Plugin.TVirtualViewer3D: ogl TGLSAViewer RGL "TGLSAViewer(TVirtualPad*)" -+Plugin.TVirtualViewer3D: ogle TGLViewer RGL "TGLViewer(TVirtualPad*)" -Plugin.TVirtualDragManager: * TGuiBldDragManager GuiBld "TGuiBldDragManager()" -Plugin.TGuiBuilder: * TRootGuiBuilder GuiBld "TRootGuiBuilder()" -Unix.*.Plugin.TVirtualGLImp: * TX11GL RGL "TX11GL()" -WinNT.*.Plugin.TVirtualGLImp: * TGWin32GL RGL "TGWin32GL()" -Unix.*.Plugin.TGLManager: * TX11GLManager RGL "TX11GLManager()" -WinNT.*.Plugin.TGLManager: * TGWin32GLManager RGL "TGWin32GLManager()" -Plugin.TGLPixmap: * TGLPixmap RGL "TGLPixmap(TPad*,Int_t,Int_t,Int_t,UInt_t,UInt_t)" - -# Example of custom setting for the Rint application (root.exe). -# This overrides the default specified above for a generic application. -# Color 5 is yellow. -Rint.Canvas.HighLightColor: 5 +# @(#)root/config:$Name: $:$Id: rootrc.in,v 1.115 2005/10/14 10:56:07 rdm Exp $ +# Author: Fons Rademakers 22/09/95 + +# ROOT Environment settings are handled via the class TEnv. To see +# which values are active do: gEnv->Print(). + +# Path used by dynamic loader to find shared libraries and macros. +# Paths are different for Unix and Windows. The example shows the defaults +# for all ROOT applications for either Unix or Windows. +Unix.*.Root.DynamicPath: .:@libdir@ +Unix.*.Root.MacroPath: .:@macrodir@ +WinNT.*.Root.DynamicPath: .;@bindir@;$(PATH) +WinNT.*.Root.MacroPath: .;@macrodir@ + +# Path where to look for TrueType fonts. +Unix.*.Root.UseTTFonts: true +*.*.Root.TTFontPath: @ttffontdir@ + +# Use Net* API functions. +WinNT.UseNetAPI: true + +# Use thread library (if exists). +Unix.*.Root.UseThreads: false + +# Select the compression algorithm (0=old zlib, 1=new zlib) +Root.ZipMode: 0 + +# Show where item is found in the specified path. +Root.ShowPath: false + +# Activate memory statistics (size and cnt is used to trap allocation of +# blocks of a certain size after cnt times). +Root.MemStat: 0 +Root.MemStat.size: -1 +Root.MemStat.cnt: -1 +Root.ObjectStat: 0 + +# Activate memory leak checker (use in conjunction with $ROOTSYS/bin/memprobe). +# Currently only works on Linux with gcc. +Root.MemCheck: 0 +Root.MemCheckFile: memcheck.out + +# Global debug mode. When >0 turns on progressively more details debugging. +Root.Debug: 0 +Root.Stacktrace: yes + +# Settings for X11 behaviour. +X11.Sync: no +X11.FindBestVisual: yes + +# Default editor. +Unix.*.Editor: vi +WinNT.*.Editor: notepad + +# Default 3d Viewer. +# By default 3-D views are shown in the pad, +# if the next line is activated, the default viewer will be OpenGL. +#Viewer3D.DefaultDrawOption: ogl + +# Default Fitter (current choices are Minuit and Fumili). +Root.Fitter: Minuit + +# Specify list of file endings which TTabCom (TAB completion) should ignore. +#TabCom.FileIgnore: .cpp:.h:.cmz + +# TCanvas specific settings. Opaque move and resize show full pad during +# the operation instead of only the outline. Especially for resize you'll +# need serious CPU power. UseScreenFactor=true means to size canvas according +# to size of screen, so a canvas still looks good on a low resolution +# laptop screen without having to change canvas size in macros. +# HighLightColor 2 = red. ShowEventStatus allows the event status bar to +# be turned on by default. AutoExec allows TExec objects to be executed +# on mouse and key events. +Canvas.MoveOpaque: false +Canvas.ResizeOpaque: false +Canvas.UseScreenFactor: true +Canvas.HighLightColor: 2 +Canvas.ShowEventStatus: false +Canvas.ShowToolBar: false +Canvas.ShowEditor: false +Canvas.AutoExec: true +Canvas.PrintDirectory . + +# Printer settings. +#WinNT.*.Print.Command: AcroRd32.exe +#Unix.*.Print.Command: a2ps -P%p --landscape --columns=2 --margin=30 -rf8.0 %f +#Print.Printer: 32-rb205-hp +#Print.Directory: . + +# Default histogram binnings for TTree::Draw(). +Hist.Binning.1D.x: 100 + +Hist.Binning.2D.x: 40 +Hist.Binning.2D.y: 40 +Hist.Binning.2D.Prof: 100 + +Hist.Binning.3D.x: 20 +Hist.Binning.3D.y: 20 +Hist.Binning.3D.z: 20 +Hist.Binning.3D.Profx: 100 +Hist.Binning.3D.Profy: 100 + +# THtml specific settings (for more see doc of THtml class). +Unix.*.Root.Html.SourceDir: .:src:include +WinNT.*.Root.Html.SourceDir: .;src;include +Root.Html.Root: http://root.cern.ch/root/html +#Root.Html.OutputDir: htmldoc/ +#Root.Html.Homepage: +#Root.Html.Header: +#Root.Html.Footer: +#Root.Html.Description: //____________________ +#Root.Html.Author: // Author: +#Root.Html.LastUpdate: // @(#) +#Root.Html.Copyright: * Copyright + +# GUI specific settings. +Gui.Backend: native +Gui.Factory: native +Gui.DefaultFont: -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1 +Gui.MenuFont: -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1 +Gui.MenuHiFont: -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1 +Gui.DocFixedFont: -adobe-courier-medium-r-*-*-12-*-*-*-*-*-iso8859-1 +Gui.DocPropFont: -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1 +Gui.IconFont: -adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1 +Gui.StatusFont: -adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1 +Gui.BackgroundColor: #c0c0c0 +Gui.ForegroundColor: black +Gui.SelectBackgroundColor: #000080 +Gui.SelectForegroundColor: white +Gui.DocumentBackgroundColor: white +Gui.DocumentForegroundColor: black +Gui.TooltipBackgroundColor: LightYellow +Gui.TooltipForegroundColor: black +Gui.IconPath: $(HOME)/icons:@iconpath@:. +Gui.MimeTypeFile: $(HOME)/.root.mimes +# If above does not exists defaults to this: +#Gui.MimeTypeFile: @etcdir@/root.mimes +# Can be either small, big, list, details +Browser.IconStyle: small +# Can be either name, type, size, date +Browser.SortBy: name +Browser.GroupView: 10000 +Browser.ShowHidden: no +Browser.AutoThumbnail: yes + +# Rint (interactive ROOT executable) specific alias, logon and logoff macros. +Rint.Load: rootalias.C +Rint.Logon: rootlogon.C +Rint.Logoff: rootlogoff.C +# Record session commands, set to "-" to turn off command recording. +Rint.History: $(HOME)/.root_hist + +# ACLiC customization. +# ACLiC.Linkdef specifies the suffix that will be added to the script name to +# try to locate a custom linkdef file when generating the dictionary. +ACLiC.Linkdef: _linkdef +# Set a top directory for storing the libraries produced by ACLiC. +#ACLiC.BuildDir: /where/I/would/like/my/compiled/scripts +# Add additional include directives for ACLiC compilations. +#ACLiC.IncludePaths: -I/where/the/includes/are + +# PROOF related variables +# +# PROOF debug options. +# Proof.DebugLevel: 0 +# Proof.DebugMask: -1 +# +# PROOF GDB hooks +# allows a debugger to be attached early in the startup phase of proofserv +# 0 - don't wait +# 1 - master proofserv enters wait loop +# 2 - slave proofserv enters wait loop +# 3 - any proofserv enters wait loop +# +# Proof.GdbHook: 0 +# +# +# On the master enable parallel startup of workers using threads +# Proof.ParallelStartup: yes +# +# Proof.StatsHist: no +# Proof.StatsTrace: no +# Proof.SlaveStatsTrace: no +# +# Proof.CondorHome: /opt/condor +# Proof.CondorConfig: /opt/condor/etc/condor_config +# +# PEAC.GmUrl: http://somewhere:8080/clarens/ +# PEAC.LmUrl: http://elsewhere:8080/clarens/ + +# Certificate and key +# Clarens.CertFile: $(HOME)/.globus/usercert.pem +# Clarens.KeyFile: $(HOME)/.globus/userkey.pem + +# Variables related to authentication to rootd and proofd. +# +# Default authentication method for rootd and proofd. +# These are supported for backward compatibility but have a very +# low priority. System defaults are generated by configure as a list +# in system.rootauthrc in $ROOTSYS/etc/ or /etc/root; the file +# $HOME/.rootauthrc can be used to override the system defaults. +# (0=UsrPwd, 1=SRP, 2=Krb5, 3=Globus,4=SSH, 5=UidGid) +Rootd.Authentication: 0 +Proofd.Authentication: 0 + +# Connection is shutdown at timeout expiration. Timeout is in seconds. +# Negotiation cannot be attempted at low level (i.e. inside +# TAuthenticate::Authenticate()) because of synchronization +# problems with the server. +# At higher level, TAuthenticate::HasTimedOut() gives information +# about timeout: 0 = no timeout; 1 = timeout, no methods left; +# 2 = timeout, still methods to be tried . +# Caller should decide about an additional attempt. +# Timeout disabled (< 0) by default. Can be changed on-the-fly +# with the static method TAuthenticate::SetTimeOut(to_value) +# +# Auth.Timeout: -1 + +# Password dialog box. +# Set to 0 if you do not want a dialog box to be popped-up +# when a password is requested. +# Default is 1. +# +# Auth.UsePasswdDialogBox: 0 + +# Set this to 1 if you want full SRP authentication in PROOF +# (Client-to-Master and Master-to-Slave). +Proofd.SendSRPPwd: 0 + +# Set this to 1 to use SSH authentication in PROOF servers +# (Master-to-Slave or Slaves-to-DataServers). This is switched +# off by default because credentials forwarding for SSH is not +# controlled by the system; however the user may have other +# ways to guarantee it, so it may want to switch it on. +ProofServ.UseSSH: 0 + +# Default login name (if not defined is taken from $(HOME)). +#UsrPwd.Login: qwerty +#SRP.Login: qwerty +#Krb5.Login: qwerty@LOCAL.DOM.AIN +#Globus.Login: cd:~/.globus cf:usercert.pem kf:userkey.pem ad:/etc/grid-security/certificates +#SSH.Login: qwerty +#UidGid.Login: qwerty + +# To be prompted for login information. +#UsrPwd.LoginPrompt: yes +#SRP.LoginPrompt: yes +#Krb5.LoginPrompt: yes +#Globus.LoginPrompt: yes +#SSH.LoginPrompt: yes +#UidGid.LoginPrompt: yes + +# To reuse established security context. +UsrPwd.ReUse: yes +SRP.ReUse: no +Krb5.ReUse: no +Globus.ReUse: yes +SSH.ReUse: yes + +# Duration validity of the sec context for UsrPwd, SRP and SSH. +# Format: <hours>:<minutes> (default 24:00) +#UsrPwd.Valid: 24:00 +#SRP.Valid: 24:00 +#SSH.Valid: 24:00 + +# To control password encryption for UsrPwd authentication. +UsrPwd.Crypt: yes + +# Globus miscellanea. +# Globus Proxy duration: HH:MM (ex 12:15 for 12 hours and 15 min) +# 'default' for system default. +Globus.ProxyDuration: default +#Globus.ProxyDuration: 14 +# Number of bits for the initial key. +Globus.ProxyKeyBits: 1024 + +# Path to alternative 'ssh' (to override $PATH if ever needed). +#SSH.ExecDir: /usr/bin + +# In case of error, SSH returns 1 (or 256 = 0x100). +# To trap those errors for which one should retry, error printouts +# must be parsed; any substring found under the Env SSH.ErrorRetry +# triggers a retry condition; strings can be added here +# in the form (including double quotes): +# +SSH.ErrorRetry: "<error_string>" +# This is what one usually gets if the server has reached the maximum +# number of sshd daemons (defined by MaxStartups in sshd_config); +# this is a typical case in which one should retry. +SSH.ErrorRetry: "Connection closed by remote host" +# Max number of retries for SSH in case of retry error (see above). +SSH.MaxRetry: 100 + +# Type of key to be used for RSA encryption: +# 0 = local; 1 = SSL (default if openssl available). +RSA.KeyType: 1 + +# In case of 'RSA.KeyType: 1' this specifies the number of bits to +# be used for the Blowfish key used to encrypt the exchanged information +# Default 256, minimum 128, maximum 15912. +#SSL.BFBits: 256 + +# Server authentication in TServerSocket. +# +# General: file with server access rules +#SrvAuth.DaemonRc: /etc/root/system.daemonrc +# +# UsrPwd: check of host equivalence via /etc/hosts.equiv or $HOME/.rhosts. +#SrvAuth.CheckHostsEquivalence: 1 +# +# SRP: pass file (default $HOME/.srootdpass). +#SrvAuth.SRPpassfile: $HOME/.srootdpass +# +# Globus/GSI: hostcert configuration file. +#SrvAuth.HostCert: /etc/root/hostcert.conf +# Globus/GSI: gridmap file. +#SrvAuth.GridMap: /etc/grid-security/grid-mapfile +# +# SSH: port for the sshd daemon. +#SrvAuth.SshdPort: 22 + +# Force file opening via TNetFile (TXNetFile) if a hostname is specified +# in the Url. +# By default, for local files TFile::Open() invokes directly TFile +#TFile.ForceRemote: yes + +# Special cases for the TUrl parser, where the special cases are parsed +# in a protocol + file part, like rfio:host:/path/file.root, +# castor:/path/file.root or /alien/path/file.root. +# In case the file namespace descriptor ends with - the namespace +# is not a part of the filename. +# Extend in private .rootrc with a +Url.Special line. +Url.Special: file: rfio: hpss: castor: dcache: dcap: /alien/- /castor/ + +# The following env vars are handled by TXNetFile and related classes +# (module netx, libNetx.so). +# +# XNet.ConnectTimeout - maximum time to wait before server's +# response on a connect [10 s] +# XNet.RequestTimeout - maximum time to wait before considering +# a read/write failure [60 s] +# XNet.ConnectDomainAllowRE +# - sequence of TRegexp regular expressions +# separated by a |. +# A domain is granted access to for the +# first connection if it matches one of these +# regexps. Example: +# slac.stanford.edu|pd.infn.it|fe.infn.it +# XNet.ConnectDomainDenyRE +# - sequence of TRegexp regular expressions +# separated by a |. +# A domain is denied access to for the +# first connection if it matches one of these +# regexps. Example: +# slac.stanford.edu|pd.infn.it|fe.infn.it +# XNet.RedirDomainAllowRE +# - sequence of TRegexp regular expressions +# separated by a |. +# A domain is granted access to for a +# redirection if it matches one of these +# regexps. Example: +# slac.stanford.edu|pd.infn.it|fe.infn.it +# XNet.RedirDomainDenyRE +# - sequence of TRegexp regular expressions +# separated by a |. +# A domain is denied access to for a +# redirection if it matches one of these +# regexps. Example: +# slac.stanford.edu|pd.infn.it|fe.infn.it +# XNet.MaxRedirectCount - maximum number of redirections from +# server [255] +# XNet.Debug - log verbosity level +# (0=nothing, +# 1=messages of interest to the user, +# 2=messages of interest to the developers +# (includes also user messages), +# 3=dump of all sent/received data buffers +# (includes also user and developers +# messages). [0] +# XNet.ReconnectTimeout - sleep-time before going back to the +# load balancer (or rebouncing to the same +# failing host) after a read/write error +# [10 s] +# XNet.StartGarbageCollectorThread - +# for test/development purposes. Normally +# nonzero (True), but as workaround for +# external causes someone could be +# interested in not having the garbage +# collector thread around. +# [experimental!] +# XNet.GoAsynchronous - Default is 0. When activated, XTNetFile +# works in async mode, allowing input +# buffering and unsolicited responses +# [experimental!] +# XNet.TryConnect - Number of tries connect to a single +# server before giving up +# XNet.TryConnectServersList +# - Number of connect retries to the whole +# server list given [240] +# XNet.PrintTAG - Print a particular string the developers +# can choose to quickly recognize the +# version at run time [0] + +# Plugin library handlers. +Plugin.TFile: ^rfio: TRFIOFile RFIO "TRFIOFile(const char*,Option_t*,const char*,Int_t)" ++Plugin.TFile: ^castor: TCastorFile RFIO "TCastorFile(const char*,Option_t*,const char*,Int_t,Int_t)" ++Plugin.TFile: ^dcache: TDCacheFile DCache "TDCacheFile(const char*,Option_t*,const char*,Int_t)" ++Plugin.TFile: ^dcap: TDCacheFile DCache "TDCacheFile(const char*,Option_t*,const char*,Int_t)" ++Plugin.TFile: ^chirp: TChirpFile Chirp "TChirpFile(const char*,Option_t*,const char*,Int_t)" ++Plugin.TFile: ^alien: TAlienFile RAliEn "TAlienFile(const char*,Option_t*,const char*,Int_t)" ++Plugin.TFile: .+[.]xml$ TXMLFile XMLIO "TXMLFile(const char*,Option_t*,const char*,Int_t)" +@hasnetx@+Plugin.TFile: ^root: TXNetFile Netx "TXNetFile(const char*,Option_t*,const char*,Int_t,Int_t)" +Plugin.TSystem: ^rfio: TRFIOSystem RFIO "TRFIOSystem()" ++Plugin.TSystem: ^castor: TRFIOSystem RFIO "TRFIOSystem()" ++Plugin.TSystem: ^dcache: TDCacheSystem DCache "TDCacheSystem()" ++Plugin.TSystem: ^dcap: TDCacheSystem DCache "TDCacheSystem()" ++Plugin.TSystem: ^alien: TAlienSystem RAliEn "TAlienSystem()" +Plugin.TArchiveFile: .+[.]zip$ TZIPFile Core "TZIPFile(const char*,const char*,TFile*)" +Plugin.TSQLServer: ^mysql: TMySQLServer MySQL "TMySQLServer(const char*,const char*,const char*)" ++Plugin.TSQLServer: ^pgsql: TPgSQLServer PgSQL "TPgSQLServer(const char*,const char*,const char*)" ++Plugin.TSQLServer: ^sapdb: TSapDBServer SapDB "TSapDBServer(const char*,const char*,const char*)" ++Plugin.TSQLServer: ^oracle: TOracleServer Oracle "TOracleServer(const char*,const char*,const char*)" +Plugin.TGrid: ^alien TAlien RAliEn "TAlien(const char*,const char*,const char*,const char*)" +Plugin.TVirtualAuth: Root TRootAuth RootAuth "TRootAuth()" +Plugin.TVirtualPad: * TPad Gpad "TPad()" +Plugin.TVirtualHistPainter: * THistPainter HistPainter "THistPainter()" +Plugin.TVirtualTreePlayer: * TTreePlayer TreePlayer "TTreePlayer()" +Plugin.TVirtualTreeViewer: * TTreeViewer TreeViewer "TTreeViewer(const TTree*)" +Plugin.TSessionViewer: * TSessionViewer TreeViewer "TSessionViewer()" +Plugin.TVirtualGeoPainter: * TGeoPainter GeomPainter "TGeoPainter(TGeoManager*)" +Plugin.TVirtualUtil3D: * TUtil3D Graf3d "TUtil3D()" +Plugin.TVirtualUtilHist: * TUtilHist Hist "TUtilHist()" +Plugin.TVirtualUtilPad: * TUtilPad Gpad "TUtilPad()" +Plugin.TVirtualFitter: Minuit TFitter Minuit "TFitter(Int_t)" ++Plugin.TVirtualFitter: Fumili TFumili Fumili "TFumili(Int_t)" ++Plugin.TVirtualFitter: Minuit2 TFitterMinuit Minuit2 "TFitterMinuit(Int_t)" ++Plugin.TVirtualFitter: Fumili2 TFitterFumili Minuit2 "TFitterFumili(Int_t)" +Plugin.TVirtualPS: ps TPostScript Postscript "TPostScript()" ++Plugin.TVirtualPS: svg TSVG Postscript "TSVG()" ++Plugin.TVirtualPS: pdf TPDF Postscript "TPDF()" ++Plugin.TVirtualPS: image TImageDump Postscript "TImageDump()" +Plugin.TViewerX3D: x11 TViewerX3D X3d "TViewerX3D(TVirtualPad*,Option_t*,const char*,UInt_t,UInt_t)" ++Plugin.TViewerX3D: qt TQtViewerX3D QtX3d "TQtViewerX3D(TVirtualPad*,Option_t*,const char*,UInt_t,UInt_t)" +Plugin.TMinuitGraph: * TGraph Graf "TGraph(Int_t,const Double_t*,const Double_t*)" +Plugin.TImage: * TASImage ASImage "TASImage()" +Plugin.TPaletteEditor: * TASPaletteEditor ASImageGui "TASPaletteEditor(TAttImage*,UInt_t,UInt_t)" +Plugin.TImagePlugin: ps TASPluginGS ASPluginGS "TASPluginGS(const char*)" ++Plugin.TImagePlugin: eps TASPluginGS ASPluginGS "TASPluginGS(const char*)" ++Plugin.TImagePlugin: pdf TASPluginGS ASPluginGS "TASPluginGS(const char*)" +Plugin.TFileDrawMap * TFileDrawMap TreePlayer "TFileDrawMap(const TFile*, const char*, const char*)" +Plugin.TVirtualX: x11 TGX11 GX11 "TGX11(const char*,const char*)" ++Plugin.TVirtualX: x11ttf TGX11TTF GX11TTF "TGX11TTF()" ++Plugin.TVirtualX: win32 TGWin32 Win32 "TGWin32(const char*,const char*)" ++Plugin.TVirtualX: win32gdk TGWin32 Win32gdk "TGWin32(const char*,const char*)" ++Plugin.TVirtualX: qt TGQt GQt "TGQt(const char*,const char*)" +Plugin.TGuiFactory: root TRootGuiFactory Gui "TRootGuiFactory()" ++Plugin.TGuiFactory: win32 TWin32GuiFactory Win32 "TWin32GuiFactory()" ++Plugin.TGuiFactory: qt TQtRootGuiFactory QtRoot "TQtRootGuiFactory()" +Plugin.TGPasswdDialog: * TGPasswdDialog Gui "TGPasswdDialog(const char*,char*,Int_t,UInt_t,UInt_t)" +Plugin.TVirtualProof: ^condor: TProofCondor Proof "TProofCondor(const char*,const char*,const char*,Int_t)" ++Plugin.TVirtualProof: ^sm: TProofSuperMaster Proof "TProofSuperMaster(const char*,const char*,const char*,Int_t)" ++Plugin.TVirtualProof: ^peac: TProofPEAC Peac "TProofPEAC(const char*,const char*,const char*,Int_t)" ++Plugin.TVirtualProof: * TProof Proof "TProof(const char*,const char*,const char*,Int_t)" +Plugin.TProofProgressDialog: * TProofProgressDialog ProofGui "TProofProgressDialog(TVirtualProof*,const char*,Int_t,Long64_t,Long64_t)" +Plugin.TDataProgressDialog: * TDataProgressDialog peacGui "TDataProgressDialog(TVirtualProof*,const char*,Int_t,Long64_t)" +Plugin.TVirtualPadEditor: GedOld TPadEditorOld GedOld "TPadEditorOld()" ++Plugin.TVirtualPadEditor: Ged TGedEditor Ged "TGedEditor(TCanvas*)" +Plugin.TVirtualViewer3D: x3d TViewerX3D X3d "TViewerX3D(TVirtualPad*)" ++Plugin.TVirtualViewer3D: ogl TGLSAViewer RGL "TGLSAViewer(TVirtualPad*)" ++Plugin.TVirtualViewer3D: ogle TGLViewer RGL "TGLViewer(TVirtualPad*)" +Plugin.TVirtualDragManager: * TGuiBldDragManager GuiBld "TGuiBldDragManager()" +Plugin.TGuiBuilder: * TRootGuiBuilder GuiBld "TRootGuiBuilder()" +Unix.*.Plugin.TVirtualGLImp: * TX11GL RGL "TX11GL()" +WinNT.*.Plugin.TVirtualGLImp: * TGWin32GL RGL "TGWin32GL()" +Unix.*.Plugin.TGLManager: * TX11GLManager RGL "TX11GLManager()" +WinNT.*.Plugin.TGLManager: * TGWin32GLManager RGL "TGWin32GLManager()" +Plugin.TGLPixmap: * TGLPixmap RGL "TGLPixmap(TPad*,Int_t,Int_t,Int_t,UInt_t,UInt_t)" + +# Example of custom setting for the Rint application (root.exe). +# This overrides the default specified above for a generic application. +# Color 5 is yellow. +Rint.Canvas.HighLightColor: 5 diff --git a/configure b/configure index 4143af1adaf7bb19afc260491d0c1a903ef07f2d..0b4e75a95186d85b3141578c9dfa5df62166d88d 100755 --- a/configure +++ b/configure @@ -50,6 +50,7 @@ options=" \ enable_qt \ enable_reflex \ enable_roofit \ + enable_minuit2 \ enable_ruby \ enable_rfio \ enable_rpath \ @@ -81,6 +82,7 @@ enable_pythia=no enable_qt=no enable_reflex=no enable_roofit=no +enable_minuit2=no enable_rpath=no enable_ruby=no enable_shadowpw= @@ -120,6 +122,7 @@ AFS \ CINTEX \ REFLEX \ ROOFIT \ +MINUIT2 \ TABLE \ XMLDIR \ " @@ -682,6 +685,7 @@ enable/disable options, prefix with either --enable- or --disable- ldap LDAP support, requires (Open)LDAP libs mathcore Build the new libMathCore math library mathmore Build the new libMathMore extended math library + minuit2 Build the new libMinuit2 minimizer library mysql MySQL support, requires libmysqlclient opengl OpenGL support, requires libGL and libGLU oracle Oracle support, requires libocci @@ -2846,6 +2850,19 @@ else echo "no" fi +###################################################################### +# +### echo %%% Minuit2 Library - Contributed library +# +message "Checking whether to build libMinuit2" +if test "x$enable_minuit2" = "xyes" || test ! "x$MINUIT2" = "x"; then + enable_minuit2="yes" + echo "yes" +else + enable_minuit2="" + echo "no" +fi + ###################################################################### # ### echo %%% Table Library - Contributed library @@ -3196,6 +3213,7 @@ sed -e "s|@aclocaldir@|$aclocaldir|" \ -e "s|@buildcintex@|$enable_cintex|" \ -e "s|@buildreflex@|$enable_reflex|" \ -e "s|@buildroofit@|$enable_roofit|" \ + -e "s|@buildminuit2t@|$enable_minuit2|" \ -e "s|@buildtable@|$enable_table|" \ -e "s|@enable_thread@|$enable_thread|" \ -e "s|@etcdir@|$etcdir|" \ diff --git a/minuit2/Module.mk b/minuit2/Module.mk new file mode 100644 index 0000000000000000000000000000000000000000..4c370c3ac31b32b0b387a1f961f92c73fc731d68 --- /dev/null +++ b/minuit2/Module.mk @@ -0,0 +1,181 @@ +# Module.mk for minuit2 module +# Copyright (c) 2000 Rene Brun and Fons Rademakers +# +# Author: Rene Brun, 07/05/2003 + +#MINUIT2INCDIR := $(ROOTSYS)/include +#MINUIT2LIBDIR := $(ROOTSYS)/lib +# MINUITINCDIR := /Users/moneta/mathlibs/Minuit-1_7_1/include +# MINUITLIBDIR := /Users/moneta/mathlibs/Minuit-1_7_1/lib + +MODDIR := minuit2 +MODDIRS := $(MODDIR)/src +MODDIRI := $(MODDIR)/inc + +MINUIT2DIR := $(MODDIR) +MINUIT2DIRS := $(MINUIT2DIR)/src +MINUIT2DIRI := $(MINUIT2DIR)/inc + +##### libMinuit2 ##### +MINUIT2L := $(MODDIRI)/LinkDef.h +MINUIT2DS := $(MODDIRS)/G__Minuit2.cxx +MINUIT2DO := $(MINUIT2DS:.cxx=.o) +MINUIT2DH := $(MINUIT2DS:.cxx=.h) + +MINUIT2H := $(filter-out $(MODDIRI)/LinkDef%,$(wildcard $(MODDIRI)/*.h)) +MINUIT2S := $(filter-out $(MODDIRS)/G__%,$(wildcard $(MODDIRS)/*.cxx)) +MINUIT2O := $(MINUIT2S:.cxx=.o) + +MINUIT2DEP := $(MINUIT2O:.o=.d) $(MINUIT2DO:.o=.d) + +MINUIT2LIB := $(LPATH)/libMinuit2.$(SOEXT) + + +MINUITBASEVERS := Minuit-1_7_6 +MINUITBASESRCS := $(MODDIRS)/$(MINUITBASEVERS).tar.gz +MINUITBASEDIRS := $(MODDIRS)/$(MINUITBASEVERS) +MINUITBASEDIRI := -I$(MODDIRS)/$(MINUITBASEVERS) +MINUITBASEETAG := $(MODDIRS)/headers.d + + +##### liblcg_Minuit ##### +ifeq ($(PLATFORM),win32) +MINUITBASELIBA := $(MINUITBASEDIRS)/lcg_Minuit.lib +MINUITBASELIB := $(LPATH)/libminuitbase.lib +ifeq (debug,$(findstring debug,$(ROOTBUILD))) +MINUITBASEBLD = "DEBUG" +else +MINUITBASEBLD = "" +endif +else +MINUITBASELIBA := $(MINUITBASEDIRS)/src/.libs/liblcg_Minuit.a +MINUITBASELIB := $(LPATH)/libminuitbase.a +endif +MINUITBASEDEP := $(MINUITBASELIB) +ifeq (debug,$(findstring debug,$(ROOTBUILD))) +MINUITBASEDBG = "--enable-gdb" +else +MINUITBASEDBG = +endif + + +# used in the main Makefile +ALLHDRS += $(patsubst $(MODDIRI)/%.h,include/%.h,$(MINUIT2H)) +ALLLIBS += $(MINUIT2LIB) + +# include all dependency files +INCLUDEFILES += $(MINUIT2LIBDEP) + +##### local rules ##### +include/%.h: $(MINUIT2DIRI)/%.h + cp $< $@ + + +$(MINUITBASELIB): $(MINUITBASELIBA) + cp $< $@ +ifeq ($(PLATFORM),macosx) + ranlib $@ +endif +ifeq ($(PLATFORM), win32) + cp $(MINUITBASEDIRS)/lcg_Minuit.dll $(LPATH)/../bin/libbaseminuit.dll +endif + +$(MINUITBASELIBA): $(MINUITBASESRCS) + echo "building Minuit library first" +ifeq ($(PLATFORM),win32) + @(if [ -d $(MINUITBASEDIRS) ]; then \ + rm -rf $(MINUITBASEDIRS); \ + fi; \ + echo "*** Building $@..."; \ + cd $(MINUIT2DIRS); \ + if [ ! -d $(MINUITBASEVERS) ]; then \ + gunzip -c $(MINUITBASEVERS).tar.gz | tar xf -; \ + fi; \ + cd $(MINUITBASEVERS); \ + unset MAKEFLAGS; \ + nmake -f makefile.msc $(MINUITBASEBLD)) +# GNUMAKE=$(MAKE) ./configure $(MINUITBASEDBG) CC=cl LD=cl CFLAGS="$(CFLAGS)" ; \ +# cd minuit; sed -e 's/ln -s/cp -p/' Makefile > MakefileNew; mv MakefileNew Makefile; cd ../; \ +# $(MAKE)) \ +# unset MAKEFLAGS; \ +# nmake -nologo -f minuit.mak \ +# CFG=$(MINUITBASEBLD)) +else + @(if [ -d $(MINUITBASEDIRS) ]; then \ + rm -rf $(MINUITBASEDIRS); \ + fi; \ + echo "*** Building $@..."; \ + cd $(MINUIT2DIRS); \ + if [ ! -d $(MINUITBASEVERS) ]; then \ + gunzip -c $(MINUITBASEVERS).tar.gz | tar xf -; \ + fi; \ + cd $(MINUITBASEVERS); \ + ACC=$(CC); \ + ACFLAGS="-O"; \ + if [ "$(CC)" = "icc" ]; then \ + ACC="icc"; \ + fi; \ + if [ "$(ARCH)" = "sgicc64" ]; then \ + ACC="gcc -mabi=64"; \ + fi; \ + if [ "$(ARCH)" = "hpuxia64acc" ]; then \ + ACC="cc +DD64 -Ae"; \ + fi; \ + if [ "$(ARCH)" = "linuxppc64gcc" ]; then \ + ACC="gcc -m64"; \ + fi; \ + if [ "$(ARCH)" = "linuxx8664gcc" ]; then \ + ACC="gcc -m64"; \ + fi; \ + GNUMAKE=$(MAKE) ./configure $(MINUITBASEDBG) CXXFLAGS="$(OPTFLAGS) $(CXXFLAGS)"; \ + $(MAKE)) +endif + +$(MINUIT2LIB): $(MINUITBASEDEP) $(MINUIT2O) $(MINUIT2DO) $(MAINLIBS) $(MINUITBASELIBDEP) + @echo "Doing Minuit lib for platform "$(PLATFORM) + @$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \ + "$(SOFLAGS)" libMinuit2.$(SOEXT) $@ "$(MINUIT2O) $(MINUIT2DO)" \ + "$(MINUITLIBEXTRA) $(MINUITBASELIB)" + +$(MINUIT2DS): $(MINUIT2H) $(MINUIT2L) $(ROOTCINTTMP) + @echo "Generating dictionary $@..." + $(ROOTCINTTMP) -f $@ -c $(MINUITBASEDIRI) $(MINUIT2H) $(MINUIT2L) + +$(MINUIT2DO): $(MINUIT2DS) + $(CXX) $(NOOPT) $(CXXFLAGS) $(MINUITBASEDIRI) -I. -o $@ -c $< + + +all-minuit2: $(MINUIT2LIB) + +# all-minuit2: untar-minuit +# echo "make all" $(MINUIT2LIB) + +test-minuit2: $(MINUIT2LIB) + cd $(MINUIT2DIR)/test; make + +clean-minuit2: + @rm -f $(MINUIT2O) $(MINUIT2DO) +ifeq ($(PLATFORM),win32) + -@(if [ -d $(MINUITBASEDIRS) ]; then \ + cd $(MINUITBASEDIRS); \ + unset MAKEFLAGS; \ + nmake -nologo -f Makefile.msc clean \ + CFG=$(MINUITBASEBLD); \ + fi) +else + -@(if [ -d $(MINUITBASEDIRS) ]; then \ + cd $(MINUITBASEDIRS); \ + $(MAKE) clean; \ + fi) +endif + +clean:: clean-minuit2 + +distclean-minuit2: clean-minuit2 + @rm -f $(MINUIT2DEP) $(MINUIT2DS) $(MINUIT2DH) $(MINUIT2LIB) + +distclean:: distclean-minuit2 +##### extra rules ###### + +$(MINUIT2O): %.o: %.cxx + $(CXX) $(OPT) $(CXXFLAGS) $(MINUITBASEDIRI) -o $@ -c $< diff --git a/minuit2/inc/LinkDef.h b/minuit2/inc/LinkDef.h new file mode 100644 index 0000000000000000000000000000000000000000..c0c08c1a56292a94407a94abd242dd1b5e8294c8 --- /dev/null +++ b/minuit2/inc/LinkDef.h @@ -0,0 +1,25 @@ +// @(#)root/minuit2:$Name: $:$Id: LinkDef.hv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + + +#ifdef __CINT__ + +#pragma link off all globals; +#pragma link off all classes; +#pragma link off all functions; + +//#pragma link C++ global gMinuit; +#pragma link C++ global gMinuit2; +#pragma link C++ global gFumili2; + +#pragma link C++ class TFitterMinuit; +#pragma link C++ class TFitterFumili; +#pragma link C++ class TFcnAdapter; + +#endif diff --git a/minuit2/inc/TBinLikelihoodFCN.h b/minuit2/inc/TBinLikelihoodFCN.h new file mode 100644 index 0000000000000000000000000000000000000000..1dfa60f1e5f3f1ee67b27e74f4f5042b73d26da3 --- /dev/null +++ b/minuit2/inc/TBinLikelihoodFCN.h @@ -0,0 +1,79 @@ +// @(#)root/minuit2:$Name: $:$Id: TBinLikelihoodFCN.hv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#ifndef ROOT_TBinLikelihoodFCN_H_ +#define ROOT_TBinLikelihoodFCN_H_ + +#include "Minuit/FCNBase.h" + + +class TF1; +class TVirtualFitter; +class TChi2FitData; + + /** + Class implementing the standard Chi2 objective function + */ + +class TBinLikelihoodFCN : public FCNBase { + + + +public: + +// // use a param function instead of TF1 + typedef TF1 ModelFunction; + // use now same data as chi2 fit data + typedef TChi2FitData BinLikelihoodFitData; + + + + /** + construct passing fitter which has ROOT data object and model function. + */ + TBinLikelihoodFCN( const TVirtualFitter & fitter); + + /** + constructor passing data and function + In this case does not own the data + */ + TBinLikelihoodFCN( TChi2FitData * data, ModelFunction * func) : + fUp(0.5), fOwner(false), fData(data), fFunc(func) {} + + + /** + this class manages the fit data class. Delete it at the end + */ + ~TBinLikelihoodFCN(); + + + /** + evaluate objective function + */ + double operator()(const std::vector<double>&) const; + + + /** + return error definition for likelihood = 0.5 + */ + double up() const { return fUp; } + + void SetErrorDef( double up) { fUp = up; } + +private: + + double fUp; + bool fOwner; + BinLikelihoodFitData * fData; + ModelFunction * fFunc; + +}; + + +#endif diff --git a/minuit2/inc/TChi2ExtendedFCN.h b/minuit2/inc/TChi2ExtendedFCN.h new file mode 100644 index 0000000000000000000000000000000000000000..9caa525f9f052ec899e20622bc9dddf1e657c2e8 --- /dev/null +++ b/minuit2/inc/TChi2ExtendedFCN.h @@ -0,0 +1,79 @@ +// @(#)root/minuit2:$Name: $:$Id: TChi2ExtendedFCN.hv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#ifndef ROOT_TChi2ExtendedFCN_H_ +#define ROOT_TChi2ExtendedFCN_H_ + +#include "Minuit/FCNBase.h" + +// temporary - should use interface +class TF1; +class TVirtualFitter; + +class TChi2ExtendedFitData; + +/** + + Extended Chi2 Fit method. + Use errors in X as well, if asymmetric make them symmetric taking the average +*/ + +class TChi2ExtendedFCN : public FCNBase { + +public: + +// // use a param function instead of TF1 + typedef TF1 ModelFunction; + + + + /** + construct passing fitter which has ROOT data object and model function. + */ + TChi2ExtendedFCN( const TVirtualFitter & fitter); + + //Chi2FCN( const DataObject & data, const ModelFunction & func); + + + /** + construct objective function passing input data and model function. + */ + + //Chi2FCN( const DataObject & data, const ModelFunction & func); + + /** + this class manages the fit data class. Delete it at the end + */ + ~TChi2ExtendedFCN(); + + + /** + evaluate objective function + */ + double operator()(const std::vector<double>&) const; + + + /** + return error definition for chi2 should be 1 + */ + double up() const { return fUp; } + + void SetErrorDef( double up) { fUp = up; } + + +private: + + double fUp; + ModelFunction * fFunc; + TChi2ExtendedFitData * fData; + +}; + + +#endif diff --git a/minuit2/inc/TChi2ExtendedFitData.h b/minuit2/inc/TChi2ExtendedFitData.h new file mode 100644 index 0000000000000000000000000000000000000000..13da6796d5a280c329d10c3db9065c6712509c89 --- /dev/null +++ b/minuit2/inc/TChi2ExtendedFitData.h @@ -0,0 +1,70 @@ +// @(#)root/minuit2:$Name: $:$Id: TChi2ExtendedFitData.hv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#ifndef ROOT_TChi2ExtendedFitData_H_ +#define ROOT_TChi2ExtendedFitData_H_ + +#include <vector> +#include "TChi2FitData.h" + +// class TObject; +class TVirtualFitter; +class TGraph; + +/** + class holding the data of the fit . + For extended chi2 fits which contains also error in x (asymmetrics) + the data are: + + coords() , value , sigma Y, sigma X_low sigma X_up +*/ + + +class TChi2ExtendedFitData : public TChi2FitData { + + +public: + + typedef std::vector<double> CoordData; + + + /** + construct the Fit data object + */ + TChi2ExtendedFitData() {} + + TChi2ExtendedFitData(const TVirtualFitter & fitter); + + virtual ~TChi2ExtendedFitData() {} + + double ErrorY(unsigned int i) const { return fErrorsY[i]; } + + double ErrorXLow(unsigned int i) const { return fErrorsXLow[i]; } + + double ErrorXUp(unsigned int i) const { return fErrorsXUp[i]; } + + +protected: + + + void GetExtendedFitData(const TGraph * graph, const TVirtualFitter * fitter); + + void SetDataPoint( const CoordData & x, double y, double errorY, double errorXlow, double errorXup ); + + +private: + + std::vector<double> fErrorsY; + std::vector<double> fErrorsXLow; + std::vector<double> fErrorsXUp; + // to do add asymmetric error in y + +}; + +#endif diff --git a/minuit2/inc/TChi2FCN.h b/minuit2/inc/TChi2FCN.h new file mode 100644 index 0000000000000000000000000000000000000000..fde0dd488d486688755057cbc000a62a5896f752 --- /dev/null +++ b/minuit2/inc/TChi2FCN.h @@ -0,0 +1,88 @@ +// @(#)root/minuit2:$Name: $:$Id: TChi2FCN.hv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#ifndef ROOT_TChi2FCN_H_ +#define ROOT_TChi2FCN_H_ + +#include "Minuit/FCNBase.h" + + +class TF1; +class TVirtualFitter; + +class TChi2FitData; + + /** + Class implementing the standard Chi2 objective function + */ + +class TChi2FCN : public FCNBase { + + + +public: + +// // use a param function instead of TF1 + typedef TF1 ModelFunction; + + + + /** + construct passing fitter which has ROOT data object and model function. + */ + TChi2FCN( const TVirtualFitter & fitter); + + /** + constructor passing data and function + In this case does not own the data + */ + TChi2FCN( TChi2FitData * data, ModelFunction * func) : + fUp(1.0), fOwner(false), fData(data), fFunc(func) {} + + + /** + construct objective function passing input data and model function. + */ + + //TChi2FCN( const DataObject & data, const ModelFunction & func); + + /** + this class manages the fit data class. Delete it at the end + */ + ~TChi2FCN(); + + + /** + evaluate objective function + */ + double operator()(const std::vector<double>&) const; + + + /** + return error definition for chi2 = 1 + */ + double up() const { return fUp; } + + void SetErrorDef( double up) { fUp = up; } + +protected: + + +private: + + double fUp; + bool fOwner; + // has to be mutable since I call non const methods (as SetParameters) + TChi2FitData * fData; + mutable ModelFunction * fFunc; + +}; + + +#endif diff --git a/minuit2/inc/TChi2FitData.h b/minuit2/inc/TChi2FitData.h new file mode 100644 index 0000000000000000000000000000000000000000..686471a4c29129624b75a67c667cf153b5dbe687 --- /dev/null +++ b/minuit2/inc/TChi2FitData.h @@ -0,0 +1,86 @@ +// @(#)root/minuit2:$Name: $:$Id: TChi2FitData.hv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#ifndef ROOT_TChi2FitData_H_ +#define ROOT_TChi2FitData_H_ + +#include <vector> + +// class TObject; +class TVirtualFitter; +class TH1; +class TGraph; +class TGraph2D; +class TMultiGraph; + +/** + class holding the data of the fit . + For chi2 fits the data are: + + coords() , value, sigmas +*/ + + +class TChi2FitData { + + +public: + + typedef std::vector<double> CoordData; + + + /** + construct the Fit data object + */ + + TChi2FitData() : fSize(0) {} + + TChi2FitData(const TVirtualFitter & fitter, bool skipEmptyBins = true); + + virtual ~TChi2FitData() {} + + unsigned int Size() const { return fSize; } + + const CoordData & Coords(unsigned int i) const { return fCoordinates[i]; } + + double Value(unsigned int i) const { return fValues[i]; } + + double InvError(unsigned int i) const { return fInvErrors[i]; } + + bool UseIntegral() const { return fIntegral; } + + bool SkipEmptyBins() const { return fSkipEmptyBins; } + + +protected: + + virtual void GetFitData(const TH1 * hfit, const TVirtualFitter * hfitter); + + void GetFitData(const TGraph * graph, const TVirtualFitter * hfitter); + + void GetFitData(const TGraph2D * graph, const TVirtualFitter * hfitter); + + void GetFitData(const TMultiGraph * graph, const TVirtualFitter * hfitter); + + void SetDataPoint( const CoordData & x, double y, double error ); + + +protected: + + unsigned int fSize; + bool fSkipEmptyBins; + bool fIntegral; + std::vector<double> fInvErrors; + std::vector<double> fValues; + std::vector<CoordData> fCoordinates; + + +}; + +#endif diff --git a/minuit2/inc/TFcnAdapter.h b/minuit2/inc/TFcnAdapter.h new file mode 100644 index 0000000000000000000000000000000000000000..98a7b5b5ec4231a0f08bd141cfea66d8e165c110 --- /dev/null +++ b/minuit2/inc/TFcnAdapter.h @@ -0,0 +1,37 @@ +// @(#)root/minuit2:$Name: $:$Id: TFcnAdapter.hv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#ifndef ROOT_TFcnAdapter_H_ +#define ROOT_TFcnAdapter_H_ + +#include "Minuit/FCNGradientBase.h" + +class TFcnAdapter : public FCNGradientBase { + +public: + + TFcnAdapter(void (*fcn)(int&, double*, double&, double*, int)) : fFCN(fcn) {} + + ~TFcnAdapter() {} + + const FCNBase& base() const {return *this;} + + virtual double operator()(const std::vector<double>&) const; + virtual double up() const {return 1;} + + virtual std::vector<double> gradient(const std::vector<double>&) const; + + // forward interface + virtual double operator()(int npar, double* params) const; + +private: + + void (*fFCN)(int&, double*, double&, double*, int); +}; +#endif //ROOT_GFcnAdapter_H_ diff --git a/minuit2/inc/TFitterFumili.h b/minuit2/inc/TFitterFumili.h new file mode 100644 index 0000000000000000000000000000000000000000..1e64c101c6e573dc1cc994ccd11395c14d20f34b --- /dev/null +++ b/minuit2/inc/TFitterFumili.h @@ -0,0 +1,64 @@ +// @(#)root/minuit2:$Name: $:$Id: TFitterFumili.hv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#ifndef ROOT_TFitterFumili_H_ +#define ROOT_TFitterFumili_H_ + + +#ifndef ROOT_TVirtualFitter +#include "TVirtualFitter.h" +#endif + +#include "TFitterMinuit.h" + +/** + TVirtualFitter implementation for new Fumili +*/ + + +class TFitterFumili : public TFitterMinuit { + +public: + + TFitterFumili(); + + TFitterFumili(Int_t maxpar); + + virtual ~TFitterFumili() { } + +public: + + + + //virtual FunctionMinimum Minimize( int nfcn = 0, double edmval = 0.1) const; + + +protected: + + void CreateMinimizer(EMinimizerType ); + + void CreateChi2FCN(); + + void CreateChi2ExtendedFCN(); + + void CreateUnbinLikelihoodFCN() {} + + void CreateBinLikelihoodFCN(); + +private: + + + + ClassDef(TFitterFumili,1) +}; + +R__EXTERN TFitterFumili* gFumili2; + + +#endif //ROOT_TFitterFumili_H_ diff --git a/minuit2/inc/TFitterMinuit.h b/minuit2/inc/TFitterMinuit.h new file mode 100644 index 0000000000000000000000000000000000000000..671f39bbe3b2ad500af2f766866e8141f76d42e1 --- /dev/null +++ b/minuit2/inc/TFitterMinuit.h @@ -0,0 +1,165 @@ +// @(#)root/minuit2:$Name: $:$Id: TFitterMinuit.hv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#ifndef ROOT_TFitterMinuit_H_ +#define ROOT_TFitterMinuit_H_ + +#ifndef ROOT_TVirtualFitter +#include "TVirtualFitter.h" +#endif + +#include "Minuit/MnUserParameterState.h" +#include "Minuit/MinosError.h" +#include "Minuit/ModularFunctionMinimizer.h" +#include "Minuit/FumiliMinimizer.h" +#include "TFcnAdapter.h" + +/** + TVirtualFitter implementation for new C++ Minuit +*/ + +class FunctionMinimum; + +class TFitterMinuit : public TVirtualFitter { + +public: + + // enumeration specifying the minimizers + enum EMinimizerType { + kMigrad, + kSimplex, + kCombined, + kScan, + kFumili + }; + + + TFitterMinuit(); + + TFitterMinuit(Int_t maxpar); + + virtual ~TFitterMinuit(); + +public: + + // inherited interface + virtual Double_t Chisquare(Int_t npar, Double_t *params) const; + virtual void Clear(Option_t *option=""); + virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs); + virtual void FixParameter(Int_t ipar); + virtual Double_t *GetCovarianceMatrix() const; + virtual Double_t GetCovarianceMatrixElement(Int_t i, Int_t j) const; + virtual Int_t GetErrors(Int_t ipar,Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc) const; + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1 + virtual Int_t GetNumberTotalParameters() const; + virtual Int_t GetNumberFreeParameters() const; + + virtual Double_t GetParError(Int_t ipar) const; + virtual Double_t GetParameter(Int_t ipar) const; + virtual Int_t GetParameter(Int_t ipar,char *name,Double_t &value,Double_t &verr,Double_t &vlow, Double_t &vhigh) const; + virtual Int_t GetStats(Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx) const; + virtual Double_t GetSumLog(Int_t i); + + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1 + virtual Bool_t IsFixed(Int_t ipar) const ; + + virtual void PrintResults(Int_t level, Double_t amin) const; + virtual void ReleaseParameter(Int_t ipar); + virtual void SetFitMethod(const char *name); + virtual Int_t SetParameter(Int_t ipar,const char *parname,Double_t value,Double_t verr,Double_t vlow, Double_t vhigh); + + virtual void SetFCN(void (*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t) ); + // this for CINT (interactive functions) + virtual void SetFCN(void * ); + + // set FCN using Minuit interface + // you pass to the class ownership of FCNBase pointer + + virtual void SetMinuitFCN( FCNBase * f); + + // methods needed by derived classes + virtual const MnUserParameterState & State() const { return fState; } + + virtual const FCNBase * GetMinuitFCN() const { return fMinuitFCN; } + + virtual const ModularFunctionMinimizer * GetMinimizer() const { return fMinimizer; } + + + // additional abstract methods to be implemented by derived classes + virtual int Minimize( int nfcn = 0, double edmval = 0.1); + + int GetStrategy() { return fStrategy; } + + int PrintLevel() { return fDebug; } + + void SetStrategy( int stra) { fStrategy = stra; } + + void SetPrintLevel(int level ) { fDebug = level; } + + // set minimum tolerance to avoid having clients (as TGraf::Fit) setting tolerances too small + void SetMinimumTolerance(double mintol) { fMinTolerance = mintol; } + + double MinimumTolerance() const { return fMinTolerance; } + + +protected: + + // method to set internal data (no copying involved so - make protected ) + + virtual MnUserParameterState & State() { return fState; } + + virtual void SetMinimizer( ModularFunctionMinimizer * m) { fMinimizer = m; } + + + // re -implemented in derived classes + + virtual void CreateMinimizer(EMinimizerType = kMigrad ); + + // functions to create FCN - re-implemented in derived class (GFumili) + + virtual void CreateChi2FCN(); + + virtual void CreateChi2ExtendedFCN(); + + virtual void CreateBinLikelihoodFCN(); + + virtual void CreateUnbinLikelihoodFCN() {} + + // internal function to perform the actual minimization (could be implemented by derived classes) + virtual FunctionMinimum DoMinimization( int nfcn = 0, double edmval = 0.1); + + // internal funcition to study Function minimum results + // return 0 if function minimum is OK or an error code + + virtual int ExamineMinimum(const FunctionMinimum & ); + + virtual void Initialize(); + +private: + + double fErrorDef; + double fEDMVal; + bool fGradient; + + MnUserParameterState fState; + std::vector<MinosError> theMinosErrors; + ModularFunctionMinimizer * fMinimizer; + FCNBase * fMinuitFCN; + int fDebug; + int fStrategy; + double fMinTolerance; + + + ClassDef(TFitterMinuit,1) +}; + +R__EXTERN TFitterMinuit* gMinuit2; + + +#endif //ROOT_TFitterMinuit_H_ diff --git a/minuit2/inc/TFumiliFCN.h b/minuit2/inc/TFumiliFCN.h new file mode 100644 index 0000000000000000000000000000000000000000..3cd8d3b5a0a4136504c0b24524b61c39902e1f5c --- /dev/null +++ b/minuit2/inc/TFumiliFCN.h @@ -0,0 +1,194 @@ +// @(#)root/minuit2:$Name: $:$Id: TFumiliFCN.hv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#ifndef ROOT_TFumiliChi2FCN_H_ +#define ROOT_TFumiliChi2FCN_H_ + +#include "Minuit/FumiliFCNBase.h" + +// temporary - should use interface +class TF1; +class TVirtualFitter; + +class TChi2FitData; + +/** + Base Class for implementing Fumili interface +*/ + + +class TFumiliFCN : public FumiliFCNBase { + +public: + +// // use a param function instead of TF1 + typedef TF1 ModelFunction; + typedef TChi2FitData FumiliFitData; + + + + /** + construct passing fitter which has ROOT data object and model function. + use a strategy for calculating derivatives + strategy = 1 default 2 point formula . Fast but not very precise + strategy = 2 5 point formula + */ + TFumiliFCN( const TVirtualFitter & fitter, double up = 1., int strategy = 1, bool sipEmptyBins = true); + + + /** + this class manages the fit data class. Delete it at the end + */ + virtual ~TFumiliFCN(); + + + /** + evaluate objective function + */ + virtual double operator()(const std::vector<double>&) const = 0; + + + /** + evaluate gradient and function elements needed by fumili + */ + void evaluateAll( const std::vector<double> & ); + + /** + return error definition for chi2 = 1 + */ + double up() const { return fUp; } + + void SetErrorDef (double up) { fUp = up; } + + + /** + initialize method to set right number of parameters. + It is known only when starting the fit + */ + + void Initialize(unsigned int npar); + + +protected: + + + void Calculate_gradient_and_hessian(const std::vector<double> & p); + + void Calculate_numerical_gradient( const std::vector<double> & x, double f0); + + void Calculate_numerical_gradient_of_integral( const std::vector<double> & x1, const std::vector<double> & x2, double f0); + + // calculate i-th element contribution to objective function + // abstract - need to be re-implemented by the derived classes§ + virtual void Calculate_element(int i, const FumiliFitData & points, double fval, double & chi2, std::vector<double> & grad, std::vector<double> & hess ) = 0; + +protected: + + double fUp; + FumiliFitData * fData; + ModelFunction * fFunc; + +// std::vector<double> fGradient; +// std::vector<double> fHessian; + + //prameter cache + std::vector<double> fParamCache; + std::vector<double> fFunctionGradient; + + int fStrategy; +}; + + +class TFumiliChi2FCN : public TFumiliFCN { + + public: + /** + construct passing fitter which has ROOT data object and model function. + use a strategy for calculating derivatives + strategy = 1 default 2 point formula . Fast but not very precise + strategy = 2 5 point formula + */ + TFumiliChi2FCN( const TVirtualFitter & fitter, int strategy = 1) : + TFumiliFCN(fitter, 1.0, strategy, true) {} + + virtual ~TFumiliChi2FCN() {} + + + /** + evaluate objective function + */ + double operator()(const std::vector<double>&) const; + +protected: + + virtual void Calculate_element(int i, const TChi2FitData & points, double fval, double & chi2, std::vector<double> & grad, std::vector<double> & hess ); + +}; + + +/** + Fumili interface for binned (Poisson) likelihood functions +*/ + +class TFumiliBinLikelihoodFCN : public TFumiliFCN { + + public: + /** + construct passing fitter which has ROOT data object and model function. + use a strategy for calculating derivatives + strategy = 1 default 2 point formula . Fast but not very precise + strategy = 2 5 point formula + */ + TFumiliBinLikelihoodFCN( const TVirtualFitter & fitter, int strategy = 1) : + TFumiliFCN(fitter, 0.5, strategy, false) {} + + + virtual ~TFumiliBinLikelihoodFCN() {} + + /** + evaluate objective function + */ + double operator()(const std::vector<double>&) const; + +protected: + + virtual void Calculate_element(int i, const TChi2FitData & points, double fval, double & chi2, std::vector<double> & grad, std::vector<double> & hess ); + +}; + + +/** + Fumili interface for Unbinned likelihood functions +*/ +class TFumiliUnbinLikelihoodFCN : public TFumiliFCN { + + public: + /** + construct passing fitter which has ROOT data object and model function. + use a strategy for calculating derivatives + strategy = 1 default 2 point formula . Fast but not very precise + strategy = 2 5 point formula + */ + TFumiliUnbinLikelihoodFCN( const TVirtualFitter & fitter, int strategy = 1) : + TFumiliFCN(fitter, 0.5, strategy, false) {} + + virtual ~TFumiliUnbinLikelihoodFCN() {} + + /** + evaluate objective function + */ + double operator()(const std::vector<double>&) const; + +protected: + + virtual void Calculate_element(int i, const TChi2FitData & points, double fval, double & chi2, std::vector<double> & grad, std::vector<double> & hess ); + +}; + +#endif diff --git a/minuit2/src/FitterUtil.cxx b/minuit2/src/FitterUtil.cxx new file mode 100644 index 0000000000000000000000000000000000000000..afac6efe7e55992a2d4d3a6ed96f12f2704f9495 --- /dev/null +++ b/minuit2/src/FitterUtil.cxx @@ -0,0 +1,47 @@ +// @(#)root/minuit2:$Name: $:$Id: FitterUtil.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include "TF1.h" +#include <vector> +#include <cassert> + +/// utility functions to be used in the fitter classes + +namespace FitterUtil { + + /// evaluate integral of fit functions from x1 and x2 and divide by dx + double EvalIntegral(TF1 * func, const std::vector<double> & x1, const std::vector<double> & x2, const std::vector<double> & par) { + + double fval; + unsigned int ndim = x1.size(); + double dx = x2[0]-x1[0]; + assert (dx != 0); + if ( ndim == 1) { + fval = func->Integral( x1[0],x2[0], &par.front() )/dx; + return fval; + } + // dim > 1 + double dy = x2[1]-x1[1]; + assert (dy != 0); + func->SetParameters(&par.front() ); + if ( ndim == 2) { + fval = func->Integral( x1[0],x2[0],x1[1],x2[1] )/(dx*dy); + return fval; + } + // dim = 3 + double dz = x2[2]-x1[2]; + assert (dz != 0); + fval = func->Integral( x1[0],x2[0],x1[1],x2[1],x1[2],x2[2])/(dx*dy*dz); + return fval; + +} + + + +} diff --git a/minuit2/src/G__Minuit2.cxx b/minuit2/src/G__Minuit2.cxx new file mode 100644 index 0000000000000000000000000000000000000000..7fb3acce0014cea490b8413c5083eb632aaaedc8 --- /dev/null +++ b/minuit2/src/G__Minuit2.cxx @@ -0,0 +1,1619 @@ +// +// File generated by utils/src/rootcint_tmp at Thu Oct 27 12:24:53 2005. +// Do NOT change. Changes will be lost next time file is generated +// + +#include "RConfig.h" +#if !defined(R__ACCESS_IN_SYMBOL) +//Break the privacy of classes -- Disabled for the moment +#define private public +#define protected public +#endif + +// Since CINT ignores the std namespace, we need to do so in this file. +namespace std {} using namespace std; + +#include "G__Minuit2.h" +#include "TClass.h" +#include "TBuffer.h" +#include "TStreamerInfo.h" +#include "TMemberInspector.h" +#include "TError.h" + +#ifndef G__ROOT +#define G__ROOT +#endif + +#include "RtypesImp.h" +#include "TCollectionProxy.h" +#include "TIsAProxy.h" +namespace ROOT { + namespace Shadow { + } // Of namespace ROOT::Shadow +} // Of namespace ROOT + +namespace ROOT { + void TFcnAdapter_ShowMembers(void *obj, TMemberInspector &R__insp, char *R__parent); + static void TFcnAdapter_Dictionary(); + static void delete_TFcnAdapter(void *p); + static void deleteArray_TFcnAdapter(void *p); + static void destruct_TFcnAdapter(void *p); + + // Function generating the singleton type initializer + TGenericClassInfo *GenerateInitInstance(const ::TFcnAdapter*) + { + ::TFcnAdapter *ptr = 0; + static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::TFcnAdapter),0); + static ::ROOT::TGenericClassInfo + instance("TFcnAdapter", "minuit2/inc/TFcnAdapter.h", 15, + typeid(::TFcnAdapter), DefineBehavior(ptr, ptr), + 0, &TFcnAdapter_Dictionary, isa_proxy, 0, + sizeof(::TFcnAdapter) ); + instance.SetDelete(&delete_TFcnAdapter); + instance.SetDeleteArray(&deleteArray_TFcnAdapter); + instance.SetDestructor(&destruct_TFcnAdapter); + return &instance; + } + // Static variable to force the class initialization + static ::ROOT::TGenericClassInfo *_R__UNIQUE_(Init) = GenerateInitInstance((const ::TFcnAdapter*)0x0); R__UseDummy(_R__UNIQUE_(Init)); + + // Dictionary for non-ClassDef classes + static void TFcnAdapter_Dictionary() { + ::ROOT::GenerateInitInstance((const ::TFcnAdapter*)0x0)->GetClass(); + } + +} + +namespace ROOT { + void TFitterMinuit_ShowMembers(void *obj, TMemberInspector &R__insp, char *R__parent); + static void *new_TFitterMinuit(void *p = 0); + static void *newArray_TFitterMinuit(Long_t size); + static void delete_TFitterMinuit(void *p); + static void deleteArray_TFitterMinuit(void *p); + static void destruct_TFitterMinuit(void *p); + + // Function generating the singleton type initializer + TGenericClassInfo *GenerateInitInstance(const ::TFitterMinuit*) + { + ::TFitterMinuit *ptr = 0; + static ::TVirtualIsAProxy* isa_proxy = new ::TInstrumentedIsAProxy< ::TFitterMinuit >(0); + static ::ROOT::TGenericClassInfo + instance("TFitterMinuit", ::TFitterMinuit::Class_Version(), "minuit2/inc/TFitterMinuit.h", 29, + typeid(::TFitterMinuit), DefineBehavior(ptr, ptr), + &::TFitterMinuit::Dictionary, isa_proxy, 0, + sizeof(::TFitterMinuit) ); + instance.SetNew(&new_TFitterMinuit); + instance.SetNewArray(&newArray_TFitterMinuit); + instance.SetDelete(&delete_TFitterMinuit); + instance.SetDeleteArray(&deleteArray_TFitterMinuit); + instance.SetDestructor(&destruct_TFitterMinuit); + return &instance; + } + // Static variable to force the class initialization + static ::ROOT::TGenericClassInfo *_R__UNIQUE_(Init) = GenerateInitInstance((const ::TFitterMinuit*)0x0); R__UseDummy(_R__UNIQUE_(Init)); +} + +namespace ROOT { + void TFitterFumili_ShowMembers(void *obj, TMemberInspector &R__insp, char *R__parent); + static void *new_TFitterFumili(void *p = 0); + static void *newArray_TFitterFumili(Long_t size); + static void delete_TFitterFumili(void *p); + static void deleteArray_TFitterFumili(void *p); + static void destruct_TFitterFumili(void *p); + + // Function generating the singleton type initializer + TGenericClassInfo *GenerateInitInstance(const ::TFitterFumili*) + { + ::TFitterFumili *ptr = 0; + static ::TVirtualIsAProxy* isa_proxy = new ::TInstrumentedIsAProxy< ::TFitterFumili >(0); + static ::ROOT::TGenericClassInfo + instance("TFitterFumili", ::TFitterFumili::Class_Version(), "minuit2/inc/TFitterFumili.h", 25, + typeid(::TFitterFumili), DefineBehavior(ptr, ptr), + &::TFitterFumili::Dictionary, isa_proxy, 0, + sizeof(::TFitterFumili) ); + instance.SetNew(&new_TFitterFumili); + instance.SetNewArray(&newArray_TFitterFumili); + instance.SetDelete(&delete_TFitterFumili); + instance.SetDeleteArray(&deleteArray_TFitterFumili); + instance.SetDestructor(&destruct_TFitterFumili); + return &instance; + } + // Static variable to force the class initialization + static ::ROOT::TGenericClassInfo *_R__UNIQUE_(Init) = GenerateInitInstance((const ::TFitterFumili*)0x0); R__UseDummy(_R__UNIQUE_(Init)); +} + +//______________________________________________________________________________ +TClass *TFitterMinuit::fgIsA = 0; // static to hold class pointer + +//______________________________________________________________________________ +const char *TFitterMinuit::Class_Name() +{ + return "TFitterMinuit"; +} + +//______________________________________________________________________________ +const char *TFitterMinuit::ImplFileName() +{ + return ::ROOT::GenerateInitInstance((const ::TFitterMinuit*)0x0)->GetImplFileName(); +} + +//______________________________________________________________________________ +int TFitterMinuit::ImplFileLine() +{ + return ::ROOT::GenerateInitInstance((const ::TFitterMinuit*)0x0)->GetImplFileLine(); +} + +//______________________________________________________________________________ +void TFitterMinuit::Dictionary() +{ + fgIsA = ::ROOT::GenerateInitInstance((const ::TFitterMinuit*)0x0)->GetClass(); +} + +//______________________________________________________________________________ +TClass *TFitterMinuit::Class() +{ + if (!fgIsA) fgIsA = ::ROOT::GenerateInitInstance((const ::TFitterMinuit*)0x0)->GetClass(); + return fgIsA; +} + +//______________________________________________________________________________ +TClass *TFitterFumili::fgIsA = 0; // static to hold class pointer + +//______________________________________________________________________________ +const char *TFitterFumili::Class_Name() +{ + return "TFitterFumili"; +} + +//______________________________________________________________________________ +const char *TFitterFumili::ImplFileName() +{ + return ::ROOT::GenerateInitInstance((const ::TFitterFumili*)0x0)->GetImplFileName(); +} + +//______________________________________________________________________________ +int TFitterFumili::ImplFileLine() +{ + return ::ROOT::GenerateInitInstance((const ::TFitterFumili*)0x0)->GetImplFileLine(); +} + +//______________________________________________________________________________ +void TFitterFumili::Dictionary() +{ + fgIsA = ::ROOT::GenerateInitInstance((const ::TFitterFumili*)0x0)->GetClass(); +} + +//______________________________________________________________________________ +TClass *TFitterFumili::Class() +{ + if (!fgIsA) fgIsA = ::ROOT::GenerateInitInstance((const ::TFitterFumili*)0x0)->GetClass(); + return fgIsA; +} + +//______________________________________________________________________________ +void TFitterMinuit::Streamer(TBuffer &R__b) +{ + // Stream an object of class TFitterMinuit. + + UInt_t R__s, R__c; + if (R__b.IsReading()) { + Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { } + TVirtualFitter::Streamer(R__b); + R__b >> fErrorDef; + R__b >> fEDMVal; + R__b >> fGradient; + R__b.StreamObject(&(fState),typeid(MnUserParameterState)); + { + vector<MinosError> &R__stl = theMinosErrors; + R__stl.clear(); + TClass *R__tcl1 = TBuffer::GetClass(typeid(MinosError)); + if (R__tcl1==0) { + Error("theMinosErrors streamer","Missing the TClass object for MinosError!"); + return; + } + int R__i, R__n; + R__b >> R__n; + R__stl.reserve(R__n); + for (R__i = 0; R__i < R__n; R__i++) { + MinosError R__t; + R__b.StreamObject(&R__t,R__tcl1); + R__stl.push_back(R__t); + } + } + R__b >> fMinimizer; + R__b >> fMinuitFCN; + R__b >> fDebug; + R__b >> fStrategy; + R__b >> fMinTolerance; + R__b.CheckByteCount(R__s, R__c, TFitterMinuit::IsA()); + } else { + R__c = R__b.WriteVersion(TFitterMinuit::IsA(), kTRUE); + TVirtualFitter::Streamer(R__b); + R__b << fErrorDef; + R__b << fEDMVal; + R__b << fGradient; + R__b.StreamObject(&(fState),typeid(MnUserParameterState)); + { + vector<MinosError> &R__stl = theMinosErrors; + int R__n=(&R__stl) ? int(R__stl.size()) : 0; + R__b << R__n; + if(R__n) { + TClass *R__tcl1 = TBuffer::GetClass(typeid(MinosError)); + if (R__tcl1==0) { + Error("theMinosErrors streamer","Missing the TClass object for MinosError!"); + return; + } + vector<MinosError>::iterator R__k; + for (R__k = R__stl.begin(); R__k != R__stl.end(); ++R__k) { + R__b.StreamObject((MinosError*)&(*R__k),R__tcl1); + } + } + } + R__b << fMinimizer; + R__b << fMinuitFCN; + R__b << fDebug; + R__b << fStrategy; + R__b << fMinTolerance; + R__b.SetByteCount(R__c, kTRUE); + } +} + +//______________________________________________________________________________ +void TFitterMinuit::ShowMembers(TMemberInspector &R__insp, char *R__parent) +{ + // Inspect the data members of an object of class TFitterMinuit. + + TClass *R__cl = ::TFitterMinuit::IsA(); + Int_t R__ncp = strlen(R__parent); + if (R__ncp || R__cl || R__insp.IsA()) { } + R__insp.Inspect(R__cl, R__parent, "fErrorDef", &fErrorDef); + R__insp.Inspect(R__cl, R__parent, "fEDMVal", &fEDMVal); + R__insp.Inspect(R__cl, R__parent, "fGradient", &fGradient); + R__insp.Inspect(R__cl, R__parent, "fState", (void*)&fState); + ::ROOT::GenericShowMembers("MnUserParameterState", (void*)&fState, R__insp, strcat(R__parent,"fState."),false); + R__parent[R__ncp] = 0; + R__insp.Inspect(R__cl, R__parent, "theMinosErrors", (void*)&theMinosErrors); + ::ROOT::GenericShowMembers("vector<MinosError>", (void*)&theMinosErrors, R__insp, strcat(R__parent,"theMinosErrors."),false); + R__parent[R__ncp] = 0; + R__insp.Inspect(R__cl, R__parent, "*fMinimizer", &fMinimizer); + R__insp.Inspect(R__cl, R__parent, "*fMinuitFCN", &fMinuitFCN); + R__insp.Inspect(R__cl, R__parent, "fDebug", &fDebug); + R__insp.Inspect(R__cl, R__parent, "fStrategy", &fStrategy); + R__insp.Inspect(R__cl, R__parent, "fMinTolerance", &fMinTolerance); + TVirtualFitter::ShowMembers(R__insp, R__parent); +} + +namespace ROOT { + // Wrappers around operator new + static void *new_TFitterMinuit(void *p) { + return p ? new(p) ::TFitterMinuit : new ::TFitterMinuit; + } + static void *newArray_TFitterMinuit(Long_t size) { + return new ::TFitterMinuit[size]; + } + // Wrapper around operator delete + static void delete_TFitterMinuit(void *p) { + delete ((::TFitterMinuit*)p); + } + static void deleteArray_TFitterMinuit(void *p) { + delete [] ((::TFitterMinuit*)p); + } + static void destruct_TFitterMinuit(void *p) { + typedef ::TFitterMinuit current_t; + ((current_t*)p)->~current_t(); + } +} // end of namespace ROOT for class ::TFitterMinuit + +//______________________________________________________________________________ +void TFitterFumili::Streamer(TBuffer &R__b) +{ + // Stream an object of class TFitterFumili. + + UInt_t R__s, R__c; + if (R__b.IsReading()) { + Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { } + TFitterMinuit::Streamer(R__b); + R__b.CheckByteCount(R__s, R__c, TFitterFumili::IsA()); + } else { + R__c = R__b.WriteVersion(TFitterFumili::IsA(), kTRUE); + TFitterMinuit::Streamer(R__b); + R__b.SetByteCount(R__c, kTRUE); + } +} + +//______________________________________________________________________________ +void TFitterFumili::ShowMembers(TMemberInspector &R__insp, char *R__parent) +{ + // Inspect the data members of an object of class TFitterFumili. + + TClass *R__cl = ::TFitterFumili::IsA(); + Int_t R__ncp = strlen(R__parent); + if (R__ncp || R__cl || R__insp.IsA()) { } + TFitterMinuit::ShowMembers(R__insp, R__parent); +} + +namespace ROOT { + // Wrappers around operator new + static void *new_TFitterFumili(void *p) { + return p ? new(p) ::TFitterFumili : new ::TFitterFumili; + } + static void *newArray_TFitterFumili(Long_t size) { + return new ::TFitterFumili[size]; + } + // Wrapper around operator delete + static void delete_TFitterFumili(void *p) { + delete ((::TFitterFumili*)p); + } + static void deleteArray_TFitterFumili(void *p) { + delete [] ((::TFitterFumili*)p); + } + static void destruct_TFitterFumili(void *p) { + typedef ::TFitterFumili current_t; + ((current_t*)p)->~current_t(); + } +} // end of namespace ROOT for class ::TFitterFumili + +namespace ROOT { + // Wrapper around operator delete + static void delete_TFcnAdapter(void *p) { + delete ((::TFcnAdapter*)p); + } + static void deleteArray_TFcnAdapter(void *p) { + delete [] ((::TFcnAdapter*)p); + } + static void destruct_TFcnAdapter(void *p) { + typedef ::TFcnAdapter current_t; + ((current_t*)p)->~current_t(); + } +} // end of namespace ROOT for class ::TFcnAdapter + +namespace ROOT { + void vectorlEMinosErrorgR_ShowMembers(void *obj, TMemberInspector &R__insp, char *R__parent); + static void vectorlEMinosErrorgR_Dictionary(); + static void *new_vectorlEMinosErrorgR(void *p = 0); + static void *newArray_vectorlEMinosErrorgR(Long_t size); + static void delete_vectorlEMinosErrorgR(void *p); + static void deleteArray_vectorlEMinosErrorgR(void *p); + static void destruct_vectorlEMinosErrorgR(void *p); + + // Function generating the singleton type initializer + static // The GenerateInitInstance for STL are not unique and should not be externally accessible + TGenericClassInfo *GenerateInitInstance(const vector<MinosError>*) + { + vector<MinosError> *ptr = 0; + static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(vector<MinosError>),0); + static ::ROOT::TGenericClassInfo + instance("vector<MinosError>", ::TStreamerInfo::Class_Version(), "prec_stl/vector", 42, + typeid(vector<MinosError>), DefineBehavior(ptr, ptr), + 0, &vectorlEMinosErrorgR_Dictionary, isa_proxy, 0, + sizeof(vector<MinosError>) ); + instance.SetNew(&new_vectorlEMinosErrorgR); + instance.SetNewArray(&newArray_vectorlEMinosErrorgR); + instance.SetDelete(&delete_vectorlEMinosErrorgR); + instance.SetDeleteArray(&deleteArray_vectorlEMinosErrorgR); + instance.SetDestructor(&destruct_vectorlEMinosErrorgR); + instance.AdoptStreamer(TCollectionProxy::GenClassStreamer(TCollectionProxy::Pushback<vector<MinosError> >())); + instance.AdoptCollectionProxy(TCollectionProxy::GenProxy(TCollectionProxy::Pushback<vector<MinosError> >())); + return &instance; + } + // Static variable to force the class initialization + static ::ROOT::TGenericClassInfo *_R__UNIQUE_(Init) = GenerateInitInstance((const vector<MinosError>*)0x0); R__UseDummy(_R__UNIQUE_(Init)); + + // Dictionary for non-ClassDef classes + static void vectorlEMinosErrorgR_Dictionary() { + ::ROOT::GenerateInitInstance((const vector<MinosError>*)0x0)->GetClass(); + } + +} + +namespace ROOT { + // Wrappers around operator new + static void *new_vectorlEMinosErrorgR(void *p) { + return p ? ::new((::ROOT::TOperatorNewHelper*)p) vector<MinosError> : new vector<MinosError>; + } + static void *newArray_vectorlEMinosErrorgR(Long_t size) { + return new vector<MinosError>[size]; + } + // Wrapper around operator delete + static void delete_vectorlEMinosErrorgR(void *p) { + delete ((vector<MinosError>*)p); + } + static void deleteArray_vectorlEMinosErrorgR(void *p) { + delete [] ((vector<MinosError>*)p); + } + static void destruct_vectorlEMinosErrorgR(void *p) { + typedef vector<MinosError> current_t; + ((current_t*)p)->~current_t(); + } +} // end of namespace ROOT for class vector<MinosError> + +/******************************************************** +* minuit2/src/G__Minuit2.cxx +* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED +* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX(). +* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE. +********************************************************/ + +#ifdef G__MEMTEST +#undef malloc +#undef free +#endif + +extern "C" void G__cpp_reset_tagtableG__Minuit2(); + +extern "C" void G__set_cpp_environmentG__Minuit2() { + G__add_macro("G__CINTVERSION=50160002"); + G__add_compiledheader("base/inc/TROOT.h"); + G__add_compiledheader("base/inc/TMemberInspector.h"); + G__add_compiledheader("minuit2/inc/TBinLikelihoodFCN.h"); + G__add_compiledheader("minuit2/inc/TChi2ExtendedFCN.h"); + G__add_compiledheader("minuit2/inc/TChi2ExtendedFitData.h"); + G__add_compiledheader("minuit2/inc/TChi2FCN.h"); + G__add_compiledheader("minuit2/inc/TChi2FitData.h"); + G__add_compiledheader("minuit2/inc/TFcnAdapter.h"); + G__add_compiledheader("minuit2/inc/TFitterFumili.h"); + G__add_compiledheader("minuit2/inc/TFitterMinuit.h"); + G__add_compiledheader("minuit2/inc/TFumiliFCN.h"); + G__cpp_reset_tagtableG__Minuit2(); +} +class G__minuit2dIsrcdIG__Minuit2dOcxx_tag {}; + +void* operator new(size_t size,G__minuit2dIsrcdIG__Minuit2dOcxx_tag* p) { + if(p && G__PVOID!=G__getgvp()) return((void*)p); +#ifndef G__ROOT + return(malloc(size)); +#else + return(::operator new(size)); +#endif +} + +/* dummy, for exception */ +#ifdef G__EH_DUMMY_DELETE +void operator delete(void *p,G__minuit2dIsrcdIG__Minuit2dOcxx_tag* x) { + if((long)p==G__getgvp() && G__PVOID!=G__getgvp()) return; +#ifndef G__ROOT + free(p); +#else + ::operator delete(p); +#endif +} +#endif + +static void G__operator_delete(void *p) { + if((long)p==G__getgvp() && G__PVOID!=G__getgvp()) return; +#ifndef G__ROOT + free(p); +#else + ::operator delete(p); +#endif +} + +void G__DELDMY_minuit2dIsrcdIG__Minuit2dOcxx() { G__operator_delete(0); } + +extern "C" int G__cpp_dllrevG__Minuit2() { return(30051515); } + +/********************************************************* +* Member function Interface Method +*********************************************************/ + +/* TFcnAdapter */ +static int G__G__Minuit2_158_1_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + TFcnAdapter *p=NULL; + p=::new((G__minuit2dIsrcdIG__Minuit2dOcxx_tag*)G__getgvp()) TFcnAdapter((void (*)(int&, double*, double&, double*, int))G__int(libp->para[0])); + result7->obj.i = (long)p; + result7->ref = (long)p; + result7->type = 'u'; + result7->tagnum = G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_158_2_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + { + const FCNBase& obj=((const TFcnAdapter*)(G__getstructoffset()))->base(); + result7->ref=(long)(&obj); result7->obj.i=(long)(&obj); + } + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_158_3_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letdouble(result7,100,(double)((const TFcnAdapter*)(G__getstructoffset()))->operator()(*(vector<double>*)libp->para[0].ref)); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_158_4_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letdouble(result7,100,(double)((const TFcnAdapter*)(G__getstructoffset()))->up()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_158_5_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + { +const vector<double> *pobj,xobj=((const TFcnAdapter*)(G__getstructoffset()))->gradient(*(vector<double>*)libp->para[0].ref); + pobj=new vector<double>(xobj); + result7->obj.i=(long)((void*)pobj); result7->ref=result7->obj.i; + G__store_tempobject(*result7); + } + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_158_6_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letdouble(result7,100,(double)((const TFcnAdapter*)(G__getstructoffset()))->operator()((int)G__int(libp->para[0]),(double*)G__int(libp->para[1]))); + return(1 || funcname || hash || result7 || libp) ; +} + +// automatic copy constructor +static int G__G__Minuit2_158_7_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) +{ + TFcnAdapter *p; + void *xtmp = (void*)G__int(libp->para[0]); + p=new TFcnAdapter(*(TFcnAdapter*)xtmp); + result7->obj.i = (long)p; + result7->ref = (long)p; + result7->type = 'u'; + result7->tagnum = G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter); + return(1 || funcname || hash || result7 || libp) ; +} + +// automatic destructor +typedef TFcnAdapter G__TTFcnAdapter; +static int G__G__Minuit2_158_8_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + if(0==G__getstructoffset()) return(1); + if(G__getaryconstruct()) + if(G__PVOID==G__getgvp()) + delete[] (TFcnAdapter *)(G__getstructoffset()); + else + for(int i=G__getaryconstruct()-1;i>=0;i--) + ((TFcnAdapter *)((G__getstructoffset())+sizeof(TFcnAdapter)*i))->~G__TTFcnAdapter(); + else { + long G__Xtmp=G__getgvp(); + G__setgvp(G__PVOID); + ((TFcnAdapter *)(G__getstructoffset()))->~G__TTFcnAdapter(); + G__setgvp(G__Xtmp); + G__operator_delete((void*)G__getstructoffset()); + } + G__setnull(result7); + return(1 || funcname || hash || result7 || libp) ; +} + +// automatic assignment operator +static int G__G__Minuit2_158_9_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + TFcnAdapter *dest = (TFcnAdapter*)(G__getstructoffset()); + *dest = (*(TFcnAdapter*)libp->para[0].ref); + const TFcnAdapter& obj = *dest; + result7->ref=(long)(&obj); result7->obj.i=(long)(&obj); + return(1 || funcname || hash || result7 || libp) ; +} + + +/* TFitterMinuit */ +static int G__G__Minuit2_270_1_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + TFitterMinuit *p=NULL; + if(G__getaryconstruct()) p=new TFitterMinuit[G__getaryconstruct()]; + else p=new TFitterMinuit; + result7->obj.i = (long)p; + result7->ref = (long)p; + result7->type = 'u'; + result7->tagnum = G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_2_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + TFitterMinuit *p=NULL; + p = new TFitterMinuit((Int_t)G__int(libp->para[0])); + result7->obj.i = (long)p; + result7->ref = (long)p; + result7->type = 'u'; + result7->tagnum = G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_3_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letdouble(result7,100,(double)((const TFitterMinuit*)(G__getstructoffset()))->Chisquare((Int_t)G__int(libp->para[0]),(Double_t*)G__int(libp->para[1]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_4_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + switch(libp->paran) { + case 1: + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->Clear((Option_t*)G__int(libp->para[0])); + break; + case 0: + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->Clear(); + break; + } + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_5_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)((TFitterMinuit*)(G__getstructoffset()))->ExecuteCommand((const char*)G__int(libp->para[0]),(Double_t*)G__int(libp->para[1]) +,(Int_t)G__int(libp->para[2]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_6_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->FixParameter((Int_t)G__int(libp->para[0])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_7_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,68,(long)((const TFitterMinuit*)(G__getstructoffset()))->GetCovarianceMatrix()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_8_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letdouble(result7,100,(double)((const TFitterMinuit*)(G__getstructoffset()))->GetCovarianceMatrixElement((Int_t)G__int(libp->para[0]),(Int_t)G__int(libp->para[1]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_9_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)((const TFitterMinuit*)(G__getstructoffset()))->GetErrors((Int_t)G__int(libp->para[0]),*(Double_t*)G__Doubleref(&libp->para[1]) +,*(Double_t*)G__Doubleref(&libp->para[2]),*(Double_t*)G__Doubleref(&libp->para[3]) +,*(Double_t*)G__Doubleref(&libp->para[4]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_0_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)((const TFitterMinuit*)(G__getstructoffset()))->GetNumberTotalParameters()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_1_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)((const TFitterMinuit*)(G__getstructoffset()))->GetNumberFreeParameters()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_2_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letdouble(result7,100,(double)((const TFitterMinuit*)(G__getstructoffset()))->GetParError((Int_t)G__int(libp->para[0]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_3_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letdouble(result7,100,(double)((const TFitterMinuit*)(G__getstructoffset()))->GetParameter((Int_t)G__int(libp->para[0]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_4_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)((const TFitterMinuit*)(G__getstructoffset()))->GetParameter((Int_t)G__int(libp->para[0]),(char*)G__int(libp->para[1]) +,*(Double_t*)G__Doubleref(&libp->para[2]),*(Double_t*)G__Doubleref(&libp->para[3]) +,*(Double_t*)G__Doubleref(&libp->para[4]),*(Double_t*)G__Doubleref(&libp->para[5]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_5_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)((const TFitterMinuit*)(G__getstructoffset()))->GetStats(*(Double_t*)G__Doubleref(&libp->para[0]),*(Double_t*)G__Doubleref(&libp->para[1]) +,*(Double_t*)G__Doubleref(&libp->para[2]),*(Int_t*)G__Intref(&libp->para[3]) +,*(Int_t*)G__Intref(&libp->para[4]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_6_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letdouble(result7,100,(double)((TFitterMinuit*)(G__getstructoffset()))->GetSumLog((Int_t)G__int(libp->para[0]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_7_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,103,(long)((const TFitterMinuit*)(G__getstructoffset()))->IsFixed((Int_t)G__int(libp->para[0]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_8_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((const TFitterMinuit*)(G__getstructoffset()))->PrintResults((Int_t)G__int(libp->para[0]),(Double_t)G__double(libp->para[1])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_9_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->ReleaseParameter((Int_t)G__int(libp->para[0])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_0_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->SetFitMethod((const char*)G__int(libp->para[0])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_1_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)((TFitterMinuit*)(G__getstructoffset()))->SetParameter((Int_t)G__int(libp->para[0]),(const char*)G__int(libp->para[1]) +,(Double_t)G__double(libp->para[2]),(Double_t)G__double(libp->para[3]) +,(Double_t)G__double(libp->para[4]),(Double_t)G__double(libp->para[5]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_2_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->SetFCN((void (*)(Int_t&, Double_t*, Double_t&f, Double_t*, Int_t) )G__int(libp->para[0])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_3_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->SetFCN((void*)G__int(libp->para[0])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_4_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->SetMinuitFCN((FCNBase*)G__int(libp->para[0])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_5_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + { + const MnUserParameterState& obj=((const TFitterMinuit*)(G__getstructoffset()))->State(); + result7->ref=(long)(&obj); result7->obj.i=(long)(&obj); + } + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_6_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,85,(long)((const TFitterMinuit*)(G__getstructoffset()))->GetMinuitFCN()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_7_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,85,(long)((const TFitterMinuit*)(G__getstructoffset()))->GetMinimizer()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_8_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + switch(libp->paran) { + case 2: + G__letint(result7,105,(long)((TFitterMinuit*)(G__getstructoffset()))->Minimize((int)G__int(libp->para[0]),(double)G__double(libp->para[1]))); + break; + case 1: + G__letint(result7,105,(long)((TFitterMinuit*)(G__getstructoffset()))->Minimize((int)G__int(libp->para[0]))); + break; + case 0: + G__letint(result7,105,(long)((TFitterMinuit*)(G__getstructoffset()))->Minimize()); + break; + } + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_9_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)((TFitterMinuit*)(G__getstructoffset()))->GetStrategy()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_0_3(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)((TFitterMinuit*)(G__getstructoffset()))->PrintLevel()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_1_3(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->SetStrategy((int)G__int(libp->para[0])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_2_3(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->SetPrintLevel((int)G__int(libp->para[0])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_3_3(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->SetMinimumTolerance((double)G__double(libp->para[0])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_4_3(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letdouble(result7,100,(double)((const TFitterMinuit*)(G__getstructoffset()))->MinimumTolerance()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_5_4(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,85,(long)TFitterMinuit::Class()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_6_4(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,67,(long)TFitterMinuit::Class_Name()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_7_4(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,115,(long)TFitterMinuit::Class_Version()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_8_4(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + TFitterMinuit::Dictionary(); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_9_4(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,85,(long)((const TFitterMinuit*)(G__getstructoffset()))->IsA()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_0_5(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->ShowMembers(*(TMemberInspector*)libp->para[0].ref,(char*)G__int(libp->para[1])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_1_5(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->Streamer(*(TBuffer*)libp->para[0].ref); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_2_5(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterMinuit*)(G__getstructoffset()))->StreamerNVirtual(*(TBuffer*)libp->para[0].ref); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_3_5(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,67,(long)TFitterMinuit::DeclFileName()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_4_5(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)TFitterMinuit::ImplFileLine()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_5_5(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,67,(long)TFitterMinuit::ImplFileName()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_270_6_5(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)TFitterMinuit::DeclFileLine()); + return(1 || funcname || hash || result7 || libp) ; +} + +// automatic copy constructor +static int G__G__Minuit2_270_7_5(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) +{ + TFitterMinuit *p; + void *xtmp = (void*)G__int(libp->para[0]); + p=new TFitterMinuit(*(TFitterMinuit*)xtmp); + result7->obj.i = (long)p; + result7->ref = (long)p; + result7->type = 'u'; + result7->tagnum = G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit); + return(1 || funcname || hash || result7 || libp) ; +} + +// automatic destructor +typedef TFitterMinuit G__TTFitterMinuit; +static int G__G__Minuit2_270_8_5(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + if(0==G__getstructoffset()) return(1); + if(G__getaryconstruct()) + if(G__PVOID==G__getgvp()) + delete[] (TFitterMinuit *)(G__getstructoffset()); + else + for(int i=G__getaryconstruct()-1;i>=0;i--) + delete (TFitterMinuit *)((G__getstructoffset())+sizeof(TFitterMinuit)*i); + else delete (TFitterMinuit *)(G__getstructoffset()); + G__setnull(result7); + return(1 || funcname || hash || result7 || libp) ; +} + +// automatic assignment operator +static int G__G__Minuit2_270_9_5(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + TFitterMinuit *dest = (TFitterMinuit*)(G__getstructoffset()); + *dest = (*(TFitterMinuit*)libp->para[0].ref); + const TFitterMinuit& obj = *dest; + result7->ref=(long)(&obj); result7->obj.i=(long)(&obj); + return(1 || funcname || hash || result7 || libp) ; +} + + +/* TFitterFumili */ +static int G__G__Minuit2_276_1_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + TFitterFumili *p=NULL; + if(G__getaryconstruct()) p=new TFitterFumili[G__getaryconstruct()]; + else p=new TFitterFumili; + result7->obj.i = (long)p; + result7->ref = (long)p; + result7->type = 'u'; + result7->tagnum = G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_2_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + TFitterFumili *p=NULL; + p = new TFitterFumili((Int_t)G__int(libp->para[0])); + result7->obj.i = (long)p; + result7->ref = (long)p; + result7->type = 'u'; + result7->tagnum = G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_8_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,85,(long)TFitterFumili::Class()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_9_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,67,(long)TFitterFumili::Class_Name()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_0_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,115,(long)TFitterFumili::Class_Version()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_1_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + TFitterFumili::Dictionary(); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_2_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,85,(long)((const TFitterFumili*)(G__getstructoffset()))->IsA()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_3_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterFumili*)(G__getstructoffset()))->ShowMembers(*(TMemberInspector*)libp->para[0].ref,(char*)G__int(libp->para[1])); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_4_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterFumili*)(G__getstructoffset()))->Streamer(*(TBuffer*)libp->para[0].ref); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_5_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__setnull(result7); + ((TFitterFumili*)(G__getstructoffset()))->StreamerNVirtual(*(TBuffer*)libp->para[0].ref); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_6_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,67,(long)TFitterFumili::DeclFileName()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_7_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)TFitterFumili::ImplFileLine()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_8_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,67,(long)TFitterFumili::ImplFileName()); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__G__Minuit2_276_9_1(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + G__letint(result7,105,(long)TFitterFumili::DeclFileLine()); + return(1 || funcname || hash || result7 || libp) ; +} + +// automatic copy constructor +static int G__G__Minuit2_276_0_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) +{ + TFitterFumili *p; + void *xtmp = (void*)G__int(libp->para[0]); + p=new TFitterFumili(*(TFitterFumili*)xtmp); + result7->obj.i = (long)p; + result7->ref = (long)p; + result7->type = 'u'; + result7->tagnum = G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili); + return(1 || funcname || hash || result7 || libp) ; +} + +// automatic destructor +typedef TFitterFumili G__TTFitterFumili; +static int G__G__Minuit2_276_1_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + if(0==G__getstructoffset()) return(1); + if(G__getaryconstruct()) + if(G__PVOID==G__getgvp()) + delete[] (TFitterFumili *)(G__getstructoffset()); + else + for(int i=G__getaryconstruct()-1;i>=0;i--) + delete (TFitterFumili *)((G__getstructoffset())+sizeof(TFitterFumili)*i); + else delete (TFitterFumili *)(G__getstructoffset()); + G__setnull(result7); + return(1 || funcname || hash || result7 || libp) ; +} + +// automatic assignment operator +static int G__G__Minuit2_276_2_2(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) { + TFitterFumili *dest = (TFitterFumili*)(G__getstructoffset()); + *dest = (*(TFitterFumili*)libp->para[0].ref); + const TFitterFumili& obj = *dest; + result7->ref=(long)(&obj); result7->obj.i=(long)(&obj); + return(1 || funcname || hash || result7 || libp) ; +} + + +/* Setting up global function */ + +/********************************************************* +* Member function Stub +*********************************************************/ + +/* TFcnAdapter */ + +/* TFitterMinuit */ + +/* TFitterFumili */ + +/********************************************************* +* Global function Stub +*********************************************************/ + +/********************************************************* +* Get size of pointer to member function +*********************************************************/ +class G__Sizep2memfuncG__Minuit2 { + public: + G__Sizep2memfuncG__Minuit2() {p=&G__Sizep2memfuncG__Minuit2::sizep2memfunc;} + size_t sizep2memfunc() { return(sizeof(p)); } + private: + size_t (G__Sizep2memfuncG__Minuit2::*p)(); +}; + +size_t G__get_sizep2memfuncG__Minuit2() +{ + G__Sizep2memfuncG__Minuit2 a; + G__setsizep2memfunc((int)a.sizep2memfunc()); + return((size_t)a.sizep2memfunc()); +} + + +/********************************************************* +* virtual base class offset calculation interface +*********************************************************/ + + /* Setting up class inheritance */ + +/********************************************************* +* Inheritance information setup/ +*********************************************************/ +extern "C" void G__cpp_setup_inheritanceG__Minuit2() { + + /* Setting up class inheritance */ + if(0==G__getnumbaseclass(G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter))) { + TFcnAdapter *G__Lderived; + G__Lderived=(TFcnAdapter*)0x1000; + { + FCNGradientBase *G__Lpbase=(FCNGradientBase*)G__Lderived; + G__inheritance_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter),G__get_linked_tagnum(&G__G__Minuit2LN_FCNGradientBase),(long)G__Lpbase-(long)G__Lderived,1,1); + } + { + FCNBase *G__Lpbase=(FCNBase*)G__Lderived; + G__inheritance_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter),G__get_linked_tagnum(&G__G__Minuit2LN_FCNBase),(long)G__Lpbase-(long)G__Lderived,1,0); + } + { + GenericFunction *G__Lpbase=(GenericFunction*)G__Lderived; + G__inheritance_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter),G__get_linked_tagnum(&G__G__Minuit2LN_GenericFunction),(long)G__Lpbase-(long)G__Lderived,1,0); + } + } + if(0==G__getnumbaseclass(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit))) { + TFitterMinuit *G__Lderived; + G__Lderived=(TFitterMinuit*)0x1000; + { + TVirtualFitter *G__Lpbase=(TVirtualFitter*)G__Lderived; + G__inheritance_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit),G__get_linked_tagnum(&G__G__Minuit2LN_TVirtualFitter),(long)G__Lpbase-(long)G__Lderived,1,1); + } + { + TNamed *G__Lpbase=(TNamed*)G__Lderived; + G__inheritance_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit),G__get_linked_tagnum(&G__G__Minuit2LN_TNamed),(long)G__Lpbase-(long)G__Lderived,1,0); + } + { + TObject *G__Lpbase=(TObject*)G__Lderived; + G__inheritance_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit),G__get_linked_tagnum(&G__G__Minuit2LN_TObject),(long)G__Lpbase-(long)G__Lderived,1,0); + } + } + if(0==G__getnumbaseclass(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili))) { + TFitterFumili *G__Lderived; + G__Lderived=(TFitterFumili*)0x1000; + { + TFitterMinuit *G__Lpbase=(TFitterMinuit*)G__Lderived; + G__inheritance_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili),G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit),(long)G__Lpbase-(long)G__Lderived,1,1); + } + { + TVirtualFitter *G__Lpbase=(TVirtualFitter*)G__Lderived; + G__inheritance_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili),G__get_linked_tagnum(&G__G__Minuit2LN_TVirtualFitter),(long)G__Lpbase-(long)G__Lderived,1,0); + } + { + TNamed *G__Lpbase=(TNamed*)G__Lderived; + G__inheritance_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili),G__get_linked_tagnum(&G__G__Minuit2LN_TNamed),(long)G__Lpbase-(long)G__Lderived,1,0); + } + { + TObject *G__Lpbase=(TObject*)G__Lderived; + G__inheritance_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili),G__get_linked_tagnum(&G__G__Minuit2LN_TObject),(long)G__Lpbase-(long)G__Lderived,1,0); + } + } +} + +/********************************************************* +* typedef information setup/ +*********************************************************/ +extern "C" void G__cpp_setup_typetableG__Minuit2() { + + /* Setting up typedef entry */ + G__search_typename2("Int_t",105,-1,0, +-1); + G__setnewtype(-1,"Signed integer 4 bytes (int)",0); + G__search_typename2("Double_t",100,-1,0, +-1); + G__setnewtype(-1,"Double 8 bytes",0); + G__search_typename2("Bool_t",103,-1,0, +-1); + G__setnewtype(-1,"Boolean (0=false, 1=true) (bool)",0); + G__search_typename2("Version_t",115,-1,0, +-1); + G__setnewtype(-1,"Class version identifier (short)",0); + G__search_typename2("Option_t",99,-1,256, +-1); + G__setnewtype(-1,"Option string (const char)",0); + G__search_typename2("vector<TStreamerInfo*>",117,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgR),0,-1); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<const_iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("vector<double>",117,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEdoublecOallocatorlEdoublegRsPgR),0,-1); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<const_iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEdoublecOallocatorlEdoublegRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEdoublecOallocatorlEdoublegRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEdoublecOallocatorlEdoublegRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEdoublecOallocatorlEdoublegRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("vector<CoordData>",117,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<const_iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("vector<vector<double,allocator<double> >>",117,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("void (*)(int&, double*, double&, double*, int)",49,-1,0, +-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector<MinuitParameter>",117,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinuitParametercOallocatorlEMinuitParametergRsPgR),0,-1); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<const_iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEMinuitParametercOallocatorlEMinuitParametergRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinuitParametercOallocatorlEMinuitParametergRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEMinuitParametercOallocatorlEMinuitParametergRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinuitParametercOallocatorlEMinuitParametergRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("vector<unsigned int>",117,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgR),0,-1); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<const_iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("vector<MinimumState>",117,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinimumStatecOallocatorlEMinimumStategRsPgR),0,-1); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<const_iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEMinimumStatecOallocatorlEMinimumStategRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinimumStatecOallocatorlEMinimumStategRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEMinimumStatecOallocatorlEMinimumStategRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinimumStatecOallocatorlEMinimumStategRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("void (*)(Int_t&, Double_t*, Double_t&f, Double_t*, Int_t) ",49,-1,0, +-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector<MinosError>",117,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinosErrorcOallocatorlEMinosErrorgRsPgR),0,-1); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<const_iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEMinosErrorcOallocatorlEMinosErrorgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinosErrorcOallocatorlEMinosErrorgRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); + G__search_typename2("reverse_iterator<iterator>",117,G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEMinosErrorcOallocatorlEMinosErrorgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinosErrorcOallocatorlEMinosErrorgRsPgR)); + G__setnewtype(-1,"// @(#)root/base:$Name: $:$Id: TROOT.h,v 1.50 2005/09/16 08:48:39 rdm Exp $",0); +} + +/********************************************************* +* Data Member information setup/ +*********************************************************/ + + /* Setting up class,struct,union tag member variable */ + + /* TFcnAdapter */ +static void G__setup_memvarTFcnAdapter(void) { + G__tag_memvar_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter)); + { TFcnAdapter *p; p=(TFcnAdapter*)0x1000; if (p) { } + G__memvar_setup((void*)NULL,49,0,0,-1,G__defined_typename("void (*)(int&, double*, double&, double*, int)"),-1,4,"fFCN=",0,(char*)NULL); + } + G__tag_memvar_reset(); +} + + + /* TFitterMinuit */ +static void G__setup_memvarTFitterMinuit(void) { + G__tag_memvar_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit)); + { TFitterMinuit *p; p=(TFitterMinuit*)0x1000; if (p) { } + G__memvar_setup((void*)G__PVOID,105,0,1,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuitcLcLEMinimizerType),-1,-2,1,"kMigrad=0",0,(char*)NULL); + G__memvar_setup((void*)G__PVOID,105,0,1,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuitcLcLEMinimizerType),-1,-2,1,"kSimplex=1",0,(char*)NULL); + G__memvar_setup((void*)G__PVOID,105,0,1,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuitcLcLEMinimizerType),-1,-2,1,"kCombined=2",0,(char*)NULL); + G__memvar_setup((void*)G__PVOID,105,0,1,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuitcLcLEMinimizerType),-1,-2,1,"kScan=3",0,(char*)NULL); + G__memvar_setup((void*)G__PVOID,105,0,1,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuitcLcLEMinimizerType),-1,-2,1,"kFumili=4",0,(char*)NULL); + G__memvar_setup((void*)NULL,100,0,0,-1,-1,-1,4,"fErrorDef=",0,(char*)NULL); + G__memvar_setup((void*)NULL,100,0,0,-1,-1,-1,4,"fEDMVal=",0,(char*)NULL); + G__memvar_setup((void*)NULL,103,0,0,-1,-1,-1,4,"fGradient=",0,(char*)NULL); + G__memvar_setup((void*)NULL,117,0,0,G__get_linked_tagnum(&G__G__Minuit2LN_MnUserParameterState),-1,-1,4,"fState=",0,(char*)NULL); + G__memvar_setup((void*)NULL,117,0,0,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinosErrorcOallocatorlEMinosErrorgRsPgR),G__defined_typename("vector<MinosError>"),-1,4,"theMinosErrors=",0,(char*)NULL); + G__memvar_setup((void*)NULL,85,0,0,G__get_linked_tagnum(&G__G__Minuit2LN_ModularFunctionMinimizer),-1,-1,4,"fMinimizer=",0,(char*)NULL); + G__memvar_setup((void*)NULL,85,0,0,G__get_linked_tagnum(&G__G__Minuit2LN_FCNBase),-1,-1,4,"fMinuitFCN=",0,(char*)NULL); + G__memvar_setup((void*)NULL,105,0,0,-1,-1,-1,4,"fDebug=",0,(char*)NULL); + G__memvar_setup((void*)NULL,105,0,0,-1,-1,-1,4,"fStrategy=",0,(char*)NULL); + G__memvar_setup((void*)NULL,100,0,0,-1,-1,-1,4,"fMinTolerance=",0,(char*)NULL); + G__memvar_setup((void*)NULL,85,0,0,G__get_linked_tagnum(&G__G__Minuit2LN_TClass),-1,-2,4,"fgIsA=",0,(char*)NULL); + } + G__tag_memvar_reset(); +} + + + /* TFitterFumili */ +static void G__setup_memvarTFitterFumili(void) { + G__tag_memvar_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili)); + { TFitterFumili *p; p=(TFitterFumili*)0x1000; if (p) { } + G__memvar_setup((void*)NULL,85,0,0,G__get_linked_tagnum(&G__G__Minuit2LN_TClass),-1,-2,4,"fgIsA=",0,(char*)NULL); + } + G__tag_memvar_reset(); +} + +extern "C" void G__cpp_setup_memvarG__Minuit2() { +} +/*********************************************************** +************************************************************ +************************************************************ +************************************************************ +************************************************************ +************************************************************ +************************************************************ +***********************************************************/ + +/********************************************************* +* Member function information setup for each class +*********************************************************/ +static void G__setup_memfuncTFcnAdapter(void) { + /* TFcnAdapter */ + G__tag_memfunc_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter)); + G__memfunc_setup("TFcnAdapter",1068,G__G__Minuit2_158_1_0,105,G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter),-1,0,1,1,1,0,"1 - 'void (*)(int&, double*, double&, double*, int)' 0 - fcn",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("base",411,G__G__Minuit2_158_2_0,117,G__get_linked_tagnum(&G__G__Minuit2LN_FCNBase),-1,1,0,1,1,9,"",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("operator()",957,G__G__Minuit2_158_3_0,100,-1,-1,0,1,1,1,8,"u 'vector<double,allocator<double> >' 'vector<double>' 11 - -",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("up",229,G__G__Minuit2_158_4_0,100,-1,-1,0,0,1,1,8,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("gradient",846,G__G__Minuit2_158_5_0,117,G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEdoublecOallocatorlEdoublegRsPgR),G__defined_typename("vector<double>"),0,1,1,1,8,"u 'vector<double,allocator<double> >' 'vector<double>' 11 - -",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("operator()",957,G__G__Minuit2_158_6_0,100,-1,-1,0,2,1,1,8, +"i - - 0 - npar D - - 0 - params",(char*)NULL,(void*)NULL,1); + // automatic copy constructor + G__memfunc_setup("TFcnAdapter",1068,G__G__Minuit2_158_7_0,(int)('i'),G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter),-1,0,1,1,1,0,"u 'TFcnAdapter' - 11 - -",(char*)NULL,(void*)NULL,0); + // automatic destructor + G__memfunc_setup("~TFcnAdapter",1194,G__G__Minuit2_158_8_0,(int)('y'),-1,-1,0,0,1,1,0,"",(char*)NULL,(void*)NULL,0); + // automatic assignment operator + G__memfunc_setup("operator=",937,G__G__Minuit2_158_9_0,(int)('u'),G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter),-1,1,1,1,1,0,"u 'TFcnAdapter' - 11 - -",(char*)NULL,(void*)NULL,0); + G__tag_memfunc_reset(); +} + +static void G__setup_memfuncTFitterMinuit(void) { + /* TFitterMinuit */ + G__tag_memfunc_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit)); + G__memfunc_setup("TFitterMinuit",1336,G__G__Minuit2_270_1_0,105,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit),-1,0,0,1,1,0,"",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("TFitterMinuit",1336,G__G__Minuit2_270_2_0,105,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit),-1,0,1,1,1,0,"i - 'Int_t' 0 - maxpar",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("Chisquare",933,G__G__Minuit2_270_3_0,100,-1,G__defined_typename("Double_t"),0,2,1,1,8, +"i - 'Int_t' 0 - npar D - 'Double_t' 0 - params",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("Clear",487,G__G__Minuit2_270_4_0,121,-1,-1,0,1,1,1,0,"C - 'Option_t' 10 \"\" option",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("ExecuteCommand",1426,G__G__Minuit2_270_5_0,105,-1,G__defined_typename("Int_t"),0,3,1,1,0, +"C - - 10 - command D - 'Double_t' 0 - args " +"i - 'Int_t' 0 - nargs",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("FixParameter",1224,G__G__Minuit2_270_6_0,121,-1,-1,0,1,1,1,0,"i - 'Int_t' 0 - ipar",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetCovarianceMatrix",1936,G__G__Minuit2_270_7_0,68,-1,G__defined_typename("Double_t"),0,0,1,1,8,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetCovarianceMatrixElement",2650,G__G__Minuit2_270_8_0,100,-1,G__defined_typename("Double_t"),0,2,1,1,8, +"i - 'Int_t' 0 - i i - 'Int_t' 0 - j",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetErrors",925,G__G__Minuit2_270_9_0,105,-1,G__defined_typename("Int_t"),0,5,1,1,8, +"i - 'Int_t' 0 - ipar d - 'Double_t' 1 - eplus " +"d - 'Double_t' 1 - eminus d - 'Double_t' 1 - eparab " +"d - 'Double_t' 1 - globcc",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetNumberTotalParameters",2465,G__G__Minuit2_270_0_1,105,-1,G__defined_typename("Int_t"),0,0,1,1,8,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetNumberFreeParameters",2335,G__G__Minuit2_270_1_1,105,-1,G__defined_typename("Int_t"),0,0,1,1,8,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetParError",1101,G__G__Minuit2_270_2_1,100,-1,G__defined_typename("Double_t"),0,1,1,1,8,"i - 'Int_t' 0 - ipar",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetParameter",1217,G__G__Minuit2_270_3_1,100,-1,G__defined_typename("Double_t"),0,1,1,1,8,"i - 'Int_t' 0 - ipar",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetParameter",1217,G__G__Minuit2_270_4_1,105,-1,G__defined_typename("Int_t"),0,6,1,1,8, +"i - 'Int_t' 0 - ipar C - - 0 - name " +"d - 'Double_t' 1 - value d - 'Double_t' 1 - verr " +"d - 'Double_t' 1 - vlow d - 'Double_t' 1 - vhigh",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetStats",815,G__G__Minuit2_270_5_1,105,-1,G__defined_typename("Int_t"),0,5,1,1,8, +"d - 'Double_t' 1 - amin d - 'Double_t' 1 - edm " +"d - 'Double_t' 1 - errdef i - 'Int_t' 1 - nvpar " +"i - 'Int_t' 1 - nparx",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetSumLog",887,G__G__Minuit2_270_6_1,100,-1,G__defined_typename("Double_t"),0,1,1,1,0,"i - 'Int_t' 0 - i",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("IsFixed",684,G__G__Minuit2_270_7_1,103,-1,G__defined_typename("Bool_t"),0,1,1,1,8,"i - 'Int_t' 0 - ipar",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("PrintResults",1279,G__G__Minuit2_270_8_1,121,-1,-1,0,2,1,1,8, +"i - 'Int_t' 0 - level d - 'Double_t' 0 - amin",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("ReleaseParameter",1634,G__G__Minuit2_270_9_1,121,-1,-1,0,1,1,1,0,"i - 'Int_t' 0 - ipar",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("SetFitMethod",1200,G__G__Minuit2_270_0_2,121,-1,-1,0,1,1,1,0,"C - - 10 - name",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("SetParameter",1229,G__G__Minuit2_270_1_2,105,-1,G__defined_typename("Int_t"),0,6,1,1,0, +"i - 'Int_t' 0 - ipar C - - 10 - parname " +"d - 'Double_t' 0 - value d - 'Double_t' 0 - verr " +"d - 'Double_t' 0 - vlow d - 'Double_t' 0 - vhigh",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("SetFCN",515,G__G__Minuit2_270_2_2,121,-1,-1,0,1,1,1,0,"1 - 'void (*)(Int_t&, Double_t*, Double_t&f, Double_t*, Int_t) ' 0 - fcn",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("SetFCN",515,G__G__Minuit2_270_3_2,121,-1,-1,0,1,1,1,0,"Y - - 0 - -",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("SetMinuitFCN",1145,G__G__Minuit2_270_4_2,121,-1,-1,0,1,1,1,0,"U 'FCNBase' - 0 - f",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("State",513,G__G__Minuit2_270_5_2,117,G__get_linked_tagnum(&G__G__Minuit2LN_MnUserParameterState),-1,1,0,1,1,9,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetMinuitFCN",1133,G__G__Minuit2_270_6_2,85,G__get_linked_tagnum(&G__G__Minuit2LN_FCNBase),-1,0,0,1,1,9,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetMinimizer",1236,G__G__Minuit2_270_7_2,85,G__get_linked_tagnum(&G__G__Minuit2LN_ModularFunctionMinimizer),-1,0,0,1,1,9,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("Minimize",834,G__G__Minuit2_270_8_2,105,-1,-1,0,2,1,1,0, +"i - - 0 0 nfcn d - - 0 0.1 edmval",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("GetStrategy",1139,G__G__Minuit2_270_9_2,105,-1,-1,0,0,1,1,0,"",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("PrintLevel",1029,G__G__Minuit2_270_0_3,105,-1,-1,0,0,1,1,0,"",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("SetStrategy",1151,G__G__Minuit2_270_1_3,121,-1,-1,0,1,1,1,0,"i - - 0 - stra",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("SetPrintLevel",1329,G__G__Minuit2_270_2_3,121,-1,-1,0,1,1,1,0,"i - - 0 - level",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("SetMinimumTolerance",1957,G__G__Minuit2_270_3_3,121,-1,-1,0,1,1,1,0,"d - - 0 - mintol",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("MinimumTolerance",1657,G__G__Minuit2_270_4_3,100,-1,-1,0,0,1,1,8,"",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("State",513,(G__InterfaceMethod)NULL,117,G__get_linked_tagnum(&G__G__Minuit2LN_MnUserParameterState),-1,1,0,1,2,0,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("SetMinimizer",1248,(G__InterfaceMethod)NULL,121,-1,-1,0,1,1,2,0,"U 'ModularFunctionMinimizer' - 0 - m",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("CreateMinimizer",1544,(G__InterfaceMethod)NULL,121,-1,-1,0,1,1,2,0,"i 'TFitterMinuit::EMinimizerType' - 0 kMigrad -",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("CreateChi2FCN",1137,(G__InterfaceMethod)NULL,121,-1,-1,0,0,1,2,0,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("CreateChi2ExtendedFCN",1954,(G__InterfaceMethod)NULL,121,-1,-1,0,0,1,2,0,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("CreateBinLikelihoodFCN",2120,(G__InterfaceMethod)NULL,121,-1,-1,0,0,1,2,0,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("CreateUnbinLikelihoodFCN",2347,(G__InterfaceMethod)NULL,121,-1,-1,0,0,1,2,0,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("DoMinimization",1451,(G__InterfaceMethod)NULL,117,G__get_linked_tagnum(&G__G__Minuit2LN_FunctionMinimum),-1,0,2,1,2,0, +"i - - 0 0 nfcn d - - 0 0.1 edmval",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("ExamineMinimum",1443,(G__InterfaceMethod)NULL,105,-1,-1,0,1,1,2,0,"u 'FunctionMinimum' - 11 - -",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("Initialize",1042,(G__InterfaceMethod)NULL,121,-1,-1,0,0,1,2,0,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("Class",502,G__G__Minuit2_270_5_4,85,G__get_linked_tagnum(&G__G__Minuit2LN_TClass),-1,0,0,3,1,0,"",(char*)NULL,(void*)(TClass* (*)())(&TFitterMinuit::Class),0); + G__memfunc_setup("Class_Name",982,G__G__Minuit2_270_6_4,67,-1,-1,0,0,3,1,1,"",(char*)NULL,(void*)(const char* (*)())(&TFitterMinuit::Class_Name),0); + G__memfunc_setup("Class_Version",1339,G__G__Minuit2_270_7_4,115,-1,G__defined_typename("Version_t"),0,0,3,1,0,"",(char*)NULL,(void*)(Version_t (*)())(&TFitterMinuit::Class_Version),0); + G__memfunc_setup("Dictionary",1046,G__G__Minuit2_270_8_4,121,-1,-1,0,0,3,1,0,"",(char*)NULL,(void*)(void (*)())(&TFitterMinuit::Dictionary),0); + G__memfunc_setup("IsA",253,G__G__Minuit2_270_9_4,85,G__get_linked_tagnum(&G__G__Minuit2LN_TClass),-1,0,0,1,1,8,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("ShowMembers",1132,G__G__Minuit2_270_0_5,121,-1,-1,0,2,1,1,0, +"u 'TMemberInspector' - 1 - insp C - - 0 - parent",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("Streamer",835,G__G__Minuit2_270_1_5,121,-1,-1,0,1,1,1,0,"u 'TBuffer' - 1 - b",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("StreamerNVirtual",1656,G__G__Minuit2_270_2_5,121,-1,-1,0,1,1,1,0,"u 'TBuffer' - 1 - b",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("DeclFileName",1145,G__G__Minuit2_270_3_5,67,-1,-1,0,0,3,1,1,"",(char*)NULL,(void*)(const char* (*)())(&TFitterMinuit::DeclFileName),0); + G__memfunc_setup("ImplFileLine",1178,G__G__Minuit2_270_4_5,105,-1,-1,0,0,3,1,0,"",(char*)NULL,(void*)(int (*)())(&TFitterMinuit::ImplFileLine),0); + G__memfunc_setup("ImplFileName",1171,G__G__Minuit2_270_5_5,67,-1,-1,0,0,3,1,1,"",(char*)NULL,(void*)(const char* (*)())(&TFitterMinuit::ImplFileName),0); + G__memfunc_setup("DeclFileLine",1152,G__G__Minuit2_270_6_5,105,-1,-1,0,0,3,1,0,"",(char*)NULL,(void*)(int (*)())(&TFitterMinuit::DeclFileLine),0); + // automatic copy constructor + G__memfunc_setup("TFitterMinuit",1336,G__G__Minuit2_270_7_5,(int)('i'),G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit),-1,0,1,1,1,0,"u 'TFitterMinuit' - 11 - -",(char*)NULL,(void*)NULL,0); + // automatic destructor + G__memfunc_setup("~TFitterMinuit",1462,G__G__Minuit2_270_8_5,(int)('y'),-1,-1,0,0,1,1,0,"",(char*)NULL,(void*)NULL,1); + // automatic assignment operator + G__memfunc_setup("operator=",937,G__G__Minuit2_270_9_5,(int)('u'),G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit),-1,1,1,1,1,0,"u 'TFitterMinuit' - 11 - -",(char*)NULL,(void*)NULL,0); + G__tag_memfunc_reset(); +} + +static void G__setup_memfuncTFitterFumili(void) { + /* TFitterFumili */ + G__tag_memfunc_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili)); + G__memfunc_setup("TFitterFumili",1320,G__G__Minuit2_276_1_0,105,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili),-1,0,0,1,1,0,"",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("TFitterFumili",1320,G__G__Minuit2_276_2_0,105,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili),-1,0,1,1,1,0,"i - 'Int_t' 0 - maxpar",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("CreateMinimizer",1544,(G__InterfaceMethod)NULL,121,-1,-1,0,1,1,2,0,"i 'TFitterMinuit::EMinimizerType' - 0 - -",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("CreateChi2FCN",1137,(G__InterfaceMethod)NULL,121,-1,-1,0,0,1,2,0,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("CreateChi2ExtendedFCN",1954,(G__InterfaceMethod)NULL,121,-1,-1,0,0,1,2,0,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("CreateUnbinLikelihoodFCN",2347,(G__InterfaceMethod)NULL,121,-1,-1,0,0,1,2,0,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("CreateBinLikelihoodFCN",2120,(G__InterfaceMethod)NULL,121,-1,-1,0,0,1,2,0,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("Class",502,G__G__Minuit2_276_8_0,85,G__get_linked_tagnum(&G__G__Minuit2LN_TClass),-1,0,0,3,1,0,"",(char*)NULL,(void*)(TClass* (*)())(&TFitterFumili::Class),0); + G__memfunc_setup("Class_Name",982,G__G__Minuit2_276_9_0,67,-1,-1,0,0,3,1,1,"",(char*)NULL,(void*)(const char* (*)())(&TFitterFumili::Class_Name),0); + G__memfunc_setup("Class_Version",1339,G__G__Minuit2_276_0_1,115,-1,G__defined_typename("Version_t"),0,0,3,1,0,"",(char*)NULL,(void*)(Version_t (*)())(&TFitterFumili::Class_Version),0); + G__memfunc_setup("Dictionary",1046,G__G__Minuit2_276_1_1,121,-1,-1,0,0,3,1,0,"",(char*)NULL,(void*)(void (*)())(&TFitterFumili::Dictionary),0); + G__memfunc_setup("IsA",253,G__G__Minuit2_276_2_1,85,G__get_linked_tagnum(&G__G__Minuit2LN_TClass),-1,0,0,1,1,8,"",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("ShowMembers",1132,G__G__Minuit2_276_3_1,121,-1,-1,0,2,1,1,0, +"u 'TMemberInspector' - 1 - insp C - - 0 - parent",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("Streamer",835,G__G__Minuit2_276_4_1,121,-1,-1,0,1,1,1,0,"u 'TBuffer' - 1 - b",(char*)NULL,(void*)NULL,1); + G__memfunc_setup("StreamerNVirtual",1656,G__G__Minuit2_276_5_1,121,-1,-1,0,1,1,1,0,"u 'TBuffer' - 1 - b",(char*)NULL,(void*)NULL,0); + G__memfunc_setup("DeclFileName",1145,G__G__Minuit2_276_6_1,67,-1,-1,0,0,3,1,1,"",(char*)NULL,(void*)(const char* (*)())(&TFitterFumili::DeclFileName),0); + G__memfunc_setup("ImplFileLine",1178,G__G__Minuit2_276_7_1,105,-1,-1,0,0,3,1,0,"",(char*)NULL,(void*)(int (*)())(&TFitterFumili::ImplFileLine),0); + G__memfunc_setup("ImplFileName",1171,G__G__Minuit2_276_8_1,67,-1,-1,0,0,3,1,1,"",(char*)NULL,(void*)(const char* (*)())(&TFitterFumili::ImplFileName),0); + G__memfunc_setup("DeclFileLine",1152,G__G__Minuit2_276_9_1,105,-1,-1,0,0,3,1,0,"",(char*)NULL,(void*)(int (*)())(&TFitterFumili::DeclFileLine),0); + // automatic copy constructor + G__memfunc_setup("TFitterFumili",1320,G__G__Minuit2_276_0_2,(int)('i'),G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili),-1,0,1,1,1,0,"u 'TFitterFumili' - 11 - -",(char*)NULL,(void*)NULL,0); + // automatic destructor + G__memfunc_setup("~TFitterFumili",1446,G__G__Minuit2_276_1_2,(int)('y'),-1,-1,0,0,1,1,0,"",(char*)NULL,(void*)NULL,1); + // automatic assignment operator + G__memfunc_setup("operator=",937,G__G__Minuit2_276_2_2,(int)('u'),G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili),-1,1,1,1,1,0,"u 'TFitterFumili' - 11 - -",(char*)NULL,(void*)NULL,0); + G__tag_memfunc_reset(); +} + + +/********************************************************* +* Member function information setup +*********************************************************/ +extern "C" void G__cpp_setup_memfuncG__Minuit2() { +} + +/********************************************************* +* Global variable information setup for each class +*********************************************************/ +static void G__cpp_setup_global0() { + + /* Setting up global variables */ + G__resetplocal(); + +} + +static void G__cpp_setup_global1() { +} + +static void G__cpp_setup_global2() { + G__memvar_setup((void*)(&gMinuit2),85,0,0,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit),-1,-1,1,"gMinuit2=",0,(char*)NULL); + G__memvar_setup((void*)(&gFumili2),85,0,0,G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili),-1,-1,1,"gFumili2=",0,(char*)NULL); + + G__resetglobalenv(); +} +extern "C" void G__cpp_setup_globalG__Minuit2() { + G__cpp_setup_global0(); + G__cpp_setup_global1(); + G__cpp_setup_global2(); +} + +/********************************************************* +* Global function information setup for each class +*********************************************************/ +static void G__cpp_setup_func0() { + G__lastifuncposition(); + +} + +static void G__cpp_setup_func1() { +} + +static void G__cpp_setup_func2() { +} + +static void G__cpp_setup_func3() { +} + +static void G__cpp_setup_func4() { +} + +static void G__cpp_setup_func5() { +} + +static void G__cpp_setup_func6() { +} + +static void G__cpp_setup_func7() { +} + +static void G__cpp_setup_func8() { + + G__resetifuncposition(); +} + +extern "C" void G__cpp_setup_funcG__Minuit2() { + G__cpp_setup_func0(); + G__cpp_setup_func1(); + G__cpp_setup_func2(); + G__cpp_setup_func3(); + G__cpp_setup_func4(); + G__cpp_setup_func5(); + G__cpp_setup_func6(); + G__cpp_setup_func7(); + G__cpp_setup_func8(); +} + +/********************************************************* +* Class,struct,union,enum tag information setup +*********************************************************/ +/* Setup class/struct taginfo */ +G__linked_taginfo G__G__Minuit2LN_TClass = { "TClass" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_TBuffer = { "TBuffer" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_TMemberInspector = { "TMemberInspector" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_TObject = { "TObject" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_TNamed = { "TNamed" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_vectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgR = { "vector<TStreamerInfo*,allocator<TStreamerInfo*> >" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_reverse_iteratorlEvectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgRcLcLiteratorgR = { "reverse_iterator<vector<TStreamerInfo*,allocator<TStreamerInfo*> >::iterator>" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_GenericFunction = { "GenericFunction" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_vectorlEdoublecOallocatorlEdoublegRsPgR = { "vector<double,allocator<double> >" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_reverse_iteratorlEvectorlEdoublecOallocatorlEdoublegRsPgRcLcLiteratorgR = { "reverse_iterator<vector<double,allocator<double> >::iterator>" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_FCNBase = { "FCNBase" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_TVirtualFitter = { "TVirtualFitter" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_vectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgR = { "vector<vector<double,allocator<double> >,allocator<vector<double,allocator<double> > > >" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_reverse_iteratorlEvectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRcLcLiteratorgR = { "reverse_iterator<vector<vector<double,allocator<double> >,allocator<vector<double,allocator<double> > > >::iterator>" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_FCNGradientBase = { "FCNGradientBase" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_TFcnAdapter = { "TFcnAdapter" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_vectorlEMinuitParametercOallocatorlEMinuitParametergRsPgR = { "vector<MinuitParameter,allocator<MinuitParameter> >" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_reverse_iteratorlEvectorlEMinuitParametercOallocatorlEMinuitParametergRsPgRcLcLiteratorgR = { "reverse_iterator<vector<MinuitParameter,allocator<MinuitParameter> >::iterator>" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_vectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgR = { "vector<unsigned int,allocator<unsigned int> >" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_reverse_iteratorlEvectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgRcLcLiteratorgR = { "reverse_iterator<vector<unsigned int,allocator<unsigned int> >::iterator>" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_MnUserParameterState = { "MnUserParameterState" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_FunctionMinimum = { "FunctionMinimum" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_ModularFunctionMinimizer = { "ModularFunctionMinimizer" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_vectorlEMinimumStatecOallocatorlEMinimumStategRsPgR = { "vector<MinimumState,allocator<MinimumState> >" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_reverse_iteratorlEvectorlEMinimumStatecOallocatorlEMinimumStategRsPgRcLcLiteratorgR = { "reverse_iterator<vector<MinimumState,allocator<MinimumState> >::iterator>" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_TFitterMinuit = { "TFitterMinuit" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_TFitterMinuitcLcLEMinimizerType = { "TFitterMinuit::EMinimizerType" , 101 , -1 }; +G__linked_taginfo G__G__Minuit2LN_vectorlEMinosErrorcOallocatorlEMinosErrorgRsPgR = { "vector<MinosError,allocator<MinosError> >" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_reverse_iteratorlEvectorlEMinosErrorcOallocatorlEMinosErrorgRsPgRcLcLiteratorgR = { "reverse_iterator<vector<MinosError,allocator<MinosError> >::iterator>" , 99 , -1 }; +G__linked_taginfo G__G__Minuit2LN_TFitterFumili = { "TFitterFumili" , 99 , -1 }; + +/* Reset class/struct taginfo */ +extern "C" void G__cpp_reset_tagtableG__Minuit2() { + G__G__Minuit2LN_TClass.tagnum = -1 ; + G__G__Minuit2LN_TBuffer.tagnum = -1 ; + G__G__Minuit2LN_TMemberInspector.tagnum = -1 ; + G__G__Minuit2LN_TObject.tagnum = -1 ; + G__G__Minuit2LN_TNamed.tagnum = -1 ; + G__G__Minuit2LN_vectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgR.tagnum = -1 ; + G__G__Minuit2LN_reverse_iteratorlEvectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__G__Minuit2LN_GenericFunction.tagnum = -1 ; + G__G__Minuit2LN_vectorlEdoublecOallocatorlEdoublegRsPgR.tagnum = -1 ; + G__G__Minuit2LN_reverse_iteratorlEvectorlEdoublecOallocatorlEdoublegRsPgRcLcLiteratorgR.tagnum = -1 ; + G__G__Minuit2LN_FCNBase.tagnum = -1 ; + G__G__Minuit2LN_TVirtualFitter.tagnum = -1 ; + G__G__Minuit2LN_vectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgR.tagnum = -1 ; + G__G__Minuit2LN_reverse_iteratorlEvectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__G__Minuit2LN_FCNGradientBase.tagnum = -1 ; + G__G__Minuit2LN_TFcnAdapter.tagnum = -1 ; + G__G__Minuit2LN_vectorlEMinuitParametercOallocatorlEMinuitParametergRsPgR.tagnum = -1 ; + G__G__Minuit2LN_reverse_iteratorlEvectorlEMinuitParametercOallocatorlEMinuitParametergRsPgRcLcLiteratorgR.tagnum = -1 ; + G__G__Minuit2LN_vectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgR.tagnum = -1 ; + G__G__Minuit2LN_reverse_iteratorlEvectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__G__Minuit2LN_MnUserParameterState.tagnum = -1 ; + G__G__Minuit2LN_FunctionMinimum.tagnum = -1 ; + G__G__Minuit2LN_ModularFunctionMinimizer.tagnum = -1 ; + G__G__Minuit2LN_vectorlEMinimumStatecOallocatorlEMinimumStategRsPgR.tagnum = -1 ; + G__G__Minuit2LN_reverse_iteratorlEvectorlEMinimumStatecOallocatorlEMinimumStategRsPgRcLcLiteratorgR.tagnum = -1 ; + G__G__Minuit2LN_TFitterMinuit.tagnum = -1 ; + G__G__Minuit2LN_TFitterMinuitcLcLEMinimizerType.tagnum = -1 ; + G__G__Minuit2LN_vectorlEMinosErrorcOallocatorlEMinosErrorgRsPgR.tagnum = -1 ; + G__G__Minuit2LN_reverse_iteratorlEvectorlEMinosErrorcOallocatorlEMinosErrorgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__G__Minuit2LN_TFitterFumili.tagnum = -1 ; +} + + +extern "C" void G__cpp_setup_tagtableG__Minuit2() { + + /* Setting up class,struct,union tag entry */ + G__get_linked_tagnum(&G__G__Minuit2LN_TClass); + G__get_linked_tagnum(&G__G__Minuit2LN_TBuffer); + G__get_linked_tagnum(&G__G__Minuit2LN_TMemberInspector); + G__get_linked_tagnum(&G__G__Minuit2LN_TObject); + G__get_linked_tagnum(&G__G__Minuit2LN_TNamed); + G__get_linked_tagnum(&G__G__Minuit2LN_vectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgR); + G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlETStreamerInfomUcOallocatorlETStreamerInfomUgRsPgRcLcLiteratorgR); + G__get_linked_tagnum(&G__G__Minuit2LN_GenericFunction); + G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEdoublecOallocatorlEdoublegRsPgR); + G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEdoublecOallocatorlEdoublegRsPgRcLcLiteratorgR); + G__get_linked_tagnum(&G__G__Minuit2LN_FCNBase); + G__get_linked_tagnum(&G__G__Minuit2LN_TVirtualFitter); + G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgR); + G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRcLcLiteratorgR); + G__get_linked_tagnum(&G__G__Minuit2LN_FCNGradientBase); + G__tagtable_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFcnAdapter),sizeof(TFcnAdapter),-1,33792,(char*)NULL,G__setup_memvarTFcnAdapter,G__setup_memfuncTFcnAdapter); + G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinuitParametercOallocatorlEMinuitParametergRsPgR); + G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEMinuitParametercOallocatorlEMinuitParametergRsPgRcLcLiteratorgR); + G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgR); + G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEunsignedsPintcOallocatorlEunsignedsPintgRsPgRcLcLiteratorgR); + G__get_linked_tagnum(&G__G__Minuit2LN_MnUserParameterState); + G__get_linked_tagnum(&G__G__Minuit2LN_FunctionMinimum); + G__get_linked_tagnum(&G__G__Minuit2LN_ModularFunctionMinimizer); + G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinimumStatecOallocatorlEMinimumStategRsPgR); + G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEMinimumStatecOallocatorlEMinimumStategRsPgRcLcLiteratorgR); + G__tagtable_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuit),sizeof(TFitterMinuit),-1,62720,(char*)NULL,G__setup_memvarTFitterMinuit,G__setup_memfuncTFitterMinuit); + G__get_linked_tagnum(&G__G__Minuit2LN_TFitterMinuitcLcLEMinimizerType); + G__get_linked_tagnum(&G__G__Minuit2LN_vectorlEMinosErrorcOallocatorlEMinosErrorgRsPgR); + G__get_linked_tagnum(&G__G__Minuit2LN_reverse_iteratorlEvectorlEMinosErrorcOallocatorlEMinosErrorgRsPgRcLcLiteratorgR); + G__tagtable_setup(G__get_linked_tagnum(&G__G__Minuit2LN_TFitterFumili),sizeof(TFitterFumili),-1,62720,(char*)NULL,G__setup_memvarTFitterFumili,G__setup_memfuncTFitterFumili); +} +extern "C" void G__cpp_setupG__Minuit2(void) { + G__check_setup_version(30051515,"G__cpp_setupG__Minuit2()"); + G__set_cpp_environmentG__Minuit2(); + G__cpp_setup_tagtableG__Minuit2(); + + G__cpp_setup_inheritanceG__Minuit2(); + + G__cpp_setup_typetableG__Minuit2(); + + G__cpp_setup_memvarG__Minuit2(); + + G__cpp_setup_memfuncG__Minuit2(); + G__cpp_setup_globalG__Minuit2(); + G__cpp_setup_funcG__Minuit2(); + + if(0==G__getsizep2memfunc()) G__get_sizep2memfuncG__Minuit2(); + return; +} +class G__cpp_setup_initG__Minuit2 { + public: + G__cpp_setup_initG__Minuit2() { G__add_setup_func("G__Minuit2",(G__incsetup)(&G__cpp_setupG__Minuit2)); G__call_setup_funcs(); } + ~G__cpp_setup_initG__Minuit2() { G__remove_setup_func("G__Minuit2"); } +}; +G__cpp_setup_initG__Minuit2 G__cpp_setup_initializerG__Minuit2; + diff --git a/minuit2/src/Minuit-1_7_6.tar.gz b/minuit2/src/Minuit-1_7_6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..fbf26288543ea4f5e025b02cc9512bd659dbcfce Binary files /dev/null and b/minuit2/src/Minuit-1_7_6.tar.gz differ diff --git a/minuit2/src/TBinLikelihoodFCN.cxx b/minuit2/src/TBinLikelihoodFCN.cxx new file mode 100644 index 0000000000000000000000000000000000000000..f909ed5e743ab53436ea97be1b325a645d8f817f --- /dev/null +++ b/minuit2/src/TBinLikelihoodFCN.cxx @@ -0,0 +1,91 @@ +// @(#)root/minuit2:$Name: $:$Id: TBinLikelihoodFCN.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include "TBinLikelihoodFCN.h" +#include "TChi2FitData.h" +#include "FitterUtil.h" + +#include <cmath> +#include <cassert> + +#include "TF1.h" +#include "TVirtualFitter.h" + +#define DEBUG 1 +#ifdef DEBUG +#include <iostream> +#endif + +// constructor _ create FitData class + +TBinLikelihoodFCN::TBinLikelihoodFCN( const TVirtualFitter & fitter) : + fUp(0.5), fOwner(true) +{ + fFunc = dynamic_cast<TF1 *> ( fitter.GetUserFunc() ); + assert(fFunc); + // to do: use class for likelihood data (errors are not necessary) + // in likelihood fit need to keep empty bins + fData = new TChi2FitData(fitter, false); +#ifdef DEBUG + std::cout << "Created FitData with size = " << fData->Size() << std::endl; +#endif + + // need to set the size so ROOT can calculate ndf. + fFunc->SetNumberFitPoints(fData->Size()); +} + +// this class manages the fit data class. Delete it at the end + +TBinLikelihoodFCN::~TBinLikelihoodFCN() { + if (fOwner && fData) { +#ifdef DEBUG + std::cout << "deleting the data - size is " << fData->Size() << std::endl; +#endif + delete fData; + } +} + + + // implement chi2 function +double TBinLikelihoodFCN::operator()(const std::vector<double>& par) const { + + assert(fData); + assert(fFunc); + + // safety measure against negative logs + static const double epsilon = 1e-300; + + // std::cout << "number of params " << par.size() << " in TF1 " << fFunc->GetNpar() << " " << fFunc->GetNumberFreeParameters() << std::endl; + + unsigned int n = fData->Size(); + double loglike = 0; + for (unsigned int i = 0; i < n; ++ i) { + const std::vector<double> & x = fData->Coords(i); + double y = fData->Value(i); + //std::cout << x[0] << " " << y << " " << 1./invError << " params " << par[0] << std::endl; + double fval; + if (fData->UseIntegral()) { + const std::vector<double> & x2 = fData->Coords(i+1); + fval = FitterUtil::EvalIntegral(fFunc,x,x2,par); + } + else + fval = fFunc->EvalPar( &x.front(), &par.front() ); + + double logtmp; + // protections against negative argument to the log + // smooth linear extrapolation below pml_A + if(fval<=epsilon) logtmp = fval/epsilon + std::log(epsilon) - 1; + else logtmp = std::log(fval); + + loglike += fval - y*logtmp; + } + + return loglike; +} + diff --git a/minuit2/src/TChi2ExtendedFCN.cxx b/minuit2/src/TChi2ExtendedFCN.cxx new file mode 100644 index 0000000000000000000000000000000000000000..671087c3faf676def09f0c719cb0195f0844e0df --- /dev/null +++ b/minuit2/src/TChi2ExtendedFCN.cxx @@ -0,0 +1,78 @@ +// @(#)root/minuit2:$Name: $:$Id: TChi2ExtendedFCN.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include "TChi2ExtendedFCN.h" +#include "TChi2ExtendedFitData.h" + +#include "TF1.h" +#include "TVirtualFitter.h" +#include <cassert> + +#include <iostream> + +// constructor _ create FitData class + +TChi2ExtendedFCN::TChi2ExtendedFCN( const TVirtualFitter & fitter) : + fUp(1.) +{ + fFunc = dynamic_cast<TF1 *> ( fitter.GetUserFunc() ); + assert(fFunc); + // default skip empty bins + fData = new TChi2ExtendedFitData(fitter); + + // need to set the size so ROOT can calculate ndf. + fFunc->SetNumberFitPoints(fData->Size()); +} + +// this class manages the fit data class. Delete it at the end + +TChi2ExtendedFCN::~TChi2ExtendedFCN() { + if (fData) { + delete fData; + } +} + + + // implement chi2 function +double TChi2ExtendedFCN::operator()(const std::vector<double>& par) const { + + assert(fData); + assert(fFunc); + + + // std::cout << "number of params " << par.size() << " in TF1 " << fFunc->GetNpar() << " " << fFunc->GetNumberFreeParameters() << std::endl; + + unsigned int n = fData->Size(); + double chi2 = 0; + for (unsigned int i = 0; i < n; ++ i) { + const std::vector<double> & x = fData->Coords(i); + double y = fData->Value(i); + //std::cout << x[0] << " " << y << " " << 1./invError << " params " << par[0] << std::endl; + double functionValue = fFunc->EvalPar( &x.front(), &par.front() ); + + double ey = fData->ErrorY(i); + double exl = fData->ErrorXLow(i); + double exh = fData->ErrorXUp(i); + double eux = 0; + if (exh <=0 && exl <= 0) + eux = 0; + else + // works only for 1D func + eux = 0.5 * (exl + exh) * fFunc->Derivative( x[0], const_cast<double *> ( &par.front() ) ); + double error2 = (ey*ey + eux*eux); + if (error2 == 0) error2 = 1; + + double tmp = ( y -functionValue ); + + chi2 += tmp*tmp/error2; + } + + return chi2; +} + diff --git a/minuit2/src/TChi2ExtendedFitData.cxx b/minuit2/src/TChi2ExtendedFitData.cxx new file mode 100644 index 0000000000000000000000000000000000000000..b134394574b996208d51a8495f49ddbb906fa2ee --- /dev/null +++ b/minuit2/src/TChi2ExtendedFitData.cxx @@ -0,0 +1,77 @@ +// @(#)root/minuit2:$Name: $:$Id: TChi2ExtendedFitData.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include <cassert> + +#include "TChi2ExtendedFitData.h" + +#include "TVirtualFitter.h" + +#include <iostream> + +#include "TGraph.h" + +// constructor - create fit data from Histogram content + +TChi2ExtendedFitData::TChi2ExtendedFitData(const TVirtualFitter & fitter ) { + + fSize = 0; + + TObject * obj = fitter.GetObjectFit(); + + // case of TGraph + TGraph * graph = dynamic_cast<TGraph*> ( obj ); + if (graph) { + GetExtendedFitData(graph, &fitter); + } + else { + std::cout << "other fit on different object than TGraf not yet supported- assert" << std::endl; + assert(graph); + } +} + + + // get data for graf with errors +void TChi2ExtendedFitData::GetExtendedFitData(const TGraph * gr, const TVirtualFitter * /*hFitter*/ ) { + + // fit options + //Foption_t fitOption = hFitter->GetFitOption(); + + int nPoints = gr->GetN(); + double *gx = gr->GetX(); + double *gy = gr->GetY(); + // return 0 pointer for some graphs, cannot be used + // double *ey = gr->GetEY(); + // double *exl = gr->GetEXlow(); + // double *exh = gr->GetEXhigh(); + + CoordData x = CoordData( 1 ); // 1D graph + + // std::cout << exl << " " << ey << std::endl; + //std::cout << "creating data with size " << nPoints << std::endl; + + for (int i = 0; i < nPoints; ++i) { + + x[0] = gx[i]; + SetDataPoint( x, gy[i], gr->GetErrorY(i), gr->GetErrorXlow(i), gr->GetErrorXhigh(i) ); + + } +} + + +void TChi2ExtendedFitData::SetDataPoint( const CoordData & x, double y, double ey, double exl, double exh) { + + + fCoordinates.push_back(x); + fValues.push_back(y); + fErrorsY.push_back(ey); + fErrorsXLow.push_back(exl); + fErrorsXUp.push_back(exh); + fSize++; +} diff --git a/minuit2/src/TChi2FCN.cxx b/minuit2/src/TChi2FCN.cxx new file mode 100644 index 0000000000000000000000000000000000000000..bb1e371cc9568012eacd5220e0f0bd5c172afdad --- /dev/null +++ b/minuit2/src/TChi2FCN.cxx @@ -0,0 +1,86 @@ +// @(#)root/minuit2:$Name: $:$Id: TChi2FCN.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include "TChi2FCN.h" +#include "TChi2FitData.h" +#include "FitterUtil.h" + +#include "TF1.h" +#include "TVirtualFitter.h" + +#include <cassert> + +//#define DEBUG +#ifdef DEBUG +#include <iostream> +#endif + +// constructor _ create FitData class + +TChi2FCN::TChi2FCN( const TVirtualFitter & fitter) : + fUp(1), fOwner(true) +{ + fFunc = dynamic_cast<TF1 *> ( fitter.GetUserFunc() ); + assert(fFunc); + // default skip empty bins + fData = new TChi2FitData(fitter, true); +#ifdef DEBUG + std::cout << "Created FitData with size = " << fData->Size() << std::endl; +#endif + + // need to set the size so ROOT can calculate ndf. + fFunc->SetNumberFitPoints(fData->Size()); +} + +// this class manages the fit data class. Delete it at the end + +TChi2FCN::~TChi2FCN() { + if (fOwner && fData) { +#ifdef DEBUG + std::cout << "deleting the data - size is " << fData->Size() << std::endl; +#endif + delete fData; + } +} + + + // implement chi2 function +double TChi2FCN::operator()(const std::vector<double>& par) const { + + assert(fData); + assert(fFunc); + + + // std::cout << "number of params " << par.size() << " in TF1 " << fFunc->GetNpar() << " " << fFunc->GetNumberFreeParameters() << std::endl; + + unsigned int n = fData->Size(); + double chi2 = 0; + for (unsigned int i = 0; i < n; ++ i) { + const std::vector<double> & x = fData->Coords(i); + double y = fData->Value(i); + double invError = fData->InvError(i); + //std::cout << x[0] << " " << y << " " << 1./invError << " params " << par[0] << std::endl; + double fval = 0; + if (fData->UseIntegral()) { + const std::vector<double> & x2 = fData->Coords(i+1); + fval = FitterUtil::EvalIntegral(fFunc,x,x2,par); + } + else + fval = fFunc->EvalPar( &x.front(), &par.front() ); + + double tmp = ( y -fval )* invError; + + chi2 += tmp*tmp; + } + + + return chi2; +} + + diff --git a/minuit2/src/TChi2FitData.cxx b/minuit2/src/TChi2FitData.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ac61966075f1d8c40e82d72712fa412440a87504 --- /dev/null +++ b/minuit2/src/TChi2FitData.cxx @@ -0,0 +1,264 @@ +// @(#)root/minuit2:$Name: $:$Id: TChi2FitData.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include <assert.h> + +#include "TChi2FitData.h" + +#include "TVirtualFitter.h" + +#include <iostream> + +#include "TH1.h" +#include "TGraph.h" +#include "TGraph2D.h" +#include "TMultiGraph.h" + +// constructor - create fit data from Histogram content + + + +TChi2FitData::TChi2FitData( const TVirtualFitter & fitter, bool skipEmptyBins) : + fSize(0), fSkipEmptyBins(skipEmptyBins), fIntegral(false) +{ + + TObject * obj = fitter.GetObjectFit(); + + // downcast to see type of object + TH1 * hfit = dynamic_cast<TH1*> ( obj ); + if (hfit) { + GetFitData(hfit, &fitter); + return; + } + // case of TGraph + TGraph * graph = dynamic_cast<TGraph*> ( obj ); + if (graph) { + GetFitData(graph, &fitter); + return; + } + // case of TGraph2D + TGraph2D * graph2D = dynamic_cast<TGraph2D*> ( obj ); + if (graph2D) { + GetFitData(graph2D, &fitter); + return; + } + // case of TMultiGraph + TMultiGraph * multigraph = dynamic_cast<TMultiGraph*> ( obj ); + if (multigraph) { + GetFitData(graph2D, &fitter); + return; + } + // else + std::cout << "other fit type are not yet supported- assert" << std::endl; + assert(hfit); + +} + +// get Histogram Data +void TChi2FitData::GetFitData(const TH1 * hfit, const TVirtualFitter * hFitter) { + + assert(hfit); + assert(hFitter); + //std::cout << "creating Fit Data from histogram " << hfit->GetName() << std::endl; + +// use TVirtual fitter to get fit range (should have a FitRange class ) + + // first and last bin + int hxfirst = hFitter->GetXfirst(); + int hxlast = hFitter->GetXlast(); + int hyfirst = hFitter->GetYfirst(); + int hylast = hFitter->GetYlast(); + int hzfirst = hFitter->GetZfirst(); + int hzlast = hFitter->GetZlast(); + TAxis *xaxis = hfit->GetXaxis(); + TAxis *yaxis = hfit->GetYaxis(); + TAxis *zaxis = hfit->GetZaxis(); + + // get fit option + Foption_t fitOption = hFitter->GetFitOption(); + if (fitOption.Integral) fIntegral=true; + + int n = (hxlast-hxfirst+1)*(hylast-hyfirst+1)*(hzlast-hzfirst+1); + //std::cout << "total bins " << hxlast-hxfirst+1 << std::endl; + + fInvErrors.reserve(n); + fValues.reserve(n); + fCoordinates.reserve(n); + + int ndim = hfit->GetDimension(); + assert( ndim > 0 ); + CoordData x = CoordData( hfit->GetDimension() ); + int binx = 0; + int biny = 0; + int binz = 0; + + for ( binx = hxfirst; binx <= hxlast; ++binx) { + if (fIntegral) { + x[0] = xaxis->GetBinLowEdge(binx); + } + else + x[0] = xaxis->GetBinCenter(binx); + + if ( ndim > 1 ) { + for ( biny = hyfirst; biny <= hylast; ++biny) { + if (fIntegral) + x[1] = yaxis->GetBinLowEdge(biny); + else + x[1] = yaxis->GetBinCenter(biny); + + if ( ndim > 2 ) { + for ( binz = hzfirst; binz <= hzlast; ++binz) { + if (fIntegral) + x[2] = zaxis->GetBinLowEdge(binz); + else + x[2] = zaxis->GetBinCenter(binz); + //if (!func->IsInside(x) ) continue; + double error = hfit->GetBinError(binx, biny, binz); + if (fitOption.W1) error = 1; + SetDataPoint( x, hfit->GetBinContent(binx, biny, binz), error ); + } // end loop on z bins + } + else if (ndim == 2) { + // for dim == 2 + //if (!func->IsInside(x) ) continue; + double error = hfit->GetBinError(binx, biny); + if (fitOption.W1) error = 1; + SetDataPoint( x, hfit->GetBinContent(binx, biny), error ); + } + + } // end loop on y bins + + } + else if (ndim == 1) { + // for 1D + //if (!func->IsInside(x) ) continue; + double error = hfit->GetBinError(binx); + if (fitOption.W1) error = 1; + SetDataPoint( x, hfit->GetBinContent(binx), error ); + } + + } // end 1D loop + + // in case of integral store additional point with upper x values + if (fIntegral) { + x[0] = xaxis->GetBinLowEdge(hxlast) + xaxis->GetBinWidth(hxlast); + if (ndim > 1) { + x[1] = yaxis->GetBinLowEdge(hylast) + yaxis->GetBinWidth(hylast); + } + if (ndim > 2) { + x[2] = zaxis->GetBinLowEdge(hzlast) + zaxis->GetBinWidth(hzlast); + } + fCoordinates.push_back(x); + } + +} + + +void TChi2FitData::GetFitData(const TGraph * gr, const TVirtualFitter * hFitter ) { + + // fit options + Foption_t fitOption = hFitter->GetFitOption(); + + int nPoints = gr->GetN(); + double *gx = gr->GetX(); + double *gy = gr->GetY(); + + CoordData x = CoordData( 1 ); // 1D graph + + for ( int i = 0; i < nPoints; ++i) { + + x[0] = gx[i]; + // neglect error in x (it is a different chi2) + double errorY = gr->GetErrorY(i); + // consider error = 0 as 1 + if (errorY <= 0) errorY = 1; + if (fitOption.W1) errorY = 1; + SetDataPoint( x, gy[i], errorY ); + + } +} + +// fetch graph 2D data for CHI2 fit. +// neglect errors in x and y (one use the ExtendedChi2 method) +void TChi2FitData::GetFitData(const TGraph2D * gr, const TVirtualFitter * hFitter ) { + + // fit options + Foption_t fitOption = hFitter->GetFitOption(); + + int nPoints = gr->GetN(); + double *gx = gr->GetX(); + double *gy = gr->GetY(); + double *gz = gr->GetZ(); + + CoordData x = CoordData( 2 ); // 2D graph + + for ( int i = 0; i < nPoints; ++i) { + + x[0] = gx[i]; + x[1] = gy[i]; + // neglect error in x (it is a different chi2) + double error = gr->GetErrorZ(i); + // consider error = 0 as 1 + if (error <= 0) error = 1; + if (fitOption.W1) error = 1; + SetDataPoint( x, gz[i], error ); + + } +} + +// multigraph + +void TChi2FitData::GetFitData(const TMultiGraph * mg, const TVirtualFitter * hFitter ) { + + // fit options + Foption_t fitOption = hFitter->GetFitOption(); + + TGraph *gr; + TIter next(mg->GetListOfGraphs()); + + int nPoints; + double *gx; + double *gy; + + CoordData x = CoordData( 1 ); // 1D graph + + while ((gr = (TGraph*) next())) { + nPoints = gr->GetN(); + gx = gr->GetX(); + gy = gr->GetY(); + for ( int i = 0; i < nPoints; ++i) { + + x[0] = gx[i]; + // neglect error in x (it is a different chi2) + double errorY = gr->GetErrorY(i); + // consider error = 0 as 1 + if (errorY <= 0) errorY = 1; + if (fitOption.W1) errorY = 1; + SetDataPoint( x, gy[i], errorY ); + + } + } + +} + +void TChi2FitData::SetDataPoint( const CoordData & x, double y, double error) { + + if (error <= 0) { + if (SkipEmptyBins() ) + return; + else + // set errors to 1 + error = 1; + } + + fCoordinates.push_back(x); + fValues.push_back(y); + fInvErrors.push_back(1./error); + fSize++; +} diff --git a/minuit2/src/TFcnAdapter.cxx b/minuit2/src/TFcnAdapter.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a537399ea7251a51535bf2bf2d107365ef5f5cd0 --- /dev/null +++ b/minuit2/src/TFcnAdapter.cxx @@ -0,0 +1,55 @@ +// @(#)root/minuit2:$Name: $:$Id: TFcnAdapter.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include "TFcnAdapter.h" + +#include <cassert> +//#include <iostream> + +double TFcnAdapter::operator()(const std::vector<double>& par) const { +// assert(par.size() == theNPar); +// std::cout<<"TFcnAdapter::operator()"<<std::endl; + assert(fFCN); + double fs = 0.; +// double* theCache = new double[par.size()]; +// copy(par.begin(), par.end(), theCache); + + double* theCache = (double*)(&(par.front())); + + int npar = par.size(); + (*fFCN)(npar, 0, fs, theCache, 4); +// delete [] theCache; + + return fs; +} + +std::vector<double> TFcnAdapter::gradient(const std::vector<double>& par) const { +// std::cout<<"TFcnAdapter::gradient "<<std::endl; +// assert(par.size() == theNPar); + assert(fFCN); + double fs = 0.; + int npar = par.size(); + double* theCache = new double[par.size()]; + double* theGradCache = new double[par.size()]; + for(int i = 0; i < npar; i++) theCache[i] = par[i]; +// (*theFcn)(npar, theGradCache, fs, theCache, 2); + (*fFCN)(npar, theGradCache, fs, theCache, 4); + std::vector<double> grad(theGradCache, theGradCache+npar); + return std::vector<double>(theGradCache, theGradCache+npar); +} + +// forward interface +double TFcnAdapter::operator()(int npar, double* params) const { +// std::cout<<"TFcnAdapter::operator()(int npar,"<<std::endl; +// assert(npar == int(theNPar)); + assert(fFCN); + double fs = 0.; + (*fFCN)(npar, 0, fs, params, 4); + return fs; +} diff --git a/minuit2/src/TFitterFumili.cxx b/minuit2/src/TFitterFumili.cxx new file mode 100644 index 0000000000000000000000000000000000000000..0d9e4b3a4a897600158e92218a137821d7fd3475 --- /dev/null +++ b/minuit2/src/TFitterFumili.cxx @@ -0,0 +1,75 @@ +// @(#)root/minuit2:$Name: $:$Id: TFitterFumili.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include "TROOT.h" +#include "TFitterFumili.h" +#include "TMath.h" +#include "TF1.h" +#include "TH1.h" +#include "TGraph.h" + +#include "TFumiliFCN.h" +#include "Minuit/FumiliMinimizer.h" +#include "Minuit/FunctionMinimum.h" +#include "Minuit/MnStrategy.h" + + +//#define DEBUG 1 + +ClassImp(TFitterFumili); + +TFitterFumili* gFumili2 = 0; + +TFitterFumili::TFitterFumili() { + SetName("Fumili2"); + gFumili2 = this; + gROOT->GetListOfSpecials()->Add(gFumili2); +} + + +// needed this additional contructor ? +TFitterFumili::TFitterFumili(Int_t /* maxpar */) { + SetName("Fumili2"); + gFumili2 = this; + gROOT->GetListOfSpecials()->Add(gFumili2); +} + + +// create the minimizer engine and register the plugin in ROOT +// what ever we specify only Fumili is created +void TFitterFumili::CreateMinimizer(EMinimizerType ) { + if (PrintLevel() >=1 ) + std::cout<<"TFitterFumili: Minimize using new Fumili algorithm "<<std::endl; + + const ModularFunctionMinimizer * minimizer = GetMinimizer(); + if (!minimizer) delete minimizer; + SetMinimizer( new FumiliMinimizer() ); + + //SetStrategy(2); + // Fumili cannot deal with tolerance too smalls (10-3 corrsponds to 10-7 in FumiliBuilder) + SetMinimumTolerance(0.001); + +#ifdef DEBUG + SetPrintLevel(3); +#endif +} + + +void TFitterFumili::CreateChi2FCN() { + SetMinuitFCN(new TFumiliChi2FCN( *this,GetStrategy()) ); +} + +void TFitterFumili::CreateChi2ExtendedFCN() { + //for Fumili use normal method + SetMinuitFCN(new TFumiliChi2FCN(*this, GetStrategy())); +} + +void TFitterFumili::CreateBinLikelihoodFCN() { + SetMinuitFCN( new TFumiliBinLikelihoodFCN( *this, GetStrategy()) ); +} diff --git a/minuit2/src/TFitterMinuit.cxx b/minuit2/src/TFitterMinuit.cxx new file mode 100644 index 0000000000000000000000000000000000000000..f4c29b87c6d77897d8a398d7a36d817b4917a012 --- /dev/null +++ b/minuit2/src/TFitterMinuit.cxx @@ -0,0 +1,621 @@ +#include "TROOT.h" +#include "TFitterMinuit.h" +#include "TMath.h" +#include "TF1.h" +#include "TH1.h" +#include "TGraph.h" + +#include "TChi2FCN.h" +#include "TChi2ExtendedFCN.h" +#include "TBinLikelihoodFCN.h" + + +#include "Minuit/MnMigrad.h" +#include "Minuit/MnMinos.h" +#include "Minuit/MnHesse.h" +#include "Minuit/MinuitParameter.h" +#include "Minuit/MnPrint.h" +#include "Minuit/FunctionMinimum.h" +#include "Minuit/VariableMetricMinimizer.h" +#include "Minuit/SimplexMinimizer.h" +#include "Minuit/CombinedMinimizer.h" +#include "Minuit/ScanMinimizer.h" + + +#ifndef ROOT_TMethodCall +#include "TMethodCall.h" +#endif +//for the G__p2f2funcname symbol +#include "Api.h" + +//#define DEBUG 1 + +//#define OLDFCN_INTERFACE +#ifdef OLDFCN_INTERFACE +extern void H1FitChisquare(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag); +extern void H1FitLikelihood(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag); +extern void Graph2DFitChisquare(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag); +extern void MultiGraphFitChisquare(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag); +#endif + + + +ClassImp(TFitterMinuit); + +TFitterMinuit* gMinuit2 = 0; + +TFitterMinuit::TFitterMinuit() : fErrorDef(0.) , fEDMVal(0.), fGradient(false), + fState(MnUserParameterState()), theMinosErrors(std::vector<MinosError>()), fMinimizer(0), fMinuitFCN(0), fDebug(1), fStrategy(1), fMinTolerance(0) { + Initialize(); +} + + +// needed this additional contructor ? +TFitterMinuit::TFitterMinuit(Int_t /* maxpar */) : fErrorDef(0.) , fEDMVal(0.), fGradient(false), fState(MnUserParameterState()), theMinosErrors(std::vector<MinosError>()), fMinimizer(0), fMinuitFCN(0), fDebug(1), fStrategy(1), fMinTolerance(0) { + Initialize(); +} + +void TFitterMinuit::Initialize() { + SetName("Minuit2"); + gMinuit2 = this; + gROOT->GetListOfSpecials()->Add(gMinuit2); + +} + +// create the minimizer engine and register the plugin in ROOT +void TFitterMinuit::CreateMinimizer(EMinimizerType type) { +#ifdef DEBUG + std::cout<<"TFitterMinuit:create minimizer of type "<< type << std::endl; +#endif + if (fMinimizer) delete fMinimizer; + + switch (type) { + case kMigrad: + SetMinimizer( new VariableMetricMinimizer() ); + return; + case kSimplex: + SetMinimizer( new SimplexMinimizer() ); + return; + case kCombined: + SetMinimizer( new CombinedMinimizer() ); + return; + case kScan: + SetMinimizer( new ScanMinimizer() ); + return; + case kFumili: + std::cout << "TFitterMinuit::Error - Fumili Minimizer must be created from TFitterFumili " << std::endl; + SetMinimizer(0); + return; + default: + //migrad minimizer + SetMinimizer( new VariableMetricMinimizer() ); + } +} + + + + // destructor - deletes the minimizer and minuit fcn +TFitterMinuit::~TFitterMinuit() { + //std::cout << "delete minimizer and FCN" << std::endl; + if (fMinuitFCN) delete fMinuitFCN; + if (fMinimizer) delete fMinimizer; +} + + +Double_t TFitterMinuit::Chisquare(Int_t npar, Double_t *params) const { + // do chisquare calculations in case of likelihood fits + TChi2FCN chi2( *this ); + std::vector<double> p(npar); + for (int i = 0; i < npar; ++i) + p[i] = params[i]; + return chi2(p); +} + +void TFitterMinuit::Clear(Option_t*) { + //std::cout<<"clear "<<std::endl; + +// fErrorDef = 0.; +// theNFcn = 0; +// fEDMVal = 0.; +// fGradient = false; + + State() = MnUserParameterState(); + theMinosErrors.clear(); +} + + + +FunctionMinimum TFitterMinuit::DoMinimization( int nfcn, double edmval) { + assert(GetMinuitFCN() ); + assert(GetMinimizer() ); + // use always strategy 1 (2 is not yet fully tested) + return GetMinimizer()->minimize(*GetMinuitFCN(), State(), MnStrategy(1), nfcn, edmval); +} + + + +int TFitterMinuit::Minimize( int nfcn, double edmval) { + + // min tolerance + edmval = std::max(fMinTolerance, edmval); + if (fDebug >=0) { + std::cout << "TFitterMinuit - Minimize with max iterations " << nfcn << " edmval " << edmval << std::endl; + } + FunctionMinimum min = DoMinimization(nfcn,edmval); + fState = min.userState(); + return ExamineMinimum(min); +} + +Int_t TFitterMinuit::ExecuteCommand(const char *command, Double_t *args, Int_t nargs){ + +#ifdef DEBUG + std::cout<<"Execute command= "<<command<<std::endl; +#endif + + // MIGRAD + if (strncmp(command,"MIG",3) == 0 || strncmp(command,"mig",3) == 0) { + int nfcn = 0; // default values for Minuit + double edmval = 0.1; +// nfcn = GetMaxIterations(); +// edmval = GetPrecision(); + if (nargs > 0) nfcn = int ( args[0] ); + if (nargs > 1) edmval = args[1]; + + // create migrad minimizer + CreateMinimizer(kMigrad); + return Minimize(nfcn, edmval); + +// if(fGradient) { +// MnMigrad migrad(theFcn, State()); +// theMinimum = migrad(theNFcn, fEDMVal); +// State() = theMinimum.userParameters(); +// } else { +// std::cout<<"State(): "<<State()<<std::endl; +// std::cout<<"State(): "<<State()<<std::endl; +// } + + + + } + //Minimize + if (strncmp(command,"MINI",4) == 0 || strncmp(command,"mini",4) == 0) { + + int nfcn = 0; // default values for Minuit + double edmval = 0.1; + if (nargs > 0) nfcn = int ( args[0] ); + if (nargs > 1) edmval = args[1]; + // create combined minimizer + CreateMinimizer(kCombined); + return Minimize(nfcn, edmval); + } + //Simplex + if (strncmp(command,"SIM",3) == 0 || strncmp(command,"sim",3) == 0) { + + int nfcn = 0; // default values for Minuit + double edmval = 0.1; + if (nargs > 0) nfcn = int ( args[0] ); + if (nargs > 1) edmval = args[1]; + // create combined minimizer + CreateMinimizer(kSimplex); + return Minimize(nfcn, edmval); + } + //SCan + if (strncmp(command,"SCA",3) == 0 || strncmp(command,"sca",3) == 0) { + + int nfcn = 0; // default values for Minuit + double edmval = 0.1; + if (nargs > 0) nfcn = int ( args[0] ); + if (nargs > 1) edmval = args[1]; + // create combined minimizer + CreateMinimizer(kScan); + return Minimize(nfcn, edmval); + } + // MINOS + else if (strncmp(command,"MINO",4) == 0 || strncmp(command,"mino",4) == 0) { + + // recall minimize using default nfcn and edmval + // should use maybe FunctionMinimum from previous call to migrad + // need to keep a pointer to function minimum in the class + FunctionMinimum min = DoMinimization(); + if (!min.isValid() ) { + std::cout << "TFitterMinuit::MINOS failed due to invalid function minimum" << std::endl; + return -10; + } + MnMinos minos( *fMinuitFCN, min); + for(unsigned int i = 0; i < State().variableParameters(); i++) { + MinosError me = minos.minos(State().extOfInt(i)); + theMinosErrors.push_back(me); + } + return 0; + } + //HESSE + else if (strncmp(command,"HES",3) == 0 || strncmp(command,"hes",3) == 0) { + MnHesse hesse( GetStrategy() ); + // update the state + const FCNBase * fcn = GetMinuitFCN(); + assert(fcn); + fState = hesse(*fcn, State(),100000 ); + if (!fState.isValid() ) { + std::cout << "TFitterMinuit::Hesse calculation failed " << std::endl; + return -10; + } + return 0; + } + + // FIX + else if (strncmp(command,"FIX",3) == 0 || strncmp(command,"fix",3) == 0) { + for(int i = 0; i < nargs; i++) { + FixParameter(int(args[i])); + } + return 0; + } + // SET LIMIT (uper and lower) + else if (strncmp(command,"SET LIM",7) == 0 || strncmp(command,"set lim",7) == 0) { + assert(nargs >= 3); + int ipar = int(args[0]); + double low = args[1]; + double up = args[2]; + State().setLimits(ipar, low, up); + return 0; + } + // SET PRINT + else if (strncmp(command,"SET PRINT",9) == 0 || strncmp(command,"set print",9) == 0) { + fDebug = int(args[0]); +#ifdef DEBUG + fDebug = 3; +#endif + return 0; + } + // SET STRATEGY + else if (strncmp(command,"SET STR",7) == 0 || strncmp(command,"set str",7) == 0) { + fStrategy = int(args[0]); + return 0; + } + //SET GRAD (not impl.) + else if (strncmp(command,"SET GRA",7) == 0 || strncmp(command,"set gra",7) == 0) { +// not yet available +// fGradient = true; + return -1; + } + else { + // other commands passed + return 0; + } + + +} + + +/// study the function minimum +int TFitterMinuit::ExamineMinimum(const FunctionMinimum & min) { + + + // debug ( print all the states) + if (fDebug >= 3) { + + const std::vector<MinimumState>& iterationStates = min.states(); + std::cout << "Number of iterations " << iterationStates.size() << std::endl; + for (unsigned int i = 0; i < iterationStates.size(); ++i) { + //std::cout << iterationStates[i] << std::endl; + const MinimumState & st = iterationStates[i]; + std::cout << "----------> Iteration " << i << std::endl; + std::cout << " FVAL = " << st.fval() << " Edm = " << st.edm() << " Nfcn = " << st.nfcn() << std::endl; + std::cout << " Error matrix change = " << st.error().dcovar() << std::endl; + std::cout << " Internal parameters : "; + for (int j = 0; j < st.size() ; ++j) std::cout << " p" << j << " = " << st.vec()(j); + std::cout << std::endl; + } + } + // print result + if (min.isValid() ) { + if (fDebug >=1 ) { + std::cout << "Minimum Found" << std::endl; + std::cout << "FVAL = " << State().fval() << std::endl; + std::cout << "Edm = " << State().edm() << std::endl; + std::cout << "Nfcn = " << State().nfcn() << std::endl; + std::vector<double> par = State().params(); + std::vector<double> err = State().errors(); + for (unsigned int i = 0; i < State().params().size(); ++i) + std::cout << State().parameter(i).name() << "\t = " << par[i] << "\t +/- " << err[i] << std::endl; + } + return 0; + } + else { + if (fDebug >= 1) std::cout << "TFitterMinuit::Minimization DID not converge !" << std::endl; + if (min.hasMadePosDefCovar() ) { + if (fDebug >= 1) std::cout << " Covar was made pos def" << std::endl; + return -11; + } + if (min.hesseFailed() ) { + if (fDebug >= 1) std::cout << " Hesse is not valid" << std::endl; + return -12; + } + if (min.isAboveMaxEdm() ) { + if (fDebug >= 1) std::cout << " Edm is above max" << std::endl; + return -13; + } + if (min.hasReachedCallLimit() ) { + if (fDebug >= 1) std::cout << " Reached call limit" << std::endl; + return -14; + } + return -10; + } + return 0; +} + +void TFitterMinuit::FixParameter(Int_t ipar) { +// std::cout<<"FixParameter"<<std::endl; + State().fix(ipar); +} + +Double_t* TFitterMinuit::GetCovarianceMatrix() const { + return (Double_t*)(&(State().covariance().data().front())); +} + +Double_t TFitterMinuit::GetCovarianceMatrixElement(Int_t i, Int_t j) const { + + std::cout<<"GetCovarianceMatrix not implemented"<<std::endl; + return State().covariance()(i,j); +} + + +Int_t TFitterMinuit::GetErrors(Int_t ipar,Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc) const { +// std::cout<<"GetError"<<std::endl; + if(theMinosErrors.empty()) { + eplus = 0.; + eminus = 0.; + } else { + unsigned int nintern = State().intOfExt(ipar); + eplus = theMinosErrors[nintern].upper(); + eminus = theMinosErrors[nintern].lower(); + } + eparab = State().error(ipar); + globcc = State().globalCC().globalCC()[ipar]; + return 0; +} + +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// here is example of deficit of new Minuit interface +////////////////////////////////////////////// +Int_t TFitterMinuit::GetNumberTotalParameters() const { + + + return State().parameters().parameters().size(); +} +Int_t TFitterMinuit::GetNumberFreeParameters() const { + + return State().parameters().variableParameters(); +} + + +Double_t TFitterMinuit::GetParError(Int_t ipar) const { +// std::cout<<"GetParError"<<std::endl; + return State().error(ipar); +} + +Double_t TFitterMinuit::GetParameter(Int_t ipar) const { +// std::cout<<"GetParameter"<<std::endl; + return State().value(ipar); +} + +Int_t TFitterMinuit::GetParameter(Int_t ipar,char *name,Double_t &value,Double_t &verr,Double_t &vlow, Double_t &vhigh) const { +// std::cout<<"GetParameter(Int_t ipar,char"<<std::endl; + const MinuitParameter& mp = State().parameter(ipar); +// std::cout<<"i= "<<ipar<<" verr= "<<mp.error()<<std::endl; + name = const_cast<char*>(mp.name()); + value = mp.value(); + verr = mp.error(); + vlow = mp.lowerLimit(); + vhigh = mp.upperLimit(); + return 0; +} + +Int_t TFitterMinuit::GetStats(Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx) const { +// std::cout<<"GetStats"<<std::endl; + amin = State().fval(); + edm = State().edm(); + errdef = fErrorDef; + nvpar = State().variableParameters(); + nparx = State().parameters().parameters().size(); + return 0; +} + +Double_t TFitterMinuit::GetSumLog(Int_t) { +// std::cout<<"GetSumLog"<<std::endl; + return 0.; +} + +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +Bool_t TFitterMinuit::IsFixed(Int_t ipar) const { + return State().parameter(ipar).isFixed(); +} + + +void TFitterMinuit::PrintResults(Int_t level, Double_t) const { +// std::cout<<"PrintResults"<<std::endl; +// std::cout<<State().parameters()<<std::endl; + std::cout<<State()<<std::endl; + if (level > 3) { + for(std::vector<MinosError>::const_iterator ime = theMinosErrors.begin(); + ime != theMinosErrors.end(); ime++) { + std::cout<<*ime<<std::endl; + } + } +} + +void TFitterMinuit::ReleaseParameter(Int_t ipar) { +// std::cout<<"ReleaseParameter"<<std::endl; + State().release(ipar); +} + + + +void TFitterMinuit::SetFitMethod(const char *name) { +#ifdef DEBUG + std::cout<<"SetFitMethod to "<< name << std::endl; +#endif + if (!strcmp(name,"H1FitChisquare")) { + fErrorDef = 1.; + // old way of passing +#ifdef OLDFCN_INTERFACE + SetFCN(H1FitChisquare); +#else + // call function (because overloaded by derived class) + CreateChi2FCN(); +#endif + return; + } + if (!strcmp(name,"GraphFitChisquare")) { + fErrorDef = 1.; +#ifdef OLDFCN_INTERFACE + SetFCN(GraphFitChisquare); +#else + // use for graph extended chi2 to include error in X coordinate + if (!GetFitOption().W1) + CreateChi2ExtendedFCN( ); + else + CreateChi2FCN( ); +#endif + return; + } + if (!strcmp(name, "Graph2DFitChisquare")) { + fErrorDef = 1.; +#ifdef OLDFCN_INTERFACE + SetFCN(Graph2DFitChisquare); +#else + // use for graph extended chi2 to include error in X and Y coordinates +// if (!GetFitOption().W1) { +// CreateChi2ExtendedFCN( ); +// else + CreateChi2FCN( ); +#endif + return; + } + if (!strcmp(name, "MultiGraphFitChisquare")) { + fErrorDef = 1.; +#ifdef OLDFCN_INTERFACE + SetFCN(MultiGraphFitChisquare); +#else + CreateChi2FCN(); +#endif + return; + } + if (!strcmp(name, "H1FitLikelihood")) { + // old way of passing +#ifdef OLDFCN_INTERFACE + fErrorDef = 1.; + SetFCN(H1FitLikelihood); +#else + fErrorDef = 0.5; + CreateBinLikelihoodFCN(); +#endif + return; + } + + std::cout << "TFitterMinuit::fit method " << name << " is not supported !" << std::endl; + + assert(fMinuitFCN); + + + +// +// } else { +// SetFCN(H1FitChisquare); +// } + // TFitterMinuit manages the data + + +} + +Int_t TFitterMinuit::SetParameter(Int_t,const char *parname,Double_t value,Double_t verr,Double_t vlow, Double_t vhigh) { +#ifdef DEBUG + std::cout<<"SetParameter"; + std::cout<<" i= "<<parname<<" value = " << value << " verr= "<<verr<<std::endl; +#endif + if(vlow < vhigh) { + State().add(parname, value, verr, vlow, vhigh); + } + else + State().add(parname, value, verr); + return 0; +} + +// override setFCN to use the Adapter +void TFitterMinuit::SetFCN(void (*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t)) +{ +//*-*-*-*-*-*-*To set the address of the minimization function*-*-*-*-*-*-*-* +//*-* =============================================== +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + fFCN = fcn; + if (fMinuitFCN) delete fMinuitFCN; + fMinuitFCN = new TFcnAdapter(fFCN); +} + +// need for interactive environment + + +// global functions needed by interpreter + + +//______________________________________________________________________________ +void InteractiveFCNm2(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag) +{ +//*-*-*-*-*-*-*Static function called when SetFCN is called in interactive mode +//*-* =============================================== + + TMethodCall *m = gMinuit2->GetMethodCall(); + if (!m) return; + + Long_t args[5]; + args[0] = (Long_t)∦ + args[1] = (Long_t)gin; + args[2] = (Long_t)&f; + args[3] = (Long_t)u; + args[4] = (Long_t)flag; + m->SetParamPtrs(args); + Double_t result; + m->Execute(result); +} + + +//______________________________________________________________________________ +void TFitterMinuit::SetFCN(void *fcn) +{ +//*-*-*-*-*-*-*To set the address of the minimization function*-*-*-*-*-*-*-* +//*-* =============================================== +// this function is called by CINT instead of the function above +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + + if (!fcn) return; + + char *funcname = G__p2f2funcname(fcn); + if (funcname) { + fMethodCall = new TMethodCall(); + fMethodCall->InitWithPrototype(funcname,"Int_t&,Double_t*,Double_t&,Double_t*,Int_t"); + } + fFCN = InteractiveFCNm2; + gMinuit2 = this; //required by InteractiveFCNm + + if (fMinuitFCN) delete fMinuitFCN; + fMinuitFCN = new TFcnAdapter(fFCN); +} + +void TFitterMinuit::SetMinuitFCN( FCNBase * f) { + // class takes the ownership of the passed pointer + // so needs to delete previous one + if (fMinuitFCN) delete fMinuitFCN; + fMinuitFCN = f; +} + +void TFitterMinuit::CreateChi2FCN() { + SetMinuitFCN(new TChi2FCN( *this ) ); +} + + +void TFitterMinuit::CreateChi2ExtendedFCN() { + SetMinuitFCN(new TChi2ExtendedFCN( *this ) ); +} + +void TFitterMinuit::CreateBinLikelihoodFCN() { + SetMinuitFCN(new TBinLikelihoodFCN( *this ) ); +} diff --git a/minuit2/src/TFumiliFCN.cxx b/minuit2/src/TFumiliFCN.cxx new file mode 100644 index 0000000000000000000000000000000000000000..7ecfb8d342b4e96408d9891f12c0df47e4e3d306 --- /dev/null +++ b/minuit2/src/TFumiliFCN.cxx @@ -0,0 +1,386 @@ +// @(#)root/minuit2:$Name: $:$Id: TFumiliFCN.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include "TFumiliFCN.h" +#include "TChi2FCN.h" +#include "TBinLikelihoodFCN.h" +#include "TChi2FitData.h" +#include "FitterUtil.h" + +#include "TF1.h" +#include "TVirtualFitter.h" + +#include <iostream> + +#include <cmath> + +static const double kPrecision = 1.E-16; +static const double kEpsilon = 1.E-300; + + +// constructor _ create FitData class + +TFumiliFCN::TFumiliFCN( const TVirtualFitter & fitter, double up, int strategy, bool skipEmptyBins) : + // need to use default constructor for FumiliFCNBase (don't know number of parameters at this stage + FumiliFCNBase() +{ + fUp = up; + fFunc = dynamic_cast<TF1 *> ( fitter.GetUserFunc() ); + assert(fFunc); + // default skip empty bins + fData = new TChi2FitData(fitter, skipEmptyBins); + //std::cout << "Created FitData with size = " << fData->Size() << std::endl; + + // need to set the size so ROOT can calculate ndf. + fFunc->SetNumberFitPoints(fData->Size()); + + fStrategy = strategy; + + //std::cout << "created FumiliFCN with dimension " << dimension() << std::endl; +} + +// this class manages the fit data class. Delete it at the end + +TFumiliFCN::~TFumiliFCN() { + if (fData) { + //std::cout << "deleting the data - size is " << fData->Size() << std::endl; + delete fData; + } +} + + + +// need an initialize method with number of fit parameters to make space for cached +// quantities (gradient , etc..) + +void TFumiliFCN::Initialize(unsigned int nPar) { + fParamCache = std::vector<double>(nPar); + fFunctionGradient = std::vector<double>( nPar ); + // call init function on FumiliFCN + initAndReset(nPar); +} + + +void TFumiliFCN::evaluateAll( const std::vector<double> & p) { + + Calculate_gradient_and_hessian(p); +} + + +void TFumiliFCN::Calculate_gradient_and_hessian(const std::vector<double> & p) { + + + + unsigned int npar = p.size(); + if (npar != dimension() ) { + // re-initialize the store gradient + //std::cout << "initialize FumiliFCN and cache" << std::endl; + Initialize(npar); + } + + const FumiliFitData & points = *fData; + + + // set parameters + fFunc->SetParameters( &p.front() ); + fParamCache = p; + + std::vector<double> & grad = gradient(); + std::vector<double> & hess = hessian(); + + // dimension of hessian symmetric matrix + unsigned int nhdim = static_cast<int>( 0.5*npar*(npar + 1) ); + assert( npar == fFunctionGradient.size() ); + assert( npar == grad.size() ); + assert( nhdim == hess.size() ); + // reset + grad.assign( npar, 0.0); + hess.assign( nhdim, 0.0); + + double sum = 0; + + + // loop on measurements + unsigned int nMeasurements = points.Size(); + for (unsigned int i = 0; i < nMeasurements; ++i) { + + const std::vector<double> & x = points.Coords(i); + + // one should implement integral option (in TFumili is not correct) + double fval; + if ( fData->UseIntegral()) { + const std::vector<double> & x2 = fData->Coords(i+1); + // need to implement derivatives of integral + fval = FitterUtil::EvalIntegral(fFunc,x,x2,p); + Calculate_numerical_gradient_of_integral( x, x2, fval); + } + else { + fval = fFunc->EvalPar(&x.front(), &p.front() ); + Calculate_numerical_gradient( x, fval); + } + + // calculate gradient + // eventually use function if provides it + + Calculate_element(i, points, fval, sum, grad, hess); + + // calculate i -element contribution to the chi2 + // add contributions to previous one + + } + + // set value of Obj function to be used by Minuit + setFCNValue(sum); + +} + + +void TFumiliFCN::Calculate_numerical_gradient( const std::vector<double> & x, double f0) { + + + // use a cache for parameters to avoid to copy parameters each time this function is called + + int n = fParamCache.size(); + //std::cout << "Model function Gradient " << std::endl; + for (int ipar = 0; ipar < n ; ++ipar) { + double p0 = fParamCache[ipar]; + // use 0.001 of par + double h = std::max( 0.001* fabs(p0), 8.0*kPrecision*(fabs(p0) + kPrecision) ); + fParamCache[ipar] = p0 + h; + double f2 = fFunc->EvalPar( &x.front(), &fParamCache.front() ); + + + if (fStrategy == 2) { + // USE 5 POINT_RULE + fParamCache[ipar] = p0 - h; + double f1 = fFunc->EvalPar( &x.front(), &fParamCache.front() ); + fParamCache[ipar] = p0 + h/2; + double g1 = fFunc->EvalPar( &x.front(), &fParamCache.front() ); + fParamCache[ipar] = p0 - h/2; + double g2 = fFunc->EvalPar( &x.front(), &fParamCache.front() ); + + double h2 = 1/(2.*h); + double d0 = f1 - f2; + double d2 = 2*(g1 - g2); + + //fFunctionGradient[ipar] = 0.5*( f2 - f1)/h; + fFunctionGradient[ipar] = h2*(4*d2 - d0)/3.; + + } + else { + //default 2 point rule + fFunctionGradient[ipar] = (f2 - f0)/h; + } + + // reset to old value + fParamCache[ipar] = p0; + //std::cout << " i " << ipar << par[ipar] << " " << fFunctionGradient[ipar] << " xi = " << x[0] << " fval " << f0 << std::endl; + } + +} + + +void TFumiliFCN::Calculate_numerical_gradient_of_integral( const std::vector<double> & x1, const std::vector<double> & x2, double f0) { + + + // use a cache for parameters to avoid to copy parameters each time this function is called + + int n = fParamCache.size(); + //std::cout << "Model function Gradient " << std::endl; + for (int ipar = 0; ipar < n ; ++ipar) { + double p0 = fParamCache[ipar]; + // use 0.001 of par + double h = std::max( 0.001* fabs(p0), 8.0*kPrecision*(fabs(p0) + kPrecision) ); + fParamCache[ipar] = p0 + h; + double f2 = FitterUtil::EvalIntegral(fFunc,x1,x2,fParamCache); + + + if (fStrategy == 2) { + // USE 5 POINT_RULE + fParamCache[ipar] = p0 - h; + double f1 = FitterUtil::EvalIntegral(fFunc,x1,x2,fParamCache); + fParamCache[ipar] = p0 + h/2; + double g1 = FitterUtil::EvalIntegral(fFunc,x1,x2,fParamCache); + fParamCache[ipar] = p0 - h/2; + double g2 = FitterUtil::EvalIntegral(fFunc,x1,x2,fParamCache); + + double h2 = 1/(2.*h); + double d0 = f1 - f2; + double d2 = 2*(g1 - g2); + + //fFunctionGradient[ipar] = 0.5*( f2 - f1)/h; + fFunctionGradient[ipar] = h2*(4*d2 - d0)/3.; + + } + else { + //default 2 point rule + fFunctionGradient[ipar] = (f2 - f0)/h; + } + + // reset to old value + fParamCache[ipar] = p0; + //std::cout << " i " << ipar << par[ipar] << " " << fFunctionGradient[ipar] << " xi = " << x[0] << " fval " << f0 << std::endl; + } + +} + + + +void TFumiliChi2FCN::Calculate_element(int i, const FumiliFitData & points, double fval, double & chi2, std::vector<double> & grad, std::vector<double> & hess ) { + + + double invError = points.InvError(i); + double value = points.Value(i); + double element = invError*( fval - value ); + unsigned int npar = grad.size(); + + chi2 += element*element; + + for (unsigned int j = 0; j < npar; ++j) { + + double fj = invError * fFunctionGradient[j]; + grad[j] += 2.0 * element * fj; + + //std::cout << " ---------j " << " j " << fFunctionGradient[j] << " " << grad[j] << std::endl; + + for (unsigned int k = j; k < npar; ++ k) { + int idx = j + k*(k+1)/2; + hess[idx] += 2.0 * fj * invError * fFunctionGradient[k]; + } + } + // std::cout << "element " << i << " x " << x[0] << " val = " << value << " sig = " << 1/invError << " f(x) " << fval << " element " << element << " gradients: " << grad[0] << " " << grad[1] << " " << grad[2] << std::endl; + +} + + +void TFumiliBinLikelihoodFCN::Calculate_element(int i, const FumiliFitData & points, double fval, double & logLike, std::vector<double> & grad, std::vector<double> & hess ) { + + unsigned int npar = grad.size(); + + // kEpsilon is smalles number ( 10-300) + double logtmp, invFval; + if(fval<=kEpsilon) { + logtmp = fval/kEpsilon + std::log(kEpsilon) - 1; + invFval = 1.0/kEpsilon; + } else { + logtmp = std::log(fval); + invFval = 1.0/fval; + } + + double value = points.Value(i); + logLike += fval - value*logtmp; + + + for (unsigned int j = 0; j < npar; ++j) { + + double fj; + if ( fval < kPrecision && fabs(fFunctionGradient[j]) < kPrecision ) + fj = 1.0; + else + fj = fFunctionGradient[j] * ( 1.0 - value*invFval); + + + // if ( ( ! (fj <= 0) ) && ( ! ( fj > 0) ) ) { + // std::cout << "fj is nan -- " << fj << " " << j << " x " << x[0] << " f(x) = " << fval << " inv = " << invFval << "gradient = " + // << fFunctionGradient[j] << " " << fFunctionGradient[j]/fval << std::endl; + // fj = 0; + + // } + + grad[j] += fj; + + for (unsigned int k = j; k < npar; ++ k) { + int idx = j + k*(k+1)/2; + double fk; + if ( fval < kPrecision && fabs(fFunctionGradient[k]) < kPrecision ) + fk = 1.0; + else + fk = fFunctionGradient[k]* ( 1.0 - value*invFval); + + + hess[idx] += fj * fk; + } + } + +} + + +void TFumiliUnbinLikelihoodFCN::Calculate_element(int , const FumiliFitData &, double fval, double & logLike, std::vector<double> & grad, std::vector<double> & hess ) { + + unsigned int npar = grad.size(); + // likelihood + //if (fval < 1.0E-16) fval = 1.0E-16; // truncate for precision + + // kEpsilon is smalles number ( 10-300) + double logtmp, invFval; + if(fval<=kEpsilon) { + logtmp = fval/kEpsilon + std::log(kEpsilon) - 1; + invFval = 1.0/kEpsilon; + } else { + logtmp = std::log(fval); + invFval = 1.0/fval; + } + + logLike += logtmp; + for (unsigned int j = 0; j < npar; ++j) { + + double fj; + if ( fval < kPrecision && fabs(fFunctionGradient[j]) < kPrecision ) + fj = 1.0; + else + fj = invFval * fFunctionGradient[j]; + + grad[j] -= fj; + + for (unsigned int k = j; k < npar; ++ k) { + int idx = j + k*(k+1)/2; + double fk; + if ( fval < kPrecision && fabs(fFunctionGradient[k]) < kPrecision ) + fk = 1.0; + else + fk = invFval * fFunctionGradient[k]; + + + hess[idx] += fj * fk; + } + } +} + + +// // implement chi2 function (should not be needed) +double TFumiliChi2FCN::operator()(const std::vector<double>& par) const { + + assert(fData); + assert(fFunc); + + TChi2FCN fcn(fData,fFunc); + return fcn(par); +} + + +double TFumiliBinLikelihoodFCN::operator()(const std::vector<double>& par) const { + + assert(fData); + assert(fFunc); + + TBinLikelihoodFCN fcn(fData,fFunc); + return fcn(par); +} + + +double TFumiliUnbinLikelihoodFCN::operator()(const std::vector<double>& /*par */) const { + + assert(fData); + assert(fFunc); + + //TUnbinLikelihoodFCN fcn(*fData,*fFunc); + //return fcn(par); + // to be implemented + return 0; +} diff --git a/minuit2/test/Makefile b/minuit2/test/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..aeffdf6bdf2917feae164cb1b9ec06fbaddb6a96 --- /dev/null +++ b/minuit2/test/Makefile @@ -0,0 +1,77 @@ +# Makefile for the ROOT test programs. +# This Makefile shows nicely how to compile and link applications +# using the ROOT libraries on all supported platforms. +# +# Copyright (c) 2000 Rene Brun and Fons Rademakers +# +# Author: Fons Rademakers, 29/2/2000 + +include $(ROOTSYS)/test/Makefile.arch + +#------------------------------------------------------------------------------ + +ifeq ($(PLATFORM),win32) +EXTRALIBS = $(ROOTSYS)/lib/libGMinuit.lib $(ROOTSYS)/lib/libMathCore.lib +else +EXTRALIBS = -lGMinuit +endif + +USERFUNCOBJ = testUserFunc.$(ObjSuf) +USERFUNCSRC = testUserFunc.$(SrcSuf) +USERFUNC = testUserFunc$(ExeSuf) + + +# ANDYOBJ = testAndy.$(ObjSuf) +# ANDYSRC = testAndy.$(SrcSuf) +# ANDY = testAndy$(ExeSuf) + +GRAPHOBJ = testGraph.$(ObjSuf) +GRAPHSRC = testGraph.$(SrcSuf) +GRAPH = testGraph$(ExeSuf) + + +OBJS = $(USERFUNCOBJ) $(GRAPHOBJ) +# $(TSTRINGO) $(TCOLLEXO) $(VVECTORO) $(VMATRIXO) $(VLAZYO) \ +# $(HELLOO) $(ACLOCKO) $(STRESSO) $(TBENCHO) $(BENCHO) \ +# $(TCOLLBMO) $(STRESSGEOMO) $(STRESSLO) $(TESTBITSO) \ +# $(CTORTUREO) $(QPRANDOMO) $(THREADO) $(STRESSVECO) + +PROGRAMS = $(USERFUNC) $(GRAPH) +# $(TCOLLEX) $(TCOLLBM) $(VVECTOR) $(VMATRIX) $(VLAZY) \ +# $(HELLOSO) $(ACLOCKSO) $(STRESS) $(TBENCHSO) $(BENCH) \ +# $(STRESSGEOM) $(STRESSL) $(TESTBITS) $(CTORTURE) $(QPRANDOM) \ +# $(THREADS) $(STRESSVEC) + +.SUFFIXES: .$(SrcSuf) .$(ObjSuf) $(ExeSuf) + + +all: $(PROGRAMS) + +$(USERFUNC): $(USERFUNCOBJ) + $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ + @echo "$@ done" + +# $(ANDY): $(ANDYOBJ) +# $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ +# @echo "$@ done" + +$(GRAPH): $(GRAPHOBJ) + $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ + @echo "$@ done" + + + +clean: + @rm -f $(OBJS) core + +distclean: clean + @rm -f $(PROGRAMS) $(EVENTSO) $(EVENTLIB) *Dict.* *.def *.exp \ + *.root *.ps *.so *.lib *.dll *.d .def so_locations + @rm -rf cxx_repository + -@cd RootShower && $(MAKE) distclea + +.SUFFIXES: .$(SrcSuf) + + +.$(SrcSuf).$(ObjSuf): + $(CXX) $(CXXFLAGS) -c $< diff --git a/minuit2/test/testGraph.cxx b/minuit2/test/testGraph.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ccf970c0bda87644811554bc040790723706faf6 --- /dev/null +++ b/minuit2/test/testGraph.cxx @@ -0,0 +1,117 @@ +// @(#)root/minuit2:$Name: $:$Id: testGraph.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include "TGraphErrors.h" +#include "TF1.h" +#include "TRandom3.h" +#include "TCanvas.h" +#include "TLegend.h" +#include "TPaveLabel.h" +#include "TStopwatch.h" +#include "TVirtualFitter.h" + +#include <vector> + +double fitFunc( double *x , double * p) { + + double A = p[0]; + double B = p[1]; + double C = p[2]; + return A*TMath::Sin(C*x[0]) + B*TMath::Sin(2*C*x[0]); +} + + + +void makePoints(Int_t n, std::vector<double> & x, std::vector<double> & y, std::vector<double> & e) +{ + Int_t i; + TRandom3 r; + + double A = 1; + double B = 2; + double C = 1; + + for (i=0; i<n; i++) { + x[i] = r.Uniform(-2, 2); + y[i]=A*TMath::Sin(C*x[i]) + B*TMath::Sin(2*C*x[i]) + r.Gaus()*0.3; + e[i] = 0.1; + } + +} + + +void doFit(int n,const char * fitter) +{ + + + std::vector<double> x(n); + std::vector<double> y(n); + std::vector<double> e(n); + + double initPar[3] = { 1, 1, 2 }; + + //Generate points along a sin(x)+sin(2x) function + makePoints(n, x , y, e); + + TGraphErrors *gre3 = new TGraphErrors(n, &x.front(), &y.front(), 0, &e.front()); + gre3->SetMarkerStyle(24); + gre3->SetMarkerSize(0.3); + gre3->Draw("ap"); + + + //Fit the graph with the predefined "pol3" function + TF1 *f = new TF1("f2",fitFunc, -2, 2, 3); + + printf("fitting with %s",fitter); + TVirtualFitter::SetDefaultFitter(fitter); + + int npass = 100; + TStopwatch timer; + timer.Start(); + for (int i = 0; i < npass; ++i) { + f->SetParameters(initPar); + + gre3->Fit(f,"q"); + } + timer.Stop(); + printf("%s,: RT=%7.3f s, Cpu=%7.3f s\n",fitter,timer.RealTime(),timer.CpuTime()); + + TPaveLabel *pl = new TPaveLabel(0.5,0.7,0.85,0.8,Form("%s CPU= %g s",fitter,timer.CpuTime()),"brNDC"); + pl->Draw(); + //Access the fit resuts + TF1 *f3 = gre3->GetFunction("f2"); + if (f3) { + f3->SetLineWidth(1); + f3->SetLineColor(kRed); + } + + TLegend *leg = new TLegend(0.1, 0.8, 0.35, 0.9); + leg->AddEntry(gre3, "sin(x) + sin(2*x)", "p"); + leg->Draw(); + leg->SetFillColor(42); + +} + +void fitGraph(int n = 500) { +// TCanvas *myc = new TCanvas("myc", "Fitting 3 TGraphErrors with linear functions"); +// myc->Divide(1,2); +// myc->SetFillColor(42); +// myc->SetGrid(); + +// myc->cd(1); +// doFit(n,"Minuit"); + +// myc->cd(2); + doFit(n,"Minuit2"); + +} + +int main() { + fitGraph(500); +} diff --git a/minuit2/test/testUserFunc.cxx b/minuit2/test/testUserFunc.cxx new file mode 100644 index 0000000000000000000000000000000000000000..73e1eb75f8481f2f39c9f7c49d905eb2e639ec7a --- /dev/null +++ b/minuit2/test/testUserFunc.cxx @@ -0,0 +1,63 @@ +// @(#)root/minuit2:$Name: $:$Id: testUserFunc.cxxv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + + +#include "TH1.h" +#include "TF1.h" +#include "TRandom3.h" +#include "TVirtualFitter.h" + + + +double myfunc( double * x, double * p) { + + return p[0]*TMath::Gaus(x[0],p[1],p[2]); +} + +void testUserFunc(std::string type="Minuit2", int n = 1000) { + + + + gRandom = new TRandom3(); + + + TVirtualFitter::SetDefaultFitter(type.c_str() ); + + + + TH1D * h1 = new TH1D("h1","fit histo 1",100, -5, 5. ); + +// gStyle->SetOptStat(1111111); +// gStyle->SetOptFit(1111111); + + + + + for (int i = 0; i < n; ++i) { + h1->Fill( gRandom->Gaus(0,1) ); + } + + TF1 * f = new TF1("f",myfunc,-10,10,3); + double p[3] = { 100.0, 0.0, 1.0 } ; + f->SetParameters(p); + + h1->Fit(f); + + + h1->Draw(); + + + +} + +#ifndef __CINT__ +int main() { + testUserFunc( ); +} +#endif diff --git a/tutorials/minuit2FitBench.C b/tutorials/minuit2FitBench.C new file mode 100644 index 0000000000000000000000000000000000000000..954f2c94bdbb82e4d4ae0613c7305af80a836fc8 --- /dev/null +++ b/tutorials/minuit2FitBench.C @@ -0,0 +1,98 @@ +// @(#)root/minuit2:$Name: $:$Id: minuit2FitBench.Cv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include "TH1.h" +#include "TF1.h" +#include "TCanvas.h" +#include "TStopwatch.h" +#include "TSystem.h" +#include "TRandom3.h" +#include "TVirtualFitter.h" +#include "TPaveLabel.h" +#include "TStyle.h" + + +TF1 *fitFcn; +TH1 *histo; + +// Quadratic background function +Double_t background(Double_t *x, Double_t *par) { + return par[0] + par[1]*x[0] + par[2]*x[0]*x[0]; +} + +// Lorenzian Peak function +Double_t lorentzianPeak(Double_t *x, Double_t *par) { + return (0.5*par[0]*par[1]/TMath::Pi()) / + TMath::Max( 1.e-10,(x[0]-par[2])*(x[0]-par[2]) + .25*par[1]*par[1]); +} + +// Sum of background and peak function +Double_t fitFunction(Double_t *x, Double_t *par) { + return background(x,par) + lorentzianPeak(x,&par[3]); +} + +void DoFit(const char* fitter, TVirtualPad *pad, Int_t npass) { + gRandom = new TRandom3(); + TStopwatch timer; + // timer.Start(); + TVirtualFitter::SetDefaultFitter(fitter); + pad->SetGrid(); + pad->SetLogy(); + fitFcn->SetParameters(1,1,1,5,.03,1); + fitFcn->Update(); + histo = new TH1D(fitter,"Fit bench",200,0,3); + + timer.Start(); + for (Int_t pass=0;pass<npass;pass++) { + if (pass%100 == 0) printf("pass : %d\n",pass); + for (Int_t i=0;i<5000;i++) { + histo->Fill(fitFcn->GetRandom()); + } + histo->Fit("fitFcn","0q"); + } + + histo->Fit("fitFcn"); + timer.Stop(); + + + Double_t cputime = timer.CpuTime(); + printf("%s, npass=%d : RT=%7.3f s, Cpu=%7.3f s\n",fitter,npass,timer.RealTime(),cputime); + TPaveLabel *p = new TPaveLabel(0.5,0.7,0.85,0.8,Form("%s CPU= %g s",fitter,cputime),"brNDC"); + p->Draw(); + pad->Update(); +} + +void minuit2FitBench(Int_t npass=20) { + TH1::AddDirectory(kFALSE); + TCanvas *c1 = new TCanvas("c1","Fitting Demo",10,10,900,900); + c1->Divide(2,2); + // create a TF1 with the range from 0 to 3 and 6 parameters + fitFcn = new TF1("fitFcn",fitFunction,0,3,6); + fitFcn->SetNpx(200); + gStyle->SetOptFit(); + gStyle->SetStatY(0.6); + + //with Minuit + c1->cd(1); + DoFit("Minuit",gPad,npass); + + //with Fumili + c1->cd(2); + DoFit("Fumili",gPad,npass); + + //with Minuit2 + c1->cd(3); + DoFit("Minuit2",gPad,npass); + + //with Fumili2 + c1->cd(4); + DoFit("Fumili2",gPad,npass); + + c1->SaveAs("FitBench.root"); +} diff --git a/tutorials/minuit2FitBench2D.C b/tutorials/minuit2FitBench2D.C new file mode 100644 index 0000000000000000000000000000000000000000..f2e692e7b001b788a098e5c4d54f6683a5ade4c8 --- /dev/null +++ b/tutorials/minuit2FitBench2D.C @@ -0,0 +1,100 @@ +// @(#)root/minuit2:$Name: $:$Id: minuit2FitBench2D.Cv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + +#include "TH1.h" +#include "TF1.h" +#include "TH2D.h" +#include "TF2.h" +#include "TCanvas.h" +#include "TStopwatch.h" +#include "TSystem.h" +#include "TRandom3.h" +#include "TVirtualFitter.h" +#include "TPaveLabel.h" +#include "TStyle.h" + + +TF2 *fitFcn; +TH2D *histo; + +// Quadratic background function +Double_t gaus2D(Double_t *x, Double_t *par) { + double t1 = x[0] - par[1]; + double t2 = x[1] - par[2]; + return par[0]* exp( - 0.5 * ( t1*t1/( par[3]*par[3]) + t2*t2 /( par[4]*par[4] ) ) ) ; +} + +// Sum of background and peak function +Double_t fitFunction(Double_t *x, Double_t *par) { + return gaus2D(x,par); +} + +void fillHisto(int n =10000) { + + gRandom = new TRandom3(); + for (int i = 0; i < n; ++i) { + double x = gRandom->Gaus(2,3); + double y = gRandom->Gaus(-1,4); + histo->Fill(x,y,1.); + } +} + +void DoFit(const char* fitter, TVirtualPad *pad, Int_t npass) { + TStopwatch timer; + TVirtualFitter::SetDefaultFitter(fitter); + pad->SetGrid(); + fitFcn->SetParameters(100,0,0,2,7); + fitFcn->Update(); + histo->Draw("LEGO"); + + timer.Start(); + + histo->Fit("fitFcn"); + + timer.Stop(); + + Double_t cputime = timer.CpuTime(); + printf("%s, npass=%d : RT=%7.3f s, Cpu=%7.3f s\n",fitter,npass,timer.RealTime(),cputime); + TPaveLabel *p = new TPaveLabel(0.5,0.7,0.85,0.8,Form("%s CPU= %g s",fitter,cputime),"brNDC"); + p->Draw(); + pad->Update(); +} + +void minuit2FitBench2D(int n = 100000) { + TH1::AddDirectory(kFALSE); + TCanvas *c1 = new TCanvas("c1","Fitting Demo",10,10,900,900); + c1->Divide(2,2); + // create a TF1 with the range from 0 to 3 and 6 parameters + fitFcn = new TF2("fitFcn",fitFunction,-10,10,-10,10,5); + //fitFcn->SetNpx(200); + gStyle->SetOptFit(); + gStyle->SetStatY(0.6); + + + histo = new TH2D("h2","2D Gauss",100,-10,10,100,-10,10); + fillHisto(n); + + int npass=0; + + //with Minuit + c1->cd(1); + DoFit("Minuit",gPad,npass); + + //with Fumili + c1->cd(2); + DoFit("Fumili",gPad,npass); + + //with Minuit2 + c1->cd(3); + DoFit("Minuit2",gPad,npass); + + //with Fumili2 + c1->cd(4); + DoFit("Fumili2",gPad,npass); +} diff --git a/tutorials/minuit2GausFit.C b/tutorials/minuit2GausFit.C new file mode 100644 index 0000000000000000000000000000000000000000..5bcdcf430add43d3fbfe8eff24d02e136cf1e236 --- /dev/null +++ b/tutorials/minuit2GausFit.C @@ -0,0 +1,78 @@ +// @(#)root/minuit2:$Name: $:$Id: minuit2GausFit.Cv 1.0 2005/06/23 12:00:00 moneta Exp $ +// Author: L. Moneta 10/2005 + +/********************************************************************** + * * + * Copyright (c) 2005 ROOT Foundation, CERN/PH-SFT * + * * + **********************************************************************/ + + +#include "TH1.h" +#include "TF1.h" +#include "TCanvas.h" +#include "TRandom3.h" +#include "TVirtualFitter.h" +#include "TPaveLabel.h" +#include "TStyle.h" + +#include <iostream> +#include <string> + + +void testGausFit( std::string type = "Minuit2", int n = 1000) { + + gRandom = new TRandom3(); + + TVirtualFitter::SetDefaultFitter(type.c_str() ); + + TH1D * h1 = new TH1D("h1","fit histo 1",100, -5, 5. ); + + gStyle->SetOptStat(1111111); + gStyle->SetOptFit(1111111); + + for (int i = 0; i < n; ++i) { + h1->Fill( gRandom->Gaus(0,1) ); + } + + std::string cname = type + "Canvas" ; + std::string ctitle = type + " Gaussian Fit" ; + TCanvas *c1 = new TCanvas(cname.c_str(),cname.c_str(),10,10,900,900); + c1->Divide(2,2); + + TH1D * h2 = new TH1D(*h1); + TH1D * h3 = new TH1D(*h1); + TH1D * h4 = new TH1D(*h1); + c1->cd(1); + cout << "\nDo Fit 1\n"; + h1->Fit("gaus","Q"); + h1->SetName("Chi2 Fit"); + h1->Draw(); + c1->cd(2); + cout << "\nDo Fit 2\n"; + h2->Fit("gaus","VE"); + h2->SetName("Chi2 Fit with Minos Erros"); + h2->Draw(); + c1->cd(3); + cout << "\nDo Fit 3\n"; + h3->Fit("gaus","IE"); + h3->SetName("Chi2 Fit with Integral and Minos"); + h3->Draw(); + c1->cd(4); + cout << "\nDo Fit 4\n"; + h4->Fit("gaus","VLE"); + h4->SetName("Likelihood Fit with Minos Erros"); + h4->Draw(); + +} + +void minuit2GausFit() { + + int n = 1000; + testGausFit("Minuit2",n); + testGausFit("Fumili2",n); + +} + + +