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);
338 theJetLeafCards.at(
i)->getJetFinderA()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
339 theJetLeafCards.at(
i)->getJetFinderB()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
340 theJetLeafCards.at(
i)->getJetFinderC()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
470 if (emc->isolated()) {
484 unsigned crate =
region.rctCrate();
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;
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),
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
std::vector< etMissType > getEtMissColl() const
void process() override
process the data, fill output buffers
void bxReset(const int bx)
Partial reset for a new bunch crossing.
L1GctJetCandCollection getForwardJets() const
forward jet outputs to GT
void fillEmCands(const std::vector< L1CaloEmCand > &rgn)
set electrons from the RCT at the input to be processed
L1GctInternHtMissCollection getInternalHtMiss() const
L1GctEtMissCollection getEtMissCollection() const
Etmiss output to GT.
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
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.
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
std::vector< L1GctEtMiss > L1GctEtMissCollection
Represents a GCT Wheel Jet FPGA.
std::vector< L1CaloEmCand > m_allInputEmCands
static const int N_WHEEL_CARDS
Number of Wheel Cards.
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
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
std::vector< L1GctEtHad > L1GctEtHadCollection
const L1GctChannelMask * m_inputChannelMask
Input channel mask.
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
L1GctHFRingEtSumsCollection getHFRingEtSumsCollection() const
bool m_bxRangeAuto
Multiple bunch crossing operation.
Level-1 Region Calorimeter Trigger EM candidate.
JetVector getTauJets() const
get the tau jets output data
L1GctHFBitCountsCollection getHFBitCountsCollection() const
JetVector getCentralJets() const
get the central jets output data
Persistable copy of missing Et measured at Level-1.
void setJetFinderParams(const L1GctJetFinderParams *const jfpars)
~L1GlobalCaloTrigger()
dismantle the GCT
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
lutPtrVector m_jetEtCalLuts
Jet Et calibration LUT.
std::vector< etMissType > getHtMissColl() const
return output missing Ht magnitude
bool emCrateMask(unsigned crate) const
get EM masks for an RCT crate
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)
JetVector getForwardJets() const
get the forward jets output data
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
Represents the final stage of L1 jet processing.
CompareBx< L1CaloRegion > rgnBxComparator
L1GctJetCandCollection getTauJets() const
tau jet outputs to GT
void setVerbose()
control output messages
L1GctEmCandCollection getNonIsoElectrons() const
non-iso electron outputs to GT
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
void setHtMissScale(const L1CaloEtScale *const scale)
setup scale for missing Ht
unsigned getCenForJetEtaBoundary() const
std::vector< etHadType > getEtHadColl() const
return std::vector< output calibrated jet Et
unsigned rctCrate() const
get RCT crate
void fetchInput() override
get input data from sources
Persistable copy of total Et measured at Level-1.
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
void fillRegions(const std::vector< L1CaloRegion > &rgn)
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
std::vector< L1GctElectronSorter * > theIsoElectronSorters
pointers to the electron sorters
std::vector< etMissPhiType > getHtMissPhiColl() const
return output missing Ht value
Emulates the GCT global energy algorithms.
bool regionMask(unsigned ieta, unsigned iphi) const
get region masks
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)
L1GctInternJetDataCollection getInternalJets() const
all jets from jetfinders in raw format
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
CompareBx< L1CaloEmCand > emcBxComparator
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
L1GctInternEtSumCollection getInternalEtSums() const
Et sums and components in internal format.
Persistable copy of total Ht measured at Level-1.
L1GctJetCandCollection getCentralJets() const
central jet outputs to GT
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)
Log< level::Info, false > LogInfo
std::vector< L1GctHtMiss > L1GctHtMissCollection
void setJetEtCalibrationLuts(const lutPtrVector &jfluts)
setup the Jet Calibration Luts
void setBxRangeAutomatic()
process all crossings present in the input (and only those crossings)
L1GctEtHadCollection getEtHadCollection() const
Total hadronic Et output to GT.
Persistable copy of missing Et measured at Level-1.
L1GlobalCaloTrigger(const L1GctJetLeafCard::jetFinderType jfType=L1GctJetLeafCard::hardwareJetFinder, unsigned jetLeafMask=0)
construct the GCT
L1GctEmCandCollection getIsoElectrons() const
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
std::vector< L1GctInternJetData > L1GctInternJetDataCollection
std::vector< etTotalType > getEtSumColl() const
return output total scalar Et
bool setupOk() const
check setup
L1GctEtTotalCollection getEtSumCollection() const
Total Et output to GT.
std::vector< L1GctElectronSorter * > theNonIsoElectronSorters
std::vector< L1CaloRegion > m_allInputRegions
std::vector< L1GctEmCand > getOutputCands() const
return output data
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.
bool setupOk() const
check we have done all the setup
void setNextBx(const int bx)
partially clear buffers
void setNextBx(const int bxnum)
clear input data buffers and process a new bunch crossing
unsigned getCenJetEtSeedGct() const
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
void process()
process an event
unsigned getTauJetEtSeedGct() const
const L1GctJetFinderParams * m_jetFinderParams
Jetfinder parameters.
bool setupOk() const
check setup
Emulates a leaf card programmed for electron sorting.
void setVerbose()
control output messages
L1GctHtMissCollection getHtMissCollection() const
Htmiss output to GT.
std::vector< L1GctEmCand > L1GctEmCandCollection
std::vector< etMissPhiType > getEtMissPhiColl() const
return output missing Et value