26 : theJetLeafCards(N_JET_LEAF_CARDS),
27 theJetFinders(N_JET_LEAF_CARDS * 3),
28 theEmLeafCards(N_EM_LEAF_CARDS),
29 theIsoElectronSorters(N_EM_LEAF_CARDS * 2),
30 theNonIsoElectronSorters(N_EM_LEAF_CARDS * 2),
31 theWheelJetFpgas(N_WHEEL_CARDS),
32 theWheelEnergyFpgas(N_WHEEL_CARDS),
33 m_jetFinderParams(nullptr),
35 m_inputChannelMask(nullptr),
42 build(jfType, jetLeafMask);
112 for (
int i = 0;
i < N_JET_LEAF_CARDS * 3;
i++) {
338 theJetLeafCards.at(
i)->getJetFinderA()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
339 theJetLeafCards.at(
i)->getJetFinderB()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
340 theJetLeafCards.at(
i)->getJetFinderC()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
384 for (
int i = 0;
i < N_JET_LEAF_CARDS * 3;
i++) {
470 if (emc->isolated()) {
487 unsigned prevphi = crate % NPHI;
488 unsigned thisphi = (crate + 1) % NPHI;
489 unsigned nextphi = (crate + 2) % NPHI;
504 const unsigned et,
const unsigned ieta,
const unsigned iphi,
const bool overFlow,
const bool fineGrain) {
533 LogInfo(
"L1GlobalCaloTrigger") <<
"=== Global Calo Trigger ===" << endl;
534 LogInfo(
"L1GlobalCaloTrigger") <<
"=== START DEBUG OUTPUT ===" << endl;
536 LogInfo(
"L1GlobalCaloTrigger") << endl;
541 LogInfo(
"L1GlobalCaloTrigger") << endl;
547 LogInfo(
"L1GlobalCaloTrigger") << endl;
553 LogInfo(
"L1GlobalCaloTrigger") << endl;
559 LogInfo(
"L1GlobalCaloTrigger") << endl;
561 LogInfo(
"L1GlobalCaloTrigger") << (*theJetFinalStage);
562 LogInfo(
"L1GlobalCaloTrigger") << endl;
564 LogInfo(
"L1GlobalCaloTrigger") << (*theEnergyFinalStage);
565 LogInfo(
"L1GlobalCaloTrigger") << endl;
568 LogInfo(
"L1GlobalCaloTrigger") << ((
i == 0) ?
"Positive eta " :
"Negative eta ");
572 LogInfo(
"L1GlobalCaloTrigger") << endl;
574 LogInfo(
"L1GlobalCaloTrigger") << (*theIsoEmFinalStage);
575 LogInfo(
"L1GlobalCaloTrigger") << endl;
577 LogInfo(
"L1GlobalCaloTrigger") << (*theNonIsoEmFinalStage);
579 LogInfo(
"L1GlobalCaloTrigger") <<
"=== Global Calo Trigger ===" << endl;
580 LogInfo(
"L1GlobalCaloTrigger") <<
"=== END DEBUG OUTPUT ===" << endl;
610 allJets.insert(allJets.end(), jfJets.begin(), jfJets.end());
672 allSums.insert(allSums.end(), procSums.begin(), procSums.end());
678 allSums.insert(allSums.end(), procSums.begin(), procSums.end());
684 allSums.insert(allSums.end(), procSums.begin(), procSums.end());
697 allSums.insert(allSums.end(), procSums.begin(), procSums.end());
703 allSums.insert(allSums.end(), procSums.begin(), procSums.end());
709 allSums.insert(allSums.end(), procSums.begin(), procSums.end());
721 static_cast<int16_t>(bx),
739 static_cast<int16_t>(bx),
764 for (
int i = 0;
i < N_JET_LEAF_CARDS * 3;
i++) {
800 for (
int i = 0;
i < N_JET_LEAF_CARDS * 3;
i++) {
831 if (jetLeafMask == 0) {
840 unsigned mask = jetLeafMask;
842 if ((mask & 1) == 0) {
855 vector<L1GctJetLeafCard*> neighbours(2);
859 int nlc = (jlc + 1) % NL;
860 int mlc = (jlc + (NL - 1)) % NL;
880 vector<L1GctJetLeafCard*> wheelJetLeafCards(3);
881 vector<L1GctJetLeafCard*> wheelEnergyLeafCards(3);
886 for (
int j = 0;
j < 3;
j++) {
914 unsigned result = (((crate % 9) < 4) ? 1 : 0);
static L1GctHFRingEtSums fromGctEmulator(const int16_t bx, const uint16_t etSumPosEtaRing1, const uint16_t etSumNegEtaRing1, const uint16_t etSumPosEtaRing2, const uint16_t etSumNegEtaRing2)
named ctor for GCT emulator
Emulates the energy summing on a GCT Wheel card.
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
void reset()
complete reset of processor
L1GctJetFinderBase::lutPtrVector lutPtrVector
void process() override
process the data, fill output buffers
L1GctHFRingEtSumsCollection getHFRingEtSumsCollection() const
void bxReset(const int bx)
Partial reset for a new bunch crossing.
bool setupOk() const
check we have done all the setup
void fillEmCands(const std::vector< L1CaloEmCand > &rgn)
set electrons from the RCT at the input to be processed
L1GctJetCandCollection getTauJets() const
tau jet outputs to GT
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
bool setupOk() const
check setup
void reset()
clear internal buffers
void setupTauAlgo(const bool useImprovedAlgo, const bool ignoreVetoBitsForIsolation)
setup the tau algorithm parameters
void fetchInput() override
get input data from sources
void sortInputData()
Sort the input data by bunch crossing number.
L1GctHFBitCountsCollection getHFBitCountsCollection() const
std::vector< L1GctEtMiss > L1GctEtMissCollection
Represents a GCT Wheel Jet FPGA.
JetVector getCentralJets() const
get the central jets output data
std::vector< etMissType > getHtMissColl() const
return output missing Ht magnitude
std::vector< L1CaloEmCand > m_allInputEmCands
static const int N_WHEEL_CARDS
Number of Wheel Cards.
unsigned rctCrate() const
get RCT crate ID
Emulates the GCT summing and packing of Hf Et sums and tower-over-threshold counts.
std::vector< L1GctHFRingEtSums > L1GctHFRingEtSumsCollection
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
void fetchInput() override
get input data from sources
void setJetFinderParams(const L1GctJetFinderParams *const jfpars)
unsigned sorterNo(const L1CaloEmCand &em) const
unsigned getCenJetEtSeedGct() const
unsigned getTauJetEtSeedGct() const
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
std::vector< L1GctEtHad > L1GctEtHadCollection
const L1GctChannelMask * m_inputChannelMask
Input channel mask.
std::vector< etTotalType > getEtSumColl() const
return output total scalar Et
void setIsoEm(const L1CaloEmCand &em)
set an isolated EM candidate to be processed
std::vector< L1GctInternHtMiss > L1GctInternHtMissCollection
void process() override
process the data, fill output buffers
bool m_bxRangeAuto
Multiple bunch crossing operation.
Level-1 Region Calorimeter Trigger EM candidate.
Persistable copy of missing Et measured at Level-1.
L1GctJetCandCollection getForwardJets() const
forward jet outputs to GT
void setJetFinderParams(const L1GctJetFinderParams *const jfpars)
JetVector getForwardJets() const
get the forward jets output data
~L1GlobalCaloTrigger()
dismantle the GCT
L1GctEmCandCollection getNonIsoElectrons() const
non-iso electron outputs to GT
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
JetVector getTauJets() const
get the tau jets output data
lutPtrVector m_jetEtCalLuts
Jet Et calibration LUT.
L1GctHtMissCollection getHtMissCollection() const
Htmiss output to GT.
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
std::vector< etMissType > getEtMissColl() const
L1GctEtTotalCollection getEtSumCollection() const
Total Et output to GT.
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
std::vector< L1GctEtTotal > L1GctEtTotalCollection
void setHtMissScale(const L1CaloEtScale *const scale)
bool emCrateMask(unsigned crate) const
get EM masks for an RCT crate
bool regionMask(unsigned ieta, unsigned iphi) const
get region masks
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
Represents the final stage of L1 jet processing.
CompareBx< L1CaloRegion > rgnBxComparator
void setVerbose()
control output messages
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
void setHtMissScale(const L1CaloEtScale *const scale)
setup scale for missing Ht
std::vector< L1GctEmCand > getOutputCands() const
return output data
void fetchInput() override
get input data from sources
L1GctInternHtMissCollection getInternalHtMiss() const
Persistable copy of total Et measured at Level-1.
unsigned rctCrate() const
get RCT crate
bool setupOk() const
check setup
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
void fillRegions(const std::vector< L1CaloRegion > &rgn)
std::vector< L1GctElectronSorter * > theIsoElectronSorters
pointers to the electron sorters
Emulates the GCT global energy algorithms.
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
L1GctEtHadCollection getEtHadCollection() const
Total hadronic Et output to GT.
void process() override
process the data, fill output buffers
void setupHfSumLuts(const L1CaloEtScale *const scale)
setup Hf sum LUTs
void setBxRange(const int firstBx, const int lastBx)
L1GctJetCandCollection getCentralJets() const
central jet outputs to GT
void setNonIsoEm(const L1CaloEmCand &em)
set a non-isolated EM candidate to be processed
void bxProcess(const int bx)
Process a new bunch crossing.
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
L1GctInternJetDataCollection getInternalJets() const
all jets from jetfinders in raw format
CompareBx< L1CaloEmCand > emcBxComparator
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
Persistable copy of total Ht measured at Level-1.
void reset()
Reset internal buffers.
void setChannelMask(const L1GctChannelMask *const mask)
setup the input channel mask
void bxSetup()
Setup bunch crossing range (depending on input data)
std::vector< etMissPhiType > getHtMissPhiColl() const
return output missing Ht value
Log< level::Info, false > LogInfo
L1GctEmCandCollection getIsoElectrons() const
std::vector< L1GctHtMiss > L1GctHtMissCollection
void setJetEtCalibrationLuts(const lutPtrVector &jfluts)
setup the Jet Calibration Luts
unsigned getCenForJetEtaBoundary() const
void setBxRangeAutomatic()
process all crossings present in the input (and only those crossings)
Persistable copy of missing Et measured at Level-1.
L1GlobalCaloTrigger(const L1GctJetLeafCard::jetFinderType jfType=L1GctJetLeafCard::hardwareJetFinder, unsigned jetLeafMask=0)
construct the GCT
std::vector< etHadType > getEtHadColl() const
return std::vector< output calibrated jet Et
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
unsigned gctEta() const
get GCT eta index
std::vector< L1GctInternJetData > L1GctInternJetDataCollection
unsigned gctPhi() const
get GCT phi index
std::vector< L1GctElectronSorter * > theNonIsoElectronSorters
std::vector< L1CaloRegion > m_allInputRegions
void build(L1GctJetLeafCard::jetFinderType jfType, unsigned jetLeafMask)
instantiate the hardware & algo objects and wire up the system
A calorimeter trigger region (sum of 4x4 trigger towers)
void setRegion(const L1CaloRegion ®ion)
std::vector< L1GctInternEtSum > L1GctInternEtSumCollection
void setBxRangeSymmetric(const int numOfBx)
process crossings from (-numOfBx) to (numOfBx)
static const unsigned N_PHI
void setupLuts(const L1CaloEtScale *scale)
Setup luts.
void setNextBx(const int bx)
partially clear buffers
void setNextBx(const int bxnum)
clear input data buffers and process a new bunch crossing
std::vector< etMissPhiType > getEtMissPhiColl() const
return output missing Et value
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
static L1GctHFBitCounts fromGctEmulator(const int16_t bx, const uint16_t bitCountPosEtaRing1, const uint16_t bitCountNegEtaRing1, const uint16_t bitCountPosEtaRing2, const uint16_t bitCountNegEtaRing2)
named ctor for GCT emulator
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards
L1GctEtMissCollection getEtMissCollection() const
Etmiss output to GT.
void process()
process an event
const L1GctJetFinderParams * m_jetFinderParams
Jetfinder parameters.
Emulates a leaf card programmed for electron sorting.
void setVerbose()
control output messages
std::vector< L1GctEmCand > L1GctEmCandCollection
L1GctInternEtSumCollection getInternalEtSums() const
Et sums and components in internal format.