ISU testbench code using Eric Oberla's original acdc-daq teststand code.
This code is built using cmake
and requires libusb
headeras (which usually come prepackaged with your os-- you may want to double-check).
To install on a debian-based machine
$ sudo apt install libusb-dev cmake
To make and use the functions, issue the following commands
$ cmake . -Bbuild
$ cmake --build build -- -j4
Where -j4
specifies the number of cores available to multi-thread the process. This will create a directory build/
with the proper build files and then use those to compile and link the libraries and executables.
After this any command can be issued, for example
$ ./bin/readACDC
If you ever need to remake without having changed to CMakeLists file, issue
$ cmake --build build -- -j4
again.
There are many executables available after building the project. Below is a list of them
This will probe the central card and return the addresses of the connected ADC boards. Useful for debugging connection
$ ./bin/readCC
This will read out the settings of any connected ADC boards. This is useful for checking the status of each ADC board
$ ./bin/readACDC
This configures the PSEC electronics given a yaml based configuration file.
See the config/
folder examples for more info.
$ ./bin/setConfig [<filename>] [-v]
Parameters
If no parameters set, will set the default (trig off) settings
- (optional) filename - the filename of the config file
- (optional) verbose flag - if provided, will show verbose output
This will find the pedestal values of the connected ADC, save them to a text file, and let them be used by further commands
$ ./bin/takePed
This will use GNUplot to give a visual representation of the incoming traces. This will mimic the output of an oscilloscope
$ ./bin/oScope <board> <num_events> <trigger_mode> [<channel>]
Parameters
- board - The ADC board to show output for
- num_events - The number of triggered events to show. If you want to show a continuous output until manualy stopped (ctrl-c) set num_events to a value less than 0 (e.g. -1)
- trigger_mode - 0 for software triggering, 1 for hardware triggering
- (optional) channel - If set, will plot the given channel and the 5 after it. For example, if channel is 10, channels 10-14 will be plotted. If the channel provided is more than 25, it will be set to 25
This will log data from the PSEC electronics. For more information, see the data heading
$ ./bin/logData <file> <num_events> <trigger_mode>
Parameters
- file - The prefix of files. Three files will be created
<file>.acdc
,<file>.ped
, and<file>.meta
- num_events - The number of events to capture
- trigger_mode - 0 for software trigger, 1 for hardware trigger
Measures noise trigger rates as a function of threshold pin voltage for the channels on the board. To convert from DAC counts to mV, multiply your value in DAC counts by (1200/4096) Writes the data to your file in three columns. The first column is channel number, the second column is threshold in DAC counts, and the third column is the number of triggers that occured in 1 second.
$ ./bin/Automation <pedestal> <board> <filename>
Parameters
- pedestal - The pedestal in ADC counts
- board - The connected ADC board
- filename - The filename to save output to
Measures the number of counts in 5 seconds with the calibration input disabled (measuring noise triggers), and the number of counts in 5 seconds with the calibration input enabled. Writes data to the file in three columns. The first column is threshold voltage in DAC counts, the second is the number of counts in 5 with the calibration input disabled, the third is the number of counts in 5 seconds with the calibration input disabled.
$ ./bin/Automated_SelfTrig <pedestal> <board> <amp> <filename>
Parameters
- pedestal - The ADC pedestal in ADC counts
- board - The connected ADC board
- amp - The pulse amplitude in mV
- filename - The filename to save output to
Works similarly to Automated_SelfTrig.cpp, but instead just writes to file the thresholds corresponding to 50%, 75%, 90%, and 98% efficiencies. Takes Pedestal in DAC counts, board number, pulse amplitude (mV), pulse frequency (Hz), and savefile name as arguments. writes data to file in three columns: threshold (in DAC counts), noise trigger rate, cal enabled trigger rate. There will be 4 rows for each channel. Each row corresponds to the minimum threshold at which self triggering occured with 50%, 75%, 90%, or 98% efficiencies.
$ ./bin/Automated_SelfTrig_Cutoffs <pedestal> <board> <amp> <freq> <filename>
Parameters
- pedestal - The ADC pedestal in ADC counts
- board - The connected ADC board
- amp - The pulse amplitude in mV
- freq - The pulse frequency in Hz
- filename - The filename to save output to