16 const std::vector<L1GctJetLeafCard*>& inputLeafCards) :
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),
33 m_outputHx(0), m_outputHy(0), m_outputHfSums(),
34 m_outputHxPipe(), m_outputHyPipe()
42 edm::LogError(
"L1GctSetupError") <<
"L1GctWheelJetFpga has been incorrectly constructed";
52 if(m_id < 0 || m_id > 1)
57 <<
"L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " <<
m_id <<
" has been incorrectly constructed!\n" 58 <<
"ID number should be between the range of 0 to 1\n";
67 <<
"L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " <<
m_id <<
" has been incorrectly constructed!\n" 69 <<
" leaf card pointers are present.\n";
80 <<
"L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " <<
m_id <<
" has been incorrectly constructed!\n" 81 <<
"Leaf card pointer " <<
i <<
" has not been set!\n";
98 os <<
"===L1GctWheelJetFPGA===" << endl;
99 os <<
"ID = " << fpga.
m_id << endl;
204 for(
unsigned short iJet = 0; iJet <
MAX_JETS_OUT; ++iJet)
234 <<
"L1GctWheelJetFpga::setInputJet() : In WheelJetFpga ID " <<
m_id <<
", inputted jet candidate " 235 << i <<
" is outside input index range of 0 to " << (
MAX_JETS_IN-1) <<
"\n";
244 std::vector< L1GctInternHtMiss >
result;
245 for (
int bx=0; bx<
numOfBx(); bx++) {
248 static_cast<int16_t
> (bx-
bxMin()) ) );
251 static_cast<int16_t
> (bx-
bxMin()) ) );
266 JetVector::iterator currentJet;
268 unsigned short pos=0;
274 if (!currentJet->empty()) {
275 if(currentJet->isForward())
281 if(currentJet->isCentral())
287 if(currentJet->isTau())
295 <<
"Unclassified jet found by WheelJetFpga id " <<
m_id 296 <<
". Jet details follow." << std::endl << *currentJet << std::endl;
309 L1GctJetCand tempCen(0, 0, 0,
false,
false, (uint16_t) 0, (uint16_t) 0, bx);
310 L1GctJetCand tempTau(0, 0, 0,
true,
false, (uint16_t) 0, (uint16_t) 0, bx);
311 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
Represents a GCT Wheel Jet FPGA.
static const unsigned int MAX_LEAF_CARDS
Max number of leaf card pointers.
virtual void fetchInput()
get input data from sources
std::vector< htComponentType > m_inputHy
bool m_verbose
Flag to control output messages.
virtual void resetPipelines()
~L1GctWheelJetFpga()
destructor
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...
int bxMin() const
Support for multiple beam crossing operation.
std::vector< L1GctInternHtMiss > getInternalHtMiss() const
get the Et sums in internal component format
std::vector< L1GctJetCand > JetVector
JetVector getSortedJets() const
ABC for a GCT trigger data processing unit.
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.
L1GctJetSorter * m_centralJetSorter
Jet sorters.
Pipeline< htComponentType > m_outputHyPipe
htComponentType m_outputHx
friend std::ostream & operator<<(std::ostream &os, const L1GctWheelJetFpga &fpga)
Overload << operator.
std::vector< hfTowerSumsType > m_inputHfSums
Pipeline< htComponentType > m_outputHxPipe
static L1GctInternHtMiss emulatorMissHtx(const int htx, const bool overFlow, const int16_t bx)
Named ctor for making missing Ht x component object from emulator.
std::vector< htComponentType > m_inputHx
static const int MAX_JET_FINDERS
Number of jetfinders per jet leaf card.
void setInputJet(int i, const L1GctJetCand &jet)
set input data
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
virtual void resetProcessor()
Separate reset methods for the processor itself and any data stored in pipelines. ...
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
virtual void setupObjects()
Initialise inputs with null objects for the correct bunch crossing if required.
JetVector m_rawCentralJets
virtual void process()
process the data, fill output buffers
void classifyJets()
Classifies jets into central, forward or tau.