CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends
L1GctWheelJetFpga Class Reference

Represents a GCT Wheel Jet FPGA. More...

#include <L1GctWheelJetFpga.h>

Inheritance diagram for L1GctWheelJetFpga:
L1GctProcessor

Public Types

typedef
L1GctJetLeafCard::hfTowerSumsType 
hfTowerSumsType
 
typedef L1GctTwosComplement
< L1GctInternHtMiss::kMissHxOrHyNBits
htComponentType
 
typedef std::vector< L1GctJetCandJetVector
 

Public Member Functions

virtual void fetchInput ()
 get input data from sources More...
 
JetVector getCentralJets () const
 get the output jets More...
 
JetVector getForwardJets () const
 get the output jets More...
 
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. More...
 
std::vector< L1GctInternHtMissgetInternalHtMiss () const
 get the Et sums in internal component format More...
 
hfTowerSumsType getOutputHfSums () const
 get the output Hf Sums More...
 
htComponentType getOutputHx () const
 get the output Ht components More...
 
htComponentType getOutputHy () const
 
JetVector getTauJets () const
 get the output jets More...
 
hfTowerSumsType inputHfSums (unsigned leafnum) const
 get the input Hf Sums More...
 
htComponentType inputHx (unsigned leafnum) const
 get the input Ht components More...
 
htComponentType inputHy (unsigned leafnum) const
 
 L1GctWheelJetFpga (int id, const std::vector< L1GctJetLeafCard * > &inputLeafCards)
 id must be 0 / 1 for -ve/+ve eta halves of CMS More...
 
virtual void process ()
 process the data, fill output buffers More...
 
void setInputJet (int i, L1GctJetCand jet)
 set input data More...
 
bool setupOk () const
 Public access to setup check. More...
 
 ~L1GctWheelJetFpga ()
 destructor More...
 
- Public Member Functions inherited from L1GctProcessor
 L1GctProcessor ()
 
void reset ()
 complete reset of processor More...
 
void setBxRange (const int firstBx, const int numberOfBx)
 define the bunch crossing range to process More...
 
void setNextBx (const int bxnum)
 clear input data buffers and process a new bunch crossing More...
 
void setTerse ()
 
bool setupOk () const
 Method to check the setup for this processor. Returns true by default. More...
 
void setVerbose ()
 control output messages More...
 
virtual ~L1GctProcessor ()
 

Static Public Attributes

static const int MAX_JETS_OUT = 4
 Max number of jets of each type we output. More...
 
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. More...
 
static const unsigned int MAX_LEAF_CARDS = 3
 Max number of leaf card pointers. More...
 

Protected Member Functions

virtual void resetPipelines ()
 
virtual void resetProcessor ()
 Separate reset methods for the processor itself and any data stored in pipelines. More...
 
virtual void setupObjects ()
 Initialise inputs with null objects for the correct bunch crossing if required. More...
 
- Protected Member Functions inherited from L1GctProcessor
int bxAbs () const
 
int bxMax () const
 
int bxMin () const
 Support for multiple beam crossing operation. More...
 
int bxRel () const
 
int numOfBx () const
 

Private Member Functions

bool checkSetup () const
 Check the setup, independently of how we have been constructed. More...
 
void classifyJets ()
 Classifies jets into central, forward or tau. More...
 
void setupJetsVectors (const int16_t bx)
 Initialises all the jet vectors with jets of the correct type. More...
 
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. More...
 

Private Attributes

JetVector m_centralJets
 
L1GctJetSorterm_centralJetSorter
 Jet sorters. More...
 
JetVector m_forwardJets
 
L1GctJetSorterm_forwardJetSorter
 
int m_id
 algo ID More...
 
std::vector< hfTowerSumsTypem_inputHfSums
 
std::vector< htComponentTypem_inputHx
 
std::vector< htComponentTypem_inputHy
 
JetVector m_inputJets
 input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B... etc. More...
 
std::vector< L1GctJetLeafCard * > m_inputLeafCards
 the jet leaf cards More...
 
hfTowerSumsType m_outputHfSums
 
htComponentType m_outputHx
 
Pipeline< htComponentTypem_outputHxPipe
 
htComponentType m_outputHy
 
Pipeline< htComponentTypem_outputHyPipe
 
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. More...
 

Friends

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

Additional Inherited Members

- Protected Attributes inherited from L1GctProcessor
bool m_verbose
 Flag to control output messages. More...
 

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 29 of file L1GctWheelJetFpga.h.

Member Typedef Documentation

Definition at line 34 of file L1GctWheelJetFpga.h.

Definition at line 33 of file L1GctWheelJetFpga.h.

Definition at line 32 of file L1GctWheelJetFpga.h.

Constructor & Destructor Documentation

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

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

Definition at line 15 of file L1GctWheelJetFpga.cc.

References checkSetup(), L1GctProcessor::m_verbose, and setupJetsVectors().

16  :
18  m_id(id),
19  m_inputLeafCards(inputLeafCards),
35 {
36  if (checkSetup()) {
37 
38  setupJetsVectors(0); //Initialises all the jet vectors with jets of the correct type.
39 
40  } else {
41  if (m_verbose) {
42  edm::LogError("L1GctSetupError") << "L1GctWheelJetFpga has been incorrectly constructed";
43  }
44  }
45 }
void setupJetsVectors(const int16_t bx)
Initialises all the jet vectors with jets of the correct type.
htComponentType m_outputHy
static const unsigned int MAX_LEAF_CARDS
Max number of leaf card pointers.
std::vector< htComponentType > m_inputHy
bool m_verbose
Flag to control output messages.
JetVector m_inputJets
input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B...
L1GctJetSorter * m_centralJetSorter
Jet sorters.
Pipeline< htComponentType > m_outputHyPipe
htComponentType m_outputHx
std::vector< hfTowerSumsType > m_inputHfSums
Pipeline< htComponentType > m_outputHxPipe
std::vector< htComponentType > m_inputHx
static const int MAX_JETS_IN
Maximum number of jets we can have as input.
static const int MAX_JETS_OUT
Max number of jets of each type we output.
std::vector< L1GctJetLeafCard * > m_inputLeafCards
the jet leaf cards
L1GctJetSorter * m_tauJetSorter
hfTowerSumsType m_outputHfSums
bool checkSetup() const
Check the setup, independently of how we have been constructed.
L1GctJetSorter * m_forwardJetSorter
L1GctWheelJetFpga::~L1GctWheelJetFpga ( )

destructor

Definition at line 88 of file L1GctWheelJetFpga.cc.

References m_centralJetSorter, m_forwardJetSorter, and m_tauJetSorter.

89 {
90  if (m_centralJetSorter != 0) delete m_centralJetSorter;
91  if (m_forwardJetSorter != 0) delete m_forwardJetSorter;
92  if (m_tauJetSorter != 0) delete m_tauJetSorter;
93 }
L1GctJetSorter * m_centralJetSorter
Jet sorters.
L1GctJetSorter * m_tauJetSorter
L1GctJetSorter * m_forwardJetSorter

Member Function Documentation

bool L1GctWheelJetFpga::checkSetup ( ) const
private

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

Definition at line 47 of file L1GctWheelJetFpga.cc.

References i, m_id, m_inputLeafCards, L1GctProcessor::m_verbose, MAX_LEAF_CARDS, and query::result.

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

48 {
49  bool result=true;
50 
51  //Check object construction is ok
52  if(m_id < 0 || m_id > 1)
53  {
54  result = false;
55  if (m_verbose) {
56  edm::LogWarning("L1GctSetupError")
57  << "L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " << m_id << " has been incorrectly constructed!\n"
58  << "ID number should be between the range of 0 to 1\n";
59  }
60  }
61 
62  if(m_inputLeafCards.size() != MAX_LEAF_CARDS)
63  {
64  result = false;
65  if (m_verbose) {
66  edm::LogWarning("L1GctSetupError")
67  << "L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " << m_id << " has been incorrectly constructed!\n"
68  << "This class needs " << MAX_LEAF_CARDS << " jet leaf card pointers, yet only " << m_inputLeafCards.size()
69  << " leaf card pointers are present.\n";
70  }
71  }
72 
73  for(unsigned int i = 0; i < MAX_LEAF_CARDS; ++i)
74  {
75  if(m_inputLeafCards.at(i) == 0)
76  {
77  result = false;
78  if (m_verbose) {
79  edm::LogWarning("L1GctSetupError")
80  << "L1GctWheelJetFpga::L1GctWheelJetFpga() : Wheel Jet FPGA ID " << m_id << " has been incorrectly constructed!\n"
81  << "Leaf card pointer " << i << " has not been set!\n";
82  }
83  }
84  }
85  return result;
86 }
int i
Definition: DBlmapReader.cc:9
static const unsigned int MAX_LEAF_CARDS
Max number of leaf card pointers.
bool m_verbose
Flag to control output messages.
tuple result
Definition: query.py:137
std::vector< L1GctJetLeafCard * > m_inputLeafCards
the jet leaf cards
void L1GctWheelJetFpga::classifyJets ( )
private

Classifies jets into central, forward or tau.

Definition at line 264 of file L1GctWheelJetFpga.cc.

References m_id, m_inputJets, m_rawCentralJets, m_rawForwardJets, m_rawTauJets, L1GctProcessor::m_verbose, and pos.

Referenced by process().

265 {
266  JetVector::iterator currentJet;
267 
268  unsigned short pos=0;
269  // In the case of two jets of equal rank, the sort will take the lower priority.
270  // This corresponds to the lower position in the array. In order to mimic the hardware
271  // behaviour, the order of jets from the input leaf cards is maintained here.
272  for(currentJet = m_inputJets.begin(); currentJet != m_inputJets.end(); ++currentJet, ++pos)
273  {
274  if (!currentJet->empty()) {
275  if(currentJet->isForward()) //forward jet
276  {
277  m_rawForwardJets.at(pos) = *currentJet;
278  }
279  else
280  {
281  if(currentJet->isCentral()) //central non-tau jet.
282  {
283  m_rawCentralJets.at(pos) = *currentJet;
284  }
285  else //must be central tau-jet
286  {
287  if(currentJet->isTau())
288  {
289  m_rawTauJets.at(pos) = *currentJet;
290  }
291  else
292  { //shouldn't get here!
293  if (m_verbose) {
294  edm::LogWarning("L1GctProcessingError")
295  << "Unclassified jet found by WheelJetFpga id " << m_id
296  << ". Jet details follow." << std::endl << *currentJet << std::endl;
297  }
298  }
299  }
300  }
301  }
302  }
303 }
bool m_verbose
Flag to control output messages.
JetVector m_inputJets
input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B...
void L1GctWheelJetFpga::fetchInput ( )
virtual

get input data from sources

Implements L1GctProcessor.

Definition at line 168 of file L1GctWheelJetFpga.cc.

References checkSetup(), m_inputHfSums, m_inputHx, m_inputHy, m_inputLeafCards, L1GctJetFinderBase::MAX_JETS_OUT, MAX_LEAF_CARDS, and storeJets().

169 {
170  if (checkSetup()) {
171  //Get Jets
172  for(unsigned short iLeaf = 0; iLeaf < MAX_LEAF_CARDS; ++iLeaf)
173  {
174  if (m_inputLeafCards.at(iLeaf) != 0) { //check that the pointers have been set up!
175 
176  storeJets(m_inputLeafCards.at(iLeaf)->getOutputJetsA(), iLeaf, 0);
177  storeJets(m_inputLeafCards.at(iLeaf)->getOutputJetsB(), iLeaf, L1GctJetFinderBase::MAX_JETS_OUT);
178  storeJets(m_inputLeafCards.at(iLeaf)->getOutputJetsC(), iLeaf, 2*L1GctJetFinderBase::MAX_JETS_OUT);
179 
180  // Deal with the Ht inputs
181  m_inputHx.at(iLeaf) = m_inputLeafCards.at(iLeaf)->getOutputHx();
182  m_inputHy.at(iLeaf) = m_inputLeafCards.at(iLeaf)->getOutputHy();
183 
184  // Deal with the Hf tower sum inputs
185  m_inputHfSums.at(iLeaf) = m_inputLeafCards.at(iLeaf)->getOutputHfSums();
186  }
187  }
188  }
189 }
static const unsigned int MAX_JETS_OUT
Max of 6 jets found per jetfinder in a 2*11 search area.
static const unsigned int MAX_LEAF_CARDS
Max number of leaf card pointers.
std::vector< htComponentType > m_inputHy
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.
std::vector< hfTowerSumsType > m_inputHfSums
std::vector< htComponentType > m_inputHx
std::vector< L1GctJetLeafCard * > m_inputLeafCards
the jet leaf cards
bool checkSetup() const
Check the setup, independently of how we have been constructed.
JetVector L1GctWheelJetFpga::getCentralJets ( ) const
inline

get the output jets

Definition at line 75 of file L1GctWheelJetFpga.h.

References m_centralJets.

75 { return m_centralJets; }
JetVector L1GctWheelJetFpga::getForwardJets ( ) const
inline

get the output jets

Definition at line 78 of file L1GctWheelJetFpga.h.

References m_forwardJets.

78 { 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 65 of file L1GctWheelJetFpga.h.

References m_inputJets.

65 { return m_inputJets; }
JetVector m_inputJets
input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B...
std::vector< L1GctInternHtMiss > L1GctWheelJetFpga::getInternalHtMiss ( ) const

get the Et sums in internal component format

Definition at line 241 of file L1GctWheelJetFpga.cc.

References L1GctProcessor::bxMin(), L1GctInternHtMiss::emulatorMissHtx(), L1GctInternHtMiss::emulatorMissHty(), m_outputHxPipe, m_outputHyPipe, L1GctProcessor::numOfBx(), and query::result.

242 {
243 
244  std::vector< L1GctInternHtMiss > result;
245  for (int bx=0; bx<numOfBx(); bx++) {
246  result.push_back( L1GctInternHtMiss::emulatorMissHtx( m_outputHxPipe.contents.at(bx).value(),
247  m_outputHxPipe.contents.at(bx).overFlow(),
248  static_cast<int16_t> (bx-bxMin()) ) );
249  result.push_back( L1GctInternHtMiss::emulatorMissHty( m_outputHyPipe.contents.at(bx).value(),
250  m_outputHyPipe.contents.at(bx).overFlow(),
251  static_cast<int16_t> (bx-bxMin()) ) );
252  }
253  return result;
254 }
static L1GctInternHtMiss emulatorMissHty(const int hty, const bool overFlow, const int16_t bx)
Named ctor for making missing Ht y component object from emulator.
int bxMin() const
Support for multiple beam crossing operation.
int numOfBx() const
Pipeline< htComponentType > m_outputHyPipe
tuple result
Definition: query.py:137
Pipeline< htComponentType > m_outputHxPipe
static L1GctInternHtMiss emulatorMissHtx(const int htx, const bool overFlow, const int16_t bx)
Named ctor for making missing Ht x component object from emulator.
hfTowerSumsType L1GctWheelJetFpga::getOutputHfSums ( ) const
inline

get the output Hf Sums

Definition at line 88 of file L1GctWheelJetFpga.h.

References m_outputHfSums.

Referenced by L1GctGlobalHfSumAlgos::fetchInput().

88 { return m_outputHfSums; }
hfTowerSumsType m_outputHfSums
htComponentType L1GctWheelJetFpga::getOutputHx ( ) const
inline

get the output Ht components

Definition at line 84 of file L1GctWheelJetFpga.h.

References m_outputHx.

Referenced by L1GctGlobalEnergyAlgos::fetchInput().

84 { return m_outputHx; }
htComponentType m_outputHx
htComponentType L1GctWheelJetFpga::getOutputHy ( ) const
inline

Definition at line 85 of file L1GctWheelJetFpga.h.

References m_outputHy.

Referenced by L1GctGlobalEnergyAlgos::fetchInput().

85 { return m_outputHy; }
htComponentType m_outputHy
JetVector L1GctWheelJetFpga::getTauJets ( ) const
inline

get the output jets

Definition at line 81 of file L1GctWheelJetFpga.h.

References m_tauJets.

81 { return m_tauJets; }
hfTowerSumsType L1GctWheelJetFpga::inputHfSums ( unsigned  leafnum) const
inline

get the input Hf Sums

Definition at line 72 of file L1GctWheelJetFpga.h.

References m_inputHfSums.

72 { return m_inputHfSums.at(leafnum); }
std::vector< hfTowerSumsType > m_inputHfSums
htComponentType L1GctWheelJetFpga::inputHx ( unsigned  leafnum) const
inline

get the input Ht components

Definition at line 68 of file L1GctWheelJetFpga.h.

References m_inputHx.

68 { return m_inputHx.at(leafnum); }
std::vector< htComponentType > m_inputHx
htComponentType L1GctWheelJetFpga::inputHy ( unsigned  leafnum) const
inline

Definition at line 69 of file L1GctWheelJetFpga.h.

References m_inputHy.

69 { return m_inputHy.at(leafnum); }
std::vector< htComponentType > m_inputHy
void L1GctWheelJetFpga::process ( )
virtual

process the data, fill output buffers

Implements L1GctProcessor.

Definition at line 191 of file L1GctWheelJetFpga.cc.

References L1GctProcessor::bxRel(), checkSetup(), classifyJets(), L1GctJetSorter::getSortedJets(), m_centralJets, m_centralJetSorter, m_forwardJets, m_forwardJetSorter, m_inputHfSums, m_inputHx, m_inputHy, m_outputHfSums, m_outputHx, m_outputHxPipe, m_outputHy, m_outputHyPipe, m_rawCentralJets, m_rawForwardJets, m_rawTauJets, m_tauJets, m_tauJetSorter, MAX_JETS_OUT, and L1GctJetSorter::setJets().

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

192 {
193  if (checkSetup()) {
194  classifyJets();
195 
199 
203 
204  for(unsigned short iJet = 0; iJet < MAX_JETS_OUT; ++iJet)
205  {
206  m_centralJets.at(iJet) = m_rawCentralJets.at(iJet);
207  m_forwardJets.at(iJet) = m_rawForwardJets.at(iJet);
208  m_tauJets.at(iJet) = m_rawTauJets.at(iJet);
209  }
210 
211  //Ht processing
212  m_outputHx = m_inputHx.at(0) + m_inputHx.at(1) + m_inputHx.at(2);
213  m_outputHy = m_inputHy.at(0) + m_inputHy.at(1) + m_inputHy.at(2);
214 
215  //Hf tower sums processing
217 
218  m_outputHxPipe.store( m_outputHx, bxRel());
219  m_outputHyPipe.store( m_outputHy, bxRel());
220  }
221 
222 }
htComponentType m_outputHy
std::vector< htComponentType > m_inputHy
int bxRel() const
JetVector getSortedJets() const
L1GctJetSorter * m_centralJetSorter
Jet sorters.
Pipeline< htComponentType > m_outputHyPipe
htComponentType m_outputHx
std::vector< hfTowerSumsType > m_inputHfSums
Pipeline< htComponentType > m_outputHxPipe
std::vector< htComponentType > m_inputHx
static const int MAX_JETS_OUT
Max number of jets of each type we output.
L1GctJetSorter * m_tauJetSorter
void setJets(JetVector &inputJets)
hfTowerSumsType m_outputHfSums
bool checkSetup() const
Check the setup, independently of how we have been constructed.
L1GctJetSorter * m_forwardJetSorter
void classifyJets()
Classifies jets into central, forward or tau.
void L1GctWheelJetFpga::resetPipelines ( )
protectedvirtual

Implements L1GctProcessor.

Definition at line 162 of file L1GctWheelJetFpga.cc.

References m_outputHxPipe, m_outputHyPipe, and L1GctProcessor::numOfBx().

163 {
164  m_outputHxPipe.reset(numOfBx());
165  m_outputHyPipe.reset(numOfBx());
166 }
int numOfBx() const
Pipeline< htComponentType > m_outputHyPipe
Pipeline< htComponentType > m_outputHxPipe
void L1GctWheelJetFpga::resetProcessor ( )
protectedvirtual

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

Implements L1GctProcessor.

Definition at line 144 of file L1GctWheelJetFpga.cc.

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

145 {
146  for (unsigned int i=0; i<MAX_LEAF_CARDS; ++i)
147  {
148  m_inputHx.at(i).reset();
149  m_inputHy.at(i).reset();
150  m_inputHfSums.at(i).reset();
151  }
152  m_outputHx.reset();
153  m_outputHy.reset();
155 }
int i
Definition: DBlmapReader.cc:9
htComponentType m_outputHy
static const unsigned int MAX_LEAF_CARDS
Max number of leaf card pointers.
std::vector< htComponentType > m_inputHy
htComponentType m_outputHx
std::vector< hfTowerSumsType > m_inputHfSums
std::vector< htComponentType > m_inputHx
void reset()
reset value and overflow to zero
hfTowerSumsType m_outputHfSums
void L1GctWheelJetFpga::setInputJet ( int  i,
L1GctJetCand  jet 
)

set input data

Definition at line 224 of file L1GctWheelJetFpga.cc.

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

225 {
226  if(i >=0 && i < MAX_JETS_IN)
227  {
228  m_inputJets.at(i) = jet;
229  }
230  else
231  {
232  if (m_verbose) {
233  edm::LogError("L1GctInputError")
234  << "L1GctWheelJetFpga::setInputJet() : In WheelJetFpga ID " << m_id << ", inputted jet candidate "
235  << i << " is outside input index range of 0 to " << (MAX_JETS_IN-1) << "\n";
236  }
237  }
238 }
int i
Definition: DBlmapReader.cc:9
bool m_verbose
Flag to control output messages.
JetVector m_inputJets
input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B...
static const int MAX_JETS_IN
Maximum number of jets we can have as input.
void L1GctWheelJetFpga::setupJetsVectors ( const int16_t  bx)
private

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

Definition at line 305 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().

306 {
307  // Create empty jet candidates with the three different combinations
308  // of flags, corresponding to central, forward and tau jets
309  L1GctJetCand tempCen(0, 0, 0, false, false, (uint16_t) 0, (uint16_t) 0, bx);
310  L1GctJetCand tempTau(0, 0, 0, true, false, (uint16_t) 0, (uint16_t) 0, bx);
311  L1GctJetCand tempFwd(0, 0, 0, false, true, (uint16_t) 0, (uint16_t) 0, bx);
312 
313  // Initialize the jet vectors with copies of the appropriate empty jet type
314  m_rawCentralJets.assign(MAX_JETS_IN, tempCen);
315  m_rawTauJets.assign (MAX_JETS_IN, tempTau);
316  m_rawForwardJets.assign(MAX_JETS_IN, tempFwd);
317 
318  m_centralJets.assign(MAX_JETS_OUT, tempCen);
319  m_tauJets.assign (MAX_JETS_OUT, tempTau);
320  m_forwardJets.assign(MAX_JETS_OUT, tempFwd);
321 }
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:18
static const int MAX_JETS_IN
Maximum number of jets we can have as input.
static const int MAX_JETS_OUT
Max number of jets of each type we output.
void L1GctWheelJetFpga::setupObjects ( )
protectedvirtual

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

Implements L1GctProcessor.

Definition at line 157 of file L1GctWheelJetFpga.cc.

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

158 {
159  setupJetsVectors(static_cast<int16_t>(bxAbs()));
160 }
void setupJetsVectors(const int16_t bx)
Initialises all the jet vectors with jets of the correct type.
int bxAbs() const
bool L1GctWheelJetFpga::setupOk ( ) const
inline

Public access to setup check.

Definition at line 91 of file L1GctWheelJetFpga.h.

References checkSetup().

91 { return checkSetup(); }
bool checkSetup() const
Check the setup, independently of how we have been constructed.
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 256 of file L1GctWheelJetFpga.cc.

References m_inputJets, L1GctJetFinderBase::MAX_JETS_OUT, and MAX_JETS_PER_LEAF.

Referenced by fetchInput().

257 {
258  for(unsigned short iJet = 0; iJet < L1GctJetFinderBase::MAX_JETS_OUT; ++iJet)
259  {
260  m_inputJets.at(iLeaf*MAX_JETS_PER_LEAF + offset + iJet) = jets.at(iJet);
261  }
262 }
static const unsigned int MAX_JETS_OUT
Max of 6 jets found per jetfinder in a 2*11 search area.
JetVector m_inputJets
input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B...
vector< PseudoJet > jets
unsigned int offset(bool)
static const unsigned int MAX_JETS_PER_LEAF
Max number of jets input from each leaf card.

Friends And Related Function Documentation

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

Overload << operator.

Definition at line 95 of file L1GctWheelJetFpga.cc.

96 {
97  using std::endl;
98  os << "===L1GctWheelJetFPGA===" << endl;
99  os << "ID = " << fpga.m_id << endl;
100  os << "No of Input Leaf Cards " << fpga.m_inputLeafCards.size() << endl;
101  for(unsigned i=0; i < fpga.m_inputLeafCards.size(); i++)
102  {
103  os << "InputLeafCard* " << i << " = " << fpga.m_inputLeafCards.at(i) << endl;
104  }
105 // os << "No. of Input Jets " << fpga.m_inputJets.size() << endl;
106 // for(unsigned i=0; i < fpga.m_inputJets.size(); i++)
107 // {
108 // os << fpga.m_inputJets.at(i);
109 // }
110 // os << "No. of raw central Jets " << fpga.m_rawCentralJets.size() << endl;
111 // for(unsigned i=0; i < fpga.m_rawCentralJets.size(); i++)
112 // {
113 // os << fpga.m_rawCentralJets.at(i);
114 // }
115 // os << "No. of raw forward Jets " << fpga.m_rawForwardJets.size() << endl;
116 // for(unsigned i=0; i < fpga.m_rawForwardJets.size(); i++)
117 // {
118 // os << fpga.m_rawForwardJets.at(i);
119 // }
120 // os << "No. of raw tau Jets " << fpga.m_rawTauJets.size() << endl;
121 // for(unsigned i=0; i < fpga.m_rawTauJets.size(); i++)
122 // {
123 // os << fpga.m_rawTauJets.at(i);
124 // }
125 // os << "No. of output central Jets " << fpga.m_centralJets.size() << endl;
126 // for(unsigned i=0; i < fpga.m_centralJets.size(); i++)
127 // {
128 // os << fpga.m_centralJets.at(i);
129 // }
130 // os << "No. of output forward Jets " << fpga.m_forwardJets.size() << endl;
131 // for(unsigned i=0; i < fpga.m_forwardJets.size(); i++)
132 // {
133 // os << fpga.m_forwardJets.at(i);
134 // }
135 // os << "No. of output tau Jets " << fpga.m_tauJets.size() << endl;
136 // for(unsigned i=0; i < fpga.m_tauJets.size(); i++)
137 // {
138 // os << fpga.m_tauJets.at(i);
139 // }
140  os << endl;
141  return os;
142 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1GctJetLeafCard * > m_inputLeafCards
the jet leaf cards

Member Data Documentation

JetVector L1GctWheelJetFpga::m_centralJets
private

Definition at line 136 of file L1GctWheelJetFpga.h.

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

L1GctJetSorter* L1GctWheelJetFpga::m_centralJetSorter
private

Jet sorters.

Definition at line 116 of file L1GctWheelJetFpga.h.

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

JetVector L1GctWheelJetFpga::m_forwardJets
private

Definition at line 137 of file L1GctWheelJetFpga.h.

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

L1GctJetSorter* L1GctWheelJetFpga::m_forwardJetSorter
private

Definition at line 117 of file L1GctWheelJetFpga.h.

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

int L1GctWheelJetFpga::m_id
private

algo ID

Definition at line 110 of file L1GctWheelJetFpga.h.

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

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

Definition at line 133 of file L1GctWheelJetFpga.h.

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

std::vector< htComponentType > L1GctWheelJetFpga::m_inputHx
private

Definition at line 129 of file L1GctWheelJetFpga.h.

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

std::vector< htComponentType > L1GctWheelJetFpga::m_inputHy
private

Definition at line 130 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 121 of file L1GctWheelJetFpga.h.

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

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

the jet leaf cards

Definition at line 113 of file L1GctWheelJetFpga.h.

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

hfTowerSumsType L1GctWheelJetFpga::m_outputHfSums
private

Definition at line 143 of file L1GctWheelJetFpga.h.

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

htComponentType L1GctWheelJetFpga::m_outputHx
private

Definition at line 141 of file L1GctWheelJetFpga.h.

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

Pipeline< htComponentType > L1GctWheelJetFpga::m_outputHxPipe
private

Definition at line 145 of file L1GctWheelJetFpga.h.

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

htComponentType L1GctWheelJetFpga::m_outputHy
private

Definition at line 142 of file L1GctWheelJetFpga.h.

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

Pipeline< htComponentType > L1GctWheelJetFpga::m_outputHyPipe
private

Definition at line 146 of file L1GctWheelJetFpga.h.

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

JetVector L1GctWheelJetFpga::m_rawCentralJets
private

Definition at line 124 of file L1GctWheelJetFpga.h.

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

JetVector L1GctWheelJetFpga::m_rawForwardJets
private

Definition at line 125 of file L1GctWheelJetFpga.h.

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

JetVector L1GctWheelJetFpga::m_rawTauJets
private

Definition at line 126 of file L1GctWheelJetFpga.h.

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

JetVector L1GctWheelJetFpga::m_tauJets
private

Definition at line 138 of file L1GctWheelJetFpga.h.

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

L1GctJetSorter* L1GctWheelJetFpga::m_tauJetSorter
private

Definition at line 118 of file L1GctWheelJetFpga.h.

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

const int L1GctWheelJetFpga::MAX_JETS_IN = L1GctWheelJetFpga::MAX_LEAF_CARDS * L1GctWheelJetFpga::MAX_JETS_PER_LEAF
staticprivate

Maximum number of jets we can have as input.

Definition at line 107 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 37 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 43 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 40 of file L1GctWheelJetFpga.h.

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