# File: directionLikelihood.mac # Brief: Short macro showing how to run the direction likelihood fitter # # Date: 19-05-2014 # Contact: I Coulter, # Revisions: # 19-05-2014 I. Coulter Initial commit. # # This is a macro which shows how to run a direction likelihood fitter. # This uses the directionLikelihood method, the directionPDF, which # consists of the angle of the PMT hits relative to the initial direction # of the hits, the metaDirectionSeed metaOptimiser, which fits multiple # directions from random seeds and takes the median result, and the # modeCut PMTselector, which selects only PMTs within 50ns of the mode # hit time. # # Load a water geometry /rat/db/set DETECTOR geo_file "geo/snoplus_water.geo" /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+direction seed /rat/proc fitter /rat/procset method "quad" /rat/proc fitter /rat/procset method "simpleDirection" /rat/procset seed "quad" # Run the direction likelihood fitter # This uses quad as a position seed and simpleDirection # as a direction seed. /rat/proc fitter /rat/procset method "directionLikelihood" /rat/procset optimiser "metaDirectionSeed-powell" /rat/procset pdf "directionPDF" /rat/procset seed "simpleDirection:quad" /rat/procset seed "quad" /rat/procset selector "modeCut" /rat/proclast outroot /rat/procset file "directionFit.root" # END EVENTLOOP /generator/add combo gun:fill /generator/vtx/set e- 0 0 0 5.0 /generator/pos/set 0 0 0 /generator/rate/set 1 /rat/run/start 10 exit