CMS 3D CMS Logo

L1GctWheelJetFpga Class Reference

Represents a GCT Wheel Jet FPGA. More...

#include <L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h>

Inheritance diagram for L1GctWheelJetFpga:

L1GctProcessor

List of all members.

Public Types

typedef
L1GctJetLeafCard::etComponentType 
etComponentType
typedef L1GctUnsignedInt
< L1GctEtHad::kEtHadNBits > 
EtHadType
typedef
L1GctJetLeafCard::hfTowerSumsType 
hfTowerSumsType
typedef std::vector< L1GctJetCandJetVector

Public Member Functions

virtual void fetchInput ()
 get input data from sources
JetVector getCentralJets () const
 get the output jets
JetVector getForwardJets () const
 get the output jets
JetVector getInputJets () const
 get the input jets. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B... etc.
L1GctJetCountergetJetCounter (unsigned jcnum) const
 Get the jet counters.
hfTowerSumsType getOutputHfSums () const
 get the output Hf Sums
EtHadType getOutputHt () const
 get the output Ht
etComponentType getOutputHx () const
 get the output Ht components
etComponentType getOutputHy () const
L1GctJetCount< 3 > getOutputJc (unsigned jcnum) const
 get the output jet counts
JetVector getTauJets () const
 get the output jets
hfTowerSumsType inputHfSums (unsigned leafnum) const
 get the input Hf Sums
EtHadType inputHt (unsigned leafnum) const
 get the input Ht
etComponentType inputHx (unsigned leafnum) const
 get the input Ht components
etComponentType inputHy (unsigned leafnum) const
 L1GctWheelJetFpga (int id, std::vector< L1GctJetLeafCard * > inputLeafCards)
 id must be 0 / 1 for -ve/+ve eta halves of CMS
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 setInputHt (int i, unsigned ht)
void setInputJet (int i, L1GctJetCand jet)
 set input data
void setNextBx (const int bx)
 partially clear buffers
bool setupOk () const
 Public access to setup check.
 ~L1GctWheelJetFpga ()
 destructor

Static Public Attributes

static const int MAX_JETS_OUT = 4
 Max number of jets of each type we output.
static const unsigned int MAX_JETS_PER_LEAF = L1GctJetLeafCard::MAX_JET_FINDERS * L1GctJetFinderBase::MAX_JETS_OUT
 Max number of jets input from each leaf card.
static const unsigned int MAX_LEAF_CARDS = 3
 Max number of leaf card pointers.
static const unsigned int N_JET_COUNTERS
 Number of jet counters.

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 Member Functions

bool checkSetup () const
 Check the setup, independently of how we have been constructed.
void classifyJets ()
 Classifies jets into central, forward or tau.
void setupJetsVectors (const int16_t bx)
 Initialises all the jet vectors with jets of the correct type.
void storeJets (JetVector jets, unsigned short iLeaf, unsigned short offset)
 Puts the output from a jetfinder into the correct index range of the m_inputJets array.

Private Attributes

JetVector m_centralJets
L1GctJetSorterm_centralJetSorter
 Jet sorters.
JetVector m_forwardJets
L1GctJetSorterm_forwardJetSorter
int m_id
 algo ID
std::vector< hfTowerSumsTypem_inputHfSums
std::vector< EtHadTypem_inputHt
std::vector< etComponentTypem_inputHx
std::vector< etComponentTypem_inputHy
JetVector m_inputJets
 input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B... etc.
std::vector< L1GctJetLeafCard * > m_inputLeafCards
 the jet leaf cards
std::vector< L1GctJetCounter * > m_jetCounters
 the jet counters
hfTowerSumsType m_outputHfSums
EtHadType m_outputHt
etComponentType m_outputHx
etComponentType m_outputHy
std::vector< L1GctJetCount< 3 > > m_outputJc
JetVector m_rawCentralJets
JetVector m_rawForwardJets
JetVector m_rawTauJets
JetVector m_tauJets
L1GctJetSorterm_tauJetSorter

Static Private Attributes

static const int MAX_JETS_IN = L1GctWheelJetFpga::MAX_LEAF_CARDS * L1GctWheelJetFpga::MAX_JETS_PER_LEAF
 Maximum number of jets we can have as input.

Friends

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


Detailed Description

Represents a GCT Wheel Jet FPGA.

Takes as input the Jet and Ht data from one eta half of CMS (three leaf cards of data) and summarises/reduces this data before passing it onto the L1GctJetFinalStage processing that takes place (physically) on the concentrator card.

Author:
Jim Brooke & Robert Frazier
Date:
May 2006

Definition at line 31 of file L1GctWheelJetFpga.h.


Member Typedef Documentation

typedef L1GctJetLeafCard::etComponentType L1GctWheelJetFpga::etComponentType

Definition at line 36 of file L1GctWheelJetFpga.h.

typedef L1GctUnsignedInt<L1GctEtHad::kEtHadNBits> L1GctWheelJetFpga::EtHadType

Definition at line 35 of file L1GctWheelJetFpga.h.

typedef L1GctJetLeafCard::hfTowerSumsType L1GctWheelJetFpga::hfTowerSumsType

Definition at line 37 of file L1GctWheelJetFpga.h.

typedef std::vector<L1GctJetCand> L1GctWheelJetFpga::JetVector

Definition at line 34 of file L1GctWheelJetFpga.h.


Constructor & Destructor Documentation

L1GctWheelJetFpga::L1GctWheelJetFpga ( int  id,
std::vector< L1GctJetLeafCard * >  inputLeafCards 
)

id must be 0 / 1 for -ve/+ve eta halves of CMS

Definition at line 23 of file L1GctWheelJetFpga.cc.

References checkSetup(), i, m_id, m_inputLeafCards, m_jetCounters, L1GctProcessor::m_verbose, N_JET_COUNTERS, and setupJetsVectors().

00024                                                                                   :
00025   L1GctProcessor(),
00026   m_id(id),
00027   m_inputLeafCards(inputLeafCards),
00028   m_centralJetSorter(new L1GctJetSorter()),
00029   m_forwardJetSorter(new L1GctJetSorter()),
00030   m_tauJetSorter(new L1GctJetSorter()),
00031   m_jetCounters(N_JET_COUNTERS),
00032   m_inputJets(MAX_JETS_IN),
00033   m_rawCentralJets(MAX_JETS_IN),
00034   m_rawForwardJets(MAX_JETS_IN),
00035   m_rawTauJets(MAX_JETS_IN),
00036   m_inputHt(MAX_LEAF_CARDS),
00037   m_inputHx(MAX_LEAF_CARDS),
00038   m_inputHy(MAX_LEAF_CARDS),
00039   m_inputHfSums(MAX_LEAF_CARDS),
00040   m_centralJets(MAX_JETS_OUT),
00041   m_forwardJets(MAX_JETS_OUT),
00042   m_tauJets(MAX_JETS_OUT),
00043   m_outputHt(0), m_outputHx(0), m_outputHy(0), m_outputHfSums(),
00044   m_outputJc(N_JET_COUNTERS)
00045 {
00046   if (checkSetup()) {
00047 
00048     setupJetsVectors(0);  //Initialises all the jet vectors with jets of the correct type.
00049 
00050     // Initalise the jetCounters with null jetCounterLuts
00051     for (unsigned int i=0; i < N_JET_COUNTERS; i++) {
00052       m_jetCounters.at(i) = new L1GctJetCounter(((100*m_id)+i), m_inputLeafCards);
00053     }
00054   } else {
00055     if (m_verbose) {
00056       edm::LogError("L1GctSetupError") << "L1GctWheelJetFpga has been incorrectly constructed";
00057     }
00058   }
00059 }

L1GctWheelJetFpga::~L1GctWheelJetFpga (  ) 

destructor

Definition at line 105 of file L1GctWheelJetFpga.cc.

References i, m_centralJetSorter, m_forwardJetSorter, m_jetCounters, m_tauJetSorter, and N_JET_COUNTERS.

00106 {
00107   if (m_centralJetSorter != 0) delete m_centralJetSorter;
00108   if (m_forwardJetSorter != 0) delete m_forwardJetSorter;
00109   if (m_tauJetSorter != 0)     delete m_tauJetSorter;
00110   for (unsigned int i=0; i < N_JET_COUNTERS; i++) {
00111     if (m_jetCounters.at(i) != 0) delete m_jetCounters.at(i);
00112   }
00113 }


Member Function Documentation

bool L1GctWheelJetFpga::checkSetup (  )  const [private]

Check the setup, independently of how we have been constructed.

Definition at line 61 of file L1GctWheelJetFpga.cc.

References i, m_id, m_inputLeafCards, m_jetCounters, L1GctProcessor::m_verbose, MAX_LEAF_CARDS, N_JET_COUNTERS, and HLT_VtxMuL3::result.

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

00062 {
00063   bool result=true;
00064   
00065   //Check object construction is ok
00066   if(m_id < 0 || m_id > 1)
00067     {
00068       result = false;
00069       if (m_verbose) {
00070         edm::LogWarning("L1GctSetupError")
00071           << "L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " << m_id << " has been incorrectly constructed!\n"
00072           << "ID number should be between the range of 0 to 1\n";
00073       }
00074     } 
00075   
00076   if(m_inputLeafCards.size() != MAX_LEAF_CARDS)
00077     {
00078       result = false;
00079       if (m_verbose) {
00080         edm::LogWarning("L1GctSetupError")
00081           << "L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " << m_id << " has been incorrectly constructed!\n"
00082           << "This class needs " << MAX_LEAF_CARDS << " jet leaf card pointers, yet only " << m_inputLeafCards.size()
00083           << " leaf card pointers are present.\n";
00084       }
00085     }
00086   
00087   for(unsigned int i = 0; i < MAX_LEAF_CARDS; ++i)
00088     {
00089       if(m_inputLeafCards.at(i) == 0)
00090         {
00091           result = false;
00092           if (m_verbose) {
00093             edm::LogWarning("L1GctSetupError")
00094               << "L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " << m_id << " has been incorrectly constructed!\n"
00095               << "Leaf card pointer " << i << " has not been set!\n";
00096           }
00097         }
00098     }
00099   for (unsigned i=0; i < N_JET_COUNTERS; i++) {
00100     if (m_jetCounters.at(i) != 0) result &= m_jetCounters.at(i)->setupOk();
00101   } 
00102   return result;
00103 }

void L1GctWheelJetFpga::classifyJets (  )  [private]

Classifies jets into central, forward or tau.

Definition at line 342 of file L1GctWheelJetFpga.cc.

References lat::endl(), m_id, m_inputJets, m_rawCentralJets, m_rawForwardJets, m_rawTauJets, and L1GctProcessor::m_verbose.

Referenced by process().

00343 {
00344   JetVector::iterator currentJet;  
00345   
00346   unsigned short pos=0;
00347   // In the case of two jets of equal rank, the sort will take the lower priority.
00348   // This corresponds to the lower position in the array. In order to mimic the hardware
00349   // behaviour, the order of jets from the input leaf cards is maintained here.
00350   for(currentJet = m_inputJets.begin(); currentJet != m_inputJets.end(); ++currentJet, ++pos)
00351     {
00352       if (!currentJet->empty()) {
00353         if(currentJet->isForward())  //forward jet
00354           {
00355             m_rawForwardJets.at(pos) = *currentJet;
00356           }
00357         else
00358           {
00359             if(currentJet->isCentral())  //central non-tau jet.
00360               {
00361                 m_rawCentralJets.at(pos) = *currentJet;
00362               }
00363             else  //must be central tau-jet
00364               {
00365                 if(currentJet->isTau())
00366                   {
00367                     m_rawTauJets.at(pos) = *currentJet;
00368                   }
00369                 else
00370                   { //shouldn't get here!
00371                     if (m_verbose) {
00372                       edm::LogWarning("L1GctProcessingError")
00373                         << "Unclassified jet found by WheelJetFpga id " << m_id
00374                         << ". Jet details follow." << std::endl << *currentJet << std::endl;
00375                     }
00376                   }
00377               }
00378           }
00379       }
00380     }
00381 }

void L1GctWheelJetFpga::fetchInput (  )  [virtual]

get input data from sources

Implements L1GctProcessor.

Definition at line 229 of file L1GctWheelJetFpga.cc.

References checkSetup(), i, m_inputHfSums, m_inputHt, m_inputHx, m_inputHy, m_inputJets, m_inputLeafCards, m_jetCounters, L1GctJetFinderBase::MAX_JETS_OUT, MAX_LEAF_CARDS, N_JET_COUNTERS, and storeJets().

00230 {
00231   if (checkSetup()) {
00232     //Get Jets
00233     for(unsigned short iLeaf = 0; iLeaf < MAX_LEAF_CARDS; ++iLeaf)
00234       {
00235         if (m_inputLeafCards.at(iLeaf) != 0) {  //check that the pointers have been set up!
00236 
00237           storeJets(m_inputLeafCards.at(iLeaf)->getOutputJetsA(), iLeaf, 0);
00238           storeJets(m_inputLeafCards.at(iLeaf)->getOutputJetsB(), iLeaf, L1GctJetFinderBase::MAX_JETS_OUT);
00239           storeJets(m_inputLeafCards.at(iLeaf)->getOutputJetsC(), iLeaf, 2*L1GctJetFinderBase::MAX_JETS_OUT);
00240         
00241           // Deal with the Ht inputs
00242           m_inputHt.at(iLeaf) = m_inputLeafCards.at(iLeaf)->getOutputHt();
00243           m_inputHx.at(iLeaf) = m_inputLeafCards.at(iLeaf)->getOutputHx();
00244           m_inputHy.at(iLeaf) = m_inputLeafCards.at(iLeaf)->getOutputHy();
00245 
00246           // Deal with the Hf tower sum inputs
00247           m_inputHfSums.at(iLeaf) = m_inputLeafCards.at(iLeaf)->getOutputHfSums();
00248         }
00249       }
00250     // Deal with the jet counters
00251     for (unsigned int i=0; i<N_JET_COUNTERS; i++) {
00252       // m_jetCounters.at(i)->fetchInput();
00253       //==============================================
00254       // For efficiency, provide our own list of jets to 
00255       // all the jet counters instead of allowing them
00256       // to fetch the jets from the jetfinder outputs
00257 
00258       m_jetCounters.at(i)->setJets(m_inputJets);
00259 
00260       //==============================================
00261     }
00262   }
00263 }

JetVector L1GctWheelJetFpga::getCentralJets (  )  const [inline]

get the output jets

Definition at line 94 of file L1GctWheelJetFpga.h.

References m_centralJets.

00094 { return m_centralJets; }

JetVector L1GctWheelJetFpga::getForwardJets (  )  const [inline]

get the output jets

Definition at line 97 of file L1GctWheelJetFpga.h.

References m_forwardJets.

00097 { return m_forwardJets; }

JetVector L1GctWheelJetFpga::getInputJets (  )  const [inline]

get the input jets. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B... etc.

Definition at line 81 of file L1GctWheelJetFpga.h.

References m_inputJets.

00081 { return m_inputJets; }

L1GctJetCounter* L1GctWheelJetFpga::getJetCounter ( unsigned  jcnum  )  const [inline]

Get the jet counters.

Definition at line 117 of file L1GctWheelJetFpga.h.

References m_jetCounters, and N_JET_COUNTERS.

00118     { return ( (jcnum<N_JET_COUNTERS) ? m_jetCounters.at(jcnum) : 0); }

hfTowerSumsType L1GctWheelJetFpga::getOutputHfSums (  )  const [inline]

get the output Hf Sums

Definition at line 110 of file L1GctWheelJetFpga.h.

References m_outputHfSums.

Referenced by L1GctGlobalHfSumAlgos::fetchInput().

00110 { return m_outputHfSums; }

EtHadType L1GctWheelJetFpga::getOutputHt (  )  const [inline]

get the output Ht

Definition at line 103 of file L1GctWheelJetFpga.h.

References m_outputHt.

Referenced by L1GctGlobalEnergyAlgos::fetchInput().

00103 { return m_outputHt; }

etComponentType L1GctWheelJetFpga::getOutputHx (  )  const [inline]

get the output Ht components

Definition at line 106 of file L1GctWheelJetFpga.h.

References m_outputHx.

Referenced by L1GctGlobalEnergyAlgos::fetchInput().

00106 { return m_outputHx; }

etComponentType L1GctWheelJetFpga::getOutputHy (  )  const [inline]

Definition at line 107 of file L1GctWheelJetFpga.h.

References m_outputHy.

Referenced by L1GctGlobalEnergyAlgos::fetchInput().

00107 { return m_outputHy; }

L1GctJetCount<3> L1GctWheelJetFpga::getOutputJc ( unsigned  jcnum  )  const [inline]

get the output jet counts

Definition at line 113 of file L1GctWheelJetFpga.h.

References m_outputJc, and N_JET_COUNTERS.

Referenced by L1GctGlobalEnergyAlgos::fetchInput().

00114     { return ( (jcnum<N_JET_COUNTERS) ? m_outputJc.at(jcnum) : 0); }

JetVector L1GctWheelJetFpga::getTauJets (  )  const [inline]

get the output jets

Definition at line 100 of file L1GctWheelJetFpga.h.

References m_tauJets.

00100 { return m_tauJets; }

hfTowerSumsType L1GctWheelJetFpga::inputHfSums ( unsigned  leafnum  )  const [inline]

get the input Hf Sums

Definition at line 91 of file L1GctWheelJetFpga.h.

References m_inputHfSums.

00091 { return m_inputHfSums.at(leafnum); }

EtHadType L1GctWheelJetFpga::inputHt ( unsigned  leafnum  )  const [inline]

get the input Ht

Definition at line 84 of file L1GctWheelJetFpga.h.

References m_inputHt.

00084 { return m_inputHt.at(leafnum); }

etComponentType L1GctWheelJetFpga::inputHx ( unsigned  leafnum  )  const [inline]

get the input Ht components

Definition at line 87 of file L1GctWheelJetFpga.h.

References m_inputHx.

00087 { return m_inputHx.at(leafnum); }

etComponentType L1GctWheelJetFpga::inputHy ( unsigned  leafnum  )  const [inline]

Definition at line 88 of file L1GctWheelJetFpga.h.

References m_inputHy.

00088 { return m_inputHy.at(leafnum); }

void L1GctWheelJetFpga::process (  )  [virtual]

process the data, fill output buffers

Implements L1GctProcessor.

Definition at line 265 of file L1GctWheelJetFpga.cc.

References checkSetup(), classifyJets(), L1GctJetSorter::getSortedJets(), i, m_centralJets, m_centralJetSorter, m_forwardJets, m_forwardJetSorter, m_inputHfSums, m_inputHt, m_inputHx, m_inputHy, m_jetCounters, m_outputHfSums, m_outputHt, m_outputHx, m_outputHy, m_outputJc, m_rawCentralJets, m_rawForwardJets, m_rawTauJets, m_tauJets, m_tauJetSorter, MAX_JETS_OUT, N_JET_COUNTERS, and L1GctJetSorter::setJets().

00266 {
00267   if (checkSetup()) {
00268     classifyJets();
00269 
00270     m_centralJetSorter->setJets(m_rawCentralJets);
00271     m_forwardJetSorter->setJets(m_rawForwardJets);
00272     m_tauJetSorter->setJets(m_rawTauJets);
00273 
00274     m_rawCentralJets = m_centralJetSorter->getSortedJets();
00275     m_rawForwardJets = m_forwardJetSorter->getSortedJets();
00276     m_rawTauJets     = m_tauJetSorter->getSortedJets();
00277 
00278     for(unsigned short iJet = 0; iJet < MAX_JETS_OUT; ++iJet)
00279       {
00280         m_centralJets.at(iJet) = m_rawCentralJets.at(iJet);
00281         m_forwardJets.at(iJet) = m_rawForwardJets.at(iJet);
00282         m_tauJets.at(iJet) = m_rawTauJets.at(iJet);
00283       }
00284 
00285     //Ht processing
00286     m_outputHt = m_inputHt.at(0) + m_inputHt.at(1) + m_inputHt.at(2);
00287     m_outputHx = m_inputHx.at(0) + m_inputHx.at(1) + m_inputHx.at(2);
00288     m_outputHy = m_inputHy.at(0) + m_inputHy.at(1) + m_inputHy.at(2);
00289 
00290     //Hf tower sums processing
00291     m_outputHfSums = m_inputHfSums.at(0) + m_inputHfSums.at(1) + m_inputHfSums.at(2);
00292 
00293     //Jet count processing
00294     for (unsigned int i=0; i<N_JET_COUNTERS; i++) {
00295       m_jetCounters.at(i)->process();
00296       m_outputJc.at(i) = m_jetCounters.at(i)->getValue();
00297     }
00298   }
00299     
00300 }

void L1GctWheelJetFpga::reset ( void   ) 

clear internal buffers

clear buffers

Reimplemented from L1GctProcessor.

Definition at line 180 of file L1GctWheelJetFpga.cc.

References i, m_jetCounters, N_JET_COUNTERS, and L1GctProcessor::reset().

00180                               {
00181   L1GctProcessor::reset();
00182   for (unsigned int i=0; i<N_JET_COUNTERS; ++i)
00183   {
00184     m_jetCounters.at(i)->reset();
00185   }
00186 }

virtual void L1GctWheelJetFpga::resetPipelines (  )  [inline, protected, virtual]

Implements L1GctProcessor.

Definition at line 127 of file L1GctWheelJetFpga.h.

00127 {}

void L1GctWheelJetFpga::resetProcessor (  )  [protected, virtual]

Separate reset methods for the processor itself and any data stored in pipelines.

Implements L1GctProcessor.

Definition at line 205 of file L1GctWheelJetFpga.cc.

References i, m_inputHfSums, m_inputHt, m_inputHx, m_inputHy, m_outputHfSums, m_outputHt, m_outputHx, m_outputHy, m_outputJc, MAX_LEAF_CARDS, N_JET_COUNTERS, L1GctJetFinderBase::hfTowerSumsType::reset(), L1GctUnsignedInt< nBits >::reset(), and L1GctTwosComplement< nBits >::reset().

00206 {
00207   for (unsigned int i=0; i<MAX_LEAF_CARDS; ++i)
00208   {
00209     m_inputHt.at(i).reset();
00210     m_inputHx.at(i).reset();
00211     m_inputHy.at(i).reset();
00212     m_inputHfSums.at(i).reset();
00213   }
00214   m_outputHt.reset();
00215   m_outputHx.reset();
00216   m_outputHy.reset();
00217   m_outputHfSums.reset();
00218   for (unsigned int i=0; i<N_JET_COUNTERS; ++i)
00219   {
00220     m_outputJc.at(i).reset();
00221   }
00222 }

void L1GctWheelJetFpga::setBxRange ( const int  firstBx,
const int  numberOfBx 
)

define the bunch crossing range to process

partially clear buffers

Reimplemented from L1GctProcessor.

Definition at line 189 of file L1GctWheelJetFpga.cc.

References i, m_jetCounters, N_JET_COUNTERS, and L1GctProcessor::setBxRange().

00189                                                                           {
00190   L1GctProcessor::setBxRange(firstBx, numberOfBx);
00191   for (unsigned int i=0; i<N_JET_COUNTERS; ++i)
00192   {
00193     m_jetCounters.at(i)->setBxRange(firstBx, numberOfBx);
00194   }
00195 }

void L1GctWheelJetFpga::setInputHt ( int  i,
unsigned  ht 
)

Definition at line 318 of file L1GctWheelJetFpga.cc.

References m_id, m_inputHt, L1GctProcessor::m_verbose, and MAX_LEAF_CARDS.

00319 {   
00320   if(i >= 0 && i < static_cast<int>(MAX_LEAF_CARDS))
00321     {
00322       m_inputHt.at(i).setValue(ht);
00323     }
00324   else
00325     {
00326       if (m_verbose) {
00327         edm::LogError("L1GctInputError")
00328           << "L1GctWheelJetFpga::setInputHt() : In WheelJetFpga ID  " << m_id << ", inputted Ht value " 
00329           << i << " is outside input index range of 0 to " << (MAX_LEAF_CARDS-1) << "\n";
00330       }
00331     }
00332 } 

void L1GctWheelJetFpga::setInputJet ( int  i,
L1GctJetCand  jet 
)

set input data

Definition at line 302 of file L1GctWheelJetFpga.cc.

References m_id, m_inputJets, L1GctProcessor::m_verbose, and MAX_JETS_IN.

00303 {
00304   if(i >=0 && i < MAX_JETS_IN)
00305     {
00306       m_inputJets.at(i) =  jet;
00307     }
00308   else
00309     {
00310       if (m_verbose) {
00311         edm::LogError("L1GctInputError")
00312           << "L1GctWheelJetFpga::setInputJet() : In WheelJetFpga ID  " << m_id << ", inputted jet candidate " 
00313           << i << " is outside input index range of 0 to " << (MAX_JETS_IN-1) << "\n";
00314       }
00315     }
00316 }

void L1GctWheelJetFpga::setNextBx ( const int  bx  ) 

partially clear buffers

Reimplemented from L1GctProcessor.

Definition at line 197 of file L1GctWheelJetFpga.cc.

References i, m_jetCounters, N_JET_COUNTERS, and L1GctProcessor::setNextBx().

00197                                               {
00198   L1GctProcessor::setNextBx(bx);
00199   for (unsigned int i=0; i<N_JET_COUNTERS; ++i)
00200   {
00201     m_jetCounters.at(i)->setNextBx(bx);
00202   }
00203 }

void L1GctWheelJetFpga::setupJetsVectors ( const int16_t  bx  )  [private]

Initialises all the jet vectors with jets of the correct type.

Definition at line 383 of file L1GctWheelJetFpga.cc.

References m_centralJets, m_forwardJets, m_rawCentralJets, m_rawForwardJets, m_rawTauJets, m_tauJets, MAX_JETS_IN, and MAX_JETS_OUT.

Referenced by L1GctWheelJetFpga(), and setupObjects().

00384 {
00385   // Create empty jet candidates with the three different combinations
00386   // of flags, corresponding to central, forward and tau jets
00387   L1GctJetCand tempCen(0, 0, 0, false, false, (uint16_t) 0, (uint16_t) 0, bx);
00388   L1GctJetCand tempTau(0, 0, 0, true,  false, (uint16_t) 0, (uint16_t) 0, bx);
00389   L1GctJetCand tempFwd(0, 0, 0, false, true,  (uint16_t) 0, (uint16_t) 0, bx);
00390 
00391   // Initialize the jet vectors with copies of the appropriate empty jet type
00392   m_rawCentralJets.assign(MAX_JETS_IN, tempCen);
00393   m_rawTauJets.assign    (MAX_JETS_IN, tempTau);
00394   m_rawForwardJets.assign(MAX_JETS_IN, tempFwd);
00395 
00396   m_centralJets.assign(MAX_JETS_OUT, tempCen);
00397   m_tauJets.assign    (MAX_JETS_OUT, tempTau);
00398   m_forwardJets.assign(MAX_JETS_OUT, tempFwd);
00399 }

void L1GctWheelJetFpga::setupObjects (  )  [protected, virtual]

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

Implements L1GctProcessor.

Definition at line 224 of file L1GctWheelJetFpga.cc.

References L1GctProcessor::bxAbs(), and setupJetsVectors().

00225 {
00226   setupJetsVectors(static_cast<int16_t>(bxAbs()));
00227 }

bool L1GctWheelJetFpga::setupOk (  )  const [inline]

Public access to setup check.

Reimplemented from L1GctProcessor.

Definition at line 121 of file L1GctWheelJetFpga.h.

References checkSetup().

00121 { return checkSetup(); }

void L1GctWheelJetFpga::storeJets ( JetVector  jets,
unsigned short  iLeaf,
unsigned short  offset 
) [private]

Puts the output from a jetfinder into the correct index range of the m_inputJets array.

Definition at line 334 of file L1GctWheelJetFpga.cc.

References m_inputJets, L1GctJetFinderBase::MAX_JETS_OUT, and MAX_JETS_PER_LEAF.

Referenced by fetchInput().

00335 {
00336   for(unsigned short iJet = 0; iJet < L1GctJetFinderBase::MAX_JETS_OUT; ++iJet)
00337     {
00338       m_inputJets.at(iLeaf*MAX_JETS_PER_LEAF + offset + iJet) = jets.at(iJet);
00339     }
00340 }


Friends And Related Function Documentation

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

Overload << operator.

Definition at line 115 of file L1GctWheelJetFpga.cc.

00116 {
00117   using std::endl;
00118   os << "===L1GctWheelJetFPGA===" << endl;
00119   os << "ID = " << fpga.m_id << endl;
00120   os << "No of Input Leaf Cards " << fpga.m_inputLeafCards.size() << endl;
00121   for(unsigned i=0; i < fpga.m_inputLeafCards.size(); i++)
00122     {
00123       os << "InputLeafCard* " << i << " = " << fpga.m_inputLeafCards.at(i) << endl;
00124     } 
00125 //   os << "No. of Input Jets " << fpga.m_inputJets.size() << endl;
00126 //   for(unsigned i=0; i < fpga.m_inputJets.size(); i++)
00127 //     {
00128 //       os << fpga.m_inputJets.at(i);
00129 //     } 
00130   os << "Input Ht " << endl;
00131   for(unsigned i=0; i < fpga.m_inputHt.size(); i++)
00132     {
00133       os << (fpga.m_inputHt.at(i)) << endl;
00134     } 
00135 //   os << "No. of raw central Jets " << fpga.m_rawCentralJets.size() << endl;
00136 //   for(unsigned i=0; i < fpga.m_rawCentralJets.size(); i++)
00137 //     {
00138 //       os << fpga.m_rawCentralJets.at(i);
00139 //     } 
00140 //   os << "No. of raw forward Jets " << fpga.m_rawForwardJets.size() << endl;
00141 //   for(unsigned i=0; i < fpga.m_rawForwardJets.size(); i++)
00142 //     {
00143 //       os << fpga.m_rawForwardJets.at(i);
00144 //     } 
00145 //   os << "No. of raw tau Jets " << fpga.m_rawTauJets.size() << endl;
00146 //   for(unsigned i=0; i < fpga.m_rawTauJets.size(); i++)
00147 //     {
00148 //       os << fpga.m_rawTauJets.at(i);
00149 //     } 
00150   os << "Output Ht " << fpga.m_outputHt << endl;
00151   os << "Output Jet count " << endl;
00152   for(unsigned i=0; i < fpga.m_outputJc.size(); i++)
00153     {
00154       os << "Jet count " << i << ": " << fpga.m_outputJc.at(i) << endl;
00155     } 
00156 //   os << "No. of output central Jets " << fpga.m_centralJets.size() << endl;
00157 //   for(unsigned i=0; i < fpga.m_centralJets.size(); i++)
00158 //     {
00159 //       os << fpga.m_centralJets.at(i);
00160 //     } 
00161 //   os << "No. of output forward Jets " << fpga.m_forwardJets.size() << endl;
00162 //   for(unsigned i=0; i < fpga.m_forwardJets.size(); i++)
00163 //     {
00164 //       os << fpga.m_forwardJets.at(i);
00165 //     } 
00166 //   os << "No. of output tau Jets " << fpga.m_tauJets.size() << endl;
00167 //   for(unsigned i=0; i < fpga.m_tauJets.size(); i++)
00168 //     {
00169 //       os << fpga.m_tauJets.at(i);
00170 //     }
00171   os << "Jet counters:" << endl; 
00172   for (unsigned int i=0; i < L1GctWheelJetFpga::N_JET_COUNTERS; i++) {
00173     os << *fpga.m_jetCounters.at(i) << endl;
00174   }
00175   os << endl;
00176   return os;
00177 }       


Member Data Documentation

JetVector L1GctWheelJetFpga::m_centralJets [private]

Definition at line 169 of file L1GctWheelJetFpga.h.

Referenced by getCentralJets(), process(), and setupJetsVectors().

L1GctJetSorter* L1GctWheelJetFpga::m_centralJetSorter [private]

Jet sorters.

Definition at line 143 of file L1GctWheelJetFpga.h.

Referenced by process(), and ~L1GctWheelJetFpga().

JetVector L1GctWheelJetFpga::m_forwardJets [private]

Definition at line 170 of file L1GctWheelJetFpga.h.

Referenced by getForwardJets(), process(), and setupJetsVectors().

L1GctJetSorter* L1GctWheelJetFpga::m_forwardJetSorter [private]

Definition at line 144 of file L1GctWheelJetFpga.h.

Referenced by process(), and ~L1GctWheelJetFpga().

int L1GctWheelJetFpga::m_id [private]

algo ID

Definition at line 137 of file L1GctWheelJetFpga.h.

Referenced by checkSetup(), classifyJets(), L1GctWheelJetFpga(), operator<<(), setInputHt(), and setInputJet().

std::vector< hfTowerSumsType > L1GctWheelJetFpga::m_inputHfSums [private]

Definition at line 166 of file L1GctWheelJetFpga.h.

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

std::vector< EtHadType > L1GctWheelJetFpga::m_inputHt [private]

Definition at line 159 of file L1GctWheelJetFpga.h.

Referenced by fetchInput(), inputHt(), operator<<(), process(), resetProcessor(), and setInputHt().

std::vector< etComponentType > L1GctWheelJetFpga::m_inputHx [private]

Definition at line 162 of file L1GctWheelJetFpga.h.

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

std::vector< etComponentType > L1GctWheelJetFpga::m_inputHy [private]

Definition at line 163 of file L1GctWheelJetFpga.h.

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

JetVector L1GctWheelJetFpga::m_inputJets [private]

input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B... etc.

Definition at line 151 of file L1GctWheelJetFpga.h.

Referenced by classifyJets(), fetchInput(), getInputJets(), setInputJet(), and storeJets().

std::vector<L1GctJetLeafCard*> L1GctWheelJetFpga::m_inputLeafCards [private]

the jet leaf cards

Definition at line 140 of file L1GctWheelJetFpga.h.

Referenced by checkSetup(), fetchInput(), L1GctWheelJetFpga(), and operator<<().

std::vector<L1GctJetCounter*> L1GctWheelJetFpga::m_jetCounters [private]

the jet counters

Definition at line 148 of file L1GctWheelJetFpga.h.

Referenced by checkSetup(), fetchInput(), getJetCounter(), L1GctWheelJetFpga(), operator<<(), process(), reset(), setBxRange(), setNextBx(), and ~L1GctWheelJetFpga().

hfTowerSumsType L1GctWheelJetFpga::m_outputHfSums [private]

Definition at line 177 of file L1GctWheelJetFpga.h.

Referenced by getOutputHfSums(), process(), and resetProcessor().

EtHadType L1GctWheelJetFpga::m_outputHt [private]

Definition at line 174 of file L1GctWheelJetFpga.h.

Referenced by getOutputHt(), operator<<(), process(), and resetProcessor().

etComponentType L1GctWheelJetFpga::m_outputHx [private]

Definition at line 175 of file L1GctWheelJetFpga.h.

Referenced by getOutputHx(), process(), and resetProcessor().

etComponentType L1GctWheelJetFpga::m_outputHy [private]

Definition at line 176 of file L1GctWheelJetFpga.h.

Referenced by getOutputHy(), process(), and resetProcessor().

std::vector< L1GctJetCount<3> > L1GctWheelJetFpga::m_outputJc [private]

Definition at line 178 of file L1GctWheelJetFpga.h.

Referenced by getOutputJc(), operator<<(), process(), and resetProcessor().

JetVector L1GctWheelJetFpga::m_rawCentralJets [private]

Definition at line 154 of file L1GctWheelJetFpga.h.

Referenced by classifyJets(), process(), and setupJetsVectors().

JetVector L1GctWheelJetFpga::m_rawForwardJets [private]

Definition at line 155 of file L1GctWheelJetFpga.h.

Referenced by classifyJets(), process(), and setupJetsVectors().

JetVector L1GctWheelJetFpga::m_rawTauJets [private]

Definition at line 156 of file L1GctWheelJetFpga.h.

Referenced by classifyJets(), process(), and setupJetsVectors().

JetVector L1GctWheelJetFpga::m_tauJets [private]

Definition at line 171 of file L1GctWheelJetFpga.h.

Referenced by getTauJets(), process(), and setupJetsVectors().

L1GctJetSorter* L1GctWheelJetFpga::m_tauJetSorter [private]

Definition at line 145 of file L1GctWheelJetFpga.h.

Referenced by process(), and ~L1GctWheelJetFpga().

const int L1GctWheelJetFpga::MAX_JETS_IN = L1GctWheelJetFpga::MAX_LEAF_CARDS * L1GctWheelJetFpga::MAX_JETS_PER_LEAF [static, private]

Maximum number of jets we can have as input.

Definition at line 134 of file L1GctWheelJetFpga.h.

Referenced by setInputJet(), and setupJetsVectors().

const int L1GctWheelJetFpga::MAX_JETS_OUT = 4 [static]

Max number of jets of each type we output.

Definition at line 40 of file L1GctWheelJetFpga.h.

Referenced by process(), setupJetsVectors(), and L1GctJetFinalStage::storeJets().

const unsigned int L1GctWheelJetFpga::MAX_JETS_PER_LEAF = L1GctJetLeafCard::MAX_JET_FINDERS * L1GctJetFinderBase::MAX_JETS_OUT [static]

Max number of jets input from each leaf card.

Definition at line 46 of file L1GctWheelJetFpga.h.

Referenced by storeJets().

const unsigned int L1GctWheelJetFpga::MAX_LEAF_CARDS = 3 [static]

Max number of leaf card pointers.

Definition at line 43 of file L1GctWheelJetFpga.h.

Referenced by checkSetup(), fetchInput(), resetProcessor(), and setInputHt().

const unsigned int L1GctWheelJetFpga::N_JET_COUNTERS [static]

Initial value:

Number of jet counters.

Definition at line 49 of file L1GctWheelJetFpga.h.

Referenced by checkSetup(), fetchInput(), getJetCounter(), getOutputJc(), L1GctWheelJetFpga(), operator<<(), process(), reset(), resetProcessor(), setBxRange(), setNextBx(), and ~L1GctWheelJetFpga().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:39 2009 for CMSSW by  doxygen 1.5.4