CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ValueAxis.h
Go to the documentation of this file.
1 #ifndef ValueAxis_h
2 #define ValueAxis_h
3 
4 /*
5  * file: ValueAxis.h
6  * Author: Viktor Khristenko
7  *
8  * Description:
9  * A wrapper around any axis that plots different value variables.
10  * No specific mapping between bins and values so far.
11  *
12  * Retrieving the bin number (for LS for instance) is hardcoded.
13  */
14 
16 
17 namespace hcaldqm
18 {
19  namespace axis
20  {
21  enum ValueType
22  {
23  fEntries = 0,
24  fEvents = 1,
26  fEnergy = 3,
27  fTime = 4,
28  fADC = 5,
29  fADC_5 = 6,
30  fADC_15 = 7,
31  fNomFC = 8,
34  fTimeTS = 11,
36  fLS = 13,
37  fEt_256 = 14,
38  fEt_128 = 15,
39  fFG = 16,
40  fRatio = 17,
41  fDigiSize = 18,
43  fRatio2 = 20,
46  fdEtRatio = 23,
47  fSumdEt = 24,
48  fTime20TS = 25,
49 
50  // for QIE 10
53 
55  };
56 
58  "Entries", "Events", "1/Events", "Energy (GeV)", "Time (ns)",
59  "ADC", "ADC", "ADC", "nom. fC", "nom. fC", "nom. fC", "Time Slice",
60  "Time Slice", "LS", "Et", "Et", "Fine Grain Bit", "Ratio",
61  "Digi Size", "Quantity", "Ratio", "Entries", "Entries",
62  "Summed dEt/Et", "Summed dEt", "Time Slice", "QIE10 ADC",
63  "QIE10 TDC"
64  };
65  double const vmin[nValueType] = {
66  0, 0, 0, 0, -50, 0, 0, 0, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5,
67  -0.5, -0.5, -0.5, 0, -0.5, -10, 0, 0, 0, -0.05, 0, -0.5, -0.5, -0.5
68  };
69  double const vmax[nValueType] = {
70  3000, 500, 1, 200, 50, 128, 5, 15, 10000, 1000, 3000, 9.5, 9.5,
71  4000.5, 255.5, 255.5, 1.5, 1.05, 10.5, 10, 2, 500, 100, 1.05, 2000,
72  9.5, 55.5, 63.5
73  };
74  int const vnbins[nValueType] = {
75  500, 100, 100, 400, 200, 128, 100, 300, 1000, 200, 600, 10,
76  200, 4000, 256, 128, 2, 200, 11, 20, 200, 500, 100, 200, 1000,10,
77  256, 64
78  };
79 
80  class ValueAxis : public Axis
81  {
82  public:
83  friend class hcaldqm::Container;
84  friend class hcaldqm::Container1D;
85  friend class hcaldqm::Container2D;
91 
92  public:
93  ValueAxis();
94  ValueAxis(AxisType type, ValueType vtype, bool log=false);
95  ValueAxis(AxisType type, ValueType vtype, int n,
96  double min, double max, std::string title, bool log=false);
97  virtual ~ValueAxis() {}
98  virtual ValueAxis* makeCopy()
99  {return new ValueAxis(_type, _vtype, _log);}
100 
101  virtual int getBin(int);
102  virtual int getBin(double);
103 
104  virtual void setBitAxisLS(TObject *o)
105  {
106  if (_vtype==fLS)
107  o->SetBit(BIT(BIT_OFFSET+BIT_AXIS_LS));
108  }
109 
110  protected:
111  virtual void _setup();
112 
114  };
115  }
116 }
117 
118 #endif
119 
120 
121 
type
Definition: HCALResponse.h:21
AxisType _type
Definition: Axis.h:111
virtual void _setup()
Definition: ValueAxis.cc:49
virtual ValueAxis * makeCopy()
Definition: ValueAxis.h:98
virtual int getBin(int)
Definition: ValueAxis.cc:27
double const vmax[nValueType]
Definition: ValueAxis.h:69
T min(T a, T b)
Definition: MathUtil.h:58
double const vmin[nValueType]
Definition: ValueAxis.h:65
std::string const vtitle[nValueType]
Definition: ValueAxis.h:57
virtual void setBitAxisLS(TObject *o)
Definition: ValueAxis.h:104
int const BIT_OFFSET
Definition: Constants.h:180
int const BIT_AXIS_LS
Definition: Constants.h:184
int const vnbins[nValueType]
Definition: ValueAxis.h:74