test
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 
24 
25 #include <boost/cstdint.hpp>
26 #include <vector>
27 #include <ostream>
28 
30 
31  public:
32 
34  L1CaloEtScale();
35 
38  L1CaloEtScale(const double linearLsbInGeV, const std::vector<double>& thresholdsInGeV);
39 
41  L1CaloEtScale(const unsigned linScaleMax, const unsigned rankScaleMax, const double linearLsbInGeV, const std::vector<double>& thresholdsInGeV);
42 
43  // destructor
45 
46  // get input scale size
47  unsigned linScaleMax() const { return m_linScaleMax; }
48 
49  // get output scale size
50  unsigned rankScaleMax() const { return m_rankScaleMax; }
51 
53  double linearLsb() const { return m_linearLsb; }
54 
56  uint16_t rank(const uint16_t linear) const;
57 
59  uint16_t rank(const double EtInGeV) const;
60 
62  double et(const uint16_t rank) const;
63 
65  const std::vector<double>& getThresholds() const { return m_thresholds; }
66 
67  void print(std::ostream& s) const;
68 
69  private:
70 
72  uint16_t m_linScaleMax;
73 
75  uint16_t m_rankScaleMax;
76 
77 
79  double m_linearLsb;
80 
82  std::vector<double> m_thresholds;
83 
84 
86 };
87 
88 std::ostream& operator << (std::ostream& os, const L1CaloEtScale onj);
89 
90 #endif
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:79
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
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:53
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:65
L1CaloEtScale()
default constructor, for testing (out = in)
std::vector< double > m_thresholds
thresholds associated with rank scale in GeV
Definition: L1CaloEtScale.h:82
#define COND_SERIALIZABLE
Definition: Serializable.h:37
unsigned linScaleMax() const
Definition: L1CaloEtScale.h:47
float linear(float x)
unsigned rankScaleMax() const
Definition: L1CaloEtScale.h:50