#/**
#*       Example Macro for viewing the PMT BucketSource with the HepRep viewer
#*
#*       view_bucketsource.mac
#*       Date:           22/09/2008
#*       contact:        J. Wilson, Oxford
#*/

# Don't care about hadrons or muons so quicker not to initialise these processes
/rat/physics_list/OmitMuonicProcesses true
/rat/physics_list/OmitHadronicProcesses true

# Load the required detector geometry
/rat/db/set DETECTOR geo_file "geo/sno_h2o.geo"
# and add the Bucket and neutron source geometry
/rat/db/load geo/calib/BucketSource.geo

# disable the PMT geometry for speed of viewing
/rat/db/set GEO[innerPMT] enable 0
# Change position of source - default is centre of AV so move up in z
#/rat/db/set GEO[source] z 100.0
#/rat/db/set GEO[neutronSource] z 100.0
/run/initialize

# And view! you need the HepRepApp java application to view the output file (G4Data0.heprep)
/vis/open HepRepFile
/vis/scene/create
/vis/scene/add/volume
/vis/sceneHandler/attach
/vis/viewer/set/upVector 0.0 0.0 1.0
/vis/viewer/set/viewpointThetaPhi -90 90
/vis/viewer/set/lightsThetaPhi 90 0
/vis/viewer/set/style s
/vis/viewer/zoom 1
/vis/viewer/flush
exit