CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GctWheelJetFpga.h
Go to the documentation of this file.
1 #ifndef L1GCTWHEELJETFPGA_H_
2 #define L1GCTWHEELJETFPGA_H_
3 
19 
22 
24 
25 class L1GctJetSorter;
26 
27 #include <vector>
28 
30 {
31 public:
32  typedef std::vector<L1GctJetCand> JetVector;
35 
37  static const int MAX_JETS_OUT;
38 
40  static const unsigned int MAX_LEAF_CARDS;
41 
43  static const unsigned int MAX_JETS_PER_LEAF;
44 
46  L1GctWheelJetFpga(int id,
47  std::vector<L1GctJetLeafCard*> inputLeafCards);
48 
51 
53  friend std::ostream& operator << (std::ostream& os, const L1GctWheelJetFpga& fpga);
54 
56  virtual void fetchInput();
57 
59  virtual void process();
60 
62  void setInputJet(int i, L1GctJetCand jet);
63 
65  JetVector getInputJets() const { return m_inputJets; }
66 
68  htComponentType inputHx(unsigned leafnum) const { return m_inputHx.at(leafnum); }
69  htComponentType inputHy(unsigned leafnum) const { return m_inputHy.at(leafnum); }
70 
72  hfTowerSumsType inputHfSums(unsigned leafnum) const { return m_inputHfSums.at(leafnum); }
73 
76 
79 
81  JetVector getTauJets() const { return m_tauJets; }
82 
86 
89 
91  bool setupOk() const { return checkSetup(); }
92 
94  std::vector< L1GctInternHtMiss > getInternalHtMiss() const;
95 
96  protected:
97 
99  virtual void resetProcessor();
100  virtual void resetPipelines();
101 
103  virtual void setupObjects();
104 
105 private:
106 
107  static const int MAX_JETS_IN;
108 
110  int m_id;
111 
113  std::vector<L1GctJetLeafCard*> m_inputLeafCards;
114 
119 
122 
123  // Holds the all the various inputted jets, re-addressed using proper GCT->GT jet addressing
127 
128  // input Ht component sums from each leaf card
129  std::vector< htComponentType > m_inputHx;
130  std::vector< htComponentType > m_inputHy;
131 
132  // input Hf Et sums from each leaf card
133  std::vector< hfTowerSumsType > m_inputHfSums;
134 
135  // output data
139 
140  // data sent to GlobalEnergyAlgos
144 
147 
148  //PRIVATE METHODS
150  bool checkSetup() const;
152  void storeJets(JetVector jets, unsigned short iLeaf, unsigned short offset);
154  void classifyJets();
156  void setupJetsVectors(const int16_t bx);
157 };
158 
159 std::ostream& operator << (std::ostream& os, const L1GctWheelJetFpga& fpga);
160 
161 #endif /*L1GCTWHEELJETFPGA_H_*/
hfTowerSumsType inputHfSums(unsigned leafnum) const
get the input Hf Sums
void setInputJet(int i, L1GctJetCand jet)
set input data
int i
Definition: DBlmapReader.cc:9
L1GctJetLeafCard::hfTowerSumsType hfTowerSumsType
void setupJetsVectors(const int16_t bx)
Initialises all the jet vectors with jets of the correct type.
htComponentType m_outputHy
htComponentType getOutputHy() const
JetVector getTauJets() const
get the output jets
JetVector getCentralJets() const
get the output jets
Represents a GCT Wheel Jet FPGA.
L1GctTwosComplement< L1GctInternHtMiss::kMissHxOrHyNBits > htComponentType
static const unsigned int MAX_LEAF_CARDS
Max number of leaf card pointers.
virtual void fetchInput()
get input data from sources
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.
virtual void resetPipelines()
~L1GctWheelJetFpga()
destructor
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:18
JetVector m_inputJets
input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B...
htComponentType inputHy(unsigned leafnum) const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
std::vector< L1GctInternHtMiss > getInternalHtMiss() const
get the Et sums in internal component format
std::vector< L1GctJetCand > JetVector
ABC for a GCT trigger data processing unit.
htComponentType inputHx(unsigned leafnum) const
get the input Ht components
L1GctJetSorter * m_centralJetSorter
Jet sorters.
Pipeline< htComponentType > m_outputHyPipe
htComponentType m_outputHx
unsigned int offset(bool)
friend std::ostream & operator<<(std::ostream &os, const L1GctWheelJetFpga &fpga)
Overload &lt;&lt; operator.
std::vector< hfTowerSumsType > m_inputHfSums
Pipeline< htComponentType > m_outputHxPipe
hfTowerSumsType getOutputHfSums() const
get the output Hf Sums
std::vector< htComponentType > m_inputHx
JetVector getInputJets() const
get the input jets. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0...
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.
htComponentType getOutputHx() const
get the output Ht components
virtual void resetProcessor()
Separate reset methods for the processor itself and any data stored in pipelines. ...
std::vector< L1GctJetLeafCard * > m_inputLeafCards
the jet leaf cards
L1GctWheelJetFpga(int id, std::vector< L1GctJetLeafCard * > inputLeafCards)
id must be 0 / 1 for -ve/+ve eta halves of CMS
L1GctJetSorter * m_tauJetSorter
JetVector getForwardJets() const
get the output jets
hfTowerSumsType m_outputHfSums
bool checkSetup() const
Check the setup, independently of how we have been constructed.
static const unsigned int MAX_JETS_PER_LEAF
Max number of jets input from each leaf card.
L1GctJetSorter * m_forwardJetSorter
virtual void setupObjects()
Initialise inputs with null objects for the correct bunch crossing if required.
virtual void process()
process the data, fill output buffers
void classifyJets()
Classifies jets into central, forward or tau.
bool setupOk() const
Public access to setup check.