CMS 3D CMS Logo

L1CaloEtScale.h
Go to the documentation of this file.
1 #ifndef L1TObjects_L1CaloEtScale_h
2 #define L1TObjects_L1CaloEtScale_h
3 // -*- C++ -*-
4 //
5 // Package: L1TObjects
6 // Class : L1CaloEtScale
7 //
17 //
18 // Author: Jim Brooke
19 // Created: Wed Sep 27 17:18:27 CEST 2006
20 // $Id:
21 //
22 
24 
25 #include <vector>
26 #include <ostream>
27 #include <cstdint>
28 
30 public:
32  L1CaloEtScale();
33 
36  L1CaloEtScale(const double linearLsbInGeV, const std::vector<double>& thresholdsInGeV);
37 
39  L1CaloEtScale(const unsigned linScaleMax,
40  const unsigned rankScaleMax,
41  const double linearLsbInGeV,
42  const std::vector<double>& thresholdsInGeV);
43 
44  // destructor
46 
47  // get input scale size
48  unsigned linScaleMax() const { return m_linScaleMax; }
49 
50  // get output scale size
51  unsigned rankScaleMax() const { return m_rankScaleMax; }
52 
54  double linearLsb() const { return m_linearLsb; }
55 
57  uint16_t rank(const uint16_t linear) const;
58 
60  uint16_t rank(const double EtInGeV) const;
61 
63  double et(const uint16_t rank) const;
64 
66  const std::vector<double>& getThresholds() const { return m_thresholds; }
67 
68  void print(std::ostream& s) const;
69 
70 private:
72  uint16_t m_linScaleMax;
73 
75  uint16_t m_rankScaleMax;
76 
78  double m_linearLsb;
79 
81  std::vector<double> m_thresholds;
82 
84 };
85 
86 std::ostream& operator<<(std::ostream& os, const L1CaloEtScale onj);
87 
88 #endif
const std::vector< double > & getThresholds() const
get thresholds
Definition: L1CaloEtScale.h:66
uint16_t m_linScaleMax
linear scale maximum
Definition: L1CaloEtScale.h:72
uint16_t m_rankScaleMax
rank scale maximum
Definition: L1CaloEtScale.h:75
double m_linearLsb
LSB of linear scale in GeV.
Definition: L1CaloEtScale.h:78
unsigned linScaleMax() const
Definition: L1CaloEtScale.h:48
std::ostream & operator<<(std::ostream &os, const L1CaloEtScale onj)
double et(const uint16_t rank) const
convert from rank to physically meaningful quantity
L1CaloEtScale()
default constructor, for testing (out = in)
double linearLsb() const
get LSB of linear input scale
Definition: L1CaloEtScale.h:54
std::vector< double > m_thresholds
thresholds associated with rank scale in GeV
Definition: L1CaloEtScale.h:81
#define COND_SERIALIZABLE
Definition: Serializable.h:39
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
unsigned rankScaleMax() const
Definition: L1CaloEtScale.h:51
float linear(float x)
void print(std::ostream &s) const