CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1CaloHcalScale.h
Go to the documentation of this file.
1 #ifndef L1TObjects_L1CaloHcalScale_h
2 #define L1TObjects_L1CaloHcalScale_h
3 // -*- C++ -*-
4 //
5 // Package: L1TObjects
6 // Class : L1CaloHcalScale
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 <stdint.h>
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 = 32; // per half, includes HF, eta index is 1-32
35 
37  L1CaloHcalScale(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
uint16_t rank(double et, unsigned short eta, short etaSign) const
convert from physical Et in GeV to rank scale
void setBin(unsigned short rank, unsigned short eta, short etaSign, double et)
set scale element; use this to create non-linear scales
T eta() const
double et(unsigned short rank, unsigned short eta, short etaSign) const
convert from rank to physically meaningful quantity
static const unsigned short nBinRank
void print(std::ostream &s) const
double m_scale[nBinRank][2 *nBinEta]
thresholds associated with rank scale in GeV
#define COND_SERIALIZABLE
Definition: Serializable.h:37
L1CaloHcalScale(double lsb=1.0)
constructor (creates a linear scale with an LSB - no LSB gives identity)
static const unsigned short nBinEta
~L1CaloHcalScale()
destructor