13 m_plusWheelJetFpga(wheelJetFpga.at(1)),
14 m_minusWheelJetFpga(wheelJetFpga.at(0)),
15 m_bitCountLuts(), m_etSumLuts(),
16 m_hfInputSumsPlusWheel(),
17 m_hfInputSumsMinusWheel(),
21 if(wheelJetFpga.size() != 2)
26 <<
"L1GctGlobalHfSumAlgos::L1GctGlobalHfSumAlgos() : Global HfSum Algos has been incorrectly constructed!\n"
27 <<
"This class needs two wheel jet fpga pointers. "
28 <<
"Number of wheel jet fpga pointers present is " << wheelJetFpga.size() <<
".\n";
37 <<
"L1GctGlobalHfSumAlgos::L1GctGlobalHfSumAlgos() has been incorrectly constructed!\n"
38 <<
"Plus Wheel Jet Fpga pointer has not been set!\n";
46 <<
"L1GctGlobalHfSumAlgos::L1GctGlobalHfSumAlgos() has been incorrectly constructed!\n"
47 <<
"Minus Wheel Jet Fpga pointer has not been set!\n";
52 edm::LogError(
"L1GctSetupError") <<
"L1GctGlobalEnergyAlgos has been incorrectly constructed";
58 std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfBitCountsLut*>::const_iterator bclut =
m_bitCountLuts.begin();
63 std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfEtSumsLut*>::const_iterator eslut =
m_etSumLuts.begin();
72 os <<
"===L1GctGlobalHfSumAlgos===" << std::endl;
74 os <<
"Plus wheel inputs:" << std::endl;
80 os <<
"Minus wheel inputs:" << std::endl;
86 int bxZero = -fpga.
bxMin();
87 if (bxZero>=0 && bxZero<fpga.
numOfBx()) {
88 os <<
"Output word " << std::hex << fpga.
hfSumsWord().at(bxZero) <<
std::dec << std::endl;
104 for (
unsigned t=0;
t<nTypes; ++
t) {
153 std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfBitCountsLut*>::const_iterator bclut =
m_bitCountLuts.find(type);
161 std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfEtSumsLut*>::const_iterator eslut =
m_etSumLuts.find(type);
173 std::map<L1GctHfEtSumsLut::hfLutType, Pipeline<uint16_t> >::const_iterator
lut=
m_hfOutputSumsPipe.find(type);
184 std::vector<uint16_t> outputBits;
187 for (
unsigned bx=0; bx<outputBits.size(); bx++) { result.at(bx) |= outputBits.at(bx); }
190 for (
unsigned bx=0; bx<outputBits.size(); bx++) { result.at(bx) |= outputBits.at(bx) << 3; }
193 for (
unsigned bx=0; bx<outputBits.size(); bx++) { result.at(bx) |= outputBits.at(bx) << 6; }
196 for (
unsigned bx=0; bx<outputBits.size(); bx++) { result.at(bx) |= outputBits.at(bx) << 9; }
199 for (
unsigned bx=0; bx<outputBits.size(); bx++) { result.at(bx) |= outputBits.at(bx) << 12; }
202 for (
unsigned bx=0; bx<outputBits.size(); bx++) { result.at(bx) |= outputBits.at(bx) << 16; }
205 for (
unsigned bx=0; bx<outputBits.size(); bx++) { result.at(bx) |= outputBits.at(bx) << 19; }
208 for (
unsigned bx=0; bx<outputBits.size(); bx++) { result.at(bx) |= outputBits.at(bx) << 22; }
240 std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfBitCountsLut*>::const_iterator bclut =
m_bitCountLuts.find(type);
242 return (bclut->second);
250 std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfEtSumsLut*>::const_iterator eslut =
m_etSumLuts.find(type);
252 return (eslut->second);
261 std::vector<double>
result;
std::vector< unsigned > hfSumsWord() const
L1GctWheelJetFpga * m_minusWheelJetFpga
virtual void resetPipelines()
std::map< L1GctHfEtSumsLut::hfLutType, Pipeline< uint16_t > > m_hfOutputSumsPipe
Emulates the GCT summing and packing of Hf Et sums and tower-over-threshold counts.
~L1GctGlobalHfSumAlgos()
Destructor.
bool m_verbose
Flag to control output messages.
hfTowerSumsType m_hfInputSumsPlusWheel
L1GctGlobalHfSumAlgos(const std::vector< L1GctWheelJetFpga * > &WheelJetFpga)
Constructor needs the Wheel card Fpgas set up first.
int bxMin() const
Support for multiple beam crossing operation.
virtual void fetchInput()
get input data from sources; this is the standard way to provide input
std::ostream & operator<<(std::ostream &out, const ALILine &li)
const L1CaloEtScale * lutFunction() const
Return the Lut function.
hfTowerSumsType m_hfInputSumsMinusWheel
ABC for a GCT trigger data processing unit.
unsigned value() const
access value as unsigned
std::map< L1GctHfEtSumsLut::hfLutType, const L1GctHfEtSumsLut * > m_etSumLuts
const L1GctHfBitCountsLut * getBCLut(const L1GctHfEtSumsLut::hfLutType type) const
Get lut pointers.
const std::vector< double > & getThresholds() const
get thresholds
L1GctWheelJetFpga * m_plusWheelJetFpga
LUT for compression of HF feature bit counts to output format.
void storeEtSum(L1GctHfEtSumsLut::hfLutType type, uint16_t value)
L1GctJetCount< kHfEtSumBits > etSum0
std::vector< uint16_t > hfSumsOutput(const L1GctHfEtSumsLut::hfLutType type) const
Access to output quantities.
LUT for compression of HF Et sum to output format.
virtual void process()
process the data, fill output buffers
std::map< L1GctHfEtSumsLut::hfLutType, const L1GctHfBitCountsLut * > m_bitCountLuts
L1GctJetCount< kHfCountBits > nOverThreshold1
hfTowerSumsType getOutputHfSums() const
get the output Hf Sums
const L1GctHfEtSumsLut * getESLut(const L1GctHfEtSumsLut::hfLutType type) const
std::vector< double > getThresholds(const L1GctHfEtSumsLut::hfLutType type) const
Get thresholds.
L1GctJetCount< kHfEtSumBits > etSum1
virtual void resetProcessor()
Separate reset methods for the processor itself and any data stored in pipelines. ...
void setupLuts(const L1CaloEtScale *scale)
Setup luts.
void storeBitCount(L1GctHfEtSumsLut::hfLutType type, uint16_t value)
L1GctJetCount< kHfCountBits > nOverThreshold0