# File: direction2D.mac # Brief: Short macro showing how to use the 2D direction PDF # # Date: 15-05-2022 # Contact: W. Parker, # Revisions: # # This is a macro which shows how to use the direction2D PDF with the # directionLikelihood method, the directionPDF. The direction2D PDF # consists of the angle of the PMT hits relative to the initial direction # of the event, and the time residual. The PDF can be coordinated # for different materials, energies, event positions, and using the # fitted or true position to calculate the time residual. These are # all configurable from the macro. /rat/db/set DETECTOR geo_file "geo/snoplusnative.geo" /rat/db/set GEO[inner_av] material "labppo_0p5_scintillator" /rat/db/set FIT_DIRECTION_2DPDF[parameters] events_pos "fullvolume" #Use PDF produced with events distributed up to r=5m. Could alternatively use events simulated at centre of detector ("centre") /rat/db/set FIT_DIRECTION_2DPDF[parameters] tResid_pos "Fit" #Use PDF produced using the fitted (scintFitter) position. Could alternatively use the true positions ("True") /rat/db/set FIT_DIRECTION_2DPDF[parameters] energy 6 #Energy of events used to produce the PDF (MeV) /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 /rat/proc fitter /rat/procset method "quad" /rat/proc fitter /rat/procset method "multipdf-scint" /rat/procset seed "quad" /rat/procset name "multiPDFFit" /rat/proc fitter /rat/procset method "simpleDirection" /rat/procset seed "multiPDFFit" /rat/proc fitter /rat/procset method "directionLikelihood-polar" /rat/procset optimiser "grid" /rat/procset pdf "Direction2D" /rat/procset seed "multiPDFFit" /rat/procset selector "null" /rat/procset name "directionFit" /rat/proc outroot /rat/procset file "directionFit.root" # END EVENTLOOP /generator/add combo gun:fill /generator/vtx/set e- 0 0 0 6.0 /generator/pos/set 0 0 0 /generator/rate/set 1 /rat/run/start 10 exit