CMS 3D CMS Logo

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 <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 = 32; // per half, includes HF, eta index is 1-32
33 
35  L1CaloHcalScale(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
L1CaloHcalScale
Definition: L1CaloHcalScale.h:28
L1CaloHcalScale::et
double et(unsigned short rank, unsigned short eta, short etaSign) const
convert from rank to physically meaningful quantity
Definition: L1CaloHcalScale.cc:64
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
L1CaloHcalScale::nBinRank
static const unsigned short nBinRank
Definition: L1CaloHcalScale.h:31
hgcalVFEProducer_cfi.lsb
lsb
Definition: hgcalVFEProducer_cfi.py:80
L1CaloHcalScale::rank
uint16_t rank(double et, unsigned short eta, short etaSign) const
convert from physical Et in GeV to rank scale
Definition: L1CaloHcalScale.cc:45
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1CaloHcalScale::print
void print(std::ostream &s) const
Definition: L1CaloHcalScale.cc:75
PVValHelper::eta
Definition: PVValidationHelpers.h:70
L1CaloHcalScale::nBinEta
static const unsigned short nBinEta
Definition: L1CaloHcalScale.h:32
Serializable.h
L1CaloHcalScale::~L1CaloHcalScale
~L1CaloHcalScale()
destructor
Definition: L1CaloHcalScale.cc:30
L1CaloHcalScale::setBin
void setBin(unsigned short rank, unsigned short eta, short etaSign, double et)
set scale element; use this to create non-linear scales
Definition: L1CaloHcalScale.cc:33
L1CaloHcalScale::L1CaloHcalScale
L1CaloHcalScale(double lsb=1.0)
constructor (creates a linear scale with an LSB - no LSB gives identity)
Definition: L1CaloHcalScale.cc:20
L1CaloHcalScale::m_scale
double m_scale[nBinRank][2 *nBinEta]
thresholds associated with rank scale in GeV
Definition: L1CaloHcalScale.h:64