CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
L1GlobalCaloTrigger Class Reference

Bit-level emulation of the Global Calorimeter Trigger. More...

#include <L1GlobalCaloTrigger.h>

Classes

struct  CompareBx
 

Public Types

typedef L1GctUnsignedInt< L1GctEtHad::kEtHadNBitsetHadType
 
typedef L1GctUnsignedInt< L1GctEtMiss::kEtMissPhiNBitsetMissPhiType
 
typedef L1GctUnsignedInt< L1GctEtMiss::kEtMissNBitsetMissType
 
typedef L1GctUnsignedInt< L1GctEtTotal::kEtTotalNBitsetTotalType
 typedefs for energy values in fixed numbers of bits More...
 
typedef L1GctJetFinderBase::lutPtr lutPtr
 
typedef L1GctJetFinderBase::lutPtrVector lutPtrVector
 

Public Member Functions

void fillEmCands (const std::vector< L1CaloEmCand > &rgn)
 set electrons from the RCT at the input to be processed More...
 
void fillRegions (const std::vector< L1CaloRegion > &rgn)
 
L1GctJetCandCollection getCentralJets () const
 central jet outputs to GT More...
 
std::vector< L1GctEmLeafCard * > getEmLeafCards () const
 get the Jet Leaf cards More...
 
L1GctGlobalEnergyAlgosgetEnergyFinalStage () const
 get the energy final stage More...
 
L1GctEtHadCollection getEtHadCollection () const
 Total hadronic Et output to GT. More...
 
L1GctEtMissCollection getEtMissCollection () const
 Etmiss output to GT. More...
 
L1GctEtTotalCollection getEtSumCollection () const
 Total Et output to GT. More...
 
int getFirstBx () const
 accessor methods More...
 
L1GctJetCandCollection getForwardJets () const
 forward jet outputs to GT More...
 
L1GctHFBitCountsCollection getHFBitCountsCollection () const
 
L1GctHFRingEtSumsCollection getHFRingEtSumsCollection () const
 
L1GctGlobalHfSumAlgosgetHfSumProcessor () const
 provide access to hf sum processor More...
 
L1GctHtMissCollection getHtMissCollection () const
 Htmiss output to GT. More...
 
L1GctInternEtSumCollection getInternalEtSums () const
 Et sums and components in internal format. More...
 
L1GctInternHtMissCollection getInternalHtMiss () const
 
L1GctInternJetDataCollection getInternalJets () const
 all jets from jetfinders in raw format More...
 
L1GctEmCandCollection getIsoElectrons () const
 
L1GctElectronFinalSortgetIsoEmFinalStage () const
 get the electron final stage sorters More...
 
const lutPtrVector getJetEtCalibLuts () const
 get the Jet Et calibration LUT More...
 
L1GctJetFinalStagegetJetFinalStage () const
 get the jet final stage More...
 
const L1GctJetFinderParamsgetJetFinderParams () const
 get the jetFinder parameters More...
 
std::vector< L1GctJetLeafCard * > getJetLeafCards () const
 
int getLastBx () const
 
L1GctEmCandCollection getNonIsoElectrons () const
 non-iso electron outputs to GT More...
 
L1GctElectronFinalSortgetNonIsoEmFinalStage () const
 
L1GctJetCandCollection getTauJets () const
 tau jet outputs to GT More...
 
int getTotalBx () const
 
std::vector< L1GctWheelEnergyFpga * > getWheelEnergyFpgas () const
 get the Wheel Energy Fpgas More...
 
std::vector< L1GctWheelJetFpga * > getWheelJetFpgas () const
 get the Wheel Jet FPGAs More...
 
 L1GlobalCaloTrigger (const L1GctJetLeafCard::jetFinderType jfType=L1GctJetLeafCard::hardwareJetFinder, unsigned jetLeafMask=0)
 construct the GCT More...
 
void print ()
 
void process ()
 process an event More...
 
void reset ()
 Reset internal buffers. More...
 
void setBxRange (const int firstBx, const int lastBx)
 
void setBxRangeAutomatic ()
 process all crossings present in the input (and only those crossings) More...
 
void setBxRangeSymmetric (const int numOfBx)
 process crossings from (-numOfBx) to (numOfBx) More...
 
void setChannelMask (const L1GctChannelMask *const mask)
 setup the input channel mask More...
 
void setHtMissScale (const L1CaloEtScale *const scale)
 setup scale for missing Ht More...
 
void setIsoEm (const L1CaloEmCand &em)
 set an isolated EM candidate to be processed More...
 
void setJetEtCalibrationLuts (const lutPtrVector &jfluts)
 setup the Jet Calibration Luts More...
 
void setJetFinderParams (const L1GctJetFinderParams *const jfpars)
 
void setNonIsoEm (const L1CaloEmCand &em)
 set a non-isolated EM candidate to be processed More...
 
void setRegion (const L1CaloRegion &region)
 
void setRegion (const unsigned et, const unsigned ieta, const unsigned iphi, const bool overFlow=false, const bool fineGrain=true)
 construct a jet region and set it at the input to be processed More...
 
void setTerse ()
 
void setupHfSumLuts (const L1CaloEtScale *const scale)
 setup Hf sum LUTs More...
 
void setupTauAlgo (const bool useImprovedAlgo, const bool ignoreVetoBitsForIsolation)
 setup the tau algorithm parameters More...
 
void setVerbose ()
 control output messages More...
 
 ~L1GlobalCaloTrigger ()
 dismantle the GCT More...
 

Static Public Attributes

static const int N_EM_LEAF_CARDS = 2
 Number of Leaf Cards configured for EM processing. More...
 
static const int N_JET_LEAF_CARDS = 6
 Number of Leaf Cards configured for jet processing. More...
 
static const int N_WHEEL_CARDS = 2
 Number of Wheel Cards. More...
 

Private Member Functions

void build (L1GctJetLeafCard::jetFinderType jfType, unsigned jetLeafMask)
 instantiate the hardware & algo objects and wire up the system More...
 
void bxProcess (const int bx)
 Process a new bunch crossing. More...
 
void bxReset (const int bx)
 Partial reset for a new bunch crossing. More...
 
void bxSetup ()
 Setup bunch crossing range (depending on input data) More...
 
void fillEmCands (std::vector< L1CaloEmCand >::iterator &emc, const int bx)
 Fill input data for a new bunch crossing. More...
 
void fillRegions (std::vector< L1CaloRegion >::iterator &rgn, const int bx)
 Private method to send one bunch crossing's worth of regions to the processors. More...
 
bool setupOk () const
 check we have done all the setup More...
 
unsigned sorterNo (const L1CaloEmCand &em) const
 
void sortInputData ()
 Sort the input data by bunch crossing number. More...
 

Private Attributes

CompareBx< L1CaloEmCandemcBxComparator
 
std::vector< L1CaloEmCandm_allInputEmCands
 
std::vector< L1CaloRegionm_allInputRegions
 
bool m_bxRangeAuto
 Multiple bunch crossing operation. More...
 
int m_bxStart
 
const L1GctChannelMaskm_inputChannelMask
 Input channel mask. More...
 
lutPtrVector m_jetEtCalLuts
 Jet Et calibration LUT. More...
 
const L1GctJetFinderParamsm_jetFinderParams
 Jetfinder parameters. More...
 
int m_numOfBx
 
CompareBx< L1CaloRegionrgnBxComparator
 
std::vector< L1GctEmLeafCard * > theEmLeafCards
 pointers to the EM Leaf cards More...
 
L1GctGlobalEnergyAlgostheEnergyFinalStage
 energy final stage algos More...
 
std::vector< L1GctElectronSorter * > theIsoElectronSorters
 pointers to the electron sorters More...
 
L1GctElectronFinalSorttheIsoEmFinalStage
 iso electron final stage sorter More...
 
L1GctJetFinalStagetheJetFinalStage
 jet final stage algo More...
 
std::vector< L1GctJetFinderBase * > theJetFinders
 pointers to the Jet Finders More...
 
std::vector< L1GctJetLeafCard * > theJetLeafCards
 pointers to the Jet Leaf cards More...
 
std::vector< L1GctElectronSorter * > theNonIsoElectronSorters
 
L1GctElectronFinalSorttheNonIsoEmFinalStage
 non-iso electron final stage sorter More...
 
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
 Wheel Card Energy Fpgas. More...
 
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
 Wheel Card Jet Fpgas. More...
 

Detailed Description

Bit-level emulation of the Global Calorimeter Trigger.

Author
Jim Brooke
Date
Feb 2006

Definition at line 44 of file L1GlobalCaloTrigger.h.

Member Typedef Documentation

◆ etHadType

Definition at line 55 of file L1GlobalCaloTrigger.h.

◆ etMissPhiType

Definition at line 57 of file L1GlobalCaloTrigger.h.

◆ etMissType

Definition at line 56 of file L1GlobalCaloTrigger.h.

◆ etTotalType

typedefs for energy values in fixed numbers of bits

Definition at line 54 of file L1GlobalCaloTrigger.h.

◆ lutPtr

Definition at line 59 of file L1GlobalCaloTrigger.h.

◆ lutPtrVector

Definition at line 60 of file L1GlobalCaloTrigger.h.

Constructor & Destructor Documentation

◆ L1GlobalCaloTrigger()

L1GlobalCaloTrigger::L1GlobalCaloTrigger ( const L1GctJetLeafCard::jetFinderType  jfType = L1GctJetLeafCard::hardwareJetFinder,
unsigned  jetLeafMask = 0 
)

construct the GCT

Definition at line 25 of file L1GlobalCaloTrigger.cc.

References build().

33  m_jetFinderParams(nullptr),
35  m_inputChannelMask(nullptr),
36  m_bxRangeAuto(true),
37  m_bxStart(0),
38  m_numOfBx(1),
41  // construct hardware
42  build(jfType, jetLeafMask);
43 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
std::vector< L1CaloEmCand > m_allInputEmCands
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
const L1GctChannelMask * m_inputChannelMask
Input channel mask.
bool m_bxRangeAuto
Multiple bunch crossing operation.
lutPtrVector m_jetEtCalLuts
Jet Et calibration LUT.
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
std::vector< L1GctElectronSorter * > theIsoElectronSorters
pointers to the electron sorters
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
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
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards
const L1GctJetFinderParams * m_jetFinderParams
Jetfinder parameters.

◆ ~L1GlobalCaloTrigger()

L1GlobalCaloTrigger::~L1GlobalCaloTrigger ( )

dismantle the GCT

GCT Destructor.

Definition at line 46 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, theEmLeafCards, theEnergyFinalStage, theIsoEmFinalStage, theJetFinalStage, theJetLeafCards, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

46  {
47  // Delete the components of the GCT that we made in build()
48  // (But not the LUTs, since these don't belong to us)
49 
50  if (theNonIsoEmFinalStage != nullptr)
51  delete theNonIsoEmFinalStage;
52 
53  if (theIsoEmFinalStage != nullptr)
54  delete theIsoEmFinalStage;
55 
56  if (theEnergyFinalStage != nullptr)
57  delete theEnergyFinalStage;
58 
59  if (theJetFinalStage != nullptr)
60  delete theJetFinalStage;
61 
62  for (unsigned i = 0; i < theWheelEnergyFpgas.size(); ++i) {
63  if (theWheelEnergyFpgas.at(i) != nullptr)
64  delete theWheelEnergyFpgas.at(i);
65  }
66  theWheelEnergyFpgas.clear();
67 
68  for (unsigned i = 0; i < theWheelJetFpgas.size(); ++i) {
69  if (theWheelJetFpgas.at(i) != nullptr)
70  delete theWheelJetFpgas.at(i);
71  }
72  theWheelJetFpgas.clear();
73 
74  for (unsigned i = 0; i < theEmLeafCards.size(); ++i) {
75  if (theEmLeafCards.at(i) != nullptr)
76  delete theEmLeafCards.at(i);
77  }
78  theEmLeafCards.clear();
79 
80  for (unsigned i = 0; i < theJetLeafCards.size(); ++i) {
81  if (theJetLeafCards.at(i) != nullptr)
82  delete theJetLeafCards.at(i);
83  }
84  theJetLeafCards.clear();
85 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards

Member Function Documentation

◆ build()

void L1GlobalCaloTrigger::build ( L1GctJetLeafCard::jetFinderType  jfType,
unsigned  jetLeafMask 
)
private

instantiate the hardware & algo objects and wire up the system

Definition at line 827 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, dqmiolumiharvest::j, N_EM_LEAF_CARDS, N_JET_LEAF_CARDS, N_WHEEL_CARDS, L1GctJetLeafCard::nullJetFinder, theEmLeafCards, theEnergyFinalStage, theIsoElectronSorters, theIsoEmFinalStage, theJetFinalStage, theJetFinders, theJetLeafCards, theNonIsoElectronSorters, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

Referenced by L1GlobalCaloTrigger().

827  {
828  // The first half of the jet leaf cards are at negative eta,
829  // followed by positive eta
830  // Jet Leaf cards
831  if (jetLeafMask == 0) {
832  for (int jlc = 0; jlc < N_JET_LEAF_CARDS; jlc++) {
833  theJetLeafCards.at(jlc) = new L1GctJetLeafCard(jlc, jlc % 3, jfType);
834  theJetFinders.at(3 * jlc) = theJetLeafCards.at(jlc)->getJetFinderA();
835  theJetFinders.at(3 * jlc + 1) = theJetLeafCards.at(jlc)->getJetFinderB();
836  theJetFinders.at(3 * jlc + 2) = theJetLeafCards.at(jlc)->getJetFinderC();
837  }
838  } else {
839  // Setup for hardware testing with reduced number of leaf cards
840  unsigned mask = jetLeafMask;
841  for (int jlc = 0; jlc < N_JET_LEAF_CARDS; jlc++) {
842  if ((mask & 1) == 0) {
843  theJetLeafCards.at(jlc) = new L1GctJetLeafCard(jlc, jlc % 3, jfType);
844  } else {
846  }
847  theJetFinders.at(3 * jlc) = theJetLeafCards.at(jlc)->getJetFinderA();
848  theJetFinders.at(3 * jlc + 1) = theJetLeafCards.at(jlc)->getJetFinderB();
849  theJetFinders.at(3 * jlc + 2) = theJetLeafCards.at(jlc)->getJetFinderC();
850  mask = mask >> 1;
851  }
852  }
853 
854  //Link jet leaf cards together
855  vector<L1GctJetLeafCard*> neighbours(2);
856  for (int jlc = 0; jlc < N_JET_LEAF_CARDS / 2; jlc++) {
857  // Define local constant for ease of typing
858  static const int NL = N_JET_LEAF_CARDS / 2;
859  int nlc = (jlc + 1) % NL;
860  int mlc = (jlc + (NL - 1)) % NL;
861  neighbours.at(0) = theJetLeafCards.at(mlc);
862  neighbours.at(1) = theJetLeafCards.at(nlc);
863  theJetLeafCards.at(jlc)->setNeighbourLeafCards(neighbours);
864  neighbours.at(0) = theJetLeafCards.at(NL + mlc);
865  neighbours.at(1) = theJetLeafCards.at(NL + nlc);
866  theJetLeafCards.at(NL + jlc)->setNeighbourLeafCards(neighbours);
867  }
868 
869  // EM leaf cards
870  // Card 0 is positive eta, card 1 is negative eta
871  for (int i = 0; i < N_EM_LEAF_CARDS; i++) {
872  theEmLeafCards.at(i) = new L1GctEmLeafCard(i);
873  theIsoElectronSorters.at(2 * i) = theEmLeafCards.at(i)->getIsoElectronSorterU1();
874  theIsoElectronSorters.at(2 * i + 1) = theEmLeafCards.at(i)->getIsoElectronSorterU2();
875  theNonIsoElectronSorters.at(2 * i) = theEmLeafCards.at(i)->getNonIsoElectronSorterU1();
876  theNonIsoElectronSorters.at(2 * i + 1) = theEmLeafCards.at(i)->getNonIsoElectronSorterU2();
877  }
878 
879  // Wheel Fpgas
880  vector<L1GctJetLeafCard*> wheelJetLeafCards(3);
881  vector<L1GctJetLeafCard*> wheelEnergyLeafCards(3);
882 
883  // The first wheel card is at negative eta,
884  // the second one is at positive eta
885  for (int i = 0; i < N_WHEEL_CARDS; i++) {
886  for (int j = 0; j < 3; j++) {
887  wheelJetLeafCards.at(j) = theJetLeafCards.at(i * 3 + j);
888  wheelEnergyLeafCards.at(j) = theJetLeafCards.at(i * 3 + j);
889  }
890  theWheelJetFpgas.at(i) = new L1GctWheelJetFpga(i, wheelJetLeafCards);
891  theWheelEnergyFpgas.at(i) = new L1GctWheelEnergyFpga(i, wheelEnergyLeafCards);
892  }
893 
894  // Jet Final Stage
896 
897  // Electron Final Sort
900 
901  // Global Energy Algos
903 }
Emulates the energy summing on a GCT Wheel card.
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
Represents a GCT Wheel Jet FPGA.
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
Represents the final stage of L1 jet processing.
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
std::vector< L1GctElectronSorter * > theIsoElectronSorters
pointers to the electron sorters
Emulates the GCT global energy algorithms.
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
std::vector< L1GctElectronSorter * > theNonIsoElectronSorters
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards
Emulates a leaf card programmed for electron sorting.

◆ bxProcess()

void L1GlobalCaloTrigger::bxProcess ( const int  bx)
private

Process a new bunch crossing.

Definition at line 260 of file L1GlobalCaloTrigger.cc.

References L1GctJetFinalStage::fetchInput(), L1GctElectronFinalSort::fetchInput(), L1GctGlobalEnergyAlgos::fetchInput(), mps_fire::i, N_EM_LEAF_CARDS, N_JET_LEAF_CARDS, N_WHEEL_CARDS, L1GctJetFinalStage::process(), L1GctElectronFinalSort::process(), L1GctGlobalEnergyAlgos::process(), theEmLeafCards, theEnergyFinalStage, theIsoEmFinalStage, theJetFinalStage, theJetLeafCards, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

Referenced by process().

260  {
261  // EM Leaf Card
262  for (int i = 0; i < N_EM_LEAF_CARDS; i++) {
263  theEmLeafCards.at(i)->fetchInput();
264  theEmLeafCards.at(i)->process();
265  }
266 
267  // Jet Leaf cards - first stage processing
268  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
269  theJetLeafCards.at(i)->fetchInput();
270  }
271 
272  // Jet Leaf cards - second stage processing
273  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
274  theJetLeafCards.at(i)->process();
275  }
276 
277  // Wheel Cards
278  for (int i = 0; i < N_WHEEL_CARDS; i++) {
279  theWheelJetFpgas.at(i)->fetchInput();
280  theWheelJetFpgas.at(i)->process();
281  }
282 
283  for (int i = 0; i < N_WHEEL_CARDS; i++) {
284  theWheelEnergyFpgas.at(i)->fetchInput();
285  theWheelEnergyFpgas.at(i)->process();
286  }
287 
288  // Electron Final Stage
291 
294 
295  // Jet Final Stage
298 
299  // Energy Final Stage
302 }
void process() override
process the data, fill output buffers
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
void fetchInput() override
get input data from sources
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
void fetchInput() override
get input data from sources
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
void process() override
process the data, fill output buffers
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
void fetchInput() override
get input data from sources
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
void process() override
process the data, fill output buffers
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards

◆ bxReset()

void L1GlobalCaloTrigger::bxReset ( const int  bx)
private

Partial reset for a new bunch crossing.

Definition at line 228 of file L1GlobalCaloTrigger.cc.

References simKBmtfDigis_cfi::bx, mps_fire::i, N_EM_LEAF_CARDS, N_JET_LEAF_CARDS, N_WHEEL_CARDS, L1GctProcessor::setNextBx(), L1GctGlobalEnergyAlgos::setNextBx(), theEmLeafCards, theEnergyFinalStage, theIsoEmFinalStage, theJetFinalStage, theJetLeafCards, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

Referenced by process().

228  {
229  // EM Leaf Card
230  for (int i = 0; i < N_EM_LEAF_CARDS; i++) {
231  theEmLeafCards.at(i)->setNextBx(bx);
232  }
233 
234  // Jet Leaf cards
235  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
236  theJetLeafCards.at(i)->setNextBx(bx);
237  }
238 
239  // Wheel Cards
240  for (int i = 0; i < N_WHEEL_CARDS; i++) {
241  theWheelJetFpgas.at(i)->setNextBx(bx);
242  }
243 
244  for (int i = 0; i < N_WHEEL_CARDS; i++) {
245  theWheelEnergyFpgas.at(i)->setNextBx(bx);
246  }
247 
248  // Electron Final Stage
251 
252  // Jet Final Stage
254 
255  // Energy Final Stage
257 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
void setNextBx(const int bx)
partially clear buffers
void setNextBx(const int bxnum)
clear input data buffers and process a new bunch crossing
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards

◆ bxSetup()

void L1GlobalCaloTrigger::bxSetup ( )
private

Setup bunch crossing range (depending on input data)

Definition at line 171 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, m_allInputEmCands, m_allInputRegions, m_bxRangeAuto, m_bxStart, m_numOfBx, SiStripPI::max, SiStripPI::min, N_EM_LEAF_CARDS, N_JET_LEAF_CARDS, N_WHEEL_CARDS, L1GctProcessor::setBxRange(), L1GctGlobalEnergyAlgos::setBxRange(), theEmLeafCards, theEnergyFinalStage, theIsoEmFinalStage, theJetFinalStage, theJetLeafCards, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

Referenced by process().

171  {
172  // Assume input data have been sorted by bunch crossing number
173  if (m_bxRangeAuto) {
174  // Find parameters defining the range of bunch crossings to be processed
175  int16_t firstBxEmCand = (m_allInputEmCands.empty() ? 0 : m_allInputEmCands.front().bx());
176  int16_t firstBxRegion = (m_allInputRegions.empty() ? 0 : m_allInputRegions.front().bx());
177  int16_t lastBxEmCand = (m_allInputEmCands.empty() ? 0 : m_allInputEmCands.back().bx());
178  int16_t lastBxRegion = (m_allInputRegions.empty() ? 0 : m_allInputRegions.back().bx());
179  m_bxStart = std::min(firstBxEmCand, firstBxRegion);
180  m_numOfBx = std::max(lastBxEmCand, lastBxRegion) - m_bxStart + 1;
181  } else {
182  // Remove any input from before the start of the requested range
183  for (vector<L1CaloEmCand>::iterator emc = m_allInputEmCands.begin(); emc != m_allInputEmCands.end(); emc++) {
184  if (emc->bx() >= m_bxStart)
185  break;
186  m_allInputEmCands.erase(emc);
187  }
188 
189  for (vector<L1CaloRegion>::iterator rgn = m_allInputRegions.begin(); rgn != m_allInputRegions.end(); rgn++) {
190  if (rgn->bx() >= m_bxStart)
191  break;
192  m_allInputRegions.erase(rgn);
193  }
194  }
195 
196  // Setup pipeline lengths
197  // EM Leaf Card
198  for (int i = 0; i < N_EM_LEAF_CARDS; i++) {
199  theEmLeafCards.at(i)->setBxRange(m_bxStart, m_numOfBx);
200  }
201 
202  // Jet Leaf cards
203  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
204  theJetLeafCards.at(i)->setBxRange(m_bxStart, m_numOfBx);
205  }
206 
207  // Wheel Cards
208  for (int i = 0; i < N_WHEEL_CARDS; i++) {
209  theWheelJetFpgas.at(i)->setBxRange(m_bxStart, m_numOfBx);
210  }
211 
212  for (int i = 0; i < N_WHEEL_CARDS; i++) {
213  theWheelEnergyFpgas.at(i)->setBxRange(m_bxStart, m_numOfBx);
214  }
215 
216  // Electron Final Stage
219 
220  // Jet Final Stage
222 
223  // Energy Final Stage
225 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
std::vector< L1CaloEmCand > m_allInputEmCands
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
bool m_bxRangeAuto
Multiple bunch crossing operation.
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
std::vector< L1CaloRegion > m_allInputRegions
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards

◆ fillEmCands() [1/2]

void L1GlobalCaloTrigger::fillEmCands ( const std::vector< L1CaloEmCand > &  rgn)

set electrons from the RCT at the input to be processed

Definition at line 453 of file L1GlobalCaloTrigger.cc.

References m_allInputEmCands.

Referenced by process().

453  {
454  // To enable multiple bunch crossing operation, we copy the input electrons into a vector,
455  // from which they will be extracted one bunch crossing at a time and sent to the processors
456  vector<L1CaloEmCand>::iterator itr = m_allInputEmCands.end();
457  m_allInputEmCands.insert(itr, em.begin(), em.end());
458 }
std::vector< L1CaloEmCand > m_allInputEmCands

◆ fillEmCands() [2/2]

void L1GlobalCaloTrigger::fillEmCands ( std::vector< L1CaloEmCand >::iterator &  emc,
const int  bx 
)
private

Fill input data for a new bunch crossing.

Private method to send one bunch crossing's worth of electrons to the processors.

Definition at line 468 of file L1GlobalCaloTrigger.cc.

References simKBmtfDigis_cfi::bx, m_allInputEmCands, setIsoEm(), and setNonIsoEm().

468  {
469  while (emc != m_allInputEmCands.end() && emc->bx() == bx) {
470  if (emc->isolated()) {
471  setIsoEm(*emc);
472  } else {
473  setNonIsoEm(*emc);
474  }
475  emc++;
476  }
477 }
std::vector< L1CaloEmCand > m_allInputEmCands
void setIsoEm(const L1CaloEmCand &em)
set an isolated EM candidate to be processed
void setNonIsoEm(const L1CaloEmCand &em)
set a non-isolated EM candidate to be processed

◆ fillRegions() [1/2]

void L1GlobalCaloTrigger::fillRegions ( const std::vector< L1CaloRegion > &  rgn)

================================================================================================= Input data set methods

Use the following two methods for full emulator operation set jet regions from the RCT at the input to be processed

Definition at line 445 of file L1GlobalCaloTrigger.cc.

References m_allInputRegions.

Referenced by process().

445  {
446  // To enable multiple bunch crossing operation, we copy the input regions into a vector,
447  // from which they will be extracted one bunch crossing at a time and sent to the processors
448  vector<L1CaloRegion>::iterator itr = m_allInputRegions.end();
449  m_allInputRegions.insert(itr, rgn.begin(), rgn.end());
450 }
std::vector< L1CaloRegion > m_allInputRegions

◆ fillRegions() [2/2]

void L1GlobalCaloTrigger::fillRegions ( std::vector< L1CaloRegion >::iterator &  rgn,
const int  bx 
)
private

Private method to send one bunch crossing's worth of regions to the processors.

Definition at line 461 of file L1GlobalCaloTrigger.cc.

References simKBmtfDigis_cfi::bx, m_allInputRegions, and setRegion().

461  {
462  while (rgn != m_allInputRegions.end() && rgn->bx() == bx) {
463  setRegion(*rgn++);
464  }
465 }
std::vector< L1CaloRegion > m_allInputRegions
void setRegion(const L1CaloRegion &region)

◆ getCentralJets()

L1GctJetCandCollection L1GlobalCaloTrigger::getCentralJets ( ) const

central jet outputs to GT

Definition at line 595 of file L1GlobalCaloTrigger.cc.

References L1GctJetFinalStage::getCentralJets(), and theJetFinalStage.

595 { return theJetFinalStage->getCentralJets(); }
JetVector getCentralJets() const
get the central jets output data
L1GctJetFinalStage * theJetFinalStage
jet final stage algo

◆ getEmLeafCards()

std::vector<L1GctEmLeafCard*> L1GlobalCaloTrigger::getEmLeafCards ( ) const
inline

get the Jet Leaf cards

Definition at line 187 of file L1GlobalCaloTrigger.h.

References theEmLeafCards.

187 { return theEmLeafCards; }
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards

◆ getEnergyFinalStage()

L1GctGlobalEnergyAlgos* L1GlobalCaloTrigger::getEnergyFinalStage ( ) const
inline

get the energy final stage

Definition at line 199 of file L1GlobalCaloTrigger.h.

References theEnergyFinalStage.

Referenced by L1GctPrintLuts::analyze().

199 { return theEnergyFinalStage; }
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos

◆ getEtHadCollection()

L1GctEtHadCollection L1GlobalCaloTrigger::getEtHadCollection ( ) const

Total hadronic Et output to GT.

Definition at line 628 of file L1GlobalCaloTrigger.cc.

References simKBmtfDigis_cfi::bx, L1GctGlobalEnergyAlgos::getEtHadColl(), mps_fire::i, m_bxStart, m_numOfBx, mps_fire::result, groupFilesInBlocks::temp, and theEnergyFinalStage.

628  {
630  int bx = m_bxStart;
631  for (int i = 0; i < m_numOfBx; i++) {
633  theEnergyFinalStage->getEtHadColl().at(i).value(), theEnergyFinalStage->getEtHadColl().at(i).overFlow(), bx++);
634  result.at(i) = temp;
635  }
636  return result;
637 }
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
std::vector< L1GctEtHad > L1GctEtHadCollection
std::vector< etHadType > getEtHadColl() const
return std::vector< output calibrated jet Et
Persistable copy of total Ht measured at Level-1.
Definition: L1GctEtHad.h:17

◆ getEtMissCollection()

L1GctEtMissCollection L1GlobalCaloTrigger::getEtMissCollection ( ) const

Etmiss output to GT.

Definition at line 639 of file L1GlobalCaloTrigger.cc.

References simKBmtfDigis_cfi::bx, L1GctGlobalEnergyAlgos::getEtMissColl(), L1GctGlobalEnergyAlgos::getEtMissPhiColl(), mps_fire::i, m_bxStart, m_numOfBx, mps_fire::result, groupFilesInBlocks::temp, and theEnergyFinalStage.

639  {
641  int bx = m_bxStart;
642  for (int i = 0; i < m_numOfBx; i++) {
644  theEnergyFinalStage->getEtMissPhiColl().at(i).value(),
645  theEnergyFinalStage->getEtMissColl().at(i).overFlow(),
646  bx++);
647  result.at(i) = temp;
648  }
649  return result;
650 }
std::vector< etMissType > getEtMissColl() const
std::vector< L1GctEtMiss > L1GctEtMissCollection
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
Persistable copy of missing Et measured at Level-1.
Definition: L1GctEtMiss.h:17
std::vector< etMissPhiType > getEtMissPhiColl() const
return output missing Et value

◆ getEtSumCollection()

L1GctEtTotalCollection L1GlobalCaloTrigger::getEtSumCollection ( ) const

Total Et output to GT.

Definition at line 617 of file L1GlobalCaloTrigger.cc.

References simKBmtfDigis_cfi::bx, L1GctGlobalEnergyAlgos::getEtSumColl(), mps_fire::i, m_bxStart, m_numOfBx, mps_fire::result, groupFilesInBlocks::temp, and theEnergyFinalStage.

617  {
619  int bx = m_bxStart;
620  for (int i = 0; i < m_numOfBx; i++) {
622  theEnergyFinalStage->getEtSumColl().at(i).value(), theEnergyFinalStage->getEtSumColl().at(i).overFlow(), bx++);
623  result.at(i) = temp;
624  }
625  return result;
626 }
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
std::vector< L1GctEtTotal > L1GctEtTotalCollection
Persistable copy of total Et measured at Level-1.
Definition: L1GctEtTotal.h:17
std::vector< etTotalType > getEtSumColl() const
return output total scalar Et

◆ getFirstBx()

int L1GlobalCaloTrigger::getFirstBx ( ) const
inline

accessor methods

Definition at line 108 of file L1GlobalCaloTrigger.h.

References m_bxStart.

108 { return m_bxStart; }

◆ getForwardJets()

L1GctJetCandCollection L1GlobalCaloTrigger::getForwardJets ( ) const

forward jet outputs to GT

Definition at line 598 of file L1GlobalCaloTrigger.cc.

References L1GctJetFinalStage::getForwardJets(), and theJetFinalStage.

598 { return theJetFinalStage->getForwardJets(); }
JetVector getForwardJets() const
get the forward jets output data
L1GctJetFinalStage * theJetFinalStage
jet final stage algo

◆ getHFBitCountsCollection()

L1GctHFBitCountsCollection L1GlobalCaloTrigger::getHFBitCountsCollection ( ) const

Definition at line 715 of file L1GlobalCaloTrigger.cc.

References L1GctHfEtSumsLut::bitCountNegEtaRing1, L1GctHfEtSumsLut::bitCountNegEtaRing2, L1GctHfEtSumsLut::bitCountPosEtaRing1, L1GctHfEtSumsLut::bitCountPosEtaRing2, simKBmtfDigis_cfi::bx, L1GctHFBitCounts::fromGctEmulator(), getHfSumProcessor(), mps_fire::i, m_bxStart, m_numOfBx, mps_fire::result, and groupFilesInBlocks::temp.

715  {
717  if (getHfSumProcessor() != nullptr) {
718  int bx = m_bxStart;
719  for (int i = 0; i < m_numOfBx; i++) {
721  static_cast<int16_t>(bx),
726  result.at(i) = temp;
727  bx++;
728  }
729  }
730  return result;
731 }
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
L1 GCT HF ring Et sums.
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
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

◆ getHFRingEtSumsCollection()

L1GctHFRingEtSumsCollection L1GlobalCaloTrigger::getHFRingEtSumsCollection ( ) const

Definition at line 733 of file L1GlobalCaloTrigger.cc.

References simKBmtfDigis_cfi::bx, L1GctHfEtSumsLut::etSumNegEtaRing1, L1GctHfEtSumsLut::etSumNegEtaRing2, L1GctHfEtSumsLut::etSumPosEtaRing1, L1GctHfEtSumsLut::etSumPosEtaRing2, L1GctHFRingEtSums::fromGctEmulator(), getHfSumProcessor(), mps_fire::i, m_bxStart, m_numOfBx, mps_fire::result, and groupFilesInBlocks::temp.

733  {
735  if (getHfSumProcessor() != nullptr) {
736  int bx = m_bxStart;
737  for (int i = 0; i < m_numOfBx; i++) {
739  static_cast<int16_t>(bx),
744  result.at(i) = temp;
745  bx++;
746  }
747  }
748  return result;
749 }
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
std::vector< L1GctHFRingEtSums > L1GctHFRingEtSumsCollection
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
L1 GCT HF ring Et sums.

◆ getHfSumProcessor()

L1GctGlobalHfSumAlgos * L1GlobalCaloTrigger::getHfSumProcessor ( ) const

provide access to hf sum processor

Definition at line 412 of file L1GlobalCaloTrigger.cc.

References L1GctGlobalEnergyAlgos::getHfSumProcessor(), mps_fire::result, and theEnergyFinalStage.

Referenced by getHFBitCountsCollection(), getHFRingEtSumsCollection(), and setupHfSumLuts().

412  {
413  L1GctGlobalHfSumAlgos* result = nullptr;
414  if (theEnergyFinalStage != nullptr) {
416  }
417  return result;
418 }
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
Emulates the GCT summing and packing of Hf Et sums and tower-over-threshold counts.
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos

◆ getHtMissCollection()

L1GctHtMissCollection L1GlobalCaloTrigger::getHtMissCollection ( ) const

Htmiss output to GT.

Definition at line 652 of file L1GlobalCaloTrigger.cc.

References simKBmtfDigis_cfi::bx, L1GctGlobalEnergyAlgos::getHtMissColl(), L1GctGlobalEnergyAlgos::getHtMissPhiColl(), mps_fire::i, m_bxStart, m_numOfBx, mps_fire::result, groupFilesInBlocks::temp, and theEnergyFinalStage.

652  {
654  int bx = m_bxStart;
655  for (int i = 0; i < m_numOfBx; i++) {
657  theEnergyFinalStage->getHtMissPhiColl().at(i).value(),
658  theEnergyFinalStage->getHtMissColl().at(i).overFlow(),
659  bx++);
660  result.at(i) = temp;
661  }
662  return result;
663 }
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
std::vector< etMissType > getHtMissColl() const
return output missing Ht magnitude
std::vector< etMissPhiType > getHtMissPhiColl() const
return output missing Ht value
std::vector< L1GctHtMiss > L1GctHtMissCollection
Persistable copy of missing Et measured at Level-1.
Definition: L1GctHtMiss.h:16

◆ getInternalEtSums()

L1GctInternEtSumCollection L1GlobalCaloTrigger::getInternalEtSums ( ) const

Et sums and components in internal format.

Definition at line 665 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, N_JET_LEAF_CARDS, N_WHEEL_CARDS, theJetFinders, theJetLeafCards, and theWheelEnergyFpgas.

665  {
666  L1GctInternEtSumCollection allSums, procSums;
667 
668  // Go through all the processor types that process et sums
669  // JetFinders
670  for (unsigned jf = 0; jf < theJetFinders.size(); jf++) {
671  procSums = theJetFinders.at(jf)->getInternalEtSums();
672  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
673  }
674 
675  // Jet Leaf cards
676  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
677  procSums = theJetLeafCards.at(i)->getInternalEtSums();
678  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
679  }
680 
681  // Wheel Cards
682  for (int i = 0; i < N_WHEEL_CARDS; i++) {
683  procSums = theWheelEnergyFpgas.at(i)->getInternalEtSums();
684  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
685  }
686 
687  return allSums;
688 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
std::vector< L1GctInternEtSum > L1GctInternEtSumCollection

◆ getInternalHtMiss()

L1GctInternHtMissCollection L1GlobalCaloTrigger::getInternalHtMiss ( ) const

Definition at line 690 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, N_JET_LEAF_CARDS, N_WHEEL_CARDS, theJetFinders, theJetLeafCards, and theWheelJetFpgas.

690  {
691  L1GctInternHtMissCollection allSums, procSums;
692 
693  // Go through all the processor types that process et sums
694  // JetFinders
695  for (unsigned jf = 0; jf < theJetFinders.size(); jf++) {
696  procSums = theJetFinders.at(jf)->getInternalHtMiss();
697  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
698  }
699 
700  // Jet Leaf cards
701  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
702  procSums = theJetLeafCards.at(i)->getInternalHtMiss();
703  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
704  }
705 
706  // Wheel Cards
707  for (int i = 0; i < N_WHEEL_CARDS; i++) {
708  procSums = theWheelJetFpgas.at(i)->getInternalHtMiss();
709  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
710  }
711 
712  return allSums;
713 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctInternHtMiss > L1GctInternHtMissCollection
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.

◆ getInternalJets()

L1GctInternJetDataCollection L1GlobalCaloTrigger::getInternalJets ( ) const

all jets from jetfinders in raw format

Definition at line 604 of file L1GlobalCaloTrigger.cc.

References reco::JetExtendedAssociation::allJets(), and theJetFinders.

604  {
606 
607  // Loop over jetfinders, find the internal jets and add them to the list
608  for (unsigned jf = 0; jf < theJetFinders.size(); jf++) {
609  jfJets = theJetFinders.at(jf)->getInternalJets();
610  allJets.insert(allJets.end(), jfJets.begin(), jfJets.end());
611  }
612 
613  return allJets;
614 }
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
std::vector< L1GctInternJetData > L1GctInternJetDataCollection

◆ getIsoElectrons()

L1GctEmCandCollection L1GlobalCaloTrigger::getIsoElectrons ( ) const

================================================================================================= Output data get methods

iso electron outputs to GT

================================================================================================= Output data get methods

Definition at line 587 of file L1GlobalCaloTrigger.cc.

References L1GctElectronFinalSort::getOutputCands(), and theIsoEmFinalStage.

587 { return theIsoEmFinalStage->getOutputCands(); }
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
std::vector< L1GctEmCand > getOutputCands() const
return output data

◆ getIsoEmFinalStage()

L1GctElectronFinalSort* L1GlobalCaloTrigger::getIsoEmFinalStage ( ) const
inline

get the electron final stage sorters

Definition at line 205 of file L1GlobalCaloTrigger.h.

References theIsoEmFinalStage.

205 { return theIsoEmFinalStage; }
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter

◆ getJetEtCalibLuts()

const lutPtrVector L1GlobalCaloTrigger::getJetEtCalibLuts ( ) const
inline

get the Jet Et calibration LUT

Definition at line 212 of file L1GlobalCaloTrigger.h.

References m_jetEtCalLuts.

212 { return m_jetEtCalLuts; }
lutPtrVector m_jetEtCalLuts
Jet Et calibration LUT.

◆ getJetFinalStage()

L1GctJetFinalStage* L1GlobalCaloTrigger::getJetFinalStage ( ) const
inline

get the jet final stage

Definition at line 196 of file L1GlobalCaloTrigger.h.

References theJetFinalStage.

196 { return theJetFinalStage; }
L1GctJetFinalStage * theJetFinalStage
jet final stage algo

◆ getJetFinderParams()

const L1GctJetFinderParams* L1GlobalCaloTrigger::getJetFinderParams ( ) const
inline

get the jetFinder parameters

Definition at line 209 of file L1GlobalCaloTrigger.h.

References m_jetFinderParams.

209 { return m_jetFinderParams; }
const L1GctJetFinderParams * m_jetFinderParams
Jetfinder parameters.

◆ getJetLeafCards()

std::vector<L1GctJetLeafCard*> L1GlobalCaloTrigger::getJetLeafCards ( ) const
inline

================================================================================================= Access to GCT component processors

get the Jet Leaf cards

Definition at line 184 of file L1GlobalCaloTrigger.h.

References theJetLeafCards.

184 { return theJetLeafCards; }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards

◆ getLastBx()

int L1GlobalCaloTrigger::getLastBx ( ) const
inline

Definition at line 109 of file L1GlobalCaloTrigger.h.

References m_bxStart, and m_numOfBx.

◆ getNonIsoElectrons()

L1GctEmCandCollection L1GlobalCaloTrigger::getNonIsoElectrons ( ) const

non-iso electron outputs to GT

Definition at line 590 of file L1GlobalCaloTrigger.cc.

References L1GctElectronFinalSort::getOutputCands(), and theNonIsoEmFinalStage.

590  {
592 }
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
std::vector< L1GctEmCand > getOutputCands() const
return output data

◆ getNonIsoEmFinalStage()

L1GctElectronFinalSort* L1GlobalCaloTrigger::getNonIsoEmFinalStage ( ) const
inline

Definition at line 206 of file L1GlobalCaloTrigger.h.

References theNonIsoEmFinalStage.

206 { return theNonIsoEmFinalStage; }
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter

◆ getTauJets()

L1GctJetCandCollection L1GlobalCaloTrigger::getTauJets ( ) const

tau jet outputs to GT

Definition at line 601 of file L1GlobalCaloTrigger.cc.

References L1GctJetFinalStage::getTauJets(), and theJetFinalStage.

601 { return theJetFinalStage->getTauJets(); }
JetVector getTauJets() const
get the tau jets output data
L1GctJetFinalStage * theJetFinalStage
jet final stage algo

◆ getTotalBx()

int L1GlobalCaloTrigger::getTotalBx ( ) const
inline

Definition at line 110 of file L1GlobalCaloTrigger.h.

References m_numOfBx.

110 { return m_numOfBx; }

◆ getWheelEnergyFpgas()

std::vector<L1GctWheelEnergyFpga*> L1GlobalCaloTrigger::getWheelEnergyFpgas ( ) const
inline

get the Wheel Energy Fpgas

Definition at line 193 of file L1GlobalCaloTrigger.h.

References theWheelEnergyFpgas.

193 { return theWheelEnergyFpgas; }
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.

◆ getWheelJetFpgas()

std::vector<L1GctWheelJetFpga*> L1GlobalCaloTrigger::getWheelJetFpgas ( ) const
inline

get the Wheel Jet FPGAs

Definition at line 190 of file L1GlobalCaloTrigger.h.

References theWheelJetFpgas.

190 { return theWheelJetFpgas; }
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.

◆ print()

void L1GlobalCaloTrigger::print ( void  )

================================================================================================= Print method

print setup info

================================================================================================= Print method

Definition at line 529 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, theEmLeafCards, theJetLeafCards, theWheelEnergyFpgas, and theWheelJetFpgas.

529  {
530  using edm::LogInfo;
531  using std::endl;
532 
533  LogInfo("L1GlobalCaloTrigger") << "=== Global Calo Trigger ===" << endl;
534  LogInfo("L1GlobalCaloTrigger") << "=== START DEBUG OUTPUT ===" << endl;
535 
536  LogInfo("L1GlobalCaloTrigger") << endl;
537  LogInfo("L1GlobalCaloTrigger") << "N Jet Leaf Cards " << theJetLeafCards.size() << endl;
538  LogInfo("L1GlobalCaloTrigger") << "N Wheel Jet Fpgas " << theWheelJetFpgas.size() << endl;
539  LogInfo("L1GlobalCaloTrigger") << "N Wheel Energy Fpgas " << theWheelEnergyFpgas.size() << endl;
540  LogInfo("L1GlobalCaloTrigger") << "N Em Leaf Cards " << theEmLeafCards.size() << endl;
541  LogInfo("L1GlobalCaloTrigger") << endl;
542 
543  for (unsigned i = 0; i < theJetLeafCards.size(); i++) {
544  LogInfo("L1GlobalCaloTrigger") << "Jet Leaf Card " << i << " : " << theJetLeafCards.at(i) << endl;
545  LogInfo("L1GlobalCaloTrigger") << (*theJetLeafCards.at(i));
546  }
547  LogInfo("L1GlobalCaloTrigger") << endl;
548 
549  for (unsigned i = 0; i < theWheelJetFpgas.size(); i++) {
550  LogInfo("L1GlobalCaloTrigger") << "Wheel Jet FPGA " << i << " : " << theWheelJetFpgas.at(i) << endl;
551  LogInfo("L1GlobalCaloTrigger") << (*theWheelJetFpgas.at(i));
552  }
553  LogInfo("L1GlobalCaloTrigger") << endl;
554 
555  for (unsigned i = 0; i < theWheelEnergyFpgas.size(); i++) {
556  LogInfo("L1GlobalCaloTrigger") << "Wheel Energy FPGA " << i << " : " << theWheelEnergyFpgas.at(i) << endl;
557  LogInfo("L1GlobalCaloTrigger") << (*theWheelEnergyFpgas.at(i));
558  }
559  LogInfo("L1GlobalCaloTrigger") << endl;
560 
561  LogInfo("L1GlobalCaloTrigger") << (*theJetFinalStage);
562  LogInfo("L1GlobalCaloTrigger") << endl;
563 
564  LogInfo("L1GlobalCaloTrigger") << (*theEnergyFinalStage);
565  LogInfo("L1GlobalCaloTrigger") << endl;
566 
567  for (unsigned i = 0; i < theEmLeafCards.size(); i++) {
568  LogInfo("L1GlobalCaloTrigger") << ((i == 0) ? "Positive eta " : "Negative eta ");
569  LogInfo("L1GlobalCaloTrigger") << "EM Leaf Card " << i << " : " << theEmLeafCards.at(i) << endl;
570  LogInfo("L1GlobalCaloTrigger") << (*theEmLeafCards.at(i));
571  }
572  LogInfo("L1GlobalCaloTrigger") << endl;
573 
574  LogInfo("L1GlobalCaloTrigger") << (*theIsoEmFinalStage);
575  LogInfo("L1GlobalCaloTrigger") << endl;
576 
577  LogInfo("L1GlobalCaloTrigger") << (*theNonIsoEmFinalStage);
578 
579  LogInfo("L1GlobalCaloTrigger") << "=== Global Calo Trigger ===" << endl;
580  LogInfo("L1GlobalCaloTrigger") << "=== END DEBUG OUTPUT ===" << endl;
581 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
Log< level::Info, false > LogInfo
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards

◆ process()

void L1GlobalCaloTrigger::process ( )

process an event

Sort the input data by bunch crossing number

Definition at line 136 of file L1GlobalCaloTrigger.cc.

References simKBmtfDigis_cfi::bx, bxProcess(), bxReset(), bxSetup(), fillEmCands(), fillRegions(), mps_fire::i, m_allInputEmCands, m_allInputRegions, m_bxStart, m_numOfBx, setupOk(), and sortInputData().

136  {
137  // Shouldn't get here unless the setup has been completed
138  if (setupOk()) {
140  sortInputData();
141  // Extract the earliest and latest bunch crossing
142  // in the input if required, and forward to the processors
143  // to determine the size of the output vectors
144  bxSetup();
145 
146  vector<L1CaloEmCand>::iterator emc = m_allInputEmCands.begin();
147  vector<L1CaloRegion>::iterator rgn = m_allInputRegions.begin();
148  int bx = m_bxStart;
149 
150  // Loop over bunch crossings
151  for (int i = 0; i < m_numOfBx; i++) {
152  // Perform partial reset (reset processing logic but preserve pipeline contents)
153  bxReset(bx);
154  // Fill input data into processors for this bunch crossing
155  fillEmCands(emc, bx);
156  fillRegions(rgn, bx);
157  // Process this bunch crossing
158  bxProcess(bx);
159  bx++;
160  }
161  }
162 }
void bxReset(const int bx)
Partial reset for a new bunch crossing.
void fillEmCands(const std::vector< L1CaloEmCand > &rgn)
set electrons from the RCT at the input to be processed
void sortInputData()
Sort the input data by bunch crossing number.
std::vector< L1CaloEmCand > m_allInputEmCands
void fillRegions(const std::vector< L1CaloRegion > &rgn)
void bxProcess(const int bx)
Process a new bunch crossing.
void bxSetup()
Setup bunch crossing range (depending on input data)
std::vector< L1CaloRegion > m_allInputRegions
bool setupOk() const
check we have done all the setup

◆ reset()

void L1GlobalCaloTrigger::reset ( void  )

Reset internal buffers.

=================================================================================================

Methods to reset all processors and process an event (consisting of multiple bunch crossings)

Definition at line 91 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, m_allInputEmCands, m_allInputRegions, m_bxRangeAuto, m_bxStart, m_numOfBx, N_EM_LEAF_CARDS, N_JET_LEAF_CARDS, N_WHEEL_CARDS, L1GctProcessor::reset(), L1GctGlobalEnergyAlgos::reset(), theEmLeafCards, theEnergyFinalStage, theIsoEmFinalStage, theJetFinalStage, theJetFinders, theJetLeafCards, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

91  {
92  // Input data
93  m_allInputEmCands.clear();
94  m_allInputRegions.clear();
95 
96  if (m_bxRangeAuto) {
97  m_bxStart = 0;
98  m_numOfBx = 1;
99  }
100 
101  // EM Leaf Card
102  for (int i = 0; i < N_EM_LEAF_CARDS; i++) {
103  theEmLeafCards.at(i)->reset();
104  }
105 
106  // Jet Leaf cards
107  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
108  theJetLeafCards.at(i)->reset();
109  }
110 
111  // Jet Finders
112  for (int i = 0; i < N_JET_LEAF_CARDS * 3; i++) {
113  theJetFinders.at(i)->reset();
114  }
115 
116  // Wheel Cards
117  for (int i = 0; i < N_WHEEL_CARDS; i++) {
118  theWheelJetFpgas.at(i)->reset();
119  }
120 
121  for (int i = 0; i < N_WHEEL_CARDS; i++) {
122  theWheelEnergyFpgas.at(i)->reset();
123  }
124 
125  // Electron Final Stage
128 
129  // Jet Final Stage
131 
132  // Energy Final Stage
134 }
void reset()
complete reset of processor
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
void reset()
clear internal buffers
std::vector< L1CaloEmCand > m_allInputEmCands
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
bool m_bxRangeAuto
Multiple bunch crossing operation.
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
std::vector< L1CaloRegion > m_allInputRegions
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards

◆ setBxRange()

void L1GlobalCaloTrigger::setBxRange ( const int  firstBx,
const int  lastBx 
)

================================================================================================= Multiple bunch operation

set parameters for multiple bunch operation process crossings from (firstBx) to (lastBx)

setup the bunch crossing range to be processed process crossings from (firstBx) to (lastBx)

Definition at line 422 of file L1GlobalCaloTrigger.cc.

References m_bxRangeAuto, m_bxStart, and m_numOfBx.

422  {
423  m_bxStart = firstBx;
424  m_numOfBx = lastBx - firstBx + 1;
425  m_bxRangeAuto = false;
426 }
bool m_bxRangeAuto
Multiple bunch crossing operation.

◆ setBxRangeAutomatic()

void L1GlobalCaloTrigger::setBxRangeAutomatic ( )

process all crossings present in the input (and only those crossings)

Definition at line 434 of file L1GlobalCaloTrigger.cc.

References m_bxRangeAuto, m_bxStart, and m_numOfBx.

434  {
435  m_bxStart = 0;
436  m_numOfBx = 1;
437  m_bxRangeAuto = true;
438 }
bool m_bxRangeAuto
Multiple bunch crossing operation.

◆ setBxRangeSymmetric()

void L1GlobalCaloTrigger::setBxRangeSymmetric ( const int  numOfBx)

process crossings from (-numOfBx) to (numOfBx)

Definition at line 428 of file L1GlobalCaloTrigger.cc.

References m_bxRangeAuto, m_bxStart, and m_numOfBx.

428  {
429  m_bxStart = -numOfBx;
430  m_numOfBx = 2 * numOfBx + 1;
431  m_bxRangeAuto = false;
432 }
bool m_bxRangeAuto
Multiple bunch crossing operation.

◆ setChannelMask()

void L1GlobalCaloTrigger::setChannelMask ( const L1GctChannelMask *const  mask)

setup the input channel mask

Definition at line 359 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, m_inputChannelMask, N_JET_LEAF_CARDS, and theJetLeafCards.

359  {
360  m_inputChannelMask = mask;
361  // Need to propagate the new mask to all the JetFinders
362  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
363  theJetLeafCards.at(i)->getJetFinderA()->setEnergySumMasks(mask);
364  theJetLeafCards.at(i)->getJetFinderB()->setEnergySumMasks(mask);
365  theJetLeafCards.at(i)->getJetFinderC()->setEnergySumMasks(mask);
366  }
367 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
const L1GctChannelMask * m_inputChannelMask
Input channel mask.
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.

◆ setHtMissScale()

void L1GlobalCaloTrigger::setHtMissScale ( const L1CaloEtScale *const  scale)

setup scale for missing Ht

Definition at line 345 of file L1GlobalCaloTrigger.cc.

References L1EGammaClusterEmuProducer_cfi::scale, L1GctGlobalEnergyAlgos::setHtMissScale(), and theEnergyFinalStage.

Referenced by L1GctPrintLuts::configureGct().

345  {
346  if (theEnergyFinalStage != nullptr) {
348  }
349 }
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
void setHtMissScale(const L1CaloEtScale *const scale)

◆ setIsoEm()

void L1GlobalCaloTrigger::setIsoEm ( const L1CaloEmCand em)

set an isolated EM candidate to be processed

Set an isolated EM candidate to be processed Called from fillEmCands() above - also available to be called directly (but the "user" has to take care of any multiple bunch crossing issues)

Definition at line 513 of file L1GlobalCaloTrigger.cc.

References L1GctChannelMask::emCrateMask(), m_inputChannelMask, L1CaloEmCand::rctCrate(), sorterNo(), and theIsoElectronSorters.

Referenced by fillEmCands().

513  {
515  theIsoElectronSorters.at(sorterNo(em))->setInputEmCand(em);
516 }
unsigned sorterNo(const L1CaloEmCand &em) const
const L1GctChannelMask * m_inputChannelMask
Input channel mask.
bool emCrateMask(unsigned crate) const
get EM masks for an RCT crate
unsigned rctCrate() const
get RCT crate
Definition: L1CaloEmCand.h:51
std::vector< L1GctElectronSorter * > theIsoElectronSorters
pointers to the electron sorters

◆ setJetEtCalibrationLuts()

void L1GlobalCaloTrigger::setJetEtCalibrationLuts ( const lutPtrVector jfluts)

setup the Jet Calibration Luts

setup the Jet Calibration Lut

Definition at line 324 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, m_jetEtCalLuts, N_JET_LEAF_CARDS, and theJetLeafCards.

Referenced by L1GctPrintLuts::configureGct().

324  {
325  m_jetEtCalLuts = jfluts;
326  // Need to propagate the new lut to all the JetFinders
327  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
328  theJetLeafCards.at(i)->getJetFinderA()->setJetEtCalibrationLuts(jfluts);
329  theJetLeafCards.at(i)->getJetFinderB()->setJetEtCalibrationLuts(jfluts);
330  theJetLeafCards.at(i)->getJetFinderC()->setJetEtCalibrationLuts(jfluts);
331  }
332 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
lutPtrVector m_jetEtCalLuts
Jet Et calibration LUT.
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.

◆ setJetFinderParams()

void L1GlobalCaloTrigger::setJetFinderParams ( const L1GctJetFinderParams *const  jfpars)

================================================================================================= Configuration options for the GCT

Setup the jet finder parameters

================================================================================================= Configuration options for the GCT

setup the Jet Finder parameters

Definition at line 308 of file L1GlobalCaloTrigger.cc.

References L1GctJetFinderParams::getCenForJetEtaBoundary(), L1GctJetFinderParams::getCenJetEtSeedGct(), L1GctJetFinderParams::getTauJetEtSeedGct(), mps_fire::i, m_jetFinderParams, N_JET_LEAF_CARDS, L1GctGlobalEnergyAlgos::setJetFinderParams(), theEnergyFinalStage, and theJetLeafCards.

Referenced by L1GctPrintLuts::configureGct().

308  {
309  // Some parameters not (yet?) implemented
310  if ((jfpars->getCenForJetEtaBoundary() == 7) && (jfpars->getCenJetEtSeedGct() == jfpars->getTauJetEtSeedGct())) {
311  m_jetFinderParams = jfpars;
312  // Need to propagate the new parameters to all the JetFinders
313  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
314  theJetLeafCards.at(i)->getJetFinderA()->setJetFinderParams(jfpars);
315  theJetLeafCards.at(i)->getJetFinderB()->setJetFinderParams(jfpars);
316  theJetLeafCards.at(i)->getJetFinderC()->setJetFinderParams(jfpars);
317  }
318  // Also send to the final energy calculation (for missing Ht)
320  }
321 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
void setJetFinderParams(const L1GctJetFinderParams *const jfpars)
unsigned getCenForJetEtaBoundary() const
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
unsigned getCenJetEtSeedGct() const
unsigned getTauJetEtSeedGct() const
const L1GctJetFinderParams * m_jetFinderParams
Jetfinder parameters.

◆ setNonIsoEm()

void L1GlobalCaloTrigger::setNonIsoEm ( const L1CaloEmCand em)

set a non-isolated EM candidate to be processed

Set a non-isolated EM candidate to be processed Called from fillEmCands() above - also available to be called directly (but the "user" has to take care of any multiple bunch crossing issues)

Definition at line 521 of file L1GlobalCaloTrigger.cc.

References L1GctChannelMask::emCrateMask(), m_inputChannelMask, L1CaloEmCand::rctCrate(), sorterNo(), and theNonIsoElectronSorters.

Referenced by fillEmCands().

521  {
523  theNonIsoElectronSorters.at(sorterNo(em))->setInputEmCand(em);
524 }
unsigned sorterNo(const L1CaloEmCand &em) const
const L1GctChannelMask * m_inputChannelMask
Input channel mask.
bool emCrateMask(unsigned crate) const
get EM masks for an RCT crate
unsigned rctCrate() const
get RCT crate
Definition: L1CaloEmCand.h:51
std::vector< L1GctElectronSorter * > theNonIsoElectronSorters

◆ setRegion() [1/2]

void L1GlobalCaloTrigger::setRegion ( const L1CaloRegion region)

Other methods for debugging set a jet region at the input to be processed

Set a jet region at the input to be processed Called from fillRegions() above - also available to be called directly (but the "user" has to take care of any multiple bunch crossing issues)

Definition at line 482 of file L1GlobalCaloTrigger.cc.

References m_inputChannelMask, L1CaloRegionDetId::N_PHI, HLT_2022v11_cff::region, L1GctChannelMask::regionMask(), and theJetFinders.

Referenced by fillRegions(), and setRegion().

482  {
483  if (!m_inputChannelMask->regionMask(region.gctEta(), region.gctPhi())) {
484  unsigned crate = region.rctCrate();
485  // Find the relevant jetFinders
486  static const unsigned NPHI = L1CaloRegionDetId::N_PHI / 2;
487  unsigned prevphi = crate % NPHI;
488  unsigned thisphi = (crate + 1) % NPHI;
489  unsigned nextphi = (crate + 2) % NPHI;
490 
491  // Send the region to six jetFinders.
492  theJetFinders.at(thisphi)->setInputRegion(region);
493  theJetFinders.at(nextphi)->setInputRegion(region);
494  theJetFinders.at(prevphi)->setInputRegion(region);
495  theJetFinders.at(thisphi + NPHI)->setInputRegion(region);
496  theJetFinders.at(nextphi + NPHI)->setInputRegion(region);
497  theJetFinders.at(prevphi + NPHI)->setInputRegion(region);
498  }
499 }
const L1GctChannelMask * m_inputChannelMask
Input channel mask.
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
bool regionMask(unsigned ieta, unsigned iphi) const
get region masks
static const unsigned N_PHI

◆ setRegion() [2/2]

void L1GlobalCaloTrigger::setRegion ( const unsigned  et,
const unsigned  ieta,
const unsigned  iphi,
const bool  overFlow = false,
const bool  fineGrain = true 
)

construct a jet region and set it at the input to be processed

Construct a jet region and set it at the input to be processed. For testing/debugging only.

Definition at line 503 of file L1GlobalCaloTrigger.cc.

References EgHLTOffHistBins_cfi::et, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, setRegion(), and groupFilesInBlocks::temp.

504  {
505  // L1CaloRegion temp = L1CaloRegion::makeRegionFromGctIndices(et, overFlow, fineGrain, false, false, ieta, iphi, 0);
506  L1CaloRegion temp(et, overFlow, fineGrain, false, false, ieta, iphi, 0);
507  setRegion(temp);
508 }
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:21
void setRegion(const L1CaloRegion &region)

◆ setTerse()

void L1GlobalCaloTrigger::setTerse ( )

Definition at line 788 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, N_EM_LEAF_CARDS, N_JET_LEAF_CARDS, N_WHEEL_CARDS, L1GctProcessor::setTerse(), theEmLeafCards, theEnergyFinalStage, theIsoEmFinalStage, theJetFinalStage, theJetFinders, theJetLeafCards, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

788  {
789  // EM Leaf Card
790  for (int i = 0; i < N_EM_LEAF_CARDS; i++) {
791  theEmLeafCards.at(i)->setTerse();
792  }
793 
794  // Jet Leaf cards
795  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
796  theJetLeafCards.at(i)->setTerse();
797  }
798 
799  // Jet Finders
800  for (int i = 0; i < N_JET_LEAF_CARDS * 3; i++) {
801  theJetFinders.at(i)->setTerse();
802  }
803 
804  // Wheel Cards
805  for (int i = 0; i < N_WHEEL_CARDS; i++) {
806  theWheelJetFpgas.at(i)->setTerse();
807  }
808 
809  for (int i = 0; i < N_WHEEL_CARDS; i++) {
810  theWheelEnergyFpgas.at(i)->setTerse();
811  }
812 
813  // Electron Final Stage
816 
817  // Jet Final Stage
819 
820  // Energy Final Stage
822 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards

◆ setupHfSumLuts()

void L1GlobalCaloTrigger::setupHfSumLuts ( const L1CaloEtScale *const  scale)

setup Hf sum LUTs

Definition at line 352 of file L1GlobalCaloTrigger.cc.

References getHfSumProcessor(), L1EGammaClusterEmuProducer_cfi::scale, and L1GctGlobalHfSumAlgos::setupLuts().

Referenced by L1GctPrintLuts::configureGct().

352  {
353  if (getHfSumProcessor() != nullptr) {
355  }
356 }
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
void setupLuts(const L1CaloEtScale *scale)
Setup luts.

◆ setupOk()

bool L1GlobalCaloTrigger::setupOk ( ) const
private

check we have done all the setup

Definition at line 370 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, m_inputChannelMask, N_EM_LEAF_CARDS, N_JET_LEAF_CARDS, N_WHEEL_CARDS, mps_fire::result, L1GctJetFinalStage::setupOk(), L1GctElectronFinalSort::setupOk(), L1GctGlobalEnergyAlgos::setupOk(), theEmLeafCards, theEnergyFinalStage, theIsoEmFinalStage, theJetFinalStage, theJetFinders, theJetLeafCards, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

Referenced by process().

370  {
371  bool result = true;
372  result &= (m_inputChannelMask != nullptr);
373  // EM Leaf Card
374  for (int i = 0; i < N_EM_LEAF_CARDS; i++) {
375  result &= theEmLeafCards.at(i)->setupOk();
376  }
377 
378  // Jet Leaf cards
379  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
380  result &= theJetLeafCards.at(i)->setupOk();
381  }
382 
383  // Jet Finders
384  for (int i = 0; i < N_JET_LEAF_CARDS * 3; i++) {
385  result &= theJetFinders.at(i)->setupOk();
386  }
387 
388  // Wheel Cards
389  for (int i = 0; i < N_WHEEL_CARDS; i++) {
390  result &= theWheelJetFpgas.at(i)->setupOk();
391  }
392 
393  for (int i = 0; i < N_WHEEL_CARDS; i++) {
394  result &= theWheelEnergyFpgas.at(i)->setupOk();
395  }
396 
397  // Electron Final Stage
400 
401  // Jet Final Stage
403 
404  // Energy Final Stage
406 
407  // All done.
408  return result;
409 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
const L1GctChannelMask * m_inputChannelMask
Input channel mask.
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
bool setupOk() const
check setup
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards
bool setupOk() const
check setup

◆ setupTauAlgo()

void L1GlobalCaloTrigger::setupTauAlgo ( const bool  useImprovedAlgo,
const bool  ignoreVetoBitsForIsolation 
)

setup the tau algorithm parameters

Setup the tau algorithm parameters.

Definition at line 335 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, N_JET_LEAF_CARDS, and theJetLeafCards.

335  {
336  // Need to propagate the new parameters to all the JetFinders
337  for (int i = 0; i < N_JET_LEAF_CARDS; 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);
341  }
342 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.

◆ setVerbose()

void L1GlobalCaloTrigger::setVerbose ( )

control output messages

Definition at line 752 of file L1GlobalCaloTrigger.cc.

References mps_fire::i, N_EM_LEAF_CARDS, N_JET_LEAF_CARDS, N_WHEEL_CARDS, L1GctProcessor::setVerbose(), theEmLeafCards, theEnergyFinalStage, theIsoEmFinalStage, theJetFinalStage, theJetFinders, theJetLeafCards, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

752  {
753  // EM Leaf Card
754  for (int i = 0; i < N_EM_LEAF_CARDS; i++) {
755  theEmLeafCards.at(i)->setVerbose();
756  }
757 
758  // Jet Leaf cards
759  for (int i = 0; i < N_JET_LEAF_CARDS; i++) {
760  theJetLeafCards.at(i)->setVerbose();
761  }
762 
763  // Jet Finders
764  for (int i = 0; i < N_JET_LEAF_CARDS * 3; i++) {
765  theJetFinders.at(i)->setVerbose();
766  }
767 
768  // Wheel Cards
769  for (int i = 0; i < N_WHEEL_CARDS; i++) {
770  theWheelJetFpgas.at(i)->setVerbose();
771  }
772 
773  for (int i = 0; i < N_WHEEL_CARDS; i++) {
774  theWheelEnergyFpgas.at(i)->setVerbose();
775  }
776 
777  // Electron Final Stage
780 
781  // Jet Final Stage
783 
784  // Energy Final Stage
786 }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
static const int N_WHEEL_CARDS
Number of Wheel Cards.
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
std::vector< L1GctJetFinderBase * > theJetFinders
pointers to the Jet Finders
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
void setVerbose()
control output messages
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards

◆ sorterNo()

unsigned L1GlobalCaloTrigger::sorterNo ( const L1CaloEmCand em) const
private

ordering of the electron sorters to give the correct priority to the candidates in the final sort

ordering of the electron sorters to give the correct priority to the candidates in the final sort The priority ordering is: crates 4 - 8 : priority 0 (highest) crates 0 - 3 : priority 1 crates 13 -17 : priority 2 crates 9 -12 : priority 3 (lowest)

Definition at line 912 of file L1GlobalCaloTrigger.cc.

References L1CaloEmCand::rctCrate(), and mps_fire::result.

Referenced by setIsoEm(), and setNonIsoEm().

912  {
913  unsigned crate = em.rctCrate();
914  unsigned result = (((crate % 9) < 4) ? 1 : 0);
915  if (crate >= 9)
916  result += 2;
917  if (crate >= 18)
918  result = 0;
919  return result;
920 }
unsigned rctCrate() const
get RCT crate
Definition: L1CaloEmCand.h:51

◆ sortInputData()

void L1GlobalCaloTrigger::sortInputData ( )
private

Sort the input data by bunch crossing number.

Steps in the processing treating input arriving over several bunch crossings Sort the input data by bunch crossing number

Definition at line 165 of file L1GlobalCaloTrigger.cc.

References emcBxComparator, m_allInputEmCands, m_allInputRegions, rgnBxComparator, and jetUpdater_cfi::sort.

Referenced by process().

165  {
168 }
std::vector< L1CaloEmCand > m_allInputEmCands
CompareBx< L1CaloRegion > rgnBxComparator
CompareBx< L1CaloEmCand > emcBxComparator
std::vector< L1CaloRegion > m_allInputRegions

Member Data Documentation

◆ emcBxComparator

CompareBx<L1CaloEmCand> L1GlobalCaloTrigger::emcBxComparator
private

Definition at line 255 of file L1GlobalCaloTrigger.h.

Referenced by sortInputData().

◆ m_allInputEmCands

std::vector<L1CaloEmCand> L1GlobalCaloTrigger::m_allInputEmCands
private

Local copies of input data, sorted by bunch crossing then sent to the processors one bunch crossing at a time

Definition at line 306 of file L1GlobalCaloTrigger.h.

Referenced by bxSetup(), fillEmCands(), process(), reset(), and sortInputData().

◆ m_allInputRegions

std::vector<L1CaloRegion> L1GlobalCaloTrigger::m_allInputRegions
private

Definition at line 307 of file L1GlobalCaloTrigger.h.

Referenced by bxSetup(), fillRegions(), process(), reset(), and sortInputData().

◆ m_bxRangeAuto

bool L1GlobalCaloTrigger::m_bxRangeAuto
private

Multiple bunch crossing operation.

Definition at line 300 of file L1GlobalCaloTrigger.h.

Referenced by bxSetup(), reset(), setBxRange(), setBxRangeAutomatic(), and setBxRangeSymmetric().

◆ m_bxStart

int L1GlobalCaloTrigger::m_bxStart
private

◆ m_inputChannelMask

const L1GctChannelMask* L1GlobalCaloTrigger::m_inputChannelMask
private

Input channel mask.

Definition at line 297 of file L1GlobalCaloTrigger.h.

Referenced by setChannelMask(), setIsoEm(), setNonIsoEm(), setRegion(), and setupOk().

◆ m_jetEtCalLuts

lutPtrVector L1GlobalCaloTrigger::m_jetEtCalLuts
private

Jet Et calibration LUT.

Definition at line 294 of file L1GlobalCaloTrigger.h.

Referenced by getJetEtCalibLuts(), and setJetEtCalibrationLuts().

◆ m_jetFinderParams

const L1GctJetFinderParams* L1GlobalCaloTrigger::m_jetFinderParams
private

Jetfinder parameters.

Definition at line 291 of file L1GlobalCaloTrigger.h.

Referenced by getJetFinderParams(), and setJetFinderParams().

◆ m_numOfBx

int L1GlobalCaloTrigger::m_numOfBx
private

◆ N_EM_LEAF_CARDS

const int L1GlobalCaloTrigger::N_EM_LEAF_CARDS = 2
static

Number of Leaf Cards configured for EM processing.

Definition at line 49 of file L1GlobalCaloTrigger.h.

Referenced by build(), bxProcess(), bxReset(), bxSetup(), reset(), setTerse(), setupOk(), and setVerbose().

◆ N_JET_LEAF_CARDS

const int L1GlobalCaloTrigger::N_JET_LEAF_CARDS = 6
static

◆ N_WHEEL_CARDS

const int L1GlobalCaloTrigger::N_WHEEL_CARDS = 2
static

Number of Wheel Cards.

Definition at line 51 of file L1GlobalCaloTrigger.h.

Referenced by build(), bxProcess(), bxReset(), bxSetup(), getInternalEtSums(), getInternalHtMiss(), reset(), setTerse(), setupOk(), and setVerbose().

◆ rgnBxComparator

CompareBx<L1CaloRegion> L1GlobalCaloTrigger::rgnBxComparator
private

Definition at line 256 of file L1GlobalCaloTrigger.h.

Referenced by sortInputData().

◆ theEmLeafCards

std::vector<L1GctEmLeafCard*> L1GlobalCaloTrigger::theEmLeafCards
private

pointers to the EM Leaf cards

Definition at line 266 of file L1GlobalCaloTrigger.h.

Referenced by build(), bxProcess(), bxReset(), bxSetup(), getEmLeafCards(), print(), reset(), setTerse(), setupOk(), setVerbose(), and ~L1GlobalCaloTrigger().

◆ theEnergyFinalStage

L1GctGlobalEnergyAlgos* L1GlobalCaloTrigger::theEnergyFinalStage
private

◆ theIsoElectronSorters

std::vector<L1GctElectronSorter*> L1GlobalCaloTrigger::theIsoElectronSorters
private

pointers to the electron sorters

Definition at line 269 of file L1GlobalCaloTrigger.h.

Referenced by build(), and setIsoEm().

◆ theIsoEmFinalStage

L1GctElectronFinalSort* L1GlobalCaloTrigger::theIsoEmFinalStage
private

◆ theJetFinalStage

L1GctJetFinalStage* L1GlobalCaloTrigger::theJetFinalStage
private

◆ theJetFinders

std::vector<L1GctJetFinderBase*> L1GlobalCaloTrigger::theJetFinders
private

pointers to the Jet Finders

Definition at line 263 of file L1GlobalCaloTrigger.h.

Referenced by build(), getInternalEtSums(), getInternalHtMiss(), getInternalJets(), reset(), setRegion(), setTerse(), setupOk(), and setVerbose().

◆ theJetLeafCards

std::vector<L1GctJetLeafCard*> L1GlobalCaloTrigger::theJetLeafCards
private

◆ theNonIsoElectronSorters

std::vector<L1GctElectronSorter*> L1GlobalCaloTrigger::theNonIsoElectronSorters
private

Definition at line 270 of file L1GlobalCaloTrigger.h.

Referenced by build(), and setNonIsoEm().

◆ theNonIsoEmFinalStage

L1GctElectronFinalSort* L1GlobalCaloTrigger::theNonIsoEmFinalStage
private

◆ theWheelEnergyFpgas

std::vector<L1GctWheelEnergyFpga*> L1GlobalCaloTrigger::theWheelEnergyFpgas
private

◆ theWheelJetFpgas

std::vector<L1GctWheelJetFpga*> L1GlobalCaloTrigger::theWheelJetFpgas
private