CMS 3D CMS Logo

L1GctGlobalHfSumAlgos.h
Go to the documentation of this file.
1 #ifndef L1GCTGLOBALHFSUMALGOS_H_
2 #define L1GCTGLOBALHFSUMALGOS_H_
3 
7 
8 #include <vector>
9 #include <map>
10 
11 class L1GctWheelJetFpga;
12 class L1GctHfLutSetup;
14 
28 public:
30 
32  L1GctGlobalHfSumAlgos(const std::vector<L1GctWheelJetFpga*>& WheelJetFpga);
34  ~L1GctGlobalHfSumAlgos() override;
35 
37  friend std::ostream& operator<<(std::ostream& os, const L1GctGlobalHfSumAlgos& fpga);
38 
40  void fetchInput() override;
41 
43  void process() override;
44 
46  std::vector<uint16_t> hfSumsOutput(const L1GctHfEtSumsLut::hfLutType type) const;
47  std::vector<unsigned> hfSumsWord() const;
48 
50  void setupLuts(const L1CaloEtScale* scale);
51 
55 
57  std::vector<double> getThresholds(const L1GctHfEtSumsLut::hfLutType type) const;
58 
63 
65  bool setupOk() const { return m_setupOk; }
66 
67 protected:
69  void resetProcessor() override;
70  void resetPipelines() override;
71 
73  void setupObjects() override {}
74 
75 private:
76  // Here are the algorithm types we get our inputs from
79 
80  // Here are the lookup tables
81  std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfBitCountsLut*> m_bitCountLuts;
82  std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfEtSumsLut*> m_etSumLuts;
83 
84  // Input data for one bunch crossing
87 
88  // Output data
89  std::map<L1GctHfEtSumsLut::hfLutType, Pipeline<uint16_t> > m_hfOutputSumsPipe;
90 
91  bool m_setupOk;
92 
93  // private methods
94  // Convert bit count value using LUT and store in the pipeline
96  // Convert et sum value using LUT and store in the pipeline
98 };
99 
100 std::ostream& operator<<(std::ostream& os, const L1GctGlobalHfSumAlgos& fpga);
101 
102 #endif /*L1GCTGLOBALHFSUMALGOS_H_*/
L1GctGlobalHfSumAlgos::hfTowerSumsType
L1GctJetFinderBase::hfTowerSumsType hfTowerSumsType
Definition: L1GctGlobalHfSumAlgos.h:29
L1GctGlobalHfSumAlgos::fetchInput
void fetchInput() override
get input data from sources; this is the standard way to provide input
Definition: L1GctGlobalHfSumAlgos.cc:104
L1GctGlobalHfSumAlgos::setupObjects
void setupObjects() override
Initialise inputs with null objects for the correct bunch crossing if required.
Definition: L1GctGlobalHfSumAlgos.h:73
L1GctHfEtSumsLut::hfLutType
hfLutType
Definition: L1GctHfEtSumsLut.h:24
L1GctGlobalHfSumAlgos
Emulates the GCT summing and packing of Hf Et sums and tower-over-threshold counts.
Definition: L1GctGlobalHfSumAlgos.h:27
HLT_FULL_cff.scale
scale
Definition: HLT_FULL_cff.py:6637
L1GctGlobalHfSumAlgos::setupOk
bool setupOk() const
check setup
Definition: L1GctGlobalHfSumAlgos.h:65
L1GctGlobalHfSumAlgos::m_etSumLuts
std::map< L1GctHfEtSumsLut::hfLutType, const L1GctHfEtSumsLut * > m_etSumLuts
Definition: L1GctGlobalHfSumAlgos.h:82
L1GctGlobalHfSumAlgos::L1GctGlobalHfSumAlgos
L1GctGlobalHfSumAlgos(const std::vector< L1GctWheelJetFpga * > &WheelJetFpga)
Constructor needs the Wheel card Fpgas set up first.
Definition: L1GctGlobalHfSumAlgos.cc:11
L1GctGlobalHfSumAlgos::resetPipelines
void resetPipelines() override
Definition: L1GctGlobalHfSumAlgos.cc:94
L1GctGlobalHfSumAlgos::~L1GctGlobalHfSumAlgos
~L1GctGlobalHfSumAlgos() override
Destructor.
Definition: L1GctGlobalHfSumAlgos.cc:53
L1GctGlobalHfSumAlgos::getThresholds
std::vector< double > getThresholds(const L1GctHfEtSumsLut::hfLutType type) const
Get thresholds.
Definition: L1GctGlobalHfSumAlgos.cc:263
L1GctHfEtSumsLut
LUT for compression of HF Et sum to output format.
Definition: L1GctHfEtSumsLut.h:20
L1GctGlobalHfSumAlgos::getMinusWheelJetFpga
L1GctWheelJetFpga * getMinusWheelJetFpga() const
provide access to input pointer, Wheel Jet Fpga 0
Definition: L1GctGlobalHfSumAlgos.h:62
L1GctGlobalHfSumAlgos::m_minusWheelJetFpga
L1GctWheelJetFpga * m_minusWheelJetFpga
Definition: L1GctGlobalHfSumAlgos.h:78
L1GctJetFinderBase.h
L1GctGlobalHfSumAlgos::setupLuts
void setupLuts(const L1CaloEtScale *scale)
Setup luts.
Definition: L1GctGlobalHfSumAlgos.cc:218
L1GctHfEtSumsLut.h
L1GctGlobalHfSumAlgos::hfSumsWord
std::vector< unsigned > hfSumsWord() const
Definition: L1GctGlobalHfSumAlgos.cc:170
L1GctGlobalHfSumAlgos::m_hfInputSumsPlusWheel
hfTowerSumsType m_hfInputSumsPlusWheel
Definition: L1GctGlobalHfSumAlgos.h:85
L1GctGlobalHfSumAlgos::resetProcessor
void resetProcessor() override
Separate reset methods for the processor itself and any data stored in pipelines.
Definition: L1GctGlobalHfSumAlgos.cc:89
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
L1GctGlobalHfSumAlgos::m_bitCountLuts
std::map< L1GctHfEtSumsLut::hfLutType, const L1GctHfBitCountsLut * > m_bitCountLuts
Definition: L1GctGlobalHfSumAlgos.h:81
L1GctGlobalHfSumAlgos::m_plusWheelJetFpga
L1GctWheelJetFpga * m_plusWheelJetFpga
Definition: L1GctGlobalHfSumAlgos.h:77
L1GctGlobalHfSumAlgos::m_hfInputSumsMinusWheel
hfTowerSumsType m_hfInputSumsMinusWheel
Definition: L1GctGlobalHfSumAlgos.h:86
L1CaloEtScale
Definition: L1CaloEtScale.h:29
value
Definition: value.py:1
L1GctWheelJetFpga
Represents a GCT Wheel Jet FPGA.
Definition: L1GctWheelJetFpga.h:29
L1GctGlobalHfSumAlgos::process
void process() override
process the data, fill output buffers
Definition: L1GctGlobalHfSumAlgos.cc:112
L1GctGlobalHfSumAlgos::operator<<
friend std::ostream & operator<<(std::ostream &os, const L1GctGlobalHfSumAlgos &fpga)
Overload << operator.
Definition: L1GctGlobalHfSumAlgos.cc:66
L1GctGlobalHfSumAlgos::getBCLut
const L1GctHfBitCountsLut * getBCLut(const L1GctHfEtSumsLut::hfLutType type) const
Get lut pointers.
Definition: L1GctGlobalHfSumAlgos.cc:244
L1GctGlobalHfSumAlgos::getPlusWheelJetFpga
L1GctWheelJetFpga * getPlusWheelJetFpga() const
provide access to input pointer, Wheel Jet Fpga 1
Definition: L1GctGlobalHfSumAlgos.h:60
L1GctGlobalHfSumAlgos::m_setupOk
bool m_setupOk
Definition: L1GctGlobalHfSumAlgos.h:91
L1GctGlobalHfSumAlgos::m_hfOutputSumsPipe
std::map< L1GctHfEtSumsLut::hfLutType, Pipeline< uint16_t > > m_hfOutputSumsPipe
Definition: L1GctGlobalHfSumAlgos.h:89
operator<<
std::ostream & operator<<(std::ostream &os, const L1GctGlobalHfSumAlgos &fpga)
Definition: L1GctGlobalHfSumAlgos.cc:66
L1GctGlobalHfSumAlgos::storeEtSum
void storeEtSum(L1GctHfEtSumsLut::hfLutType type, uint16_t value)
Definition: L1GctGlobalHfSumAlgos.cc:152
L1GctGlobalHfSumAlgos::storeBitCount
void storeBitCount(L1GctHfEtSumsLut::hfLutType type, uint16_t value)
Definition: L1GctGlobalHfSumAlgos.cc:144
L1GctJetFinderBase::hfTowerSumsType
Definition: L1GctJetFinderBase.h:73
L1GctProcessor.h
L1GctGlobalHfSumAlgos::hfSumsOutput
std::vector< uint16_t > hfSumsOutput(const L1GctHfEtSumsLut::hfLutType type) const
Access to output quantities.
Definition: L1GctGlobalHfSumAlgos.cc:160
L1GctProcessor
ABC for a GCT trigger data processing unit.
Definition: L1GctProcessor.h:22
L1GctHfBitCountsLut
LUT for compression of HF feature bit counts to output format.
Definition: L1GctHfBitCountsLut.h:19
L1GctGlobalHfSumAlgos::getESLut
const L1GctHfEtSumsLut * getESLut(const L1GctHfEtSumsLut::hfLutType type) const
Definition: L1GctGlobalHfSumAlgos.cc:253