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 48 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.

48  {
49  switch(parameter){
50  case m_run : return "run number";
51  case m_start_time_ll : return "start time";
52  case m_stop_time_ll : return "stop time";
53  case m_start_current : return "start current [A]";
54  case m_stop_current : return "stop current [A]";
55  case m_avg_current : return "average current [A]";
56  case m_max_current : return "max current [A]";
57  case m_min_current : return "min current [A]";
58  case m_run_intervall_micros : return "run duration [#mus]";
59  case m_fedIN : return "n. FEDs";
60  case m_BField : return "B-field intensity [T]";
61  default: return "should never be here";
62  }
63  }
void RunInfoPI::reportSummaryMapPalette ( TH2 *  obj)

Definition at line 66 of file RunInfoPayloadInspectoHelper.h.

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

66  {
67 
68  static int pcol[20];
69 
70  float rgb[20][3];
71 
72  for( int i=0; i<20; i++ ) {
73  if ( i < 17 ){
74  rgb[i][0] = 0.80+0.01*i;
75  rgb[i][1] = 0.00+0.03*i;
76  rgb[i][2] = 0.00;
77  } else if ( i < 19 ) {
78  rgb[i][0] = 0.80+0.01*i;
79  rgb[i][1] = 0.00+0.03*i+0.15+0.10*(i-17);
80  rgb[i][2] = 0.00;
81  } else if ( i == 19 ){
82  rgb[i][0] = 0.00;
83  rgb[i][1] = 0.80;
84  rgb[i][2] = 0.00;
85  }
86  pcol[i] = TColor::GetColor(rgb[i][0], rgb[i][1], rgb[i][2]);
87  }
88 
89  gStyle->SetPalette(20, pcol);
90 
91  if( obj ){
92  obj->SetMinimum(-1.e-15);
93  obj->SetMaximum(+1.0);
94  obj->SetOption("colz");
95  }
96  }
def rgb(r, g, b, maximum=1.)
Definition: svgfig.py:39
float RunInfoPI::theBField ( const float  current)

Definition at line 34 of file RunInfoPayloadInspectoHelper.h.

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

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