CMS 3D CMS Logo

Enumerations | Functions | Variables
RunInfoPI Namespace Reference

Enumerations

enum  parameters {
  m_run, m_start_time_ll, m_stop_time_ll, m_start_current,
  m_stop_current, m_avg_current, m_max_current, m_min_current,
  m_run_intervall_micros, m_fedIN, m_BField, END_OF_TYPES
}
 

Functions

std::string getStringFromTypeEnum (const parameters &parameter)
 
void reportSummaryMapPalette (TH2 *obj)
 
float theBField (const float current)
 

Variables

constexpr std::array< int, 7 > nominalCurrents {{-1, 0, 9558, 14416, 16819, 18268, 19262}}
 
constexpr std::array< float, 7 > nominalFields {{3.8, 0., 2., 3., 3.5, 3.8, 4.}}
 

Enumeration Type Documentation

◆ parameters

Enumerator
m_run 
m_start_time_ll 
m_stop_time_ll 
m_start_current 
m_stop_current 
m_avg_current 
m_max_current 
m_min_current 
m_run_intervall_micros 
m_fedIN 
m_BField 
END_OF_TYPES 

Definition at line 20 of file RunInfoPayloadInspectoHelper.h.

20  {
21  m_run, // int
22  m_start_time_ll, // long long;
23  m_stop_time_ll, // long long
24  m_start_current, // float
25  m_stop_current, // float
26  m_avg_current, // float
27  m_max_current, // float
28  m_min_current, // float
29  m_run_intervall_micros, // float
30  m_fedIN, // unsigned int
31  m_BField, // float
33  };

Function Documentation

◆ getStringFromTypeEnum()

std::string RunInfoPI::getStringFromTypeEnum ( const parameters parameter)

Definition at line 49 of file RunInfoPayloadInspectoHelper.h.

49  {
50  switch (parameter) {
51  case m_run:
52  return "run number";
53  case m_start_time_ll:
54  return "start time";
55  case m_stop_time_ll:
56  return "stop time";
57  case m_start_current:
58  return "start current [A]";
59  case m_stop_current:
60  return "stop current [A]";
61  case m_avg_current:
62  return "average current [A]";
63  case m_max_current:
64  return "max current [A]";
65  case m_min_current:
66  return "min current [A]";
68  return "run duration [#mus]";
69  case m_fedIN:
70  return "n. FEDs";
71  case m_BField:
72  return "B-field intensity [T]";
73  default:
74  return "should never be here";
75  }
76  }

References m_avg_current, m_BField, m_fedIN, m_max_current, m_min_current, m_run, m_run_intervall_micros, m_start_current, m_start_time_ll, m_stop_current, and m_stop_time_ll.

◆ reportSummaryMapPalette()

void RunInfoPI::reportSummaryMapPalette ( TH2 *  obj)

Definition at line 79 of file RunInfoPayloadInspectoHelper.h.

79  {
80  static int pcol[20];
81 
82  float rgb[20][3];
83 
84  for (int i = 0; i < 20; i++) {
85  if (i < 17) {
86  rgb[i][0] = 0.80 + 0.01 * i;
87  rgb[i][1] = 0.00 + 0.03 * i;
88  rgb[i][2] = 0.00;
89  } else if (i < 19) {
90  rgb[i][0] = 0.80 + 0.01 * i;
91  rgb[i][1] = 0.00 + 0.03 * i + 0.15 + 0.10 * (i - 17);
92  rgb[i][2] = 0.00;
93  } else if (i == 19) {
94  rgb[i][0] = 0.00;
95  rgb[i][1] = 0.80;
96  rgb[i][2] = 0.00;
97  }
98  pcol[i] = TColor::GetColor(rgb[i][0], rgb[i][1], rgb[i][2]);
99  }
100 
101  gStyle->SetPalette(20, pcol);
102 
103  if (obj) {
104  obj->SetMinimum(-1.e-15);
105  obj->SetMaximum(+1.0);
106  obj->SetOption("colz");
107  }
108  }

References MillePedeFileConverter_cfg::e, mps_fire::i, getGTfromDQMFile::obj, and svgfig::rgb().

◆ theBField()

float RunInfoPI::theBField ( const float  current)

Definition at line 36 of file RunInfoPayloadInspectoHelper.h.

36  {
37  // logic is taken from https://github.com/cms-sw/cmssw/blob/master/MagneticField/GeomBuilder/plugins/VolumeBasedMagneticFieldESProducerFromDB.cc#L156
38 
39  int i = 0;
40  for (; i < (int)nominalFields.size() - 1; i++) {
41  if (2 * current < nominalCurrents[i] + nominalCurrents[i + 1]) {
42  return nominalFields[i];
43  }
44  }
45  return nominalFields[i];
46  }

References mps_fire::i, createfilelist::int, nominalCurrents, and nominalFields.

Variable Documentation

◆ nominalCurrents

constexpr std::array<int, 7> RunInfoPI::nominalCurrents {{-1, 0, 9558, 14416, 16819, 18268, 19262}}
constexpr

◆ nominalFields

constexpr std::array<float, 7> RunInfoPI::nominalFields {{3.8, 0., 2., 3., 3.5, 3.8, 4.}}
constexpr
RunInfoPI::m_min_current
Definition: RunInfoPayloadInspectoHelper.h:28
mps_fire.i
i
Definition: mps_fire.py:355
RunInfoPI::nominalCurrents
constexpr std::array< int, 7 > nominalCurrents
Definition: RunInfoPayloadInspectoHelper.h:16
RunInfoPI::nominalFields
constexpr std::array< float, 7 > nominalFields
Definition: RunInfoPayloadInspectoHelper.h:17
RunInfoPI::m_stop_current
Definition: RunInfoPayloadInspectoHelper.h:25
RunInfoPI::m_start_current
Definition: RunInfoPayloadInspectoHelper.h:24
parameter
Definition: vlib.h:168
RunInfoPI::m_run
Definition: RunInfoPayloadInspectoHelper.h:21
RunInfoPI::m_run_intervall_micros
Definition: RunInfoPayloadInspectoHelper.h:29
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
RunInfoPI::END_OF_TYPES
Definition: RunInfoPayloadInspectoHelper.h:32
RunInfoPI::m_BField
Definition: RunInfoPayloadInspectoHelper.h:31
createfilelist.int
int
Definition: createfilelist.py:10
RunInfoPI::m_max_current
Definition: RunInfoPayloadInspectoHelper.h:27
RunInfoPI::m_avg_current
Definition: RunInfoPayloadInspectoHelper.h:26
RunInfoPI::m_fedIN
Definition: RunInfoPayloadInspectoHelper.h:30
RunInfoPI::m_start_time_ll
Definition: RunInfoPayloadInspectoHelper.h:22
svgfig.rgb
def rgb(r, g, b, maximum=1.)
Definition: svgfig.py:40
RunInfoPI::m_stop_time_ll
Definition: RunInfoPayloadInspectoHelper.h:23
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37