User Tools

Site Tools


itk:calibration_with_hsio

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
itk:calibration_with_hsio [2017/02/06 19:20]
dfrizzell
itk:calibration_with_hsio [2017/02/06 21:00] (current)
dfrizzell This is essentially the initial commit. Everything up to this point has been preperation.
Line 4: Line 4:
  
 https://atlaswww.hep.anl.gov/asc/wikidoc/doku.php?id=itk:hsio https://atlaswww.hep.anl.gov/asc/wikidoc/doku.php?id=itk:hsio
 +
 +The bold font indicates action items and regular text gives supplemental information.
  
 ====== Setting up Calibration GUI ====== ====== Setting up Calibration GUI ======
Line 19: Line 21:
  
   $>cd ~/daq/rce #move to rce directory   $>cd ~/daq/rce #move to rce directory
-  $>source ./scripts/setup-gen3.sh #setup environment. ALTERNATIVELY ANL can use source setupGUIandROOT.sh (if exists) to setup setup-gen3 and thisroot.sh+  $>source ./scripts/setup-gen3.sh #setup environment. ANL can use source setupGUIandROOT.sh to source setup-gen3 and thisroot.sh
   $>calibGUI #start the GUI to interface with the rce   $>calibGUI #start the GUI to interface with the rce
      
Line 27: Line 29:
 ===== Single Scan to Verify Everything is Working (Optional) ===== ===== Single Scan to Verify Everything is Working (Optional) =====
  
-**On the GUI select Save As and select a location for the log file to be saved. I simply make a directory ($>mkdir ~/daq/rce/Logs) and choose this location. The Config Root Dir should be set and then left alone once everything has been initialized (I set it to /root/pixelrce/rce). The Data Dir should be set to /root/calibData by default which is preferred. Select a Run Number which by default will automatically increment, and set a Scan Type. For this demonstration choose THRESHOLD_SCAN. On the next tab "Config HalfStave A" make sure only as many front end windows as you want are selected as "Valid" and "Included". For this example there is only one, A1-1. Select Inlink and Outlink equal to 1 and rce equal to 0 (or whatever configuration is setup in /etc/hosts).  Last and most important, select the configuration file by clicking the CHOOSE button. The default file (94-22-04_25__cern__6999.cfg) can be found in moduleconfigs/fei4bexample/configs/. Be sure the Address parameter (see below) is set appropriately. Returning to the "Scan" tab you may click Start Run.**+**On the GUI select Save As and select a location for the log file to be saved. I simply make a directory ($>mkdir ~/daq/rce/Logs) and choose this location. The Config Root Dir should be set and then left alone once everything has been initialized (I set it to /root/pixelrce/rce). The Data Dir should be set to /root/calibData by default which is preferred. Select a Run Number which by default will automatically increment, and set a Scan Type. For this demonstration choose THRESHOLD_SCAN. On the next tab "Config HalfStave A" make sure only as many front end windows as desired are selected as "Valid" and "Included". For this example there is only one included frontend, A1-1. Select Inlink and Outlink equal to 1 and rce equal to 0 (or whatever configuration is setup in /etc/hosts).  Last and most important, select the configuration file by clicking the CHOOSE button. The default file (94-22-04_25__cern__6999.cfg) can be found in moduleconfigs/fei4bexample/configs/. Be sure the Address parameter (see below) is set appropriately. Returning to the "Scan" tab you may click Start Run.** 
 + 
 +{{:itk:scans_calibgui.png?490|}} 
 +{{ :itk:stave_calibgui.png?540|}}
  
 The default configuration file, (94-22-04_25__cern__6999.cfg) is not setup for the chip geometry currently at ANL-ASC (02-06-2016). To fix this open the file and edit the 'Address' parameter from 7 to 8. Save this altered file with a new name, (ex: default.cfg). The default configuration file, (94-22-04_25__cern__6999.cfg) is not setup for the chip geometry currently at ANL-ASC (02-06-2016). To fix this open the file and edit the 'Address' parameter from 7 to 8. Save this altered file with a new name, (ex: default.cfg).
  
 To communicate with the rce you may need to add a line into the /etc/hosts file. Add the line: "192.168.3._ rce0" where the last digit is the one corresponding to your device (check arp -a) to this file.  To communicate with the rce you may need to add a line into the /etc/hosts file. Add the line: "192.168.3._ rce0" where the last digit is the one corresponding to your device (check arp -a) to this file. 
 +
 +
 +**Once the test run is complete you will be able to go into the 'Plots' tab to examine the output of the scan. The results of the scan (including .root files and any calibrated configuration files) will be saved to the Data Dir (default is ~/calibData) specified before the scan is started.**
 +
 +{{:itk:plots_calibgui.png?500 |}}
 +
 +If for example, I ran a FDAC_TUNE there would be a folder in the calibData directory 'FDAC_TUNE_#####'. Inside this folder there would be histograms made from the scan, and more importantly in the config/fei4bexample/configs folder there will be a new .cfg file that can be loaded in at the start of a new scan that will use the calibration already performed by the previous FDAC_TUNE. Ideally one would run these calibrations one after the other and tune different parts of the chip. The GUI has a feature that lets this be done automatically (see next section).
 +
 +It useful to note that the .cfg file isn't actually what gets changed during calibration. It is merely a pointer to a series of .dat files under the fei4bexample directory substructure. 
 +
 +===== Calibrations Using Primlist =====
 +In order to fully calibrate the pixel frontend chips one simply has to run a series of calibration scans each incrementally altering configuration files until the chip becomes optimally tuned as the user desires. The Primlist feature of the calibGUI does this automatically by way of loading in a file with the desired calibration scans and their parameters.
 +
 +**On the GUI select Save As and select a location for the log file to be saved. I simply make a directory ($>mkdir ~/daq/rce/Logs) and choose this location. The Config Root Dir should be set and then left alone once everything has been initialized (I set it to /root/pixelrce/rce). The Data Dir should be set to /root/calibData by default which is preferred. Select 'Load Primlist' and select a text file //anyName.pl// that you create with the following lines:**
 +
 +  DIGITAL_TEST,FEI4B
 +  DIGITAL_TEST,FEI4B,CLEARMASKS=1
 +  ANALOG_TEST,FEI4B
 +  GDAC_COARSE_FAST_TUNE,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  GDAC_FAST_TUNE,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  IF_TUNE,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  GDAC_FAST_TUNE,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  TDAC_FAST_TUNE,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  IF_TUNE,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  FDAC_TUNE,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  TDAC_FAST_TUNE,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  FDAC_TUNE,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  THRESHOLD_SCAN,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  TOT_TEST,FEI4B,THRESHOLDTARGETVALUE=3000,TOTTARGETCHARGE=16000,TOTTARGETVALUE=10
 +  NOISESCAN,FEI4B,TIMEOUTSECONDS=20
 +  NOISESCAN,FEI4B,TIMEOUTSECONDS=20
 +  NOISESCAN,FEI4B,TIMEOUTSECONDS=20
 +  NOISESCAN,FEI4B,TIMEOUTSECONDS=20
 +  
 +**On the 'Config Halfstave A' tab be sure and select 'Include' and 'Validate' for the proper ethernet connection (default = A1-1), select the proper inline,outlink, and rce numbers (default = 1,1,0 in order), and choose the starting configuration file (default is in /moduleconfigs/fei4bexample/configs , be sure to change Address 7 -> Address 8). Return to the 'Scan' tab and click start scan. The scans and tunings will be ran in order, with the parameters specified in the .pl file, and the outputs will be written to the calibData directory with the new calibrated .cfg files.**
 +
 +
 +To run further tests you may simply 'Choose' these new configuration files (in the previous case it would be helpful to choose the .cfg from the last noise scan) to run scans on the chip with the newly tuned configurations.
 +
 +Sometimes unexpected crashes of the calibserver on the rce can occur. Simply restart this server and try again. 
 +
 +The logic behind the primlist file is fairly obvious and can be manipulated and altered as the user desires different parameters, orderings, or scans. 
 +
 +**It is most instructive to run a diagnostic scan such as the THRESHOLD_SCAN on the default .cfg file, then again on the last .cfg file after the primlist has run (for example in the ~/calibData/NOISESCAN_####/config/fei4bexample/configs/ directory where #### is the last scan number). Use ROOT to compare the histograms in the two THRESHOLD_SCANs before and after to ensure everything was executed as expected. See below for example.**
 +
 +{{:itk:threshold_before_fit.png?575 |}}
 +{{ :itk:threshold_after.png?375|}}
 +
 + 
 + 
 +===== Questions, Comments, or Corrections =====
 +[email protected]
 +
  
  
  
-//Under construction// 
itk/calibration_with_hsio.1486408855.txt.gz · Last modified: 2017/02/06 19:20 by dfrizzell