ATLAS Offline Software
tgc.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 from ..lib import DCSC_DefectTranslate_Subdetector, DCSC_Variable
4 
5 TGCEA, TGCEC = 324, 325
6 
7 def TGC_HV_state(iov):
8  return iov.fsm_currentState == "ON"
9 
11 
12  folder_base = "/TGC/DCS"
13 
14  #
15  # how to derive mapping:
16  # ----------------------
17  # from DQUtils import Databases
18  # from DQUtils.channel_mapping import get_channel_ids_names
19  # folder, database = "/TGC/DCS/PSHVCHSTATE", "COOLOFL_DCS/CONDBR2"
20  # ids, names, _ = get_channel_ids_names(Databases.get_folder(folder, database))
21  # for id, name in zip(ids, names):
22  # print id, name
23  #
24  mapping = {
25  TGCEA: list(range(3733, 5504)) + list(range(5552, 5593)) + list(range(7459, 7465)),
26  TGCEC: list(range(5593, 7362)) + list(range(7411, 7459))
27  }
28 
29  variables = [
30  DCSC_Variable("PSHVCHSTATE", TGC_HV_state),
31  # DCSC_Variable("PSHVVMON", TGC_HV_value),
32  ]
33 
34  # If you change this please consult with the Muon groups.
35  # It was decided to make it the same across CSC, MDT, RPC and TGC.
36  dead_fraction_caution = None
37  dead_fraction_bad = 0.1
38 
39  def __init__(self, *args, **kwargs):
40 
41  #kwargs['keep_dcsofl'] = True
42 
43  super(TGC, self).__init__(*args, **kwargs)
44 
45  self.translators = [TGC.color_to_defect_translator(flag, defect)
46  for flag, defect in ((TGCEA, 'MS_TGC_EA_STANDBY_HV'),
47  (TGCEC, 'MS_TGC_EC_STANDBY_HV'),
48  )]
python.subdetectors.tgc.TGC_HV_state
def TGC_HV_state(iov)
Definition: tgc.py:7
python.subdetector.DCSC_DefectTranslate_Subdetector.translators
translators
Definition: subdetector.py:541
python.variable.DCSC_Variable
Definition: variable.py:33
python.subdetectors.tgc.TGC
Definition: tgc.py:10
python.subdetector.DCSC_DefectTranslate_Subdetector
Definition: subdetector.py:532
python.subdetectors.tgc.TGC.__init__
def __init__(self, *args, **kwargs)
Definition: tgc.py:39
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38