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 
30  public:
31 
32  // static const unsigned short nBinRank = 0xff;
33  static const unsigned short nBinRank = 1<<8;
34  static const unsigned short nBinEta = 28; // per half, eta index is 1-28
35 
37  L1CaloEcalScale(double lsb=1.0);
38 
41 
42  // eta = |eta|
43  // etaSign = +1 or -1
44 
46  void setBin(unsigned short rank,
47  unsigned short eta, // input eta index is 1-28
48  short etaSign,
49  double et);
50 
52  uint16_t rank(double et,
53  unsigned short eta, // input eta index is 1-28
54  short etaSign) const;
55 
57  double et(unsigned short rank,
58  unsigned short eta, // input eta index is 1-28
59  short etaSign) const;
60 
61  void print(std::ostream& s) const;
62 
63  private:
64 
66  // First nBinEta eta bins for positive eta, second nBinEta bins for negative
67  double m_scale[nBinRank][2*nBinEta];
68 
69 
71 };
72 
73 #endif
L1CaloEcalScale(double lsb=1.0)
constructor (creates a linear scale with an LSB - no LSB gives identity)
void print(std::ostream &s) const
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
double et(unsigned short rank, unsigned short eta, short etaSign) const
convert from rank to physically meaningful quantity
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:38
static const unsigned short nBinRank
static const unsigned short nBinEta
~L1CaloEcalScale()
destructor