test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
22  public:
23 
25 
29 
30  struct etmiss_vec {
33  };
34 
35  L1GctMet(const unsigned ex=0, const unsigned ey=0, const metAlgoType algo=cordicTranslate);
37  ~L1GctMet();
38 
39  // return the missing Et as (magnitude, angle)
40  etmiss_vec metVector() const ;
41 
42  // set and get the components
43  void setComponents(const unsigned ex, const unsigned ey) { setExComponent(ex); setEyComponent(ey); }
45  void setExComponent(const unsigned ex);
46  void setEyComponent(const unsigned ey);
47  void setExComponent(const etComponentType& ex) { m_exComponent = ex; }
48  void setEyComponent(const etComponentType& ey) { m_eyComponent = ey; }
51 
52  // set and get the algorithm type
54  metAlgoType getAlgoType() const { return m_algoType; }
55 
56  // set and get the bit shift
57  // This parameter can be used to scale the output relative to the input
58  void setBitShift(const unsigned nbits) { m_bitShift = nbits; }
59  unsigned getBitShift() const { return m_bitShift; }
60 
61  // get the LUT (used by L1GctPrintLuts)
62  const L1GctHtMissLut* getHtMissLut() const { return m_htMissLut; }
63 
64  // set and get the LUT parameters
65  void setEtScale(const L1CaloEtScale* const fn);
66  void setEtComponentLsb(const double lsb);
67 
68  const L1CaloEtScale* etScale() const;
69  const double componentLsb() const;
70  private:
71 
73 
74  struct etmiss_internal {
75  unsigned mag;
76  unsigned phi;
77  };
78 
79 
82  const bool inputOverFlow() const;
83 
87  unsigned short m_bitShift;
88 
90 
91  etmiss_internal cordicTranslateAlgo (const int ex, const int ey, const bool of) const;
92  etmiss_internal useHtMissLutAlgo (const int ex, const int ey, const bool of) const;
93  etmiss_internal oldGctAlgo (const int ex, const int ey) const;
94  etmiss_internal floatingPointAlgo (const int ex, const int ey) const;
95 
96  int cordicShiftAndRoundBits (const int e, const unsigned nBits) const;
97 };
98 
99 #endif
void setComponents(const etComponentType &ex, const etComponentType &ey)
Definition: L1GctMet.h:44
etComponentType m_exComponent
Definition: L1GctMet.h:84
void setEyComponent(const etComponentType &ey)
Definition: L1GctMet.h:48
L1GctMet(const unsigned ex=0, const unsigned ey=0, const metAlgoType algo=cordicTranslate)
Definition: L1GctMet.cc:7
~L1GctMet()
Definition: L1GctMet.cc:23
const bool inputOverFlow() const
Definition: L1GctMet.cc:340
unsigned getBitShift() const
Definition: L1GctMet.h:59
const double componentLsb() const
Definition: L1GctMet.cc:333
etMissPhiType phi
Definition: L1GctMet.h:32
etmiss_internal useHtMissLutAlgo(const int ex, const int ey, const bool of) const
Definition: L1GctMet.cc:174
LUT for conversion of Ht components x and y to magnitude and angle.
Stores Level-1 missing Et in (Ex, Ey) form, allowing it to be retrieved as (magnitude, angle)
Definition: L1GctMet.h:20
void setComponents(const unsigned ex, const unsigned ey)
Definition: L1GctMet.h:43
void setEyComponent(const unsigned ey)
Definition: L1GctMet.cc:71
void setExComponent(const unsigned ex)
Definition: L1GctMet.cc:66
etmiss_internal oldGctAlgo(const int ex, const int ey) const
Definition: L1GctMet.cc:219
void setEtScale(const L1CaloEtScale *const fn)
Definition: L1GctMet.cc:318
const L1GctHtMissLut * getHtMissLut() const
Definition: L1GctMet.h:62
int cordicShiftAndRoundBits(const int e, const unsigned nBits) const
Definition: L1GctMet.cc:161
L1GctUnsignedInt< L1GctEtMiss::kEtMissPhiNBits > etMissPhiType
Definition: L1GctMet.h:27
etComponentShift
Definition: L1GctMet.h:72
metAlgoType getAlgoType() const
Definition: L1GctMet.h:54
L1GctUnsignedInt< L1GctEtMiss::kEtMissNBits > etMissType
Definition: L1GctMet.h:26
L1GctHtMissLut * m_htMissLut
Definition: L1GctMet.h:89
etmiss_internal cordicTranslateAlgo(const int ex, const int ey, const bool of) const
Definition: L1GctMet.cc:79
void setAlgoType(const metAlgoType algo)
Definition: L1GctMet.h:53
etComponentType m_eyComponent
Definition: L1GctMet.h:85
const L1CaloEtScale * etScale() const
Definition: L1GctMet.cc:328
etComponentType getEyComponent() const
Definition: L1GctMet.h:50
etmiss_vec metVector() const
Definition: L1GctMet.cc:27
etmiss_internal floatingPointAlgo(const int ex, const int ey) const
Definition: L1GctMet.cc:297
etComponentType getExComponent() const
Definition: L1GctMet.h:49
void setExComponent(const etComponentType &ex)
Definition: L1GctMet.h:47
metAlgoType
Definition: L1GctMet.h:24
etMissType mag
Definition: L1GctMet.h:31
metAlgoType m_algoType
Definition: L1GctMet.h:86
void setBitShift(const unsigned nbits)
Definition: L1GctMet.h:58
L1GctWheelEnergyFpga::etComponentType etComponentType
Definition: L1GctMet.h:28
unsigned short m_bitShift
Definition: L1GctMet.h:87
void setEtComponentLsb(const double lsb)
Definition: L1GctMet.cc:323