CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GctGlobalEnergyAlgos.h
Go to the documentation of this file.
1 #ifndef L1GCTGLOBALENERGYALGOS_H_
2 #define L1GCTGLOBALENERGYALGOS_H_
3 
7 
10 
11 
12 #include <vector>
13 
15 class L1GctWheelJetFpga;
17 
35 {
36 public:
37 
44 
45  enum maxValues {
49  };
50 
52  L1GctGlobalEnergyAlgos(std::vector<L1GctWheelEnergyFpga*> WheelFpga,
53  std::vector<L1GctWheelJetFpga*> WheelJetFpga);
56 
58  friend std::ostream& operator << (std::ostream& os, const L1GctGlobalEnergyAlgos& fpga);
59 
61  void reset();
62 
64  virtual void fetchInput();
65 
67  virtual void process();
68 
70  void setBxRange(const int firstBx, const int numberOfBx);
71 
73  void setNextBx(const int bx);
74 
76  void setInputWheelEx(unsigned wheel, int energy, bool overflow);
78  void setInputWheelEy(unsigned wheel, int energy, bool overflow);
80  void setInputWheelEt(unsigned wheel, unsigned energy, bool overflow);
82  void setInputWheelHt(unsigned wheel, unsigned energy, bool overflow);
84  void setInputWheelHx(unsigned wheel, unsigned energy, bool overflow);
85  void setInputWheelHy(unsigned wheel, unsigned energy, bool overflow);
86 
88  void setInputWheelJc(unsigned wheel, unsigned jcnum, unsigned count);
89 
100 
102  inline std::vector< etComponentType > getInputExValPlusWheel() const { return m_exValPlusPipe.contents; }
104  inline std::vector< etComponentType > getInputEyValPlusWheel() const { return m_eyValPlusPipe.contents; }
106  inline std::vector< etComponentType > getInputExVlMinusWheel() const { return m_exVlMinusPipe.contents; }
108  inline std::vector< etComponentType > getInputEyVlMinusWheel() const { return m_eyVlMinusPipe.contents; }
110  inline std::vector< etTotalType > getInputEtValPlusWheel() const { return m_etValPlusPipe.contents; }
112  inline std::vector< etHadType > getInputHtValPlusWheel() const { return m_htValPlusPipe.contents; }
114  inline std::vector< etComponentType > getInputHxValPlusWheel() const { return m_hxValPlusPipe.contents; }
115  inline std::vector< etComponentType > getInputHyValPlusWheel() const { return m_hyValPlusPipe.contents; }
117  inline std::vector< etTotalType > getInputEtVlMinusWheel() const { return m_etVlMinusPipe.contents; }
119  inline std::vector< etHadType > getInputHtVlMinusWheel() const { return m_htVlMinusPipe.contents; }
121  inline std::vector< etComponentType > getInputHxVlMinusWheel() const { return m_hxVlMinusPipe.contents; }
122  inline std::vector< etComponentType > getInputHyVlMinusWheel() const { return m_hyVlMinusPipe.contents; }
123 
126  inline std::vector< etMissType > getEtMissColl() const { return m_outputEtMiss.contents; }
128  inline std::vector< etMissPhiType > getEtMissPhiColl() const { return m_outputEtMissPhi.contents; }
130  inline std::vector< etTotalType > getEtSumColl() const { return m_outputEtSum.contents; }
132  inline std::vector< etHadType > getEtHadColl() const { return m_outputEtHad.contents; }
134  inline std::vector< etMissType > getHtMissColl() const { return m_outputHtMiss.contents; }
136  inline std::vector< etMissPhiType > getHtMissPhiColl() const { return m_outputHtMissPhi.contents; }
137 
138  void setJetFinderParams(const L1GctJetFinderParams* const jfpars);
139  void setHtMissScale(const L1CaloEtScale* const scale);
140 
141  // get the missing Ht LUT (used by L1GctPrintLuts)
143 
145  bool setupOk() const;
146 
147  protected:
149  virtual void resetProcessor();
150  virtual void resetPipelines();
151 
153  virtual void setupObjects() {}
154 
155  private:
156  // Here are the algorithm types we get our inputs from
161 
162  // Here's the class that does the Hf sums
164 
165  // Missing Et and missing Ht
168 
169  // input data
176 
183 
184  // stored copies of input data
185  Pipeline< etComponentType > m_exValPlusPipe;
186  Pipeline< etComponentType > m_eyValPlusPipe;
187  Pipeline< etTotalType > m_etValPlusPipe;
188  Pipeline< etHadType > m_htValPlusPipe;
189  Pipeline< etComponentType > m_hxValPlusPipe;
190  Pipeline< etComponentType > m_hyValPlusPipe;
191 
192  Pipeline< etComponentType > m_exVlMinusPipe;
193  Pipeline< etComponentType > m_eyVlMinusPipe;
194  Pipeline< etTotalType > m_etVlMinusPipe;
195  Pipeline< etHadType > m_htVlMinusPipe;
196  Pipeline< etComponentType > m_hxVlMinusPipe;
197  Pipeline< etComponentType > m_hyVlMinusPipe;
198 
199  // output data
200  Pipeline<etMissType> m_outputEtMiss;
201  Pipeline<etMissPhiType> m_outputEtMissPhi;
202  Pipeline<etTotalType> m_outputEtSum;
203  Pipeline<etHadType> m_outputEtHad;
204  Pipeline<etMissType> m_outputHtMiss;
205  Pipeline<etMissPhiType> m_outputHtMissPhi;
206 
207  bool m_setupOk;
208 
209 };
210 
211 std::ostream& operator << (std::ostream& os, const L1GctGlobalEnergyAlgos& fpga);
212 
213 #endif /*L1GCTGLOBALENERGYALGOS_H_*/
L1GctMet::etmiss_vec etmiss_vec
Emulates the energy summing on a GCT Wheel card.
std::vector< etMissType > getHtMissColl() const
return output missing Ht magnitude
std::vector< etTotalType > getInputEtVlMinusWheel() const
return input Et value wheel 0
bool setupOk() const
check setup
void reset()
clear internal buffers
Pipeline< etMissType > m_outputHtMiss
std::vector< etComponentType > getInputExValPlusWheel() const
return input Ex value wheel 1
friend std::ostream & operator<<(std::ostream &os, const L1GctGlobalEnergyAlgos &fpga)
Overload &lt;&lt; operator.
Represents a GCT Wheel Jet FPGA.
virtual void setupObjects()
Initialise inputs with null objects for the correct bunch crossing if required.
Emulates the GCT summing and packing of Hf Et sums and tower-over-threshold counts.
L1GctMet::etMissType etMissType
Pipeline< etTotalType > m_etVlMinusPipe
void setInputWheelEx(unsigned wheel, int energy, bool overflow)
set input Ex value per wheel (0 or 1); not used in normal operation
Pipeline< etMissPhiType > m_outputHtMissPhi
std::vector< etMissPhiType > getEtMissPhiColl() const
return output missing Et value
std::vector< etComponentType > getInputHxVlMinusWheel() const
return input Ht value wheel 0
L1GctWheelEnergyFpga * getMinusWheelFpga() const
provide access to input pointer, Wheel Energy Fpga 0
void setInputWheelHy(unsigned wheel, unsigned energy, bool overflow)
void setJetFinderParams(const L1GctJetFinderParams *const jfpars)
Pipeline< etComponentType > m_exValPlusPipe
L1GctWheelJetFpga * m_plusWheelJetFpga
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
Pipeline< etComponentType > m_eyVlMinusPipe
LUT for conversion of Ht components x and y to magnitude and angle.
virtual void process()
process the data, fill output buffers
Pipeline< etComponentType > m_hyVlMinusPipe
L1GctMet::etMissPhiType etMissPhiType
Stores Level-1 missing Et in (Ex, Ey) form, allowing it to be retrieved as (magnitude, angle)
Definition: L1GctMet.h:20
std::vector< etComponentType > getInputHyVlMinusWheel() const
void setHtMissScale(const L1CaloEtScale *const scale)
ABC for a GCT trigger data processing unit.
std::vector< etComponentType > getInputEyValPlusWheel() const
return input Ex value wheel 1
L1GctWheelEnergyFpga * getPlusWheelFpga() const
provide access to input pointer, Wheel Energy Fpga 1
Pipeline< etHadType > m_outputEtHad
std::vector< etHadType > getEtHadColl() const
return std::vector&lt; output calibrated jet Et
virtual void resetProcessor()
Separate reset methods for the processor itself and any data stored in pipelines. ...
virtual void fetchInput()
get input data from sources
std::vector< etTotalType > getInputEtValPlusWheel() const
return input Et value wheel 1
L1GctWheelEnergyFpga * m_minusWheelFpga
L1GctWheelJetFpga * getMinusWheelJetFpga() const
provide access to input pointer, Wheel Jet Fpga 0
void setInputWheelHx(unsigned wheel, unsigned energy, bool overflow)
set input Ht component values per wheel (0 or 1); not used in normal operation
const L1GctHtMissLut * getHtMissLut() const
Definition: L1GctMet.h:62
L1GctGlobalEnergyAlgos(std::vector< L1GctWheelEnergyFpga * > WheelFpga, std::vector< L1GctWheelJetFpga * > WheelJetFpga)
Constructor needs the Wheel card Fpgas set up first.
std::vector< etComponentType > getInputHxValPlusWheel() const
return input Ht component values wheel 1
L1GctGlobalHfSumAlgos * m_hfSumProcessor
std::vector< etTotalType > getEtSumColl() const
return output total scalar Et
Emulates the GCT global energy algorithms.
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
void setInputWheelHt(unsigned wheel, unsigned energy, bool overflow)
set input Ht value per wheel (0 or 1); not used in normal operation
L1GctWheelJetFpga * m_minusWheelJetFpga
void setInputWheelEy(unsigned wheel, int energy, bool overflow)
set input Ey value per wheel (0 or 1); not used in normal operation
Pipeline< etMissPhiType > m_outputEtMissPhi
Pipeline< etComponentType > m_hyValPlusPipe
std::vector< etHadType > getInputHtValPlusWheel() const
return input Ht value wheel 1
std::vector< etHadType > getInputHtVlMinusWheel() const
return input Ht value wheel 0
L1GctWheelEnergyFpga * m_plusWheelFpga
std::vector< etComponentType > getInputEyVlMinusWheel() const
return input Ey value wheel 0
std::vector< etComponentType > getInputHyValPlusWheel() const
Pipeline< etComponentType > m_eyValPlusPipe
Pipeline< etMissType > m_outputEtMiss
Pipeline< etComponentType > m_exVlMinusPipe
const L1GctHtMissLut * getHtMissLut() const
L1GctUnsignedInt< L1GctEtHad::kEtHadNBits > etHadType
void setInputWheelJc(unsigned wheel, unsigned jcnum, unsigned count)
set input jet count (number 0-11) per wheel (0 or 1); not used in normal operation ...
Pipeline< etComponentType > m_hxVlMinusPipe
std::vector< etMissPhiType > getHtMissPhiColl() const
return output missing Ht value
L1GctUnsignedInt< L1GctEtTotal::kEtTotalNBits > etTotalType
Pipeline< etHadType > m_htValPlusPipe
L1GctWheelEnergyFpga::etComponentType etComponentType
std::vector< etComponentType > getInputExVlMinusWheel() const
return input Ey value wheel 0
void setNextBx(const int bx)
partially clear buffers
Pipeline< etTotalType > m_outputEtSum
std::vector< etMissType > getEtMissColl() const
return output missing Et magnitude
Pipeline< etTotalType > m_etValPlusPipe
Pipeline< etComponentType > m_hxValPlusPipe
void setInputWheelEt(unsigned wheel, unsigned energy, bool overflow)
set input Et value per wheel (0 or 1); not used in normal operation
L1GctWheelJetFpga * getPlusWheelJetFpga() const
provide access to input pointer, Wheel Jet Fpga 1
Pipeline< etHadType > m_htVlMinusPipe