# File: daq.mac # Brief: Macro for simulation of the daq in RAT # # Date: 2014-12-19 # Contact: I Coulter, # Revisions: # # This macro shows how to simulate the DAQ in RAT. # frontend takes a single photon hit on the PMTs and works out whether it # registers a hit. It samples the time and charges and creates the event's # MCHits. # trigger takes the MCHits and decides if the MC event would be sufficient to # cause triggered events. # eventbuilder associates the MCHits with a particular triggered event and then # uncalibrates the event # calibrate PMT runs the event through the PCA and ECA, returned a calibrated # event # # Descriptions of the options included in frontend (e.g. realistic pulses) and # trigger (e.g. trigger thresholds, mask) are shown in the example macros, # frontend.mac and trigger.mac. # A simplified DAQ can also be simulated as seen in simpledaq.mac. # A more complete descriptions of the DAQ can be found in the user manual and # on DocDB 827 which describes the trigger system on SNO. # # Additionally this macro shows how to turn on PMT after-pulsing, a more detailed # description of which can be found in the user manual. The lines below can be # un-commented to run after-pulsing. #/rat/db/set AFTERPULSING[data_type] data "r1408_snoplus" # Set the after-pulsing data type #/rat/db/set AFTERPULSING[r1408_snoplus] apFlag 1 # turn on pmt after-pulsing /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 "daq.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