ATLAS Offline Software
Classes | Functions | Variables
python.subdetectors.mdt Namespace Reference

Classes

class  MDT
 

Functions

def generate_mdt_mappings ()
 
def evaluator_HV (iov)
 
def evaluator_LV (iov)
 
def evaluator_JTAG (iov)
 

Variables

 MDTBA
 
 MDTBC
 
 MDTEA
 
 MDTEC
 

Function Documentation

◆ evaluator_HV()

def python.subdetectors.mdt.evaluator_HV (   iov)
Some chambers dont have a second multilayer (ML2). 
Dont flag these as bad.


Definition at line 36 of file mdt.py.

36 def evaluator_HV(iov):
37  """
38  Some chambers dont have a second multilayer (ML2).
39  Dont flag these as bad.
40  """
41  if iov.channel in range(245, 253): #Lower voltage requirement for new BIS78 chambers
42  hv = (
43  (
44  iov.fsmCurrentState_ML1 in ["ON"] and iov.v1set_ML1 >= 2730 and
45  ((iov.fsmCurrentState_ML2 in ["ON"] and iov.v1set_ML2 >= 2730) or iov.fsmCurrentState_ML2 == "")
46  )
47 
48  or
49 
50  (
51  iov.fsmCurrentState_ML1 == "STANDBY" and iov.v0set_ML1 >= 2730 and
52  iov.fsmCurrentState_ML2 == "STANDBY" and iov.v0set_ML2 >= 2730
53  )
54  )
55  else: # Original Requirement
56  hv = (
57  (
58  iov.fsmCurrentState_ML1 in ["ON"] and iov.v1set_ML1 >= 3050 and
59  ((iov.fsmCurrentState_ML2 in ["ON"] and iov.v1set_ML2 >= 3050) or iov.fsmCurrentState_ML2 == "")
60  )
61 
62  or
63 
64  (
65  iov.fsmCurrentState_ML1 == "STANDBY" and iov.v0set_ML1 >= 3050 and
66  iov.fsmCurrentState_ML2 == "STANDBY" and iov.v0set_ML2 >= 3050
67  )
68  )
69 
70  # uncomment me for debugging
71  # if not hv and "2016-05-17 01:3" in str(iov.since):
72  # try:
73  # name_to_output, hv_to_name, lv_to_name, jtag_to_name, name_to_name = generate_mdt_mappings()
74  # print "%25s %12s %12s %10.3f %10.3f | %s - %s" % (hv_to_name[iov.channel],
75  # iov.fsmCurrentState_ML1, iov.fsmCurrentState_ML2,
76  # iov.iMon_ML1, iov.iMon_ML2,
77  # iov.since, iov.until)
78  # except:
79  # pass
80 
81  return hv
82 

◆ evaluator_JTAG()

def python.subdetectors.mdt.evaluator_JTAG (   iov)

Definition at line 86 of file mdt.py.

86 def evaluator_JTAG(iov):
87  return iov.fsmCurrentState_JTAG == "INITIALIZED"
88 

◆ evaluator_LV()

def python.subdetectors.mdt.evaluator_LV (   iov)

Definition at line 83 of file mdt.py.

83 def evaluator_LV(iov):
84  return iov.fsmCurrentState_LV == "ON"
85 

◆ generate_mdt_mappings()

def python.subdetectors.mdt.generate_mdt_mappings ( )
Creates dictionaries representing the mappings
for different systems onto the chamber name.

Definition at line 11 of file mdt.py.

12  """
13  Creates dictionaries representing the mappings
14  for different systems onto the chamber name.
15  """
16  def fix_line(line):
17  if not line:
18  return None
19  hv, lv, jtag, name, output_channel = line.split()
20  return int(hv), int(lv), int(jtag), name, int(output_channel)
21 
22  mdtcodes = resource_string("DCSCalculator2.subdetectors.data", "mdt_codes.dat").decode().strip().split("\n")
23 
24 
25  lines = [line for line in [fix_line(raw_line) for raw_line in mdtcodes if raw_line] if line]
26 
27  name_to_output = make_multi_mapping((name, output_channel) for hv, lv, jtag, name, output_channel in lines)
28  hv_to_name = make_multi_mapping((hv, name) for hv, lv, jtag, name, output_channel in lines)
29  lv_to_name = make_multi_mapping((lv, name) for hv, lv, jtag, name, output_channel in lines)
30  jtag_to_name = make_multi_mapping((jtag, name) for hv, lv, jtag, name, output_channel in lines)
31  name_to_name = make_multi_mapping((name, name) for hv, lv, jtag, name, output_channel in lines)
32 
33  return name_to_output, hv_to_name, lv_to_name, jtag_to_name, name_to_name
34 
35 

Variable Documentation

◆ MDTBA

python.subdetectors.mdt.MDTBA

Definition at line 9 of file mdt.py.

◆ MDTBC

python.subdetectors.mdt.MDTBC

Definition at line 9 of file mdt.py.

◆ MDTEA

python.subdetectors.mdt.MDTEA

Definition at line 9 of file mdt.py.

◆ MDTEC

python.subdetectors.mdt.MDTEC

Definition at line 9 of file mdt.py.

AtlasMcWeight::decode
double decode(number_type binnedWeight)
Convert weight from unsigned to double.
Definition: AtlasMcWeight.cxx:32
python.subdetectors.mdt.evaluator_HV
def evaluator_HV(iov)
Definition: mdt.py:36
python.subdetectors.mdt.generate_mdt_mappings
def generate_mdt_mappings()
Definition: mdt.py:11
python.subdetectors.mdt.evaluator_LV
def evaluator_LV(iov)
Definition: mdt.py:83
python.libcore.make_multi_mapping
def make_multi_mapping(iterable)
Definition: libcore.py:17
python.subdetectors.mdt.evaluator_JTAG
def evaluator_JTAG(iov)
Definition: mdt.py:86
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
Trk::split
@ split
Definition: LayerMaterialProperties.h:38