CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Member Functions | Private Attributes | Friends

L1GctGlobalEnergyAlgos Class Reference

Emulates the GCT global energy algorithms. More...

#include <L1GctGlobalEnergyAlgos.h>

Inheritance diagram for L1GctGlobalEnergyAlgos:
L1GctProcessor

List of all members.

Public Types

typedef
L1GctWheelEnergyFpga::etComponentType 
etComponentType
typedef L1GctUnsignedInt
< L1GctEtHad::kEtHadNBits > 
etHadType
typedef L1GctMet::etmiss_vec etmiss_vec
typedef L1GctMet::etMissPhiType etMissPhiType
typedef L1GctMet::etMissType etMissType
typedef L1GctUnsignedInt
< L1GctEtTotal::kEtTotalNBits > 
etTotalType
enum  maxValues { etTotalMaxValue = L1GctEtTotal::kEtTotalMaxValue, etHadMaxValue = L1GctEtHad::kEtHadMaxValue, etMissMaxValue = L1GctEtMiss::kEtMissMaxValue }

Public Member Functions

virtual void fetchInput ()
 get input data from sources
std::vector< etHadTypegetEtHadColl () const
 return std::vector< output calibrated jet Et
std::vector< etMissTypegetEtMissColl () const
std::vector< etMissPhiTypegetEtMissPhiColl () const
 return output missing Et value
std::vector< etTotalTypegetEtSumColl () const
 return output total scalar Et
L1GctGlobalHfSumAlgosgetHfSumProcessor () const
 provide access to hf sum processor
std::vector< etMissTypegetHtMissColl () const
 return output missing Ht magnitude
const L1GctHtMissLutgetHtMissLut () const
std::vector< etMissPhiTypegetHtMissPhiColl () const
 return output missing Ht value
std::vector< etTotalTypegetInputEtValPlusWheel () const
 return input Et value wheel 1
std::vector< etTotalTypegetInputEtVlMinusWheel () const
 return input Et value wheel 0
std::vector< etComponentTypegetInputExValPlusWheel () const
 return input Ex value wheel 1
std::vector< etComponentTypegetInputExVlMinusWheel () const
 return input Ey value wheel 0
std::vector< etComponentTypegetInputEyValPlusWheel () const
 return input Ex value wheel 1
std::vector< etComponentTypegetInputEyVlMinusWheel () const
 return input Ey value wheel 0
std::vector< etHadTypegetInputHtValPlusWheel () const
 return input Ht value wheel 1
std::vector< etHadTypegetInputHtVlMinusWheel () const
 return input Ht value wheel 0
std::vector< etComponentTypegetInputHxValPlusWheel () const
 return input Ht component values wheel 1
std::vector< etComponentTypegetInputHxVlMinusWheel () const
 return input Ht value wheel 0
std::vector< etComponentTypegetInputHyValPlusWheel () const
std::vector< etComponentTypegetInputHyVlMinusWheel () const
L1GctWheelEnergyFpgagetMinusWheelFpga () const
 provide access to input pointer, Wheel Energy Fpga 0
L1GctWheelJetFpgagetMinusWheelJetFpga () const
 provide access to input pointer, Wheel Jet Fpga 0
L1GctWheelEnergyFpgagetPlusWheelFpga () const
 provide access to input pointer, Wheel Energy Fpga 1
L1GctWheelJetFpgagetPlusWheelJetFpga () const
 provide access to input pointer, Wheel Jet Fpga 1
 L1GctGlobalEnergyAlgos (std::vector< L1GctWheelEnergyFpga * > WheelFpga, std::vector< L1GctWheelJetFpga * > WheelJetFpga)
 Constructor needs the Wheel card Fpgas set up first.
virtual void process ()
 process the data, fill output buffers
void reset ()
 clear internal buffers
void setBxRange (const int firstBx, const int numberOfBx)
 define the bunch crossing range to process
void setHtMissScale (const L1CaloEtScale *const scale)
void setInputWheelEt (unsigned wheel, unsigned energy, bool overflow)
 set input Et value per wheel (0 or 1); not used in normal operation
void setInputWheelEx (unsigned wheel, int energy, bool overflow)
 set input Ex value per wheel (0 or 1); not used in normal operation
void setInputWheelEy (unsigned wheel, int energy, bool overflow)
 set input Ey value per wheel (0 or 1); not used in normal operation
void setInputWheelHt (unsigned wheel, unsigned energy, bool overflow)
 set input Ht value per wheel (0 or 1); not used in normal operation
void setInputWheelHx (unsigned wheel, unsigned energy, bool overflow)
 set input Ht component values per wheel (0 or 1); not used in normal operation
void setInputWheelHy (unsigned wheel, unsigned energy, bool overflow)
void setInputWheelJc (unsigned wheel, unsigned jcnum, unsigned count)
 set input jet count (number 0-11) per wheel (0 or 1); not used in normal operation
void setJetFinderParams (const L1GctJetFinderParams *const jfpars)
void setNextBx (const int bx)
 partially clear buffers
bool setupOk () const
 check setup
 ~L1GctGlobalEnergyAlgos ()
 Destructor.

Protected Member Functions

virtual void resetPipelines ()
virtual void resetProcessor ()
 Separate reset methods for the processor itself and any data stored in pipelines.
virtual void setupObjects ()
 Initialise inputs with null objects for the correct bunch crossing if required.

Private Attributes

Pipeline< etTotalTypem_etValPlusPipe
etTotalType m_etValPlusWheel
Pipeline< etTotalTypem_etVlMinusPipe
etTotalType m_etVlMinusWheel
Pipeline< etComponentTypem_exValPlusPipe
etComponentType m_exValPlusWheel
Pipeline< etComponentTypem_exVlMinusPipe
etComponentType m_exVlMinusWheel
Pipeline< etComponentTypem_eyValPlusPipe
etComponentType m_eyValPlusWheel
Pipeline< etComponentTypem_eyVlMinusPipe
etComponentType m_eyVlMinusWheel
L1GctGlobalHfSumAlgosm_hfSumProcessor
Pipeline< etHadTypem_htValPlusPipe
etHadType m_htValPlusWheel
Pipeline< etHadTypem_htVlMinusPipe
etHadType m_htVlMinusWheel
Pipeline< etComponentTypem_hxValPlusPipe
etComponentType m_hxValPlusWheel
Pipeline< etComponentTypem_hxVlMinusPipe
etComponentType m_hxVlMinusWheel
Pipeline< etComponentTypem_hyValPlusPipe
etComponentType m_hyValPlusWheel
Pipeline< etComponentTypem_hyVlMinusPipe
etComponentType m_hyVlMinusWheel
L1GctMet m_metComponents
L1GctMet m_mhtComponents
L1GctWheelEnergyFpgam_minusWheelFpga
L1GctWheelJetFpgam_minusWheelJetFpga
Pipeline< etHadTypem_outputEtHad
Pipeline< etMissTypem_outputEtMiss
Pipeline< etMissPhiTypem_outputEtMissPhi
Pipeline< etTotalTypem_outputEtSum
Pipeline< etMissTypem_outputHtMiss
Pipeline< etMissPhiTypem_outputHtMissPhi
L1GctWheelEnergyFpgam_plusWheelFpga
L1GctWheelJetFpgam_plusWheelJetFpga
bool m_setupOk

Friends

std::ostream & operator<< (std::ostream &os, const L1GctGlobalEnergyAlgos &fpga)
 Overload << operator.

Detailed Description

Emulates the GCT global energy algorithms.

This class carries out the final stage of summing of total Et, missing Et components Ex and Ey, calibrated jet energy Ht, and jet counts. It converts the final missing Ex and Ey sums to magnitude and direction. The inputs come from the two Wheel cards and the outputs are sent to the Global Trigger.

Author:
Jim Brooke & Greg Heath
Date:
20/2/2006

Definition at line 34 of file L1GctGlobalEnergyAlgos.h.


Member Typedef Documentation

Definition at line 43 of file L1GctGlobalEnergyAlgos.h.

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

Definition at line 39 of file L1GctGlobalEnergyAlgos.h.

Definition at line 42 of file L1GctGlobalEnergyAlgos.h.

Definition at line 41 of file L1GctGlobalEnergyAlgos.h.

Definition at line 40 of file L1GctGlobalEnergyAlgos.h.

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

Definition at line 38 of file L1GctGlobalEnergyAlgos.h.


Member Enumeration Documentation

Enumerator:
etTotalMaxValue 
etHadMaxValue 
etMissMaxValue 

Definition at line 45 of file L1GctGlobalEnergyAlgos.h.


Constructor & Destructor Documentation

L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos ( std::vector< L1GctWheelEnergyFpga * >  WheelFpga,
std::vector< L1GctWheelJetFpga * >  WheelJetFpga 
)

Constructor needs the Wheel card Fpgas set up first.

Definition at line 16 of file L1GctGlobalEnergyAlgos.cc.

References m_hfSumProcessor, m_metComponents, m_mhtComponents, m_minusWheelFpga, m_minusWheelJetFpga, m_plusWheelFpga, m_plusWheelJetFpga, m_setupOk, L1GctProcessor::m_verbose, L1GctMet::setBitShift(), and L1GctGlobalHfSumAlgos::setupOk().

                                                                                        :
  L1GctProcessor(),
  m_plusWheelFpga(wheelFpga.at(1)),
  m_minusWheelFpga(wheelFpga.at(0)),
  m_plusWheelJetFpga(wheelJetFpga.at(1)),
  m_minusWheelJetFpga(wheelJetFpga.at(0)),
  m_metComponents(0,0, L1GctMet::cordicTranslate),
  m_mhtComponents(0,0, L1GctMet::useHtMissLut),
  m_exValPlusWheel(), m_eyValPlusWheel(),
  m_etValPlusWheel(), m_htValPlusWheel(),
  m_exVlMinusWheel(), m_eyVlMinusWheel(),
  m_etVlMinusWheel(), m_htVlMinusWheel(),
  m_exValPlusPipe(), m_eyValPlusPipe(),
  m_etValPlusPipe(), m_htValPlusPipe(),
  m_exVlMinusPipe(), m_eyVlMinusPipe(),
  m_etVlMinusPipe(), m_htVlMinusPipe(),
  m_outputEtMiss(), m_outputEtMissPhi(),
  m_outputEtSum(), m_outputEtHad(),
  m_setupOk(true)
{
  if(wheelFpga.size() != 2)
    {
      m_setupOk = false;
      if (m_verbose) {
        edm::LogWarning("L1GctSetupError")
          << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() : Global Energy Algos has been incorrectly constructed!\n"
          << "This class needs two wheel card pointers. "
          << "Number of wheel card pointers present is " << wheelFpga.size() << ".\n";
      }
    }
  
  if(wheelJetFpga.size() != 2)
    {
      m_setupOk = false;
      if (m_verbose) {
        edm::LogWarning("L1GctSetupError")
          << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() : Global Energy Algos has been incorrectly constructed!\n"
          << "This class needs two wheel jet fpga pointers. "
          << "Number of wheel jet fpga pointers present is " << wheelJetFpga.size() << ".\n";
      }
    }
  
  if(m_plusWheelFpga == 0)
    {
      m_setupOk = false;
      if (m_verbose) {
        edm::LogWarning("L1GctSetupError")
          << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() has been incorrectly constructed!\n"
          << "Plus Wheel Fpga pointer has not been set!\n";
      }
    }
  if(m_minusWheelFpga == 0)
    {
      m_setupOk = false;
      if (m_verbose) {
        edm::LogWarning("L1GctSetupError")
          << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() has been incorrectly constructed!\n"
          << "Minus Wheel Fpga pointer has not been set!\n";
      }
    }
  if(m_plusWheelJetFpga == 0)
    {
      m_setupOk = false;
      if (m_verbose) {
        edm::LogWarning("L1GctSetupError")
          << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() has been incorrectly constructed!\n"
          << "Plus Wheel Jet Fpga pointer has not been set!\n";
      }
    }
  if(m_minusWheelJetFpga == 0)
    {
      m_setupOk = false;
      if (m_verbose) {
        edm::LogWarning("L1GctSetupError")
          << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() has been incorrectly constructed!\n"
          << "Minus Wheel Jet Fpga pointer has not been set!\n";
      }
    }

  // Set the scale for missing Et and missing Ht
  // Missing Et has one extra bit of precision added in the (Ex, Ey) 
  // conversion step, so we reverse this here.
  m_metComponents.setBitShift(1);
  // Missing Ht has its own bit shifting before the LUT, so we don't
  // need any extra
  m_mhtComponents.setBitShift(0);

  // Setup to perform the Hf sums
  m_hfSumProcessor = new L1GctGlobalHfSumAlgos(wheelJetFpga);

  m_setupOk &= m_hfSumProcessor->setupOk();

  if (!m_setupOk && m_verbose) {
    edm::LogError("L1GctSetupError") << "L1GctGlobalEnergyAlgos has been incorrectly constructed";
  }
}
L1GctGlobalEnergyAlgos::~L1GctGlobalEnergyAlgos ( )

Destructor.

Definition at line 114 of file L1GctGlobalEnergyAlgos.cc.

References m_hfSumProcessor.

{
  if (m_hfSumProcessor != 0) {
    delete m_hfSumProcessor;
  }
}

Member Function Documentation

void L1GctGlobalEnergyAlgos::fetchInput ( ) [virtual]
std::vector< etHadType > L1GctGlobalEnergyAlgos::getEtHadColl ( ) const [inline]

return std::vector< output calibrated jet Et

Definition at line 132 of file L1GctGlobalEnergyAlgos.h.

References m_outputEtHad.

Referenced by L1GlobalCaloTrigger::getEtHadCollection().

{ return m_outputEtHad.contents; }
std::vector< etMissType > L1GctGlobalEnergyAlgos::getEtMissColl ( ) const [inline]

Access to output quantities for all bunch crossings return output missing Et magnitude

Definition at line 126 of file L1GctGlobalEnergyAlgos.h.

References m_outputEtMiss.

Referenced by L1GlobalCaloTrigger::getEtMissCollection().

{ return m_outputEtMiss.contents; }
std::vector< etMissPhiType > L1GctGlobalEnergyAlgos::getEtMissPhiColl ( ) const [inline]

return output missing Et value

Definition at line 128 of file L1GctGlobalEnergyAlgos.h.

References m_outputEtMissPhi.

Referenced by L1GlobalCaloTrigger::getEtMissCollection().

{ return m_outputEtMissPhi.contents; }
std::vector< etTotalType > L1GctGlobalEnergyAlgos::getEtSumColl ( ) const [inline]

return output total scalar Et

Definition at line 130 of file L1GctGlobalEnergyAlgos.h.

References m_outputEtSum.

Referenced by L1GlobalCaloTrigger::getEtSumCollection().

{ return m_outputEtSum.contents; }
L1GctGlobalHfSumAlgos* L1GctGlobalEnergyAlgos::getHfSumProcessor ( ) const [inline]

provide access to hf sum processor

Definition at line 99 of file L1GctGlobalEnergyAlgos.h.

References m_hfSumProcessor.

Referenced by L1GctPrintLuts::analyze(), and L1GlobalCaloTrigger::getHfSumProcessor().

{ return m_hfSumProcessor; }
std::vector< etMissType > L1GctGlobalEnergyAlgos::getHtMissColl ( ) const [inline]

return output missing Ht magnitude

Definition at line 134 of file L1GctGlobalEnergyAlgos.h.

References m_outputHtMiss.

Referenced by L1GlobalCaloTrigger::getHtMissCollection().

{ return m_outputHtMiss.contents; }
const L1GctHtMissLut* L1GctGlobalEnergyAlgos::getHtMissLut ( ) const [inline]

Definition at line 142 of file L1GctGlobalEnergyAlgos.h.

References L1GctMet::getHtMissLut(), and m_mhtComponents.

Referenced by L1GctPrintLuts::analyze().

std::vector< etMissPhiType > L1GctGlobalEnergyAlgos::getHtMissPhiColl ( ) const [inline]

return output missing Ht value

Definition at line 136 of file L1GctGlobalEnergyAlgos.h.

References m_outputHtMissPhi.

Referenced by L1GlobalCaloTrigger::getHtMissCollection().

{ return m_outputHtMissPhi.contents; }
std::vector< etTotalType > L1GctGlobalEnergyAlgos::getInputEtValPlusWheel ( ) const [inline]

return input Et value wheel 1

Definition at line 110 of file L1GctGlobalEnergyAlgos.h.

References m_etValPlusPipe.

{ return m_etValPlusPipe.contents; }
std::vector< etTotalType > L1GctGlobalEnergyAlgos::getInputEtVlMinusWheel ( ) const [inline]

return input Et value wheel 0

Definition at line 117 of file L1GctGlobalEnergyAlgos.h.

References m_etVlMinusPipe.

{ return m_etVlMinusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputExValPlusWheel ( ) const [inline]

return input Ex value wheel 1

Definition at line 102 of file L1GctGlobalEnergyAlgos.h.

References m_exValPlusPipe.

{ return m_exValPlusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputExVlMinusWheel ( ) const [inline]

return input Ey value wheel 0

Definition at line 106 of file L1GctGlobalEnergyAlgos.h.

References m_exVlMinusPipe.

{ return m_exVlMinusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputEyValPlusWheel ( ) const [inline]

return input Ex value wheel 1

Definition at line 104 of file L1GctGlobalEnergyAlgos.h.

References m_eyValPlusPipe.

{ return m_eyValPlusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputEyVlMinusWheel ( ) const [inline]

return input Ey value wheel 0

Definition at line 108 of file L1GctGlobalEnergyAlgos.h.

References m_eyVlMinusPipe.

{ return m_eyVlMinusPipe.contents; }
std::vector< etHadType > L1GctGlobalEnergyAlgos::getInputHtValPlusWheel ( ) const [inline]

return input Ht value wheel 1

Definition at line 112 of file L1GctGlobalEnergyAlgos.h.

References m_htValPlusPipe.

{ return m_htValPlusPipe.contents; }
std::vector< etHadType > L1GctGlobalEnergyAlgos::getInputHtVlMinusWheel ( ) const [inline]

return input Ht value wheel 0

Definition at line 119 of file L1GctGlobalEnergyAlgos.h.

References m_htVlMinusPipe.

{ return m_htVlMinusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputHxValPlusWheel ( ) const [inline]

return input Ht component values wheel 1

Definition at line 114 of file L1GctGlobalEnergyAlgos.h.

References m_hxValPlusPipe.

{ return m_hxValPlusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputHxVlMinusWheel ( ) const [inline]

return input Ht value wheel 0

Definition at line 121 of file L1GctGlobalEnergyAlgos.h.

References m_hxVlMinusPipe.

{ return m_hxVlMinusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputHyValPlusWheel ( ) const [inline]

Definition at line 115 of file L1GctGlobalEnergyAlgos.h.

References m_hyValPlusPipe.

{ return m_hyValPlusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputHyVlMinusWheel ( ) const [inline]

Definition at line 122 of file L1GctGlobalEnergyAlgos.h.

References m_hyVlMinusPipe.

{ return m_hyVlMinusPipe.contents; }
L1GctWheelEnergyFpga* L1GctGlobalEnergyAlgos::getMinusWheelFpga ( ) const [inline]

provide access to input pointer, Wheel Energy Fpga 0

Definition at line 93 of file L1GctGlobalEnergyAlgos.h.

References m_minusWheelFpga.

{ return m_minusWheelFpga; }
L1GctWheelJetFpga* L1GctGlobalEnergyAlgos::getMinusWheelJetFpga ( ) const [inline]

provide access to input pointer, Wheel Jet Fpga 0

Definition at line 97 of file L1GctGlobalEnergyAlgos.h.

References m_minusWheelJetFpga.

{ return m_minusWheelJetFpga; }
L1GctWheelEnergyFpga* L1GctGlobalEnergyAlgos::getPlusWheelFpga ( ) const [inline]

provide access to input pointer, Wheel Energy Fpga 1

Definition at line 91 of file L1GctGlobalEnergyAlgos.h.

References m_plusWheelFpga.

{ return m_plusWheelFpga; }
L1GctWheelJetFpga* L1GctGlobalEnergyAlgos::getPlusWheelJetFpga ( ) const [inline]

provide access to input pointer, Wheel Jet Fpga 1

Definition at line 95 of file L1GctGlobalEnergyAlgos.h.

References m_plusWheelJetFpga.

{ return m_plusWheelJetFpga; }
void L1GctGlobalEnergyAlgos::process ( ) [virtual]

process the data, fill output buffers

Implements L1GctProcessor.

Definition at line 225 of file L1GctGlobalEnergyAlgos.cc.

References L1GctProcessor::bxRel(), etHadMaxValue, etMissMaxValue, etTotalMaxValue, m_etValPlusPipe, m_etValPlusWheel, m_etVlMinusPipe, m_etVlMinusWheel, m_exValPlusPipe, m_exValPlusWheel, m_exVlMinusPipe, m_exVlMinusWheel, m_eyValPlusPipe, m_eyValPlusWheel, m_eyVlMinusPipe, m_eyVlMinusWheel, m_hfSumProcessor, m_htValPlusPipe, m_htValPlusWheel, m_htVlMinusPipe, m_htVlMinusWheel, m_hxValPlusPipe, m_hxValPlusWheel, m_hxVlMinusPipe, m_hxVlMinusWheel, m_hyValPlusPipe, m_hyValPlusWheel, m_hyVlMinusPipe, m_hyVlMinusWheel, m_metComponents, m_mhtComponents, m_outputEtHad, m_outputEtMiss, m_outputEtMissPhi, m_outputEtSum, m_outputHtMiss, m_outputHtMissPhi, m_setupOk, L1GctMet::etmiss_vec::mag, L1GctMet::metVector(), L1GctUnsignedInt< nBits >::overFlow(), L1GctMet::etmiss_vec::phi, L1GctGlobalHfSumAlgos::process(), L1GctMet::setComponents(), L1GctUnsignedInt< nBits >::setOverFlow(), L1GctUnsignedInt< nBits >::setValue(), and L1GctUnsignedInt< nBits >::value().

Referenced by L1GlobalCaloTrigger::bxProcess().

{
  if (m_setupOk) {
    // Store the inputs in pipelines
    m_exValPlusPipe.store(m_exValPlusWheel, bxRel());
    m_eyValPlusPipe.store(m_eyValPlusWheel, bxRel());
    m_etValPlusPipe.store(m_etValPlusWheel, bxRel());
    m_htValPlusPipe.store(m_htValPlusWheel, bxRel());
    m_hxValPlusPipe.store(m_hxValPlusWheel, bxRel());
    m_hyValPlusPipe.store(m_hyValPlusWheel, bxRel());

    m_exVlMinusPipe.store(m_exVlMinusWheel, bxRel());
    m_eyVlMinusPipe.store(m_eyVlMinusWheel, bxRel());
    m_etVlMinusPipe.store(m_etVlMinusWheel, bxRel());
    m_htVlMinusPipe.store(m_htVlMinusWheel, bxRel());
    m_hxVlMinusPipe.store(m_hxVlMinusWheel, bxRel());
    m_hyVlMinusPipe.store(m_hyVlMinusWheel, bxRel());

    // Process to produce the outputs
    etComponentType ExSum, EySum;
    etmiss_vec EtMissing, HtMissing;

    //
    //-----------------------------------------------------------------------------
    // Form the Ex and Ey sums
    ExSum = m_exValPlusWheel + m_exVlMinusWheel;
    EySum = m_eyValPlusWheel + m_eyVlMinusWheel;
    // Execute the missing Et algorithm
    // Rotate by pi to evaluate MISSING Et. 
    // Implement this in the same way as the firmware
    m_metComponents.setComponents(ExSum, EySum);
    EtMissing = m_metComponents.metVector();
    if (EtMissing.phi.value() > 35) {
      EtMissing.phi.setValue(EtMissing.phi.value() - 36);
    } else {
      EtMissing.phi.setValue(EtMissing.phi.value() + 36);
    }
    if (EtMissing.mag.value() == etMissMaxValue) EtMissing.mag.setOverFlow(true);

    m_outputEtMiss.store    (EtMissing.mag, bxRel());
    m_outputEtMissPhi.store (EtMissing.phi, bxRel());

    //
    //-----------------------------------------------------------------------------
    // Form the Hx and Hy sums
    ExSum = m_hxValPlusWheel + m_hxVlMinusWheel;
    EySum = m_hyValPlusWheel + m_hyVlMinusWheel;
    // Execute the missing Et algorithm
    // Implement this in the same way as the firmware
    m_mhtComponents.setComponents(ExSum, EySum);
    HtMissing = m_mhtComponents.metVector();
    if (HtMissing.phi.value() > 8) {
      HtMissing.phi.setValue(HtMissing.phi.value() - 9);
    } else {
      HtMissing.phi.setValue(HtMissing.phi.value() + 9);
    }

    // Store 7 bits of magnitude and 5 bits of phi angle.
    static const unsigned MAX_HT_VALUE = 0x7f;
    static const unsigned PHI_HT_MASK  = 0x1f;
    if ( (HtMissing.mag.value() > MAX_HT_VALUE) || (HtMissing.mag.overFlow()) ) {
      HtMissing.mag.setValue(MAX_HT_VALUE);
    }
    HtMissing.phi.setValue(HtMissing.phi.value() & PHI_HT_MASK);
    m_outputHtMiss.store    (HtMissing.mag, bxRel());
    m_outputHtMissPhi.store (HtMissing.phi, bxRel());

    //
    //-----------------------------------------------------------------------------
    // Form the Et and Ht sums
    etTotalType ettTemp = m_etValPlusWheel + m_etVlMinusWheel;
    if (ettTemp.overFlow()) ettTemp.setValue(etTotalMaxValue);
    etHadType   httTemp = m_htValPlusWheel + m_htVlMinusWheel;
    if (httTemp.overFlow()) httTemp.setValue(etHadMaxValue);
    m_outputEtSum.store (ettTemp, bxRel());
    m_outputEtHad.store (httTemp, bxRel());

    m_hfSumProcessor->process();
  }
}
void L1GctGlobalEnergyAlgos::reset ( void  )

clear internal buffers

clear buffers

Reimplemented from L1GctProcessor.

Definition at line 147 of file L1GctGlobalEnergyAlgos.cc.

References m_hfSumProcessor, and L1GctProcessor::reset().

Referenced by L1GlobalCaloTrigger::reset().

void L1GctGlobalEnergyAlgos::resetPipelines ( ) [protected, virtual]
void L1GctGlobalEnergyAlgos::resetProcessor ( ) [protected, virtual]
void L1GctGlobalEnergyAlgos::setBxRange ( const int  firstBx,
const int  numberOfBx 
)

define the bunch crossing range to process

partially clear buffers

Reimplemented from L1GctProcessor.

Definition at line 153 of file L1GctGlobalEnergyAlgos.cc.

References m_hfSumProcessor, and L1GctProcessor::setBxRange().

Referenced by L1GlobalCaloTrigger::bxSetup().

                                                                               {
  L1GctProcessor::setBxRange(firstBx, numberOfBx);
  m_hfSumProcessor->setBxRange(firstBx, numberOfBx);
}
void L1GctGlobalEnergyAlgos::setHtMissScale ( const L1CaloEtScale *const  scale)
void L1GctGlobalEnergyAlgos::setInputWheelEt ( unsigned  wheel,
unsigned  energy,
bool  overflow 
)

set input Et value per wheel (0 or 1); not used in normal operation

Definition at line 362 of file L1GctGlobalEnergyAlgos.cc.

References m_etValPlusWheel, m_etVlMinusWheel, L1GctUnsignedInt< nBits >::setOverFlow(), and L1GctUnsignedInt< nBits >::setValue().

{
  if (wheel==0) {
    m_etValPlusWheel.setValue(energy);
    m_etValPlusWheel.setOverFlow(overflow);
  } else if (wheel==1) {
    m_etVlMinusWheel.setValue(energy);
    m_etVlMinusWheel.setOverFlow(overflow);
  }
}
void L1GctGlobalEnergyAlgos::setInputWheelEx ( unsigned  wheel,
int  energy,
bool  overflow 
)

set input Ex value per wheel (0 or 1); not used in normal operation

Definition at line 334 of file L1GctGlobalEnergyAlgos.cc.

References m_exValPlusWheel, m_exVlMinusWheel, L1GctTwosComplement< nBits >::setOverFlow(), and L1GctTwosComplement< nBits >::setValue().

{
  if (wheel==0) {
    m_exValPlusWheel.setValue(energy);
    m_exValPlusWheel.setOverFlow(overflow);
  } else if (wheel==1) {
    m_exVlMinusWheel.setValue(energy);
    m_exVlMinusWheel.setOverFlow(overflow);
  }
}
void L1GctGlobalEnergyAlgos::setInputWheelEy ( unsigned  wheel,
int  energy,
bool  overflow 
)

set input Ey value per wheel (0 or 1); not used in normal operation

Definition at line 348 of file L1GctGlobalEnergyAlgos.cc.

References m_eyValPlusWheel, m_eyVlMinusWheel, L1GctTwosComplement< nBits >::setOverFlow(), and L1GctTwosComplement< nBits >::setValue().

{
  if (wheel==0) {
    m_eyValPlusWheel.setValue(energy);
    m_eyValPlusWheel.setOverFlow(overflow);
  } else if (wheel==1) {
    m_eyVlMinusWheel.setValue(energy);
    m_eyVlMinusWheel.setOverFlow(overflow);
  }
}
void L1GctGlobalEnergyAlgos::setInputWheelHt ( unsigned  wheel,
unsigned  energy,
bool  overflow 
)

set input Ht value per wheel (0 or 1); not used in normal operation

Definition at line 376 of file L1GctGlobalEnergyAlgos.cc.

References m_htValPlusWheel, m_htVlMinusWheel, L1GctUnsignedInt< nBits >::setOverFlow(), and L1GctUnsignedInt< nBits >::setValue().

{
  if (wheel==0) {
    m_htValPlusWheel.setValue(energy);
    m_htValPlusWheel.setOverFlow(overflow);
  } else if (wheel==1) {
    m_htVlMinusWheel.setValue(energy);
    m_htVlMinusWheel.setOverFlow(overflow);
  }
}
void L1GctGlobalEnergyAlgos::setInputWheelHx ( unsigned  wheel,
unsigned  energy,
bool  overflow 
)

set input Ht component values per wheel (0 or 1); not used in normal operation

Definition at line 391 of file L1GctGlobalEnergyAlgos.cc.

References m_hxValPlusWheel, m_hxVlMinusWheel, L1GctTwosComplement< nBits >::setOverFlow(), and L1GctTwosComplement< nBits >::setValue().

{
  if (wheel==0) {
    m_hxValPlusWheel.setValue(energy);
    m_hxValPlusWheel.setOverFlow(overflow);
  } else if (wheel==1) {
    m_hxVlMinusWheel.setValue(energy);
    m_hxVlMinusWheel.setOverFlow(overflow);
  }
}
void L1GctGlobalEnergyAlgos::setInputWheelHy ( unsigned  wheel,
unsigned  energy,
bool  overflow 
)
void L1GctGlobalEnergyAlgos::setInputWheelJc ( unsigned  wheel,
unsigned  jcnum,
unsigned  count 
)

set input jet count (number 0-11) per wheel (0 or 1); not used in normal operation

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

Definition at line 309 of file L1GctGlobalEnergyAlgos.cc.

References L1GctJetFinderParams::getHtLsbGeV(), m_mhtComponents, and L1GctMet::setEtComponentLsb().

Referenced by L1GlobalCaloTrigger::setJetFinderParams().

{
  // The jetFinders add an LSB when converting to x and y components,
  // so the scale lsb for htx and hty is half the lsb for htt.
  m_mhtComponents.setEtComponentLsb(jfpars->getHtLsbGeV()/2);
}
void L1GctGlobalEnergyAlgos::setNextBx ( const int  bx)

partially clear buffers

Reimplemented from L1GctProcessor.

Definition at line 158 of file L1GctGlobalEnergyAlgos.cc.

References m_hfSumProcessor, and L1GctProcessor::setNextBx().

Referenced by L1GlobalCaloTrigger::bxReset().

virtual void L1GctGlobalEnergyAlgos::setupObjects ( ) [inline, protected, virtual]

Initialise inputs with null objects for the correct bunch crossing if required.

Implements L1GctProcessor.

Definition at line 153 of file L1GctGlobalEnergyAlgos.h.

{}
bool L1GctGlobalEnergyAlgos::setupOk ( ) const

check setup

Reimplemented from L1GctProcessor.

Definition at line 324 of file L1GctGlobalEnergyAlgos.cc.

References m_hfSumProcessor, m_setupOk, and L1GctGlobalHfSumAlgos::setupOk().

Referenced by L1GlobalCaloTrigger::setupOk().

                                           { 
  return (m_setupOk && 
          m_hfSumProcessor != 0 &&
          m_hfSumProcessor->setupOk()); 
}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const L1GctGlobalEnergyAlgos fpga 
) [friend]

Overload << operator.


Member Data Documentation

Definition at line 187 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputEtValPlusWheel(), process(), and resetPipelines().

Definition at line 194 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputEtVlMinusWheel(), process(), and resetPipelines().

Definition at line 185 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputExValPlusWheel(), process(), and resetPipelines().

Definition at line 192 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputExVlMinusWheel(), process(), and resetPipelines().

Definition at line 186 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputEyValPlusWheel(), process(), and resetPipelines().

Definition at line 193 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputEyVlMinusWheel(), process(), and resetPipelines().

Definition at line 188 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputHtValPlusWheel(), process(), and resetPipelines().

Definition at line 195 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputHtVlMinusWheel(), process(), and resetPipelines().

Definition at line 189 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputHxValPlusWheel(), process(), and resetPipelines().

Definition at line 174 of file L1GctGlobalEnergyAlgos.h.

Referenced by fetchInput(), process(), resetProcessor(), and setInputWheelHx().

Definition at line 196 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputHxVlMinusWheel(), process(), and resetPipelines().

Definition at line 181 of file L1GctGlobalEnergyAlgos.h.

Referenced by fetchInput(), process(), resetProcessor(), and setInputWheelHx().

Definition at line 190 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputHyValPlusWheel(), process(), and resetPipelines().

Definition at line 175 of file L1GctGlobalEnergyAlgos.h.

Referenced by fetchInput(), process(), resetProcessor(), and setInputWheelHy().

Definition at line 197 of file L1GctGlobalEnergyAlgos.h.

Referenced by getInputHyVlMinusWheel(), process(), and resetPipelines().

Definition at line 182 of file L1GctGlobalEnergyAlgos.h.

Referenced by fetchInput(), process(), resetProcessor(), and setInputWheelHy().

Definition at line 166 of file L1GctGlobalEnergyAlgos.h.

Referenced by L1GctGlobalEnergyAlgos(), and process().

Definition at line 203 of file L1GctGlobalEnergyAlgos.h.

Referenced by getEtHadColl(), operator<<(), process(), and resetPipelines().

Definition at line 200 of file L1GctGlobalEnergyAlgos.h.

Referenced by getEtMissColl(), operator<<(), process(), and resetPipelines().

Definition at line 201 of file L1GctGlobalEnergyAlgos.h.

Referenced by getEtMissPhiColl(), operator<<(), process(), and resetPipelines().

Definition at line 202 of file L1GctGlobalEnergyAlgos.h.

Referenced by getEtSumColl(), operator<<(), process(), and resetPipelines().

Definition at line 204 of file L1GctGlobalEnergyAlgos.h.

Referenced by getHtMissColl(), process(), and resetPipelines().

Definition at line 205 of file L1GctGlobalEnergyAlgos.h.

Referenced by getHtMissPhiColl(), process(), and resetPipelines().

Definition at line 207 of file L1GctGlobalEnergyAlgos.h.

Referenced by fetchInput(), L1GctGlobalEnergyAlgos(), process(), and setupOk().