CMS 3D CMS Logo

L1GctMet.h
Go to the documentation of this file.
1 #ifndef L1GCTMET_H
2 #define L1GCTMET_H
3 
16 
17 class L1CaloEtScale;
18 class L1GctHtMissLut;
19 
20 class L1GctMet {
21 public:
23 
27 
28  struct etmiss_vec {
31  };
32 
33  L1GctMet(const unsigned ex = 0, const unsigned ey = 0, const metAlgoType algo = cordicTranslate);
35  ~L1GctMet();
36 
37  // return the missing Et as (magnitude, angle)
38  etmiss_vec metVector() const;
39 
40  // set and get the components
41  void setComponents(const unsigned ex, const unsigned ey) {
42  setExComponent(ex);
43  setEyComponent(ey);
44  }
45  void setComponents(const etComponentType& ex, const etComponentType& ey) {
46  setExComponent(ex);
47  setEyComponent(ey);
48  }
49  void setExComponent(const unsigned ex);
50  void setEyComponent(const unsigned ey);
51  void setExComponent(const etComponentType& ex) { m_exComponent = ex; }
52  void setEyComponent(const etComponentType& ey) { m_eyComponent = ey; }
55 
56  // set and get the algorithm type
58  metAlgoType getAlgoType() const { return m_algoType; }
59 
60  // set and get the bit shift
61  // This parameter can be used to scale the output relative to the input
62  void setBitShift(const unsigned nbits) { m_bitShift = nbits; }
63  unsigned getBitShift() const { return m_bitShift; }
64 
65  // get the LUT (used by L1GctPrintLuts)
66  const L1GctHtMissLut* getHtMissLut() const { return m_htMissLut; }
67 
68  // set and get the LUT parameters
69  void setEtScale(const L1CaloEtScale* const fn);
70  void setEtComponentLsb(const double lsb);
71 
72  const L1CaloEtScale* etScale() const;
73  const double componentLsb() const;
74 
75 private:
77 
78  struct etmiss_internal {
79  unsigned mag;
80  unsigned phi;
81  };
82 
85  const bool inputOverFlow() const;
86 
90  unsigned short m_bitShift;
91 
93 
94  etmiss_internal cordicTranslateAlgo(const int ex, const int ey, const bool of) const;
95  etmiss_internal useHtMissLutAlgo(const int ex, const int ey, const bool of) const;
96  etmiss_internal oldGctAlgo(const int ex, const int ey) const;
97  etmiss_internal floatingPointAlgo(const int ex, const int ey) const;
98 
99  int cordicShiftAndRoundBits(const int e, const unsigned nBits) const;
100 };
101 
102 #endif
L1GctMet::etComponentType
L1GctWheelEnergyFpga::etComponentType etComponentType
Definition: L1GctMet.h:26
L1GctMet::etmiss_internal::mag
unsigned mag
Definition: L1GctMet.h:79
L1GctMet::setComponents
void setComponents(const unsigned ex, const unsigned ey)
Definition: L1GctMet.h:41
L1GctMet::setExComponent
void setExComponent(const unsigned ex)
Definition: L1GctMet.cc:54
L1GctMet::cordicShiftAndRoundBits
int cordicShiftAndRoundBits(const int e, const unsigned nBits) const
Definition: L1GctMet.cc:148
L1GctMet::setAlgoType
void setAlgoType(const metAlgoType algo)
Definition: L1GctMet.h:57
L1GctMet::getAlgoType
metAlgoType getAlgoType() const
Definition: L1GctMet.h:58
L1GctMet::setEyComponent
void setEyComponent(const etComponentType &ey)
Definition: L1GctMet.h:52
L1GctMet::m_eyComponent
etComponentType m_eyComponent
Definition: L1GctMet.h:88
L1GctMet::componentLsb
const double componentLsb() const
Definition: L1GctMet.cc:310
L1GctMet::etComponentShift
etComponentShift
Definition: L1GctMet.h:76
L1GctMet::setBitShift
void setBitShift(const unsigned nbits)
Definition: L1GctMet.h:62
hgcalVFEProducer_cfi.lsb
lsb
Definition: hgcalVFEProducer_cfi.py:80
L1GctMet::useHtMissLutAlgo
etmiss_internal useHtMissLutAlgo(const int ex, const int ey, const bool of) const
Definition: L1GctMet.cc:158
L1GctMet::m_htMissLut
L1GctHtMissLut * m_htMissLut
Definition: L1GctMet.h:92
L1GctMet::~L1GctMet
~L1GctMet()
Definition: L1GctMet.cc:13
L1GctWheelEnergyFpga.h
L1GctMet::floatingPoint
Definition: L1GctMet.h:22
cmsdt::algo
algo
Definition: constants.h:171
L1GctMet::inputOverFlow
const bool inputOverFlow() const
Definition: L1GctMet.cc:314
L1GctMet::getBitShift
unsigned getBitShift() const
Definition: L1GctMet.h:63
L1GctMet::getEyComponent
etComponentType getEyComponent() const
Definition: L1GctMet.h:54
L1GctTwosComplement< L1GctInternEtSum::kMissExOrEyNBits >
L1GctMet::etmiss_vec::mag
etMissType mag
Definition: L1GctMet.h:29
L1GctMet::etmiss_vec
Definition: L1GctMet.h:28
L1GctMet::kExOrEyMissComponentShift
Definition: L1GctMet.h:76
L1GctMet::setEyComponent
void setEyComponent(const unsigned ey)
Definition: L1GctMet.cc:59
L1GctMet::m_bitShift
unsigned short m_bitShift
Definition: L1GctMet.h:90
L1GctMet::etMissType
L1GctUnsignedInt< L1GctEtMiss::kEtMissNBits > etMissType
Definition: L1GctMet.h:24
L1GctMet::etmiss_internal::phi
unsigned phi
Definition: L1GctMet.h:80
L1CaloEtScale
Definition: L1CaloEtScale.h:29
L1GctMet::m_algoType
metAlgoType m_algoType
Definition: L1GctMet.h:89
L1GctMet::setComponents
void setComponents(const etComponentType &ex, const etComponentType &ey)
Definition: L1GctMet.h:45
L1GctMet::setEtComponentLsb
void setEtComponentLsb(const double lsb)
Definition: L1GctMet.cc:304
L1GctUnsignedInt< L1GctEtMiss::kEtMissNBits >
L1GctMet::cordicTranslateAlgo
etmiss_internal cordicTranslateAlgo(const int ex, const int ey, const bool of) const
Definition: L1GctMet.cc:66
L1GctMet::etmiss_internal
Definition: L1GctMet.h:78
L1GctMet
Stores Level-1 missing Et in (Ex, Ey) form, allowing it to be retrieved as (magnitude,...
Definition: L1GctMet.h:20
L1GctHtMissLut
LUT for conversion of Ht components x and y to magnitude and angle.
Definition: L1GctHtMissLut.h:20
L1GctMet::m_exComponent
etComponentType m_exComponent
Definition: L1GctMet.h:87
L1GctMet::cordicTranslate
Definition: L1GctMet.h:22
L1GctMet::useHtMissLut
Definition: L1GctMet.h:22
personalPlayback.fn
fn
Definition: personalPlayback.py:515
L1GctMet::etmiss_vec::phi
etMissPhiType phi
Definition: L1GctMet.h:30
L1GctMet::setEtScale
void setEtScale(const L1CaloEtScale *const fn)
Definition: L1GctMet.cc:302
L1GctMet::L1GctMet
L1GctMet(const unsigned ex=0, const unsigned ey=0, const metAlgoType algo=cordicTranslate)
Definition: L1GctMet.cc:7
L1GctMet::setExComponent
void setExComponent(const etComponentType &ex)
Definition: L1GctMet.h:51
L1GctMet::metAlgoType
metAlgoType
Definition: L1GctMet.h:22
L1GctMet::getHtMissLut
const L1GctHtMissLut * getHtMissLut() const
Definition: L1GctMet.h:66
L1GctMet::etScale
const L1CaloEtScale * etScale() const
Definition: L1GctMet.cc:308
L1GctMet::etMissPhiType
L1GctUnsignedInt< L1GctEtMiss::kEtMissPhiNBits > etMissPhiType
Definition: L1GctMet.h:25
L1GctMet::oldGctAlgo
etmiss_internal oldGctAlgo(const int ex, const int ey) const
Definition: L1GctMet.cc:198
L1GctMet::oldGct
Definition: L1GctMet.h:22
L1GctMet::getExComponent
etComponentType getExComponent() const
Definition: L1GctMet.h:53
L1GctMet::floatingPointAlgo
etmiss_internal floatingPointAlgo(const int ex, const int ey) const
Definition: L1GctMet.cc:284
L1GctMet::metVector
etmiss_vec metVector() const
Definition: L1GctMet.cc:16
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37