CMS 3D CMS Logo

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>

List of all members.

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

Static Public Attributes

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

Private Member Functions

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

Private Attributes

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

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

typedef L1GctUnsignedInt< L1GctEtHad::kEtHadNBits > L1GlobalCaloTrigger::etHadType

Definition at line 57 of file L1GlobalCaloTrigger.h.

typedef L1GctUnsignedInt< L1GctEtMiss::kEtMissPhiNBits > L1GlobalCaloTrigger::etMissPhiType

Definition at line 59 of file L1GlobalCaloTrigger.h.

typedef L1GctUnsignedInt< L1GctEtMiss::kEtMissNBits > L1GlobalCaloTrigger::etMissType

Definition at line 58 of file L1GlobalCaloTrigger.h.

typedef L1GctUnsignedInt< L1GctEtTotal::kEtTotalNBits > L1GlobalCaloTrigger::etTotalType

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

{
  // Delete the components of the GCT that we made in build()
  // (But not the LUTs, since these don't belong to us)

  if (theNonIsoEmFinalStage != 0) delete theNonIsoEmFinalStage;
  
  if (theIsoEmFinalStage != 0) delete theIsoEmFinalStage;
  
  if (theEnergyFinalStage != 0) delete theEnergyFinalStage;     
  
  if (theJetFinalStage != 0) delete theJetFinalStage;                   
  
  for (unsigned i=0; i<theWheelEnergyFpgas.size(); ++i) { 
    if (theWheelEnergyFpgas.at(i) != 0) delete theWheelEnergyFpgas.at(i); }
  theWheelEnergyFpgas.clear();
  
  for (unsigned i=0; i<theWheelJetFpgas.size(); ++i) { 
    if (theWheelJetFpgas.at(i) != 0) delete theWheelJetFpgas.at(i); }
  theWheelJetFpgas.clear();             

  for (unsigned i=0; i<theEmLeafCards.size(); ++i) { 
    if (theEmLeafCards.at(i) != 0) delete theEmLeafCards.at(i); }
  theEmLeafCards.clear();

  for (unsigned i=0; i<theJetLeafCards.size(); ++i) { 
    if (theJetLeafCards.at(i) != 0) delete theJetLeafCards.at(i); }
  theJetLeafCards.clear();
  
}

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

                                                                                          {

  // The first half of the jet leaf cards are at negative eta,
  // followed by positive eta
  // Jet Leaf cards
  if (jetLeafMask==0) {
    for (int jlc=0; jlc<N_JET_LEAF_CARDS; jlc++) {
      theJetLeafCards.at(jlc) = new L1GctJetLeafCard(jlc,jlc % 3, jfType);
      theJetFinders.at( 3*jlc ) = theJetLeafCards.at(jlc)->getJetFinderA();
      theJetFinders.at(3*jlc+1) = theJetLeafCards.at(jlc)->getJetFinderB();
      theJetFinders.at(3*jlc+2) = theJetLeafCards.at(jlc)->getJetFinderC();
    }
  } else {
    // Setup for hardware testing with reduced number of leaf cards
    unsigned mask = jetLeafMask;
    for (int jlc=0; jlc<N_JET_LEAF_CARDS; jlc++) {
      if ((mask&1) == 0) {
        theJetLeafCards.at(jlc) = new L1GctJetLeafCard(jlc,jlc % 3, jfType);
      } else {
        theJetLeafCards.at(jlc) = new L1GctJetLeafCard(jlc,jlc % 3, L1GctJetLeafCard::nullJetFinder);
      }
      theJetFinders.at( 3*jlc ) = theJetLeafCards.at(jlc)->getJetFinderA();
      theJetFinders.at(3*jlc+1) = theJetLeafCards.at(jlc)->getJetFinderB();
      theJetFinders.at(3*jlc+2) = theJetLeafCards.at(jlc)->getJetFinderC();
      mask = mask >> 1;
    }
  }

  //Link jet leaf cards together
  vector<L1GctJetLeafCard*> neighbours(2);
  for (int jlc=0 ; jlc<N_JET_LEAF_CARDS/2; jlc++) {
    // Define local constant for ease of typing
    static const int NL = N_JET_LEAF_CARDS/2;
    int nlc = (jlc+1)%NL;
    int mlc = (jlc+(NL-1))%NL;
    neighbours.at(0) = theJetLeafCards.at(mlc);
    neighbours.at(1) = theJetLeafCards.at(nlc);
    theJetLeafCards.at(jlc)->setNeighbourLeafCards(neighbours);
    neighbours.at(0) = theJetLeafCards.at(NL+mlc);
    neighbours.at(1) = theJetLeafCards.at(NL+nlc);
    theJetLeafCards.at(NL+jlc)->setNeighbourLeafCards(neighbours);
  }

  // EM leaf cards  
  // Card 0 is positive eta, card 1 is negative eta
  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
    theEmLeafCards.at(i) = new L1GctEmLeafCard(i);
    theIsoElectronSorters.at( 2*i ) = theEmLeafCards.at(i)->getIsoElectronSorterU1();
    theIsoElectronSorters.at(2*i+1) = theEmLeafCards.at(i)->getIsoElectronSorterU2();
    theNonIsoElectronSorters.at( 2*i ) = theEmLeafCards.at(i)->getNonIsoElectronSorterU1();
    theNonIsoElectronSorters.at(2*i+1) = theEmLeafCards.at(i)->getNonIsoElectronSorterU2();
  }

   // Wheel Fpgas
   vector<L1GctJetLeafCard*> wheelJetLeafCards(3);
   vector<L1GctJetLeafCard*> wheelEnergyLeafCards(3);

   // The first wheel card is at negative eta,
   // the second one is at positive eta
   for (int i=0; i<N_WHEEL_CARDS; i++) {
     for (int j=0; j<3; j++) {
       wheelJetLeafCards.at(j)=theJetLeafCards.at(i*3+j);
       wheelEnergyLeafCards.at(j)=theJetLeafCards.at(i*3+j);
     }
     theWheelJetFpgas.at(i)    = new L1GctWheelJetFpga   (i,wheelJetLeafCards);
     theWheelEnergyFpgas.at(i) = new L1GctWheelEnergyFpga(i,wheelEnergyLeafCards);
   }

   // Jet Final Stage  
   theJetFinalStage = new L1GctJetFinalStage(theWheelJetFpgas);

  // Electron Final Sort
   theIsoEmFinalStage = new L1GctElectronFinalSort(true,theEmLeafCards.at(0), theEmLeafCards.at(1));
   theNonIsoEmFinalStage = new L1GctElectronFinalSort(false,theEmLeafCards.at(0), theEmLeafCards.at(1));  

  // Global Energy Algos
  theEnergyFinalStage = new L1GctGlobalEnergyAlgos(theWheelEnergyFpgas, theWheelJetFpgas);

}
void L1GlobalCaloTrigger::bxProcess ( const int  bx) [private]

Process a new bunch crossing.

Definition at line 253 of file L1GlobalCaloTrigger.cc.

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

Referenced by process().

                                                {

  // EM Leaf Card
  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
    theEmLeafCards.at(i)->fetchInput();
    theEmLeafCards.at(i)->process();
  }

  // Jet Leaf cards - first stage processing
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    theJetLeafCards.at(i)->fetchInput();
  }

  // Jet Leaf cards - second stage processing
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    theJetLeafCards.at(i)->process();
  }

  // Wheel Cards
  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelJetFpgas.at(i)->fetchInput();
    theWheelJetFpgas.at(i)->process();
  }

  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelEnergyFpgas.at(i)->fetchInput();
    theWheelEnergyFpgas.at(i)->process();
  }

  // Electron Final Stage
  theIsoEmFinalStage->fetchInput();
  theIsoEmFinalStage->process();

  theNonIsoEmFinalStage->fetchInput();
  theNonIsoEmFinalStage->process();


  // Jet Final Stage
  theJetFinalStage->fetchInput();
  theJetFinalStage->process();

  // Energy Final Stage
  theEnergyFinalStage->fetchInput();
  theEnergyFinalStage->process();

}
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, L1GctGlobalEnergyAlgos::setNextBx(), L1GctProcessor::setNextBx(), theEmLeafCards, theEnergyFinalStage, theIsoEmFinalStage, theJetFinalStage, theJetLeafCards, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

Referenced by process().

                                              {
  // EM Leaf Card
  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
    theEmLeafCards.at(i)->setNextBx(bx);
  }

  // Jet Leaf cards
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    theJetLeafCards.at(i)->setNextBx(bx);
  }

  // Wheel Cards
  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelJetFpgas.at(i)->setNextBx(bx);
  }

  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelEnergyFpgas.at(i)->setNextBx(bx);
  }

  // Electron Final Stage
  theIsoEmFinalStage->setNextBx(bx);
  theNonIsoEmFinalStage->setNextBx(bx);

  // Jet Final Stage
  theJetFinalStage->setNextBx(bx);

  // Energy Final Stage
  theEnergyFinalStage->setNextBx(bx);

}
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, max(), min, N_EM_LEAF_CARDS, N_JET_LEAF_CARDS, N_WHEEL_CARDS, L1GctGlobalEnergyAlgos::setBxRange(), L1GctProcessor::setBxRange(), theEmLeafCards, theEnergyFinalStage, theIsoEmFinalStage, theJetFinalStage, theJetLeafCards, theNonIsoEmFinalStage, theWheelEnergyFpgas, and theWheelJetFpgas.

Referenced by process().

                                  {
  // Assume input data have been sorted by bunch crossing number
  if (m_bxRangeAuto) {
    // Find parameters defining the range of bunch crossings to be processed
    int16_t firstBxEmCand = (m_allInputEmCands.size()==0 ? 0 : m_allInputEmCands.front().bx() );
    int16_t firstBxRegion = (m_allInputRegions.size()==0 ? 0 : m_allInputRegions.front().bx() );
    int16_t  lastBxEmCand = (m_allInputEmCands.size()==0 ? 0 : m_allInputEmCands.back().bx() );
    int16_t  lastBxRegion = (m_allInputRegions.size()==0 ? 0 : m_allInputRegions.back().bx() );
    m_bxStart = std::min(firstBxEmCand, firstBxRegion);
    m_numOfBx = std::max( lastBxEmCand,  lastBxRegion) - m_bxStart + 1;
  } else {
    // Remove any input from before the start of the requested range
    for (vector<L1CaloEmCand>::iterator emc=m_allInputEmCands.begin(); emc != m_allInputEmCands.end(); emc++) {
      if (emc->bx() >= m_bxStart) break;
      m_allInputEmCands.erase(emc);
    }

    for (vector<L1CaloRegion>::iterator rgn=m_allInputRegions.begin(); rgn != m_allInputRegions.end(); rgn++) {
      if (rgn->bx() >= m_bxStart) break;
      m_allInputRegions.erase(rgn);
    }
  }

  // Setup pipeline lengths
  // EM Leaf Card
  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
    theEmLeafCards.at(i)->setBxRange(m_bxStart, m_numOfBx);
  }

  // Jet Leaf cards
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    theJetLeafCards.at(i)->setBxRange(m_bxStart, m_numOfBx);
  }

  // Wheel Cards
  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelJetFpgas.at(i)->setBxRange(m_bxStart, m_numOfBx);
  }

  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelEnergyFpgas.at(i)->setBxRange(m_bxStart, m_numOfBx);
  }

  // Electron Final Stage
  theIsoEmFinalStage->setBxRange(m_bxStart, m_numOfBx);
  theNonIsoEmFinalStage->setBxRange(m_bxStart, m_numOfBx);

  // Jet Final Stage
  theJetFinalStage->setBxRange(m_bxStart, m_numOfBx);

  // Energy Final Stage
  theEnergyFinalStage->setBxRange(m_bxStart, m_numOfBx);
}
void L1GlobalCaloTrigger::fillEmCands ( const std::vector< L1CaloEmCand > &  rgn)

set electrons from the RCT at the input to be processed

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

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

Fill input data for a new bunch crossing.

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

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

void L1GlobalCaloTrigger::fillRegions ( std::vector< L1CaloRegion >::iterator &  rgn,
const int  bx 
) [private]
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().

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

get the Jet Leaf cards

Definition at line 185 of file L1GlobalCaloTrigger.h.

References theEmLeafCards.

{ return theEmLeafCards; }
L1GctGlobalEnergyAlgos* L1GlobalCaloTrigger::getEnergyFinalStage ( ) const [inline]

get the energy final stage

Definition at line 197 of file L1GlobalCaloTrigger.h.

References theEnergyFinalStage.

Referenced by L1GctPrintLuts::analyze().

{ return theEnergyFinalStage; }
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, cond::rpcobtemp::temp, and theEnergyFinalStage.

Referenced by L1GctEmulator::produce().

                                                                     {
  L1GctEtHadCollection result(m_numOfBx);
  int bx = m_bxStart;
  for (int i=0; i<m_numOfBx; i++) {
    L1GctEtHad temp(theEnergyFinalStage->getEtHadColl().at(i).value(),
                    theEnergyFinalStage->getEtHadColl().at(i).overFlow(),
                    bx++ );
    result.at(i) = temp;
  }
  return result;
}
L1GctEtMissCollection L1GlobalCaloTrigger::getEtMissCollection ( ) const
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, cond::rpcobtemp::temp, and theEnergyFinalStage.

Referenced by L1GctEmulator::produce().

                                                                     {
  L1GctEtTotalCollection result(m_numOfBx);
  int bx = m_bxStart;
  for (int i=0; i<m_numOfBx; i++) {
    L1GctEtTotal temp(theEnergyFinalStage->getEtSumColl().at(i).value(),
                      theEnergyFinalStage->getEtSumColl().at(i).overFlow(),
                      bx++ );
    result.at(i) = temp;
  }
  return result;
}
int L1GlobalCaloTrigger::getFirstBx ( ) const [inline]

accessor methods

Definition at line 109 of file L1GlobalCaloTrigger.h.

References m_bxStart.

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

L1GctHFBitCountsCollection L1GlobalCaloTrigger::getHFBitCountsCollection ( ) const
L1GctHFRingEtSumsCollection L1GlobalCaloTrigger::getHFRingEtSumsCollection ( ) const
L1GctGlobalHfSumAlgos * L1GlobalCaloTrigger::getHfSumProcessor ( ) const
L1GctHtMissCollection L1GlobalCaloTrigger::getHtMissCollection ( ) const
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().

{
  L1GctInternEtSumCollection allSums, procSums;

  // Go through all the processor types that process et sums
  // JetFinders
  for (unsigned jf=0; jf<theJetFinders.size(); jf++) {
    procSums = theJetFinders.at(jf)->getInternalEtSums();
    allSums.insert(allSums.end(), procSums.begin(), procSums.end());
  }

  // Jet Leaf cards
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    procSums = theJetLeafCards.at(i)->getInternalEtSums();
    allSums.insert(allSums.end(), procSums.begin(), procSums.end());
  }

  // Wheel Cards
  for (int i=0; i<N_WHEEL_CARDS; i++) {
    procSums = theWheelEnergyFpgas.at(i)->getInternalEtSums();
    allSums.insert(allSums.end(), procSums.begin(), procSums.end());
  }

  return allSums;
}
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().

{
  L1GctInternHtMissCollection allSums, procSums;

  // Go through all the processor types that process et sums
  // JetFinders
  for (unsigned jf=0; jf<theJetFinders.size(); jf++) {
    procSums = theJetFinders.at(jf)->getInternalHtMiss();
    allSums.insert(allSums.end(), procSums.begin(), procSums.end());
  }

  // Jet Leaf cards
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    procSums = theJetLeafCards.at(i)->getInternalHtMiss();
    allSums.insert(allSums.end(), procSums.begin(), procSums.end());
  }

  // Wheel Cards
  for (int i=0; i<N_WHEEL_CARDS; i++) {
    procSums = theWheelJetFpgas.at(i)->getInternalHtMiss();
    allSums.insert(allSums.end(), procSums.begin(), procSums.end());
  }

  return allSums;
}
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().

                                                                        {
  L1GctInternJetDataCollection allJets, jfJets;

  // Loop over jetfinders, find the internal jets and add them to the list
  for (unsigned jf=0; jf<theJetFinders.size(); jf++) {
    jfJets = theJetFinders.at(jf)->getInternalJets();
    allJets.insert(allJets.end(), jfJets.begin(), jfJets.end());
  }

  return allJets;
}
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().

L1GctElectronFinalSort* L1GlobalCaloTrigger::getIsoEmFinalStage ( ) const [inline]

get the electron final stage sorters

Definition at line 203 of file L1GlobalCaloTrigger.h.

References theIsoEmFinalStage.

{ return theIsoEmFinalStage; }
const lutPtrVector L1GlobalCaloTrigger::getJetEtCalibLuts ( ) const [inline]

get the Jet Et calibration LUT

Definition at line 210 of file L1GlobalCaloTrigger.h.

References m_jetEtCalLuts.

{ return m_jetEtCalLuts; }
L1GctJetFinalStage* L1GlobalCaloTrigger::getJetFinalStage ( ) const [inline]

get the jet final stage

Definition at line 194 of file L1GlobalCaloTrigger.h.

References theJetFinalStage.

{ return theJetFinalStage; }
const L1GctJetFinderParams* L1GlobalCaloTrigger::getJetFinderParams ( ) const [inline]

get the jetFinder parameters

Definition at line 207 of file L1GlobalCaloTrigger.h.

References m_jetFinderParams.

{ return m_jetFinderParams; }
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.

{ return theJetLeafCards; }
int L1GlobalCaloTrigger::getLastBx ( ) const [inline]

Definition at line 110 of file L1GlobalCaloTrigger.h.

References m_bxStart, and m_numOfBx.

{ return (m_bxStart + m_numOfBx - 1); }
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().

L1GctElectronFinalSort* L1GlobalCaloTrigger::getNonIsoEmFinalStage ( ) const [inline]

Definition at line 204 of file L1GlobalCaloTrigger.h.

References theNonIsoEmFinalStage.

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

                                                             { 
  return theJetFinalStage->getTauJets(); 
}
int L1GlobalCaloTrigger::getTotalBx ( ) const [inline]

Definition at line 111 of file L1GlobalCaloTrigger.h.

References m_numOfBx.

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

{ return theWheelEnergyFpgas; }
std::vector<L1GctWheelJetFpga*> L1GlobalCaloTrigger::getWheelJetFpgas ( ) const [inline]

get the Wheel Jet FPGAs

Definition at line 188 of file L1GlobalCaloTrigger.h.

References theWheelJetFpgas.

{ return theWheelJetFpgas; }
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().

                                {

  using edm::LogInfo;
  using std::endl;

  LogInfo("L1GlobalCaloTrigger") << "=== Global Calo Trigger ===" << endl;
  LogInfo("L1GlobalCaloTrigger") << "=== START DEBUG OUTPUT  ===" << endl;

  LogInfo("L1GlobalCaloTrigger") << endl;
  LogInfo("L1GlobalCaloTrigger") << "N Jet Leaf Cards " << theJetLeafCards.size() << endl;
  LogInfo("L1GlobalCaloTrigger") << "N Wheel Jet Fpgas " << theWheelJetFpgas.size() << endl;
  LogInfo("L1GlobalCaloTrigger") << "N Wheel Energy Fpgas " << theWheelEnergyFpgas.size() << endl;
  LogInfo("L1GlobalCaloTrigger") << "N Em Leaf Cards " << theEmLeafCards.size() << endl;
  LogInfo("L1GlobalCaloTrigger") << endl;

  for (unsigned i=0; i<theJetLeafCards.size(); i++) {
    LogInfo("L1GlobalCaloTrigger") << "Jet Leaf Card " << i << " : " << theJetLeafCards.at(i) << endl;
    LogInfo("L1GlobalCaloTrigger") << (*theJetLeafCards.at(i));
  }
  LogInfo("L1GlobalCaloTrigger") << endl;

  for (unsigned i=0; i<theWheelJetFpgas.size(); i++) {
    LogInfo("L1GlobalCaloTrigger") << "Wheel Jet FPGA " << i << " : " << theWheelJetFpgas.at(i) << endl; 
    LogInfo("L1GlobalCaloTrigger") << (*theWheelJetFpgas.at(i));
  }
  LogInfo("L1GlobalCaloTrigger") << endl;

  for (unsigned i=0; i<theWheelEnergyFpgas.size(); i++) {
    LogInfo("L1GlobalCaloTrigger") << "Wheel Energy FPGA " << i <<" : " << theWheelEnergyFpgas.at(i) << endl; 
    LogInfo("L1GlobalCaloTrigger") << (*theWheelEnergyFpgas.at(i));
  }
  LogInfo("L1GlobalCaloTrigger") << endl;

  LogInfo("L1GlobalCaloTrigger") << (*theJetFinalStage);
  LogInfo("L1GlobalCaloTrigger") << endl;

  LogInfo("L1GlobalCaloTrigger") << (*theEnergyFinalStage);
  LogInfo("L1GlobalCaloTrigger") << endl;

  for (unsigned i=0; i<theEmLeafCards.size(); i++) {
    LogInfo("L1GlobalCaloTrigger") << ( (i==0) ? "Positive eta " : "Negative eta " ); 
    LogInfo("L1GlobalCaloTrigger") << "EM Leaf Card " << i << " : " << theEmLeafCards.at(i) << endl;
    LogInfo("L1GlobalCaloTrigger") << (*theEmLeafCards.at(i));
  }
  LogInfo("L1GlobalCaloTrigger") << endl;

  LogInfo("L1GlobalCaloTrigger") << (*theIsoEmFinalStage);
  LogInfo("L1GlobalCaloTrigger") << endl;

  LogInfo("L1GlobalCaloTrigger") << (*theNonIsoEmFinalStage);

  LogInfo("L1GlobalCaloTrigger") << "=== Global Calo Trigger ===" << endl;
  LogInfo("L1GlobalCaloTrigger") << "===  END DEBUG OUTPUT   ===" << endl;
 
}
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 L1GctEmulator::produce().

                                  {

  // Shouldn't get here unless the setup has been completed
  if (setupOk()) {

    sortInputData();
    // Extract the earliest and latest bunch crossing
    // in the input if required, and forward to the processors
    // to determine the size of the output vectors
    bxSetup();

    vector<L1CaloEmCand>::iterator emc=m_allInputEmCands.begin();
    vector<L1CaloRegion>::iterator rgn=m_allInputRegions.begin();
    int bx = m_bxStart;

    // Loop over bunch crossings
    for (int i=0; i<m_numOfBx; i++) {
      // Perform partial reset (reset processing logic but preserve pipeline contents)
      bxReset(bx);
      // Fill input data into processors for this bunch crossing
      fillEmCands(emc, bx);
      fillRegions(rgn, bx);
      // Process this bunch crossing
      bxProcess(bx);
      bx++;
    }
  }
}
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().

                                {

  // Input data
  m_allInputEmCands.clear();
  m_allInputRegions.clear();

  if (m_bxRangeAuto) {
    m_bxStart = 0;
    m_numOfBx = 1;
  }

  // EM Leaf Card
  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
    theEmLeafCards.at(i)->reset();
  }

  // Jet Leaf cards
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    theJetLeafCards.at(i)->reset();
  }

  // Jet Finders
  for (int i=0; i<N_JET_LEAF_CARDS*3; i++) {
    theJetFinders.at(i)->reset();
  }

  // Wheel Cards
  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelJetFpgas.at(i)->reset();
  }

  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelEnergyFpgas.at(i)->reset();
  }

  // Electron Final Stage
  theIsoEmFinalStage->reset();
  theNonIsoEmFinalStage->reset();

  // Jet Final Stage
  theJetFinalStage->reset();

  // Energy Final Stage
  theEnergyFinalStage->reset();

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

{ m_bxStart = firstBx; m_numOfBx = lastBx - firstBx + 1; m_bxRangeAuto = false; }
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.

{ m_bxStart = 0; m_numOfBx = 1; m_bxRangeAuto = true; }
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.

{ m_bxStart = -numOfBx; m_numOfBx = 2*numOfBx + 1; m_bxRangeAuto = false; }
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().

                                                                           {
  m_inputChannelMask = mask;
  // Need to propagate the new mask to all the JetFinders
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    theJetLeafCards.at(i)->getJetFinderA()->setEnergySumMasks(mask);
    theJetLeafCards.at(i)->getJetFinderB()->setEnergySumMasks(mask);
    theJetLeafCards.at(i)->getJetFinderC()->setEnergySumMasks(mask);
  }
}
void L1GlobalCaloTrigger::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.

{
  if ( !m_inputChannelMask->emCrateMask( em.rctCrate() ) )
    theIsoElectronSorters.at(sorterNo(em))->setInputEmCand(em);
}
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().

                                                                                               {

  m_jetEtCalLuts = jfluts;
  // Need to propagate the new lut to all the JetFinders
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    theJetLeafCards.at(i)->getJetFinderA()->setJetEtCalibrationLuts(jfluts);
    theJetLeafCards.at(i)->getJetFinderB()->setJetEtCalibrationLuts(jfluts);
    theJetLeafCards.at(i)->getJetFinderC()->setJetEtCalibrationLuts(jfluts);
  }
}
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().

                                                                                     {

  // Some parameters not (yet?) implemented
  if ((jfpars->getCenForJetEtaBoundary()==7) &&
      (jfpars->getCenJetEtSeedGct()==jfpars->getTauJetEtSeedGct())) { 

    m_jetFinderParams = jfpars;
    // Need to propagate the new parameters to all the JetFinders
    for (int i=0; i<N_JET_LEAF_CARDS; i++) {
      theJetLeafCards.at(i)->getJetFinderA()->setJetFinderParams(jfpars);
      theJetLeafCards.at(i)->getJetFinderB()->setJetFinderParams(jfpars);
      theJetLeafCards.at(i)->getJetFinderC()->setJetFinderParams(jfpars);
    }
    // Also send to the final energy calculation (for missing Ht)
    theEnergyFinalStage->setJetFinderParams(jfpars);
  }
}
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.

{
  if ( !m_inputChannelMask->emCrateMask( em.rctCrate() ) )
    theNonIsoElectronSorters.at(sorterNo(em))->setInputEmCand(em);
}
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 setRegion().

{
  if ( !m_inputChannelMask->regionMask( region.gctEta(), region.gctPhi() ) ) {
    unsigned crate = region.rctCrate();
    // Find the relevant jetFinders
    static const unsigned NPHI = L1CaloRegionDetId::N_PHI/2;
    unsigned prevphi = crate % NPHI;
    unsigned thisphi = (crate+1) % NPHI;
    unsigned nextphi = (crate+2) % NPHI;

    // Send the region to six jetFinders.
    theJetFinders.at(thisphi)->setInputRegion(region);
    theJetFinders.at(nextphi)->setInputRegion(region);
    theJetFinders.at(prevphi)->setInputRegion(region);
    theJetFinders.at(thisphi+NPHI)->setInputRegion(region);
    theJetFinders.at(nextphi+NPHI)->setInputRegion(region);
    theJetFinders.at(prevphi+NPHI)->setInputRegion(region);
  }
}
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 cond::rpcobtemp::temp.

{
  //  L1CaloRegion temp = L1CaloRegion::makeRegionFromGctIndices(et, overFlow, fineGrain, false, false, ieta, iphi, 0);
  L1CaloRegion temp(et, overFlow, fineGrain, false, false, ieta, iphi, 0);
  setRegion(temp);
}
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.

                                   {
  // EM Leaf Card
  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
    theEmLeafCards.at(i)->setTerse();
  }

  // Jet Leaf cards
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    theJetLeafCards.at(i)->setTerse();
  }

  // Jet Finders
  for (int i=0; i<N_JET_LEAF_CARDS*3; i++) {
    theJetFinders.at(i)->setTerse();
  }

  // Wheel Cards
  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelJetFpgas.at(i)->setTerse();
  }

  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelEnergyFpgas.at(i)->setTerse();
  }

  // Electron Final Stage
  theIsoEmFinalStage->setTerse();
  theNonIsoEmFinalStage->setTerse();

  // Jet Final Stage
  theJetFinalStage->setTerse();

  // Energy Final Stage
  theEnergyFinalStage->setTerse();
}
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().

                                                                         {
  if (getHfSumProcessor() != 0) {
    getHfSumProcessor()->setupLuts(scale);
  }
}
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().

                                        { 
  bool result = true;
  result &= (m_inputChannelMask != 0);
  // EM Leaf Card
  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
    result &= theEmLeafCards.at(i)->setupOk();
  }

  // Jet Leaf cards
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    result &= theJetLeafCards.at(i)->setupOk();
  }

  // Jet Finders
  for (int i=0; i<N_JET_LEAF_CARDS*3; i++) {
    result &= theJetFinders.at(i)->setupOk();
  }

  // Wheel Cards
  for (int i=0; i<N_WHEEL_CARDS; i++) {
    result &= theWheelJetFpgas.at(i)->setupOk();
  }

  for (int i=0; i<N_WHEEL_CARDS; i++) {
    result &= theWheelEnergyFpgas.at(i)->setupOk();
  }

  // Electron Final Stage
  result &= theIsoEmFinalStage->setupOk();
  result &= theNonIsoEmFinalStage->setupOk();

  // Jet Final Stage
  result &= theJetFinalStage->setupOk();

  // Energy Final Stage
  result &= theEnergyFinalStage->setupOk();

  // All done.
  return result;
}
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().

{
  // Need to propagate the new parameters to all the JetFinders
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    theJetLeafCards.at(i)->getJetFinderA()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
    theJetLeafCards.at(i)->getJetFinderB()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
    theJetLeafCards.at(i)->getJetFinderC()->setupTauAlgo(useImprovedAlgo, ignoreVetoBitsForIsolation);
  }
}
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.

                                     {
  // EM Leaf Card
  for (int i=0; i<N_EM_LEAF_CARDS; i++) {
    theEmLeafCards.at(i)->setVerbose();
  }

  // Jet Leaf cards
  for (int i=0; i<N_JET_LEAF_CARDS; i++) {
    theJetLeafCards.at(i)->setVerbose();
  }

  // Jet Finders
  for (int i=0; i<N_JET_LEAF_CARDS*3; i++) {
    theJetFinders.at(i)->setVerbose();
  }

  // Wheel Cards
  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelJetFpgas.at(i)->setVerbose();
  }

  for (int i=0; i<N_WHEEL_CARDS; i++) {
    theWheelEnergyFpgas.at(i)->setVerbose();
  }

  // Electron Final Stage
  theIsoEmFinalStage->setVerbose();
  theNonIsoEmFinalStage->setVerbose();

  // Jet Final Stage
  theJetFinalStage->setVerbose();

  // Energy Final Stage
  theEnergyFinalStage->setVerbose();
}
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().

                                                                   {
  unsigned crate = em.rctCrate();
  unsigned result = ( ((crate%9) < 4) ? 1 : 0 );
  if (crate>=9) result += 2;
  if (crate>=18) result = 0;
  return result; 
}
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().


Member Data Documentation

Definition at line 256 of file L1GlobalCaloTrigger.h.

Referenced by sortInputData().

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(), process(), reset(), and sortInputData().

Definition at line 309 of file L1GlobalCaloTrigger.h.

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

Multiple bunch crossing operation.

Definition at line 302 of file L1GlobalCaloTrigger.h.

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

Input channel mask.

Definition at line 299 of file L1GlobalCaloTrigger.h.

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

Jet Et calibration LUT.

Definition at line 296 of file L1GlobalCaloTrigger.h.

Referenced by getJetEtCalibLuts(), and setJetEtCalibrationLuts().

Jetfinder parameters.

Definition at line 293 of file L1GlobalCaloTrigger.h.

Referenced by getJetFinderParams(), and setJetFinderParams().

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

Definition at line 257 of file L1GlobalCaloTrigger.h.

Referenced by sortInputData().

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

pointers to the electron sorters

Definition at line 271 of file L1GlobalCaloTrigger.h.

Referenced by build(), and setIsoEm().

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

Definition at line 272 of file L1GlobalCaloTrigger.h.

Referenced by build(), and setNonIsoEm().