# File: fitName.mac
# Brief: Short macro showing use of the fitter names
#
# Date: 19-05-2014
# Contact: P G Jones,
# Revisions:
# 19-05-2014 I. Coulter Initial commit.
#
# This is a macro which shows the naming format of the fitters as well
# as how to use the fitter naming command to simplify the naming of
# fitters when it comes to analysis.
#
/run/initialize
# BEGIN EVENT LOOP
/rat/proc frontend
/rat/proc trigger
/rat/proc eventbuilder
/rat/proc count
/rat/procset update 10
/rat/proc calibratePMT
# Run a typical likelihood fitter.
# Using the fitter naming format, this example is known as:
# "positionTimeLikelihood:powell:et1d:null:quad"
/rat/proc fitter
/rat/procset method "positionTimeLikelihood"
/rat/procset optimiser "powell"
/rat/procset pdf "et1d"
/rat/procset seed "quad"
/rat/procset selector "null"
# Using the fitter nickname command,
# this can be renamed "likelihoodFit"
/rat/procset name "likelihoodFit"
/rat/proclast outroot
/rat/procset file "fitName.root"
# END EVENTLOOP
/generator/add combo gun:fill
/generator/vtx/set e- 0 0 0 1.0
/generator/pos/set 0 0 0
/generator/rate/set 1
/rat/run/start 10
exit