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
L1CaloEtScale::~L1CaloEtScale
~L1CaloEtScale()
Definition: L1CaloEtScale.cc:49
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
L1CaloEtScale::m_linearLsb
double m_linearLsb
LSB of linear scale in GeV.
Definition: L1CaloEtScale.h:78
L1CaloEtScale::rankScaleMax
unsigned rankScaleMax() const
Definition: L1CaloEtScale.h:51
alignCSCRings.s
s
Definition: alignCSCRings.py:92
operator<<
std::ostream & operator<<(std::ostream &os, const L1CaloEtScale onj)
Definition: L1CaloEtScale.cc:95
L1CaloEtScale::linearLsb
double linearLsb() const
get LSB of linear input scale
Definition: L1CaloEtScale.h:54
L1CaloEtScale::m_rankScaleMax
uint16_t m_rankScaleMax
rank scale maximum
Definition: L1CaloEtScale.h:75
L1CaloEtScale::linScaleMax
unsigned linScaleMax() const
Definition: L1CaloEtScale.h:48
L1CaloEtScale::m_linScaleMax
uint16_t m_linScaleMax
linear scale maximum
Definition: L1CaloEtScale.h:72
Serializable.h
L1CaloEtScale
Definition: L1CaloEtScale.h:29
L1CaloEtScale::rank
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
Definition: L1CaloEtScale.cc:52
L1CaloEtScale::print
void print(std::ostream &s) const
Definition: L1CaloEtScale.cc:85
L1CaloEtScale::getThresholds
const std::vector< double > & getThresholds() const
get thresholds
Definition: L1CaloEtScale.h:66
linear
float linear(float x)
Definition: OccupancyPlotMacros.cc:26
L1CaloEtScale::L1CaloEtScale
L1CaloEtScale()
default constructor, for testing (out = in)
Definition: L1CaloEtScale.cc:23
L1CaloEtScale::et
double et(const uint16_t rank) const
convert from rank to physically meaningful quantity
Definition: L1CaloEtScale.cc:68
L1CaloEtScale::m_thresholds
std::vector< double > m_thresholds
thresholds associated with rank scale in GeV
Definition: L1CaloEtScale.h:81