CMS 3D CMS Logo

L1CaloEcalScale.h
Go to the documentation of this file.
1 #ifndef L1TObjects_L1CaloEcalScale_h
2 #define L1TObjects_L1CaloEcalScale_h
3 // -*- C++ -*-
4 //
5 // Package: L1TObjects
6 // Class : L1CaloEcalScale
7 //
16 //
17 // Author: Jim Brooke
18 // Created: Wed Sep 27 17:18:27 CEST 2006
19 // $Id:
20 //
21 
23 
24 #include <vector>
25 #include <ostream>
26 #include <cstdint>
27 
29 public:
30  // static const unsigned short nBinRank = 0xff;
31  static const unsigned short nBinRank = 1 << 8;
32  static const unsigned short nBinEta = 28; // per half, eta index is 1-28
33 
35  L1CaloEcalScale(double lsb = 1.0);
36 
39 
40  // eta = |eta|
41  // etaSign = +1 or -1
42 
44  void setBin(unsigned short rank,
45  unsigned short eta, // input eta index is 1-28
46  short etaSign,
47  double et);
48 
50  uint16_t rank(double et,
51  unsigned short eta, // input eta index is 1-28
52  short etaSign) const;
53 
55  double et(unsigned short rank,
56  unsigned short eta, // input eta index is 1-28
57  short etaSign) const;
58 
59  void print(std::ostream& s) const;
60 
61 private:
63  // First nBinEta eta bins for positive eta, second nBinEta bins for negative
64  double m_scale[nBinRank][2 * nBinEta];
65 
67 };
68 
69 #endif
L1CaloEcalScale(double lsb=1.0)
constructor (creates a linear scale with an LSB - no LSB gives identity)
double et(unsigned short rank, unsigned short eta, short etaSign) const
convert from rank to physically meaningful quantity
void setBin(unsigned short rank, unsigned short eta, short etaSign, double et)
set scale element; use this to create non-linear scales
double m_scale[nBinRank][2 *nBinEta]
thresholds associated with rank scale in GeV
uint16_t rank(double et, unsigned short eta, short etaSign) const
convert from physical Et in GeV to rank scale
#define COND_SERIALIZABLE
Definition: Serializable.h:39
static const unsigned short nBinRank
static const unsigned short nBinEta
~L1CaloEcalScale()
destructor
void print(std::ostream &s) const