CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::kEtHadNBits
etHadType
 
typedef L1GctUnsignedInt
< L1GctEtMiss::kEtMissPhiNBits
etMissPhiType
 
typedef L1GctUnsignedInt
< L1GctEtMiss::kEtMissNBits
etMissType
 
typedef L1GctUnsignedInt
< L1GctEtTotal::kEtTotalNBits
etTotalType
 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 46 of file L1GlobalCaloTrigger.h.

Member Typedef Documentation

Definition at line 57 of file L1GlobalCaloTrigger.h.

Definition at line 59 of file L1GlobalCaloTrigger.h.

Definition at line 58 of file L1GlobalCaloTrigger.h.

typedefs for energy values in fixed numbers of bits

Definition at line 56 of file L1GlobalCaloTrigger.h.

Definition at line 61 of file L1GlobalCaloTrigger.h.

Definition at line 62 of file L1GlobalCaloTrigger.h.

Constructor & Destructor Documentation

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

construct the GCT

Definition at line 25 of file L1GlobalCaloTrigger.cc.

References build().

25  :
36  m_bxRangeAuto(true),
37  m_bxStart(0), m_numOfBx(1),
39 {
40 
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 &amp; 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 ( )

dismantle the GCT

GCT Destructor.

Definition at line 46 of file L1GlobalCaloTrigger.cc.

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

47 {
48  // Delete the components of the GCT that we made in build()
49  // (But not the LUTs, since these don't belong to us)
50 
52 
53  if (theIsoEmFinalStage != 0) delete theIsoEmFinalStage;
54 
55  if (theEnergyFinalStage != 0) delete theEnergyFinalStage;
56 
57  if (theJetFinalStage != 0) delete theJetFinalStage;
58 
59  for (unsigned i=0; i<theWheelEnergyFpgas.size(); ++i) {
60  if (theWheelEnergyFpgas.at(i) != 0) delete theWheelEnergyFpgas.at(i); }
61  theWheelEnergyFpgas.clear();
62 
63  for (unsigned i=0; i<theWheelJetFpgas.size(); ++i) {
64  if (theWheelJetFpgas.at(i) != 0) delete theWheelJetFpgas.at(i); }
65  theWheelJetFpgas.clear();
66 
67  for (unsigned i=0; i<theEmLeafCards.size(); ++i) {
68  if (theEmLeafCards.at(i) != 0) delete theEmLeafCards.at(i); }
69  theEmLeafCards.clear();
70 
71  for (unsigned i=0; i<theJetLeafCards.size(); ++i) {
72  if (theJetLeafCards.at(i) != 0) delete theJetLeafCards.at(i); }
73  theJetLeafCards.clear();
74 
75 }
int i
Definition: DBlmapReader.cc:9
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

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

instantiate the hardware & algo objects and wire up the system

Definition at line 839 of file L1GlobalCaloTrigger.cc.

References i, 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().

839  {
840 
841  // The first half of the jet leaf cards are at negative eta,
842  // followed by positive eta
843  // Jet Leaf cards
844  if (jetLeafMask==0) {
845  for (int jlc=0; jlc<N_JET_LEAF_CARDS; jlc++) {
846  theJetLeafCards.at(jlc) = new L1GctJetLeafCard(jlc,jlc % 3, jfType);
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  }
851  } else {
852  // Setup for hardware testing with reduced number of leaf cards
853  unsigned mask = jetLeafMask;
854  for (int jlc=0; jlc<N_JET_LEAF_CARDS; jlc++) {
855  if ((mask&1) == 0) {
856  theJetLeafCards.at(jlc) = new L1GctJetLeafCard(jlc,jlc % 3, jfType);
857  } else {
859  }
860  theJetFinders.at( 3*jlc ) = theJetLeafCards.at(jlc)->getJetFinderA();
861  theJetFinders.at(3*jlc+1) = theJetLeafCards.at(jlc)->getJetFinderB();
862  theJetFinders.at(3*jlc+2) = theJetLeafCards.at(jlc)->getJetFinderC();
863  mask = mask >> 1;
864  }
865  }
866 
867  //Link jet leaf cards together
868  vector<L1GctJetLeafCard*> neighbours(2);
869  for (int jlc=0 ; jlc<N_JET_LEAF_CARDS/2; jlc++) {
870  // Define local constant for ease of typing
871  static const int NL = N_JET_LEAF_CARDS/2;
872  int nlc = (jlc+1)%NL;
873  int mlc = (jlc+(NL-1))%NL;
874  neighbours.at(0) = theJetLeafCards.at(mlc);
875  neighbours.at(1) = theJetLeafCards.at(nlc);
876  theJetLeafCards.at(jlc)->setNeighbourLeafCards(neighbours);
877  neighbours.at(0) = theJetLeafCards.at(NL+mlc);
878  neighbours.at(1) = theJetLeafCards.at(NL+nlc);
879  theJetLeafCards.at(NL+jlc)->setNeighbourLeafCards(neighbours);
880  }
881 
882  // EM leaf cards
883  // Card 0 is positive eta, card 1 is negative eta
884  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
885  theEmLeafCards.at(i) = new L1GctEmLeafCard(i);
886  theIsoElectronSorters.at( 2*i ) = theEmLeafCards.at(i)->getIsoElectronSorterU1();
887  theIsoElectronSorters.at(2*i+1) = theEmLeafCards.at(i)->getIsoElectronSorterU2();
888  theNonIsoElectronSorters.at( 2*i ) = theEmLeafCards.at(i)->getNonIsoElectronSorterU1();
889  theNonIsoElectronSorters.at(2*i+1) = theEmLeafCards.at(i)->getNonIsoElectronSorterU2();
890  }
891 
892  // Wheel Fpgas
893  vector<L1GctJetLeafCard*> wheelJetLeafCards(3);
894  vector<L1GctJetLeafCard*> wheelEnergyLeafCards(3);
895 
896  // The first wheel card is at negative eta,
897  // the second one is at positive eta
898  for (int i=0; i<N_WHEEL_CARDS; i++) {
899  for (int j=0; j<3; j++) {
900  wheelJetLeafCards.at(j)=theJetLeafCards.at(i*3+j);
901  wheelEnergyLeafCards.at(j)=theJetLeafCards.at(i*3+j);
902  }
903  theWheelJetFpgas.at(i) = new L1GctWheelJetFpga (i,wheelJetLeafCards);
904  theWheelEnergyFpgas.at(i) = new L1GctWheelEnergyFpga(i,wheelEnergyLeafCards);
905  }
906 
907  // Jet Final Stage
909 
910  // Electron Final Sort
913 
914  // Global Energy Algos
916 
917 }
Emulates the energy summing on a GCT Wheel card.
int i
Definition: DBlmapReader.cc:9
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
int j
Definition: DBlmapReader.cc:9
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.
void L1GlobalCaloTrigger::bxProcess ( const int  bx)
private

Process a new bunch crossing.

Definition at line 253 of file L1GlobalCaloTrigger.cc.

References L1GctJetFinalStage::fetchInput(), L1GctElectronFinalSort::fetchInput(), L1GctGlobalEnergyAlgos::fetchInput(), 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().

253  {
254 
255  // EM Leaf Card
256  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
257  theEmLeafCards.at(i)->fetchInput();
258  theEmLeafCards.at(i)->process();
259  }
260 
261  // Jet Leaf cards - first stage processing
262  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
263  theJetLeafCards.at(i)->fetchInput();
264  }
265 
266  // Jet Leaf cards - second stage processing
267  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
268  theJetLeafCards.at(i)->process();
269  }
270 
271  // Wheel Cards
272  for (int i=0; i<N_WHEEL_CARDS; i++) {
273  theWheelJetFpgas.at(i)->fetchInput();
274  theWheelJetFpgas.at(i)->process();
275  }
276 
277  for (int i=0; i<N_WHEEL_CARDS; i++) {
278  theWheelEnergyFpgas.at(i)->fetchInput();
279  theWheelEnergyFpgas.at(i)->process();
280  }
281 
282  // Electron Final Stage
285 
288 
289 
290  // Jet Final Stage
293 
294  // Energy Final Stage
297 
298 }
int i
Definition: DBlmapReader.cc:9
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
virtual void process()
process the data, fill output buffers
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
virtual void process()
process the data, fill output buffers
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
virtual void fetchInput()
get input data from sources
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
virtual void process()
process the data, fill output buffers
static const int N_EM_LEAF_CARDS
Number of Leaf Cards configured for EM processing.
virtual void fetchInput()
get input data from sources
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
virtual void fetchInput()
get input data from sources
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards
void L1GlobalCaloTrigger::bxReset ( const int  bx)
private

Partial reset for a new bunch crossing.

Definition at line 220 of file L1GlobalCaloTrigger.cc.

References 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().

220  {
221  // EM Leaf Card
222  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
223  theEmLeafCards.at(i)->setNextBx(bx);
224  }
225 
226  // Jet Leaf cards
227  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
228  theJetLeafCards.at(i)->setNextBx(bx);
229  }
230 
231  // Wheel Cards
232  for (int i=0; i<N_WHEEL_CARDS; i++) {
233  theWheelJetFpgas.at(i)->setNextBx(bx);
234  }
235 
236  for (int i=0; i<N_WHEEL_CARDS; i++) {
237  theWheelEnergyFpgas.at(i)->setNextBx(bx);
238  }
239 
240  // Electron Final Stage
243 
244  // Jet Final Stage
246 
247  // Energy Final Stage
249 
250 }
int i
Definition: DBlmapReader.cc:9
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
void L1GlobalCaloTrigger::bxSetup ( )
private

Setup bunch crossing range (depending on input data)

Definition at line 165 of file L1GlobalCaloTrigger.cc.

References i, m_allInputEmCands, m_allInputRegions, m_bxRangeAuto, m_bxStart, m_numOfBx, bookConverter::max, 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().

165  {
166  // Assume input data have been sorted by bunch crossing number
167  if (m_bxRangeAuto) {
168  // Find parameters defining the range of bunch crossings to be processed
169  int16_t firstBxEmCand = (m_allInputEmCands.size()==0 ? 0 : m_allInputEmCands.front().bx() );
170  int16_t firstBxRegion = (m_allInputRegions.size()==0 ? 0 : m_allInputRegions.front().bx() );
171  int16_t lastBxEmCand = (m_allInputEmCands.size()==0 ? 0 : m_allInputEmCands.back().bx() );
172  int16_t lastBxRegion = (m_allInputRegions.size()==0 ? 0 : m_allInputRegions.back().bx() );
173  m_bxStart = std::min(firstBxEmCand, firstBxRegion);
174  m_numOfBx = std::max( lastBxEmCand, lastBxRegion) - m_bxStart + 1;
175  } else {
176  // Remove any input from before the start of the requested range
177  for (vector<L1CaloEmCand>::iterator emc=m_allInputEmCands.begin(); emc != m_allInputEmCands.end(); emc++) {
178  if (emc->bx() >= m_bxStart) break;
179  m_allInputEmCands.erase(emc);
180  }
181 
182  for (vector<L1CaloRegion>::iterator rgn=m_allInputRegions.begin(); rgn != m_allInputRegions.end(); rgn++) {
183  if (rgn->bx() >= m_bxStart) break;
184  m_allInputRegions.erase(rgn);
185  }
186  }
187 
188  // Setup pipeline lengths
189  // EM Leaf Card
190  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
191  theEmLeafCards.at(i)->setBxRange(m_bxStart, m_numOfBx);
192  }
193 
194  // Jet Leaf cards
195  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
196  theJetLeafCards.at(i)->setBxRange(m_bxStart, m_numOfBx);
197  }
198 
199  // Wheel Cards
200  for (int i=0; i<N_WHEEL_CARDS; i++) {
201  theWheelJetFpgas.at(i)->setBxRange(m_bxStart, m_numOfBx);
202  }
203 
204  for (int i=0; i<N_WHEEL_CARDS; i++) {
205  theWheelEnergyFpgas.at(i)->setBxRange(m_bxStart, m_numOfBx);
206  }
207 
208  // Electron Final Stage
211 
212  // Jet Final Stage
214 
215  // Energy Final Stage
217 }
int i
Definition: DBlmapReader.cc:9
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.
T min(T a, T b)
Definition: MathUtil.h:58
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
void L1GlobalCaloTrigger::fillEmCands ( const std::vector< L1CaloEmCand > &  rgn)

set electrons from the RCT at the input to be processed

Definition at line 444 of file L1GlobalCaloTrigger.cc.

References m_allInputEmCands.

Referenced by process(), and L1GctEmulator::produce().

445 {
446  // To enable multiple bunch crossing operation, we copy the input electrons into a vector,
447  // from which they will be extracted one bunch crossing at a time and sent to the processors
448  vector<L1CaloEmCand>::iterator itr=m_allInputEmCands.end();
449  m_allInputEmCands.insert(itr, em.begin(), em.end());
450 }
std::vector< L1CaloEmCand > m_allInputEmCands
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 460 of file L1GlobalCaloTrigger.cc.

References m_allInputEmCands, setIsoEm(), and setNonIsoEm().

460  {
461  while (emc != m_allInputEmCands.end() && emc->bx() == bx) {
462  if (emc->isolated()) {
463  setIsoEm(*emc);
464  } else {
465  setNonIsoEm(*emc);
466  }
467  emc++;
468  }
469 }
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
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 435 of file L1GlobalCaloTrigger.cc.

References m_allInputRegions.

Referenced by process(), and L1GctEmulator::produce().

436 {
437  // To enable multiple bunch crossing operation, we copy the input regions into a vector,
438  // from which they will be extracted one bunch crossing at a time and sent to the processors
439  vector<L1CaloRegion>::iterator itr=m_allInputRegions.end();
440  m_allInputRegions.insert(itr, rgn.begin(), rgn.end());
441 }
std::vector< L1CaloRegion > m_allInputRegions
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 453 of file L1GlobalCaloTrigger.cc.

References m_allInputRegions, and setRegion().

453  {
454  while (rgn != m_allInputRegions.end() && rgn->bx() == bx) {
455  setRegion(*rgn++);
456  }
457 }
std::vector< L1CaloRegion > m_allInputRegions
void setRegion(const L1CaloRegion &region)
L1GctJetCandCollection L1GlobalCaloTrigger::getCentralJets ( ) const

central jet outputs to GT

Definition at line 595 of file L1GlobalCaloTrigger.cc.

References L1GctJetFinalStage::getCentralJets(), and theJetFinalStage.

Referenced by L1GctEmulator::produce().

595  {
597 }
JetVector getCentralJets() const
get the central jets output data
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
std::vector<L1GctEmLeafCard*> L1GlobalCaloTrigger::getEmLeafCards ( ) const
inline

get the Jet Leaf cards

Definition at line 185 of file L1GlobalCaloTrigger.h.

References theEmLeafCards.

185 { return theEmLeafCards; }
std::vector< L1GctEmLeafCard * > theEmLeafCards
pointers to the EM Leaf cards
L1GctGlobalEnergyAlgos* L1GlobalCaloTrigger::getEnergyFinalStage ( ) const
inline

get the energy final stage

Definition at line 197 of file L1GlobalCaloTrigger.h.

References theEnergyFinalStage.

Referenced by L1GctPrintLuts::analyze().

197 { return theEnergyFinalStage; }
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
L1GctEtHadCollection L1GlobalCaloTrigger::getEtHadCollection ( ) const

Total hadronic Et output to GT.

Definition at line 635 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::produce().

635  {
637  int bx = m_bxStart;
638  for (int i=0; i<m_numOfBx; i++) {
640  theEnergyFinalStage->getEtHadColl().at(i).overFlow(),
641  bx++ );
642  result.at(i) = temp;
643  }
644  return result;
645 }
int i
Definition: DBlmapReader.cc:9
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
std::vector< L1GctEtHad > L1GctEtHadCollection
std::vector< etHadType > getEtHadColl() const
return std::vector&lt; output calibrated jet Et
tuple result
Definition: query.py:137
Persistable copy of total Ht measured at Level-1.
Definition: L1GctEtHad.h:18
L1GctEtMissCollection L1GlobalCaloTrigger::getEtMissCollection ( ) const

Etmiss output to GT.

Definition at line 647 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::produce().

647  {
649  int bx = m_bxStart;
650  for (int i=0; i<m_numOfBx; i++) {
652  theEnergyFinalStage->getEtMissPhiColl().at(i).value(),
653  theEnergyFinalStage->getEtMissColl().at(i).overFlow(),
654  bx++ );
655  result.at(i) = temp;
656  }
657  return result;
658 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1GctEtMiss > L1GctEtMissCollection
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
std::vector< etMissPhiType > getEtMissPhiColl() const
return output missing Et value
Persistable copy of missing Et measured at Level-1.
Definition: L1GctEtMiss.h:18
tuple result
Definition: query.py:137
std::vector< etMissType > getEtMissColl() const
return output missing Et magnitude
L1GctEtTotalCollection L1GlobalCaloTrigger::getEtSumCollection ( ) const

Total Et output to GT.

Definition at line 623 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::produce().

623  {
625  int bx = m_bxStart;
626  for (int i=0; i<m_numOfBx; i++) {
628  theEnergyFinalStage->getEtSumColl().at(i).overFlow(),
629  bx++ );
630  result.at(i) = temp;
631  }
632  return result;
633 }
int i
Definition: DBlmapReader.cc:9
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
std::vector< L1GctEtTotal > L1GctEtTotalCollection
Persistable copy of total Et measured at Level-1.
Definition: L1GctEtTotal.h:18
tuple result
Definition: query.py:137
std::vector< etTotalType > getEtSumColl() const
return output total scalar Et
int L1GlobalCaloTrigger::getFirstBx ( ) const
inline

accessor methods

Definition at line 109 of file L1GlobalCaloTrigger.h.

References m_bxStart.

109 { return m_bxStart; }
L1GctJetCandCollection L1GlobalCaloTrigger::getForwardJets ( ) const

forward jet outputs to GT

Definition at line 600 of file L1GlobalCaloTrigger.cc.

References L1GctJetFinalStage::getForwardJets(), and theJetFinalStage.

Referenced by L1GctEmulator::produce().

600  {
601  return theJetFinalStage->getForwardJets();
602 }
JetVector getForwardJets() const
get the forward jets output data
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
L1GctHFBitCountsCollection L1GlobalCaloTrigger::getHFBitCountsCollection ( ) const

Definition at line 726 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::produce().

726  {
728  if (getHfSumProcessor() != 0) {
729  int bx = m_bxStart;
730  for (int i=0; i<m_numOfBx; i++) {
732  L1GctHFBitCounts::fromGctEmulator(static_cast<int16_t>(bx),
737  result.at(i) = temp;
738  bx++;
739  }
740  }
741  return result;
742 }
int i
Definition: DBlmapReader.cc:9
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
L1 GCT HF ring Et sums.
tuple result
Definition: query.py:137
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
L1GctHFRingEtSumsCollection L1GlobalCaloTrigger::getHFRingEtSumsCollection ( ) const

Definition at line 744 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::produce().

744  {
746  if (getHfSumProcessor() != 0) {
747  int bx = m_bxStart;
748  for (int i=0; i<m_numOfBx; i++) {
750  L1GctHFRingEtSums::fromGctEmulator(static_cast<int16_t>(bx),
755  result.at(i) = temp;
756  bx++;
757  }
758  }
759  return result;
760 }
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
int i
Definition: DBlmapReader.cc:9
std::vector< L1GctHFRingEtSums > L1GctHFRingEtSumsCollection
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
tuple result
Definition: query.py:137
L1 GCT HF ring Et sums.
L1GctGlobalHfSumAlgos * L1GlobalCaloTrigger::getHfSumProcessor ( ) const

provide access to hf sum processor

Definition at line 413 of file L1GlobalCaloTrigger.cc.

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

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

414 {
416  if (theEnergyFinalStage !=0) {
418  }
419  return result;
420 }
Emulates the GCT summing and packing of Hf Et sums and tower-over-threshold counts.
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
tuple result
Definition: query.py:137
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
L1GctHtMissCollection L1GlobalCaloTrigger::getHtMissCollection ( ) const

Htmiss output to GT.

Definition at line 660 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::produce().

660  {
662  int bx = m_bxStart;
663  for (int i=0; i<m_numOfBx; i++) {
665  theEnergyFinalStage->getHtMissPhiColl().at(i).value(),
666  theEnergyFinalStage->getHtMissColl().at(i).overFlow(),
667  bx++ );
668  result.at(i) = temp;
669  }
670  return result;
671 }
std::vector< etMissType > getHtMissColl() const
return output missing Ht magnitude
int i
Definition: DBlmapReader.cc:9
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
tuple result
Definition: query.py:137
std::vector< L1GctHtMiss > L1GctHtMissCollection
Persistable copy of missing Et measured at Level-1.
Definition: L1GctHtMiss.h:16
std::vector< etMissPhiType > getHtMissPhiColl() const
return output missing Ht value
L1GctInternEtSumCollection L1GlobalCaloTrigger::getInternalEtSums ( ) const

Et sums and components in internal format.

Definition at line 673 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::produce().

674 {
675  L1GctInternEtSumCollection allSums, procSums;
676 
677  // Go through all the processor types that process et sums
678  // JetFinders
679  for (unsigned jf=0; jf<theJetFinders.size(); jf++) {
680  procSums = theJetFinders.at(jf)->getInternalEtSums();
681  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
682  }
683 
684  // Jet Leaf cards
685  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
686  procSums = theJetLeafCards.at(i)->getInternalEtSums();
687  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
688  }
689 
690  // Wheel Cards
691  for (int i=0; i<N_WHEEL_CARDS; i++) {
692  procSums = theWheelEnergyFpgas.at(i)->getInternalEtSums();
693  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
694  }
695 
696  return allSums;
697 }
int i
Definition: DBlmapReader.cc:9
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
L1GctInternHtMissCollection L1GlobalCaloTrigger::getInternalHtMiss ( ) const

Definition at line 699 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::produce().

700 {
701  L1GctInternHtMissCollection allSums, procSums;
702 
703  // Go through all the processor types that process et sums
704  // JetFinders
705  for (unsigned jf=0; jf<theJetFinders.size(); jf++) {
706  procSums = theJetFinders.at(jf)->getInternalHtMiss();
707  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
708  }
709 
710  // Jet Leaf cards
711  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
712  procSums = theJetLeafCards.at(i)->getInternalHtMiss();
713  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
714  }
715 
716  // Wheel Cards
717  for (int i=0; i<N_WHEEL_CARDS; i++) {
718  procSums = theWheelJetFpgas.at(i)->getInternalHtMiss();
719  allSums.insert(allSums.end(), procSums.begin(), procSums.end());
720  }
721 
722  return allSums;
723 }
int i
Definition: DBlmapReader.cc:9
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.
L1GctInternJetDataCollection L1GlobalCaloTrigger::getInternalJets ( ) const

all jets from jetfinders in raw format

Definition at line 610 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::produce().

610  {
612 
613  // Loop over jetfinders, find the internal jets and add them to the list
614  for (unsigned jf=0; jf<theJetFinders.size(); jf++) {
615  jfJets = theJetFinders.at(jf)->getInternalJets();
616  allJets.insert(allJets.end(), jfJets.begin(), jfJets.end());
617  }
618 
619  return allJets;
620 }
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
L1GctEmCandCollection L1GlobalCaloTrigger::getIsoElectrons ( ) const

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

iso electron outputs to GT

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

Definition at line 585 of file L1GlobalCaloTrigger.cc.

References L1GctElectronFinalSort::getOutputCands(), and theIsoEmFinalStage.

Referenced by L1GctEmulator::produce().

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

get the electron final stage sorters

Definition at line 203 of file L1GlobalCaloTrigger.h.

References theIsoEmFinalStage.

203 { return theIsoEmFinalStage; }
L1GctElectronFinalSort * theIsoEmFinalStage
iso electron final stage sorter
const lutPtrVector L1GlobalCaloTrigger::getJetEtCalibLuts ( ) const
inline

get the Jet Et calibration LUT

Definition at line 210 of file L1GlobalCaloTrigger.h.

References m_jetEtCalLuts.

210 { return m_jetEtCalLuts; }
lutPtrVector m_jetEtCalLuts
Jet Et calibration LUT.
L1GctJetFinalStage* L1GlobalCaloTrigger::getJetFinalStage ( ) const
inline

get the jet final stage

Definition at line 194 of file L1GlobalCaloTrigger.h.

References theJetFinalStage.

194 { return theJetFinalStage; }
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
const L1GctJetFinderParams* L1GlobalCaloTrigger::getJetFinderParams ( ) const
inline

get the jetFinder parameters

Definition at line 207 of file L1GlobalCaloTrigger.h.

References m_jetFinderParams.

207 { return m_jetFinderParams; }
const L1GctJetFinderParams * m_jetFinderParams
Jetfinder parameters.
std::vector<L1GctJetLeafCard*> L1GlobalCaloTrigger::getJetLeafCards ( ) const
inline

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

get the Jet Leaf cards

Definition at line 182 of file L1GlobalCaloTrigger.h.

References theJetLeafCards.

182 { return theJetLeafCards; }
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
int L1GlobalCaloTrigger::getLastBx ( ) const
inline

Definition at line 110 of file L1GlobalCaloTrigger.h.

References m_bxStart, and m_numOfBx.

L1GctEmCandCollection L1GlobalCaloTrigger::getNonIsoElectrons ( ) const

non-iso electron outputs to GT

Definition at line 590 of file L1GlobalCaloTrigger.cc.

References L1GctElectronFinalSort::getOutputCands(), and theNonIsoEmFinalStage.

Referenced by L1GctEmulator::produce().

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

Definition at line 204 of file L1GlobalCaloTrigger.h.

References theNonIsoEmFinalStage.

204 { return theNonIsoEmFinalStage; }
L1GctElectronFinalSort * theNonIsoEmFinalStage
non-iso electron final stage sorter
L1GctJetCandCollection L1GlobalCaloTrigger::getTauJets ( ) const

tau jet outputs to GT

Definition at line 605 of file L1GlobalCaloTrigger.cc.

References L1GctJetFinalStage::getTauJets(), and theJetFinalStage.

Referenced by L1GctEmulator::produce().

605  {
606  return theJetFinalStage->getTauJets();
607 }
JetVector getTauJets() const
get the tau jets output data
L1GctJetFinalStage * theJetFinalStage
jet final stage algo
int L1GlobalCaloTrigger::getTotalBx ( ) const
inline

Definition at line 111 of file L1GlobalCaloTrigger.h.

References m_numOfBx.

111 { return m_numOfBx; }
std::vector<L1GctWheelEnergyFpga*> L1GlobalCaloTrigger::getWheelEnergyFpgas ( ) const
inline

get the Wheel Energy Fpgas

Definition at line 191 of file L1GlobalCaloTrigger.h.

References theWheelEnergyFpgas.

191 { return theWheelEnergyFpgas; }
std::vector< L1GctWheelEnergyFpga * > theWheelEnergyFpgas
Wheel Card Energy Fpgas.
std::vector<L1GctWheelJetFpga*> L1GlobalCaloTrigger::getWheelJetFpgas ( ) const
inline

get the Wheel Jet FPGAs

Definition at line 188 of file L1GlobalCaloTrigger.h.

References theWheelJetFpgas.

188 { return theWheelJetFpgas; }
std::vector< L1GctWheelJetFpga * > theWheelJetFpgas
Wheel Card Jet Fpgas.
void L1GlobalCaloTrigger::print ( void  )

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

print setup info

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

Definition at line 525 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::L1GctEmulator().

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

process an event

Sort the input data by bunch crossing number

Definition at line 128 of file L1GlobalCaloTrigger.cc.

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

Referenced by ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::completeInputCommand(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_PATFILTER(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), L1GctEmulator::produce(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder::scheduleSequence().

128  {
129 
130  // Shouldn't get here unless the setup has been completed
131  if (setupOk()) {
132 
134  sortInputData();
135  // Extract the earliest and latest bunch crossing
136  // in the input if required, and forward to the processors
137  // to determine the size of the output vectors
138  bxSetup();
139 
140  vector<L1CaloEmCand>::iterator emc=m_allInputEmCands.begin();
141  vector<L1CaloRegion>::iterator rgn=m_allInputRegions.begin();
142  int bx = m_bxStart;
143 
144  // Loop over bunch crossings
145  for (int i=0; i<m_numOfBx; i++) {
146  // Perform partial reset (reset processing logic but preserve pipeline contents)
147  bxReset(bx);
148  // Fill input data into processors for this bunch crossing
149  fillEmCands(emc, bx);
150  fillRegions(rgn, bx);
151  // Process this bunch crossing
152  bxProcess(bx);
153  bx++;
154  }
155  }
156 }
int i
Definition: DBlmapReader.cc:9
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
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
void L1GlobalCaloTrigger::reset ( void  )

Reset internal buffers.

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

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

Definition at line 81 of file L1GlobalCaloTrigger.cc.

References 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.

Referenced by L1GctEmulator::produce().

81  {
82 
83  // Input data
84  m_allInputEmCands.clear();
85  m_allInputRegions.clear();
86 
87  if (m_bxRangeAuto) {
88  m_bxStart = 0;
89  m_numOfBx = 1;
90  }
91 
92  // EM Leaf Card
93  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
94  theEmLeafCards.at(i)->reset();
95  }
96 
97  // Jet Leaf cards
98  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
99  theJetLeafCards.at(i)->reset();
100  }
101 
102  // Jet Finders
103  for (int i=0; i<N_JET_LEAF_CARDS*3; i++) {
104  theJetFinders.at(i)->reset();
105  }
106 
107  // Wheel Cards
108  for (int i=0; i<N_WHEEL_CARDS; i++) {
109  theWheelJetFpgas.at(i)->reset();
110  }
111 
112  for (int i=0; i<N_WHEEL_CARDS; i++) {
113  theWheelEnergyFpgas.at(i)->reset();
114  }
115 
116  // Electron Final Stage
119 
120  // Jet Final Stage
122 
123  // Energy Final Stage
125 
126 }
void reset()
complete reset of processor
int i
Definition: DBlmapReader.cc:9
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
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 424 of file L1GlobalCaloTrigger.cc.

References m_bxRangeAuto, m_bxStart, and m_numOfBx.

Referenced by L1GctEmulator::L1GctEmulator().

424 { m_bxStart = firstBx; m_numOfBx = lastBx - firstBx + 1; m_bxRangeAuto = false; }
bool m_bxRangeAuto
Multiple bunch crossing operation.
void L1GlobalCaloTrigger::setBxRangeAutomatic ( )

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

Definition at line 428 of file L1GlobalCaloTrigger.cc.

References m_bxRangeAuto, m_bxStart, and m_numOfBx.

428 { m_bxStart = 0; m_numOfBx = 1; m_bxRangeAuto = true; }
bool m_bxRangeAuto
Multiple bunch crossing operation.
void L1GlobalCaloTrigger::setBxRangeSymmetric ( const int  numOfBx)

process crossings from (-numOfBx) to (numOfBx)

Definition at line 426 of file L1GlobalCaloTrigger.cc.

References m_bxRangeAuto, m_bxStart, and m_numOfBx.

426 { m_bxStart = -numOfBx; m_numOfBx = 2*numOfBx + 1; m_bxRangeAuto = false; }
bool m_bxRangeAuto
Multiple bunch crossing operation.
void L1GlobalCaloTrigger::setChannelMask ( const L1GctChannelMask *const  mask)

setup the input channel mask

Definition at line 360 of file L1GlobalCaloTrigger.cc.

References i, m_inputChannelMask, N_JET_LEAF_CARDS, and theJetLeafCards.

Referenced by L1GctEmulator::configureGct().

360  {
361  m_inputChannelMask = mask;
362  // Need to propagate the new mask to all the JetFinders
363  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
364  theJetLeafCards.at(i)->getJetFinderA()->setEnergySumMasks(mask);
365  theJetLeafCards.at(i)->getJetFinderB()->setEnergySumMasks(mask);
366  theJetLeafCards.at(i)->getJetFinderC()->setEnergySumMasks(mask);
367  }
368 }
int i
Definition: DBlmapReader.cc:9
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.
void L1GlobalCaloTrigger::setHtMissScale ( const L1CaloEtScale *const  scale)

setup scale for missing Ht

Definition at line 346 of file L1GlobalCaloTrigger.cc.

References L1GctGlobalEnergyAlgos::setHtMissScale(), and theEnergyFinalStage.

Referenced by L1GctEmulator::configureGct(), and L1GctPrintLuts::configureGct().

346  {
347  if (theEnergyFinalStage != 0) {
349  }
350 }
L1GctGlobalEnergyAlgos * theEnergyFinalStage
energy final stage algos
void setHtMissScale(const L1CaloEtScale *const scale)
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 507 of file L1GlobalCaloTrigger.cc.

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

Referenced by fillEmCands().

508 {
509  if ( !m_inputChannelMask->emCrateMask( em.rctCrate() ) )
510  theIsoElectronSorters.at(sorterNo(em))->setInputEmCand(em);
511 }
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:53
std::vector< L1GctElectronSorter * > theIsoElectronSorters
pointers to the electron sorters
void L1GlobalCaloTrigger::setJetEtCalibrationLuts ( const lutPtrVector jfluts)

setup the Jet Calibration Luts

setup the Jet Calibration Lut

Definition at line 323 of file L1GlobalCaloTrigger.cc.

References i, m_jetEtCalLuts, N_JET_LEAF_CARDS, and theJetLeafCards.

Referenced by L1GctEmulator::configureGct(), and L1GctPrintLuts::configureGct().

323  {
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 }
int i
Definition: DBlmapReader.cc:9
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.
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 304 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::configureGct(), and L1GctPrintLuts::configureGct().

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

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

Referenced by fillEmCands().

517 {
518  if ( !m_inputChannelMask->emCrateMask( em.rctCrate() ) )
519  theNonIsoElectronSorters.at(sorterNo(em))->setInputEmCand(em);
520 }
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:53
std::vector< L1GctElectronSorter * > theNonIsoElectronSorters
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 474 of file L1GlobalCaloTrigger.cc.

References L1CaloRegion::gctEta(), L1CaloRegion::gctPhi(), m_inputChannelMask, L1CaloRegionDetId::N_PHI, L1CaloRegion::rctCrate(), L1GctChannelMask::regionMask(), and theJetFinders.

Referenced by fillRegions(), and setRegion().

475 {
476  if ( !m_inputChannelMask->regionMask( region.gctEta(), region.gctPhi() ) ) {
477  unsigned crate = region.rctCrate();
478  // Find the relevant jetFinders
479  static const unsigned NPHI = L1CaloRegionDetId::N_PHI/2;
480  unsigned prevphi = crate % NPHI;
481  unsigned thisphi = (crate+1) % NPHI;
482  unsigned nextphi = (crate+2) % NPHI;
483 
484  // Send the region to six jetFinders.
485  theJetFinders.at(thisphi)->setInputRegion(region);
486  theJetFinders.at(nextphi)->setInputRegion(region);
487  theJetFinders.at(prevphi)->setInputRegion(region);
488  theJetFinders.at(thisphi+NPHI)->setInputRegion(region);
489  theJetFinders.at(nextphi+NPHI)->setInputRegion(region);
490  theJetFinders.at(prevphi+NPHI)->setInputRegion(region);
491  }
492 }
unsigned rctCrate() const
get RCT crate ID
Definition: L1CaloRegion.h:165
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
unsigned gctEta() const
get GCT eta index
Definition: L1CaloRegion.h:180
unsigned gctPhi() const
get GCT phi index
Definition: L1CaloRegion.h:183
static const unsigned N_PHI
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 496 of file L1GlobalCaloTrigger.cc.

References setRegion(), and groupFilesInBlocks::temp.

498 {
499  // L1CaloRegion temp = L1CaloRegion::makeRegionFromGctIndices(et, overFlow, fineGrain, false, false, ieta, iphi, 0);
500  L1CaloRegion temp(et, overFlow, fineGrain, false, false, ieta, iphi, 0);
501  setRegion(temp);
502 }
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:22
void setRegion(const L1CaloRegion &region)
void L1GlobalCaloTrigger::setTerse ( )

Definition at line 800 of file L1GlobalCaloTrigger.cc.

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

800  {
801  // EM Leaf Card
802  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
803  theEmLeafCards.at(i)->setTerse();
804  }
805 
806  // Jet Leaf cards
807  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
808  theJetLeafCards.at(i)->setTerse();
809  }
810 
811  // Jet Finders
812  for (int i=0; i<N_JET_LEAF_CARDS*3; i++) {
813  theJetFinders.at(i)->setTerse();
814  }
815 
816  // Wheel Cards
817  for (int i=0; i<N_WHEEL_CARDS; i++) {
818  theWheelJetFpgas.at(i)->setTerse();
819  }
820 
821  for (int i=0; i<N_WHEEL_CARDS; i++) {
822  theWheelEnergyFpgas.at(i)->setTerse();
823  }
824 
825  // Electron Final Stage
828 
829  // Jet Final Stage
831 
832  // Energy Final Stage
834 }
int i
Definition: DBlmapReader.cc:9
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
void L1GlobalCaloTrigger::setupHfSumLuts ( const L1CaloEtScale *const  scale)

setup Hf sum LUTs

Definition at line 353 of file L1GlobalCaloTrigger.cc.

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

Referenced by L1GctEmulator::configureGct(), and L1GctPrintLuts::configureGct().

353  {
354  if (getHfSumProcessor() != 0) {
355  getHfSumProcessor()->setupLuts(scale);
356  }
357 }
L1GctGlobalHfSumAlgos * getHfSumProcessor() const
provide access to hf sum processor
void setupLuts(const L1CaloEtScale *scale)
Setup luts.
bool L1GlobalCaloTrigger::setupOk ( ) const
private

check we have done all the setup

Definition at line 371 of file L1GlobalCaloTrigger.cc.

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

Referenced by process().

371  {
372  bool result = true;
373  result &= (m_inputChannelMask != 0);
374  // EM Leaf Card
375  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
376  result &= theEmLeafCards.at(i)->setupOk();
377  }
378 
379  // Jet Leaf cards
380  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
381  result &= theJetLeafCards.at(i)->setupOk();
382  }
383 
384  // Jet Finders
385  for (int i=0; i<N_JET_LEAF_CARDS*3; i++) {
386  result &= theJetFinders.at(i)->setupOk();
387  }
388 
389  // Wheel Cards
390  for (int i=0; i<N_WHEEL_CARDS; i++) {
391  result &= theWheelJetFpgas.at(i)->setupOk();
392  }
393 
394  for (int i=0; i<N_WHEEL_CARDS; i++) {
395  result &= theWheelEnergyFpgas.at(i)->setupOk();
396  }
397 
398  // Electron Final Stage
399  result &= theIsoEmFinalStage->setupOk();
400  result &= theNonIsoEmFinalStage->setupOk();
401 
402  // Jet Final Stage
403  result &= theJetFinalStage->setupOk();
404 
405  // Energy Final Stage
406  result &= theEnergyFinalStage->setupOk();
407 
408  // All done.
409  return result;
410 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1GctJetLeafCard * > theJetLeafCards
pointers to the Jet Leaf cards
bool setupOk() const
check setup
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
bool setupOk() const
check setup
static const int N_JET_LEAF_CARDS
Number of Leaf Cards configured for jet processing.
tuple result
Definition: query.py:137
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
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 i, N_JET_LEAF_CARDS, and theJetLeafCards.

Referenced by L1GctEmulator::L1GctEmulator().

336 {
337  // Need to propagate the new parameters to all the JetFinders
338  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
339  theJetLeafCards.at(i)->getJetFinderA()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
340  theJetLeafCards.at(i)->getJetFinderB()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
341  theJetLeafCards.at(i)->getJetFinderC()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
342  }
343 }
int i
Definition: DBlmapReader.cc:9
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.
void L1GlobalCaloTrigger::setVerbose ( )

control output messages

Definition at line 764 of file L1GlobalCaloTrigger.cc.

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

764  {
765  // EM Leaf Card
766  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
767  theEmLeafCards.at(i)->setVerbose();
768  }
769 
770  // Jet Leaf cards
771  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
772  theJetLeafCards.at(i)->setVerbose();
773  }
774 
775  // Jet Finders
776  for (int i=0; i<N_JET_LEAF_CARDS*3; i++) {
777  theJetFinders.at(i)->setVerbose();
778  }
779 
780  // Wheel Cards
781  for (int i=0; i<N_WHEEL_CARDS; i++) {
782  theWheelJetFpgas.at(i)->setVerbose();
783  }
784 
785  for (int i=0; i<N_WHEEL_CARDS; i++) {
786  theWheelEnergyFpgas.at(i)->setVerbose();
787  }
788 
789  // Electron Final Stage
792 
793  // Jet Final Stage
795 
796  // Energy Final Stage
798 }
int i
Definition: DBlmapReader.cc:9
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
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 926 of file L1GlobalCaloTrigger.cc.

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

Referenced by setIsoEm(), and setNonIsoEm().

926  {
927  unsigned crate = em.rctCrate();
928  unsigned result = ( ((crate%9) < 4) ? 1 : 0 );
929  if (crate>=9) result += 2;
930  if (crate>=18) result = 0;
931  return result;
932 }
unsigned rctCrate() const
get RCT crate
Definition: L1CaloEmCand.h:53
tuple result
Definition: query.py:137
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 159 of file L1GlobalCaloTrigger.cc.

References emcBxComparator, m_allInputEmCands, m_allInputRegions, rgnBxComparator, and python.multivaluedict::sort().

Referenced by process().

159  {
162 }
std::vector< L1CaloEmCand > m_allInputEmCands
CompareBx< L1CaloRegion > rgnBxComparator
CompareBx< L1CaloEmCand > emcBxComparator
std::vector< L1CaloRegion > m_allInputRegions

Member Data Documentation

CompareBx<L1CaloEmCand> L1GlobalCaloTrigger::emcBxComparator
private

Definition at line 256 of file L1GlobalCaloTrigger.h.

Referenced by sortInputData().

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 308 of file L1GlobalCaloTrigger.h.

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

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

Definition at line 309 of file L1GlobalCaloTrigger.h.

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

bool L1GlobalCaloTrigger::m_bxRangeAuto
private

Multiple bunch crossing operation.

Definition at line 302 of file L1GlobalCaloTrigger.h.

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

int L1GlobalCaloTrigger::m_bxStart
private
const L1GctChannelMask* L1GlobalCaloTrigger::m_inputChannelMask
private

Input channel mask.

Definition at line 299 of file L1GlobalCaloTrigger.h.

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

lutPtrVector L1GlobalCaloTrigger::m_jetEtCalLuts
private

Jet Et calibration LUT.

Definition at line 296 of file L1GlobalCaloTrigger.h.

Referenced by getJetEtCalibLuts(), and setJetEtCalibrationLuts().

const L1GctJetFinderParams* L1GlobalCaloTrigger::m_jetFinderParams
private

Jetfinder parameters.

Definition at line 293 of file L1GlobalCaloTrigger.h.

Referenced by getJetFinderParams(), and setJetFinderParams().

int L1GlobalCaloTrigger::m_numOfBx
private
const int L1GlobalCaloTrigger::N_EM_LEAF_CARDS = 2
static

Number of Leaf Cards configured for EM processing.

Definition at line 51 of file L1GlobalCaloTrigger.h.

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

const int L1GlobalCaloTrigger::N_JET_LEAF_CARDS = 6
static
const int L1GlobalCaloTrigger::N_WHEEL_CARDS = 2
static

Number of Wheel Cards.

Definition at line 53 of file L1GlobalCaloTrigger.h.

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

CompareBx<L1CaloRegion> L1GlobalCaloTrigger::rgnBxComparator
private

Definition at line 257 of file L1GlobalCaloTrigger.h.

Referenced by sortInputData().

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

pointers to the EM Leaf cards

Definition at line 268 of file L1GlobalCaloTrigger.h.

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

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

pointers to the electron sorters

Definition at line 271 of file L1GlobalCaloTrigger.h.

Referenced by build(), and setIsoEm().

L1GctElectronFinalSort* L1GlobalCaloTrigger::theIsoEmFinalStage
private
L1GctJetFinalStage* L1GlobalCaloTrigger::theJetFinalStage
private
std::vector<L1GctJetFinderBase*> L1GlobalCaloTrigger::theJetFinders
private

pointers to the Jet Finders

Definition at line 265 of file L1GlobalCaloTrigger.h.

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

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

Definition at line 272 of file L1GlobalCaloTrigger.h.

Referenced by build(), and setNonIsoEm().

L1GctElectronFinalSort* L1GlobalCaloTrigger::theNonIsoEmFinalStage
private
std::vector<L1GctWheelEnergyFpga*> L1GlobalCaloTrigger::theWheelEnergyFpgas
private
std::vector<L1GctWheelJetFpga*> L1GlobalCaloTrigger::theWheelJetFpgas
private