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

Feature request: Sensible default for --calFile (or make sure it's provided when --VFAT3 is used) #154

Closed lmoureaux closed 5 years ago

lmoureaux commented 6 years ago

Brief summary of issue

When analyzing VFAT3 S-curves with --isVFAT3, the --calFile option is required. If it's not provided, the VFAT2 settings are used, which results in unusable output.

Types of issue

Expected Behavior

anaUltraScurve checks its inputs for consistency and provide sensible defaults for optional arguments.

Current Behavior

anaUltraScurve doesn't check that --calFile is present when --isVFAT3 is used.

Possible Solutions

  1. Check that --calFile is present when --isVFAT3 is used, or
  2. Provide sensible defaults for the VFAT3 calibration

Context (for feature requests)

See this discussion on Mattermost

Your Environment

bdorney commented 6 years ago

As discussed on Mattermost, the intended use case with vfat3 was that the --calFile would provide the exact calibration for each chip (or at least values that would approximate this). Raw DAC units view is not supported. If this is interested please see other plotting tools:

These will allow a "DAC unit" view.

lmoureaux commented 6 years ago

Please take some time to read the issue before tagging it as invalid. I don't mention raw DAC units in my description.

bdorney commented 6 years ago

Version used: as installed at ULB setup on 2018/1/10

To find this info you can execute:

% yum info \*vfatqc\* | grep "Version"
Version     : 2.1.0
% yum info \*vfatqc\* | grep "Release"
Release     : centos7.python2.7
bdorney commented 6 years ago

After further thought on this matter, the --calFile argument should be viewed as an optional argument entirely. And any script that requires calibration instead by default make a DB query to request cal_m and cal_b in question. The DB query should be made from the vfatIDs in the input file, which can be obtained via:

        # Determine vfatID
        import root_numpy as rp
        import numpy as np
        list_bNames = ['vfatN','vfatID']
        array_vfatData = rp.tree2array(tree=someGemTree, branches=list_bNames)
        array_vfatData = np.unique(array_vfatData)

Then array_vfatData['vfatID'] is what is the starting point for the DB query.

If --calFile is provided, then the DB query is not made.

This could hopefully be resolved this week at the camp.

bdorney commented 5 years ago

Superseded by https://github.com/cms-gem-daq-project/gem-plotting-tools/issues/188