cms-gem-daq-project / gem-plotting-tools

Repository for GEM commissioning plotting tools
GNU General Public License v3.0
1 stars 26 forks source link

Update anaDACScans.py to handle files containing multiple DAC Scans #169

Closed bdorney closed 5 years ago

bdorney commented 5 years ago

Description

Rewrite of anaDACScans.py to handle multiple DAC scans in input file. Calling syntax remains the same.

Types of changes

Motivation and Context

It's really annoying to have to analyze ~10-15 different scandates and look through output information in multiple different locations.

Now input files containing multiple DAC scans can be analyzed simultaneously and output in a single location.

How Has This Been Tested?

Ran updated analysis:

% anaDACScan.py --calFileList=tmpCalFileADC.txt dacScanTest.root                                                                                
Analyzing: 'dacScanTest.root'
Loading info from input TTree
Initializing TObjects
Looping over stored events in dacScanTree
fitting DAC vs. ADC distributions
Determining nominal values for bias voltage and/or current settings
Warning: when fitting DAC CFG_BIAS_SD_I_BDIFF the fitted value, 319, is outside range the register can hold: [0,255]. It will be replaced by 255.
Warning: when fitting DAC CFG_BIAS_SD_I_BDIFF the fitted value, 301, is outside range the register can hold: [0,255]. It will be replaced by 255.
Warning: when fitting DAC CFG_BIAS_SD_I_BDIFF the fitted value, 349, is outside range the register can hold: [0,255]. It will be replaced by 255.
Warning: when fitting DAC CFG_BIAS_SD_I_BDIFF the fitted value, 341, is outside range the register can hold: [0,255]. It will be replaced by 255.
Warning: when fitting DAC CFG_BIAS_SD_I_BDIFF the fitted value, 315, is outside range the register can hold: [0,255]. It will be replaced by 255.
Warning: when fitting DAC CFG_BIAS_SD_I_BDIFF the fitted value, 340, is outside range the register can hold: [0,255]. It will be replaced by 255.
Writing output data
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_ADC_VREF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_CFD_DAC_1.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_CFD_DAC_2.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_I_BIT.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_I_BLCC.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_I_BSF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_VREF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SD_I_BDIFF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SD_I_BFCAS.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SD_I_BSF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SH_I_BDIFF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SH_I_BFCAS.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_CAL_DAC.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_HYST.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_THR_ARM_DAC.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_THR_ZCC_DAC.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_ADC_VREF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_CFD_DAC_1.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_CFD_DAC_2.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_I_BIT.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_I_BLCC.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_I_BSF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_VREF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SD_I_BDIFF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SD_I_BFCAS.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SD_I_BSF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SH_I_BDIFF.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SH_I_BFCAS.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_CAL_DAC.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_HYST.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_THR_ARM_DAC.png has been created
Info in <TCanvas::Print>: png file /data/gemelog/GE11-X-S-BARI-0010/Summary_GE11-X-S-BARI-0010_DACScan_CFG_THR_ZCC_DAC.png has been created

Analysis completed. Goodbye

Output data area now contains summary canvas's and text files:

% ll
total 3.4M
-rw-r--r--. 1 gemuser zh  85K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_CFD_DAC_1.png
-rw-r--r--. 1 gemuser zh  77K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_ADC_VREF.png
-rw-r--r--. 1 gemuser zh 123K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_I_BLCC.png
-rw-r--r--. 1 gemuser zh  84K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_I_BIT.png
-rw-r--r--. 1 gemuser zh  85K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_CFD_DAC_2.png
-rw-r--r--. 1 gemuser zh  89K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SD_I_BFCAS.png
-rw-r--r--. 1 gemuser zh  88K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SD_I_BDIFF.png
-rw-r--r--. 1 gemuser zh  83K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_VREF.png
-rw-r--r--. 1 gemuser zh  80K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_PRE_I_BSF.png
-rw-r--r--. 1 gemuser zh  90K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SH_I_BFCAS.png
-rw-r--r--. 1 gemuser zh  88K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SH_I_BDIFF.png
-rw-r--r--. 1 gemuser zh  81K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_BIAS_SD_I_BSF.png
-rw-r--r--. 1 gemuser zh  90K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_HYST.png
-rw-r--r--. 1 gemuser zh 145K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_CAL_DAC.png
-rw-r--r--. 1 gemuser zh 117K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_THR_ZCC_DAC.png
-rw-r--r--. 1 gemuser zh 117K Nov 15 22:53 Summary_GE11-X-S-BARI-0010_DACScan_CFG_THR_ARM_DAC.png
-rw-r--r--. 1 gemuser zh 1.9M Nov 15 22:53 DACFitData.root
-rw-r--r--. 1 gemuser zh  107 Nov 15 22:53 NominalValues-CFG_THR_ZCC_DAC.txt
-rw-r--r--. 1 gemuser zh  128 Nov 15 22:53 NominalValues-CFG_THR_ARM_DAC.txt
-rw-r--r--. 1 gemuser zh  105 Nov 15 22:53 NominalValues-CFG_HYST.txt
-rw-r--r--. 1 gemuser zh  113 Nov 15 22:53 NominalValues-CFG_CAL_DAC.txt
-rw-r--r--. 1 gemuser zh  151 Nov 15 22:53 NominalValues-CFG_BIAS_SH_I_BFCAS.txt
-rw-r--r--. 1 gemuser zh  151 Nov 15 22:53 NominalValues-CFG_BIAS_SH_I_BDIFF.txt
-rw-r--r--. 1 gemuser zh  128 Nov 15 22:53 NominalValues-CFG_BIAS_SD_I_BSF.txt
-rw-r--r--. 1 gemuser zh  151 Nov 15 22:53 NominalValues-CFG_BIAS_SD_I_BFCAS.txt
-rw-r--r--. 1 gemuser zh  151 Nov 15 22:53 NominalValues-CFG_BIAS_SD_I_BDIFF.txt
-rw-r--r--. 1 gemuser zh  128 Nov 15 22:53 NominalValues-CFG_BIAS_PRE_VREF.txt
-rw-r--r--. 1 gemuser zh  128 Nov 15 22:53 NominalValues-CFG_BIAS_PRE_I_BSF.txt
-rw-r--r--. 1 gemuser zh  128 Nov 15 22:53 NominalValues-CFG_BIAS_PRE_I_BLCC.txt
-rw-r--r--. 1 gemuser zh  151 Nov 15 22:53 NominalValues-CFG_BIAS_PRE_I_BIT.txt
-rw-r--r--. 1 gemuser zh  128 Nov 15 22:53 NominalValues-CFG_BIAS_CFD_DAC_2.txt
-rw-r--r--. 1 gemuser zh  128 Nov 15 22:53 NominalValues-CFG_BIAS_CFD_DAC_1.txt
-rw-r--r--. 1 gemuser zh  105 Nov 15 22:53 NominalValues-CFG_ADC_VREF.txt   

Screenshots (if appropriate):

Output TFile now contains all TObjects subdivided by VFAT position and DAC name:

screen shot 2018-11-15 at 23 02 40

Each TObject now shows DAC Name:

screen shot 2018-11-15 at 23 02 50 screen shot 2018-11-15 at 23 04 09

Checklist: