# The goal of this macro is to produce a root-file from data that can be used # for the PMT calibration rattest. You will need to get the zdab file for # run 8880 (December 2014 data) or update the rattest with a new run when # needed. # # Remember: # 1) Make sure to keep the file-size small. We do not need a large number of # events for this test to work. To create the input file, the zdabconverter # was changed to skip over any hit that was not on PMT 3635, cell 1 and also not # to record any events that did not contain a hit on PMT 3635, cell 1. # Here is what I did in zdab_convert.cc where the pmt info is read in: # // pmt hit data # uint32_t* hits = reinterpret_cast(pev + 1); # bool skipev = 1; # RAT::DS::UncalPMTs& uncalPMTs = ev.GetUncalPMTs(); # double totalQ = 0.0; # RAT::DS::CalPMTs calPMTs; # for (unsigned i=0; iAddEV( ev ); # # 2) Update the rattest when you have re-generated the input file. # # F. Descamps Sept 2015 # N Barros (Nov 2016) : Changed the logic of InZDAB /rat/inzdab/load SNOP_0000008880_000.zdab /run/initialize # BEGIN EVENT LOOP # Select only events with EXTA trigger /rat/proc/if trigTypeSelector /rat/procset trigType 15 # BEGIN EVENT LOOP /rat/proc count /rat/procset update 1000 /rat/proclast outroot /rat/procset file "pmtcal-input.root" /rat/proc/endif # END EVENTLOOP # Fiber 020 December 2014 data /rat/inzdab/read