1 #ifndef L1GLOBALCALOTRIGGER_H_
2 #define L1GLOBALCALOTRIGGER_H_
86 void setupTauAlgo(
const bool useImprovedAlgo,
const bool ignoreVetoBitsForIsolation);
102 void setBxRange(
const int firstBx,
const int lastBx);
118 void fillRegions(
const std::vector<L1CaloRegion>& rgn);
121 void fillEmCands(
const std::vector<L1CaloEmCand>& rgn);
128 void setRegion(
const unsigned et,
const unsigned ieta,
const unsigned iphi,
129 const bool overFlow=
false,
const bool fineGrain=
true);
232 void fillEmCands(std::vector<L1CaloEmCand>::iterator& emc,
const int bx);
233 void fillRegions(std::vector<L1CaloRegion>::iterator& rgn,
const int bx);
253 return i.bx() < j.bx();
std::vector< L1GctJetLeafCard * > getJetLeafCards() const
Emulates the energy summing on a GCT Wheel card.
L1GctJetFinderBase::lutPtrVector lutPtrVector
L1GctHFRingEtSumsCollection getHFRingEtSumsCollection() const
std::vector< L1GctWheelEnergyFpga * > getWheelEnergyFpgas() const
get the Wheel Energy Fpgas
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
void setupTauAlgo(const bool useImprovedAlgo, const bool ignoreVetoBitsForIsolation)
setup the tau algorithm parameters
void sortInputData()
Sort the input data by bunch crossing number.
L1GctHFBitCountsCollection getHFBitCountsCollection() const
L1GctUnsignedInt< L1GctEtHad::kEtHadNBits > etHadType
L1GctElectronFinalSort * getNonIsoEmFinalStage() const
std::vector< L1GctEtMiss > L1GctEtMissCollection
Represents a GCT Wheel Jet FPGA.
int getFirstBx() const
accessor methods
L1GctUnsignedInt< L1GctEtMiss::kEtMissPhiNBits > etMissPhiType
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 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
bool m_bxRangeAuto
Multiple bunch crossing operation.
Level-1 Region Calorimeter Trigger EM candidate.
L1GctJetCandCollection getForwardJets() const
forward jet outputs to GT
~L1GlobalCaloTrigger()
dismantle the GCT
L1GctEmCandCollection getNonIsoElectrons() const
non-iso electron outputs to GT
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
lutPtrVector m_jetEtCalLuts
Jet Et calibration LUT.
L1GctHtMissCollection getHtMissCollection() const
Htmiss output to GT.
Bit-level emulation of the Global Calorimeter Trigger.
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
L1GctJetFinderBase::lutPtr lutPtr
Base class to allow implementation of jetFinder algorithms.
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
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
Represents the final stage of L1 jet processing.
CompareBx< L1CaloRegion > rgnBxComparator
const L1GctJetFinderParams * getJetFinderParams() const
get the jetFinder parameters
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
void setHtMissScale(const L1CaloEtScale *const scale)
setup scale for missing Ht
L1GctInternHtMissCollection getInternalHtMiss() const
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
Class that sorts electron candidates.
Emulates the GCT global energy algorithms.
L1GctEtHadCollection getEtHadCollection() const
Total hadronic Et output to GT.
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.
L1GctInternJetDataCollection getInternalJets() const
all jets from jetfinders in raw format
CompareBx< L1CaloEmCand > emcBxComparator
L1GctGlobalEnergyAlgos * getEnergyFinalStage() const
get the energy final stage
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)
L1GctEmCandCollection getIsoElectrons() const
std::vector< L1GctHtMiss > L1GctHtMissCollection
void setJetEtCalibrationLuts(const lutPtrVector &jfluts)
setup the Jet Calibration Luts
L1GctElectronFinalSort * getIsoEmFinalStage() const
get the electron final stage sorters
void setBxRangeAutomatic()
process all crossings present in the input (and only those crossings)
std::vector< L1GctWheelJetFpga * > getWheelJetFpgas() const
get the Wheel Jet FPGAs
const lutPtrVector getJetEtCalibLuts() const
get the Jet Et calibration LUT
L1GlobalCaloTrigger(const L1GctJetLeafCard::jetFinderType jfType=L1GctJetLeafCard::hardwareJetFinder, unsigned jetLeafMask=0)
construct the GCT
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
std::vector< lutPtr > lutPtrVector
std::vector< L1GctInternJetData > L1GctInternJetDataCollection
L1GctJetFinalStage * getJetFinalStage() const
get the jet final stage
std::vector< L1GctElectronSorter * > theNonIsoElectronSorters
std::vector< L1CaloRegion > m_allInputRegions
L1GctUnsignedInt< L1GctEtTotal::kEtTotalNBits > etTotalType
typedefs for energy values in fixed numbers of bits
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)
bool operator()(const T &i, const T &j) const
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
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.
L1GctUnsignedInt< L1GctEtMiss::kEtMissNBits > etMissType
std::vector< L1GctEmLeafCard * > getEmLeafCards() const
get the Jet Leaf cards
void setVerbose()
control output messages
std::vector< L1GctEmCand > L1GctEmCandCollection
L1GctInternEtSumCollection getInternalEtSums() const
Et sums and components in internal format.