0;136;0c# File: energyLookup.mac
# Brief: Short macro showing how to run the energyLookup fitter
#
# Date: 19-05-2014
# Contact: P G Jones,
# Revisions:
# 19-05-2014 I. Coulter Initial commit.
#
# This is a macro which shows how to run the energyLookup fitter. This
# calculates the fitted energy using a position and nhit dependent lookup
# table found in FIT_ENERGY_LOOKUP.ratdb. The table is automatically
# loaded for the material in the "scint" volume (if no match is found,
# labppo_scintillator is used by default). This can be overwritten by
# passing an initialisation parameter.
#
/run/initialize
# BEGIN EVENT LOOP
/rat/proc frontend
/rat/proc trigger
/rat/proc eventbuilder
/rat/proc count
/rat/procset update 10
/rat/proc calibratePMT
# Requires a position seed.
# Use the quad fitter (see quadFitter.mac).
/rat/proc fitter
/rat/procset method "quad"
/rat/proc fitter
/rat/procset method "energyLookup"
/rat/procset seed "quad"
/rat/proclast outroot
/rat/procset file "energyLookup.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