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

Change Default Mapping to be for V3 Electronics & Use DB Tools #187

Open bdorney opened 5 years ago

bdorney commented 5 years ago

Brief summary of issue

The channel to strip mapping is not presently correct for v3 electronics, and in many cases it's hard coded to v2b mapping.

Types of issue

Expected Behavior

The channel-to-strip mapping should stop defaulting to the v2b mapping but should be determined in the following way:

  1. If the user provides an external mapping file the script should use this mapping file (with the option --extChanMapping),
    • Scripts below should all have the option --extChanMapping.
  2. If an external mapping file is not provided, a DB query based on the chamber name should be determined to load the mapping, or
  3. If the chamber name is not know, the GEBType should be used to query the DB to determine the channel mapping,
  4. If the DB query fails, it should default to the HV3b_V3 mapping included in the repo:

To accomplish this I would propose the getMapping(...) function is adapted to use the db interface tools to determine the mapping.

This may require adding a function to extract the channel mapping from the DB and then getMapping(...) to use this function.

Current Behavior

anaSBitReadout.py

Here the mapping is v3 defaulted. But it is hard coded for HV3b_V1, V2, or V4 hybrids:

https://github.com/cms-gem-daq-project/gem-plotting-tools/blob/78c88741fbe292f37476c79ffad108a137c1aa27/anaSBitReadout.py#L97-L102

anaUltraScurve.py

Here an external mapping file can be provided but otherwise it will default to the v2b mapping:

https://github.com/cms-gem-daq-project/gem-plotting-tools/blob/78c88741fbe292f37476c79ffad108a137c1aa27/anaUltraScurve.py#L293-L298

anaUltraThreshold.py

The mapping is defaulting to the v2b mapping:

https://github.com/cms-gem-daq-project/gem-plotting-tools/blob/78c88741fbe292f37476c79ffad108a137c1aa27/anaUltraThreshold.py#L65-L70

Context (for feature requests)

The channel to strip mapping is not presented correctly for v3 detectors.

Your Environment