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

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

Enumeration Type Documentation

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.

Function Documentation

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

Definition at line 49 of file RunInfoPayloadInspectoHelper.h.

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.

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  }
void RunInfoPI::reportSummaryMapPalette ( TH2 *  obj)

Definition at line 79 of file RunInfoPayloadInspectoHelper.h.

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

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  }
def rgb(r, g, b, maximum=1.)
Definition: svgfig.py:40
float RunInfoPI::theBField ( const float  current)

Definition at line 36 of file RunInfoPayloadInspectoHelper.h.

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

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  }
std::array< float, 7 > nominalFields
std::array< int, 7 > nominalCurrents

Variable Documentation

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