Hall C Pedestal Runs and Determining FADC Thresholds

From HallCWiki
Jump to: navigation, search


This How-To discusses the necessary steps required in order to take a pedestal run utilizing the single arm DAQ's. Furthermore, the steps required in-order to determine the appropriate FADC thresholds are discussed.

Taking Pedestal Runs

  • Ensure that both single arm DAQ's are configured with the "fadcnothr" flag, which is activated via. of the pre-scale GUI, and the configuration has been saved
    • The FADC's can either be in mode 9 or 10
  • With both arms take at least 1000 cosmic or EDTM triggers and note the run numbers

Determining the FADC thresholds

  • The following example will illustrate the necessary steps required to determine the FADC thresholds for SHMS ROC 2
  • On the SHMS side, this procedure will have to be repeated for both ROC's 2 and 4
  • On the HMS side, this procedure only has to be executed for ROC 1
  • With the pedestal runs complete, open a terminal and SSH into cdaql1
ssh cdaq@cdaql1
  • Setup the hallc-online analyzer
  • Descend into the hallc-online hcana/podd directory
cd ../hcana/podd/hana_decode/apps
  • Exectue the tstfadc_main.C script
  • Input the appropriate configurations: raw data file location, run number, number of events, spectrometer name, crate number
Enter the location of the raw CODA file (raw, raw.copiedtotape): raw
Enter a Run Number (-1 to exit): 1537 
Enter Number of Events to Analyze (-1 = All): -1
All Events in Run 1537 Will be Analayzed
Enter the Spectrometer Name (hms or shms): shms
Enter the Crate Number to be Analyzed: 2
  • If successful, the for file "fadc_data.root" will have been produced
  • In order to produce the threshold text file "thresholds.dat" one needs to execute the calc_thresh_hallc.C ROOT script
root -l ./calc_thresh_hallc.cxx
  • Input the appropriate configurations: spectrometer name, crate number, FADC mode, threshold in channels
Enter the Spectrometer Name (hms or shms): shms
Enter the Crate Number to be Analyzed: 2
Enter The Mode of The F250's: 9
Enter The Number of Channels Above Baseline the Threshold Should Be [40 (10 mV) recommended]: 40
  • A ROOT file "fadc_ped_data.root" will have been created which contains the final fits and determines the baseline values and thus the threshold values which are written to the text file "thresholds.dat"
  • Open the "thresholds.dat" file and have a sanity check the thresholds
    • Most FADC channels should have thresholds set to 400-700 channels
    • For channels set to 4095, these channels are empty
    • For ROC2 slot 14 channels 12-15 are set to 1 by default since they are fast raster FADC channels
    • For ROC4 slot 18 channels 12-15 are set to 1 by default since they are fast raster FADC channels
  • In the event that a few thresholds are set to unrealistic values, simply open the "fadc_ped_data.root" file and perform the fit manually if possible
    • If a manual fit is not possible, then a new pedestal run with more statistics is recommended

Loading the FADC Thresholds

  • In order to have the CRL's load the appropriate FADC threshold files the newly created "thresholds.dat" file must be placed in the correct location
  • SSH into cdaql3 as coda
ssh coda@cdaql3
  • Descend into the respective thresholds directory for the appropriate ROC
cd coda/config_files/SHMS/ROC02/thresholds
  • Copy the newly created "thresholds.dat" into the current working directory and tag the "thresholds.dat" file with the current date
cp hana_decode/thresholds.dat thresholds_DDMONYYYY.dat
  • Ascend one directory and symbolically link the newly created thresholds file as "thresholds.dat"
cd ../
ln -fs thresholds/thresholds_DDMONYYYY.dat thresholds.dat