19 m_inputLeafCards(inputLeafCards),
23 m_inputJets(MAX_JETS_IN),
24 m_rawCentralJets(MAX_JETS_IN),
25 m_rawForwardJets(MAX_JETS_IN),
26 m_rawTauJets(MAX_JETS_IN),
27 m_inputHx(MAX_LEAF_CARDS),
28 m_inputHy(MAX_LEAF_CARDS),
29 m_inputHfSums(MAX_LEAF_CARDS),
30 m_centralJets(MAX_JETS_OUT),
31 m_forwardJets(MAX_JETS_OUT),
32 m_tauJets(MAX_JETS_OUT),
43 edm::LogError(
"L1GctSetupError") <<
"L1GctWheelJetFpga has been incorrectly constructed";
52 if (m_id < 0 || m_id > 1) {
55 edm::LogWarning(
"L1GctSetupError") <<
"L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " <<
m_id
56 <<
" has been incorrectly constructed!\n"
57 <<
"ID number should be between the range of 0 to 1\n";
64 edm::LogWarning(
"L1GctSetupError") <<
"L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " <<
m_id
65 <<
" has been incorrectly constructed!\n"
68 <<
" leaf card pointers are present.\n";
76 edm::LogWarning(
"L1GctSetupError") <<
"L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " <<
m_id
77 <<
" has been incorrectly constructed!\n"
78 <<
"Leaf card pointer " <<
i <<
" has not been set!\n";
96 os <<
"===L1GctWheelJetFPGA===" << endl;
97 os <<
"ID = " << fpga.
m_id << endl;
192 for (
unsigned short iJet = 0; iJet <
MAX_JETS_OUT; ++iJet) {
215 edm::LogError(
"L1GctInputError") <<
"L1GctWheelJetFpga::setInputJet() : In WheelJetFpga ID " <<
m_id
216 <<
", inputted jet candidate " << i <<
" is outside input index range of 0 to "
224 std::vector<L1GctInternHtMiss>
result;
228 static_cast<int16_t
>(
bx -
bxMin())));
231 static_cast<int16_t
>(
bx -
bxMin())));
243 JetVector::iterator currentJet;
245 unsigned short pos = 0;
250 if (!currentJet->empty()) {
251 if (currentJet->isForward())
255 if (currentJet->isCentral())
260 if (currentJet->isTau()) {
265 <<
"Unclassified jet found by WheelJetFpga id " <<
m_id <<
". Jet details follow." << std::endl
266 << *currentJet << std::endl;
278 L1GctJetCand tempCen(0, 0, 0,
false,
false, (uint16_t)0, (uint16_t)0, bx);
279 L1GctJetCand tempTau(0, 0, 0,
true,
false, (uint16_t)0, (uint16_t)0, bx);
280 L1GctJetCand tempFwd(0, 0, 0,
false,
true, (uint16_t)0, (uint16_t)0, bx);
L1GctWheelJetFpga(int id, const std::vector< L1GctJetLeafCard * > &inputLeafCards)
id must be 0 / 1 for -ve/+ve eta halves of CMS
static const unsigned int MAX_JETS_OUT
Max of 6 jets found per jetfinder in a 2*11 search area.
void setupJetsVectors(const int16_t bx)
Initialises all the jet vectors with jets of the correct type.
static L1GctInternHtMiss emulatorMissHty(const int hty, const bool overFlow, const int16_t bx)
Named ctor for making missing Ht y component object from emulator.
htComponentType m_outputHy
void setupObjects() override
Initialise inputs with null objects for the correct bunch crossing if required.
Represents a GCT Wheel Jet FPGA.
static const unsigned int MAX_LEAF_CARDS
Max number of leaf card pointers.
bool m_verbose
Flag to control output messages.
std::vector< htComponentType > m_inputHy
std::vector< htComponentType > m_inputHx
void process() override
process the data, fill output buffers
Level-1 Trigger jet candidate.
JetVector m_inputJets
input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B...
Pipeline< htComponentType > m_outputHxPipe
int bxMin() const
Support for multiple beam crossing operation.
void fetchInput() override
get input data from sources
Log< level::Error, false > LogError
std::ostream & operator<<(std::ostream &out, const ALILine &li)
std::vector< L1GctInternHtMiss > getInternalHtMiss() const
get the Et sums in internal component format
std::vector< L1GctJetCand > JetVector
void resetPipelines() override
JetVector getSortedJets() const
ABC for a GCT trigger data processing unit.
void resetProcessor() override
Separate reset methods for the processor itself and any data stored in pipelines. ...
void storeJets(const JetVector &jets, unsigned short iLeaf, unsigned short offset)
Puts the output from a jetfinder into the correct index range of the m_inputJets array.
std::vector< hfTowerSumsType > m_inputHfSums
L1GctJetSorter * m_centralJetSorter
Jet sorters.
htComponentType m_outputHx
static L1GctInternHtMiss emulatorMissHtx(const int htx, const bool overFlow, const int16_t bx)
Named ctor for making missing Ht x component object from emulator.
Pipeline< htComponentType > m_outputHyPipe
static const int MAX_JET_FINDERS
Number of jetfinders per jet leaf card.
void setInputJet(int i, const L1GctJetCand &jet)
set input data
~L1GctWheelJetFpga() override
destructor
static const int MAX_JETS_IN
Maximum number of jets we can have as input.
static const int MAX_JETS_OUT
Max number of jets of each type we output.
JetVector m_rawForwardJets
std::vector< L1GctJetLeafCard * > m_inputLeafCards
the jet leaf cards
void reset()
reset value and overflow to zero
L1GctJetSorter * m_tauJetSorter
void setJets(JetVector &inputJets)
hfTowerSumsType m_outputHfSums
bool checkSetup() const
Check the setup, independently of how we have been constructed.
static const unsigned int MAX_JETS_PER_LEAF
Max number of jets input from each leaf card.
L1GctJetSorter * m_forwardJetSorter
Log< level::Warning, false > LogWarning
JetVector m_rawCentralJets
void classifyJets()
Classifies jets into central, forward or tau.