# File: snoman.mac
# Brief: Macro showing how to run rat with SNOMAN assumptions
#
# Date: 2014-08-29
# Contact: P G Jones,
# Revisions:
#
# This mac file will allow RAT to mimic SNOMAN 5_0294 using the salt
# phase optical values. Note: One must be careful to ensure all variation
# and drift is off in SNOMAN and the matching parameters are set if doing
# a direct comparison between RAT and SNOMAN. See docDB-1468 for details.
# Choose the snoman geometry and materials (for salt phase)
/rat/db/set DETECTOR geo_file "snoman/salt.geo"
/rat/db/set DETECTOR pmt_info_file "pmt/snoman.ratdb"
/rat/db/load snoman/PMT_DQXX.ratdb
# Now the snoman materials & optics
/rat/db/load snoman/OPTICS.ratdb
/rat/db/load snoman/MATERIALS.ratdb
# Typical salt phase thresholds
/rat/db/set DAQ_RUN_LEVEL n100_hi_thresh 21.0
/rat/db/set DAQ_RUN_LEVEL n100_med_thresh 16.0
/rat/db/set DAQ_RUN_LEVEL n100_lo_thresh 11.0
/rat/db/set DAQ_RUN_LEVEL n20_thresh 16.0
/rat/db/set DAQ_RUN_LEVEL n20_lb_thresh 11.0
/rat/db/set DAQ_RUN_LEVEL eshi_thresh 120.0
/rat/db/set DAQ_RUN_LEVEL eslo_thresh 60.0
# The SNOMAN physics models
/rat/physics_list/SelectCerenkovProcess SNOMAN
/rat/physics_list/SelectOpRayleighProcess SNOMAN
/run/initialize
# BEGIN EVENT LOOP
/rat/proc frontend
/rat/proc trigger
/rat/proc eventbuilder
/rat/proc calibratePMT
/rat/proc count
/rat/procset update 100
/rat/proc outroot
/rat/procset file "SNOMAN.root"
# END EVENT LOOP
/generator/add combo gun:fill:uniform
/generator/vtx/set e- 0 0 0 5.0
/generator/pos/set 0 0 0
/generator/rate/set 50
/rat/run/start 10
exit