# File: trigger.mac # Brief: Macro for simulation of the trigger system in RAT # # Date: 2014-12-19 # Contact: I Coulter, # Revisions: # # This macro shows how to simulate the SNO+ trigger system. # The trigger system itself is described on the user manual and there is a # comprehensive description of the SNO trigger system on DocDB 827. # # This macro shows how the DAQ parameters can be set in DAQ.ratdb # and in DAQ_RUN_LEVEL.ratdb to change # the trigger mask, thresholds, to enable automatic retriggers and to choose # which triggers are simulated. # The DAQ will also allow the user to change parameters like the trigger pulse # width, lockout and delays but these will not be of interest to most people # and so aren't included here. # Trigger mask can be set: /rat/db/set DAQ_RUN_LEVEL trigger_mask 28398 # defined as a standard neutrino run # Other triggers include 1024 Pulse GT # 32768 ExtAsync # A full list can be found in the user manual # The simulated triggers can be set: /rat/db/set DAQ_RUN_LEVEL trigger_enable 3199 # Trigger thresholds can be set: /rat/db/set DAQ_RUN_LEVEL n100_hi_thresh 50.0, #NHIT100 HI threshold in hits /rat/db/set DAQ_RUN_LEVEL n100_med_thresh 30.0, #NHIT100 MED threshold in hits /rat/db/set DAQ_RUN_LEVEL n100_lo_thresh 10.0, #NHIT100 LO threshold in hits /rat/db/set DAQ_RUN_LEVEL n20_thresh 16.0, #NHIT20 threshold in hits /rat/db/set DAQ_RUN_LEVEL n20_lb_thresh 11.0, #NHIT20LB (`lookback') threshold in hits /rat/db/set DAQ_RUN_LEVEL eshi_thresh 120.0, #ESUMHI threshold in mV /rat/db/set DAQ_RUN_LEVEL eslo_thresh 60.0, #ESUMLO threshold in mV # Automatic retriggers can be simulated on the MTCA+ using: #/rat/db/set DAQ_RUN_LEVEL n100_retrig 1 #/rat/db/set DAQ_RUN_LEVEL n20_retrig 1 #/rat/db/set DAQ_RUN_LEVEL eshi_retrig 1 #/rat/db/set DAQ_RUN_LEVEL eslo_retrig 1 #/rat/db/set DAQ_RUN_LEVEL owln_retrig 1 #/rat/db/set DAQ_RUN_LEVEL owlehi_retrig 1 #/rat/db/set DAQ_RUN_LEVEL owlelo_retrig 1 # The period of pulseGT can be set (in ms) /rat/db/set DAQ_RUN_LEVEL pulse_gt 200.0 /run/initialize # BEGIN EVENT LOOP /rat/proc frontend /rat/proc trigger /rat/proc eventbuilder /rat/proc calibratePMT /rat/proc count /rat/procset update 10 /rat/proclast outroot /rat/procset file "trigger.root" # END EVENTLOOP /generator/add combo gun:fill:poisson /generator/vtx/set e- 0 0 0 1.0 /generator/pos/set 0.0 0.0 0.0 /generator/rate/set 1 /rat/run/start 10 exit