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