# File: quad.mac # Brief: Short macro showing how to run the quadFitter # # Date: 19-05-2014 # Contact: I. Coulter, # M. Strait, # Revisions: # 19-05-2014 I. Coulter Initial commit. # # This is a macro which shows how to run the quadFitter. The quadFitter # fits a point-like event by choosing many combinations of four PMT hits # and calculating the analytic solution for where the light must have # come from. It returns the median of these solutions (the "quadCloud") # in each of x, y, z and t. # A constant speed of light is assumed (independent of material and # wavelength) and no consideration is given to anything other than # straight line paths for the light. This method is primarily used for # providing a starting position ("seed") for other fitters but can also # provide good-enough fast reconstruction for online processes. # # The quadFitter takes input parameters from FIT_QUAD.ratdb. # These can be overwritten by the user using the commands: # Effective overall speed of light /rat/db/set QUAD_FIT[labppo_scintillator] light_speed 188.8d # Max points generated in quadCloud /rat/db/set QUAD_FIT[labppo_scintillator] num_points 4000 # Number of attempts to generate points /rat/db/set QUAD_FIT[labppo_scintillator] limit_points 20000 # To speed the quadFitter up further for use in online processing, # the user can specify whether to calculate a reconstructed time # (if position is all that is required) and whether to compute # errors on time and position /rat/db/set QUAD_FIT[labppo_scintillator] calc_time 1 /rat/db/set QUAD_FIT[labppo_scintillator] calc_errors 1 /run/initialize # BEGIN EVENT LOOP /rat/proc frontend /rat/proc trigger /rat/proc eventbuilder /rat/proc count /rat/procset update 10 /rat/proc calibratePMT # Run the quadFitter /rat/proc fitter /rat/procset method "quad" /rat/proclast outroot /rat/procset file "quad.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