CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
23 #include <boost/cstdint.hpp>
24 #include <vector>
25 #include <ostream>
26 
28 
29  public:
30 
32  L1CaloEtScale();
33 
36  L1CaloEtScale(const double linearLsbInGeV, const std::vector<double>& thresholdsInGeV);
37 
39  L1CaloEtScale(const unsigned linScaleMax, const unsigned rankScaleMax, const double linearLsbInGeV, const std::vector<double>& thresholdsInGeV);
40 
41  // destructor
43 
44  // get input scale size
45  unsigned linScaleMax() const { return m_linScaleMax; }
46 
47  // get output scale size
48  unsigned rankScaleMax() const { return m_rankScaleMax; }
49 
51  double linearLsb() const { return m_linearLsb; }
52 
54  uint16_t rank(const uint16_t linear) const;
55 
57  uint16_t rank(const double EtInGeV) const;
58 
60  double et(const uint16_t rank) const;
61 
63  const std::vector<double>& getThresholds() const { return m_thresholds; }
64 
65  void print(std::ostream& s) const;
66 
67  private:
68 
70  uint16_t m_linScaleMax;
71 
73  uint16_t m_rankScaleMax;
74 
75 
77  double m_linearLsb;
78 
80  std::vector<double> m_thresholds;
81 
82 };
83 
84 std::ostream& operator << (std::ostream& os, const L1CaloEtScale onj);
85 
86 #endif
uint16_t m_linScaleMax
linear scale maximum
Definition: L1CaloEtScale.h:70
uint16_t m_rankScaleMax
rank scale maximum
Definition: L1CaloEtScale.h:73
double m_linearLsb
LSB of linear scale in GeV.
Definition: L1CaloEtScale.h:77
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
double et(const uint16_t rank) const
convert from rank to physically meaningful quantity
double linearLsb() const
get LSB of linear input scale
Definition: L1CaloEtScale.h:51
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
void print(std::ostream &s) const
const std::vector< double > & getThresholds() const
get thresholds
Definition: L1CaloEtScale.h:63
L1CaloEtScale()
default constructor, for testing (out = in)
std::vector< double > m_thresholds
thresholds associated with rank scale in GeV
Definition: L1CaloEtScale.h:80
unsigned linScaleMax() const
Definition: L1CaloEtScale.h:45
unsigned rankScaleMax() const
Definition: L1CaloEtScale.h:48