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 37 of file mdt.py.

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

◆ evaluator_JTAG()

def python.subdetectors.mdt.evaluator_JTAG (   iov)

Definition at line 87 of file mdt.py.

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

◆ evaluator_LV()

def python.subdetectors.mdt.evaluator_LV (   iov)

Definition at line 84 of file mdt.py.

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

◆ 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 12 of file mdt.py.

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

Variable Documentation

◆ MDTBA

python.subdetectors.mdt.MDTBA

Definition at line 10 of file mdt.py.

◆ MDTBC

python.subdetectors.mdt.MDTBC

Definition at line 10 of file mdt.py.

◆ MDTEA

python.subdetectors.mdt.MDTEA

Definition at line 10 of file mdt.py.

◆ MDTEC

python.subdetectors.mdt.MDTEC

Definition at line 10 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:37
python.subdetectors.mdt.generate_mdt_mappings
def generate_mdt_mappings()
Definition: mdt.py:12
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.subdetectors.mdt.evaluator_LV
def evaluator_LV(iov)
Definition: mdt.py:84
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:87
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
Trk::split
@ split
Definition: LayerMaterialProperties.h:38