CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 public:
31  typedef std::vector<L1GctJetCand> JetVector;
34 
36  static const int MAX_JETS_OUT;
37 
39  static const unsigned int MAX_LEAF_CARDS;
40 
42  static const unsigned int MAX_JETS_PER_LEAF;
43 
45  L1GctWheelJetFpga(int id, const std::vector<L1GctJetLeafCard*>& inputLeafCards);
46 
48  ~L1GctWheelJetFpga() override;
49 
51  friend std::ostream& operator<<(std::ostream& os, const L1GctWheelJetFpga& fpga);
52 
54  void fetchInput() override;
55 
57  void process() override;
58 
60  void setInputJet(int i, const L1GctJetCand& jet);
61 
63  JetVector getInputJets() const { return m_inputJets; }
64 
66  htComponentType inputHx(unsigned leafnum) const { return m_inputHx.at(leafnum); }
67  htComponentType inputHy(unsigned leafnum) const { return m_inputHy.at(leafnum); }
68 
70  hfTowerSumsType inputHfSums(unsigned leafnum) const { return m_inputHfSums.at(leafnum); }
71 
74 
77 
79  JetVector getTauJets() const { return m_tauJets; }
80 
84 
87 
89  bool setupOk() const { return checkSetup(); }
90 
92  std::vector<L1GctInternHtMiss> getInternalHtMiss() const;
93 
94 protected:
96  void resetProcessor() override;
97  void resetPipelines() override;
98 
100  void setupObjects() override;
101 
102 private:
103  static const int MAX_JETS_IN;
104 
106  int m_id;
107 
109  std::vector<L1GctJetLeafCard*> m_inputLeafCards;
110 
115 
118 
119  // Holds the all the various inputted jets, re-addressed using proper GCT->GT jet addressing
123 
124  // input Ht component sums from each leaf card
125  std::vector<htComponentType> m_inputHx;
126  std::vector<htComponentType> m_inputHy;
127 
128  // input Hf Et sums from each leaf card
129  std::vector<hfTowerSumsType> m_inputHfSums;
130 
131  // output data
135 
136  // data sent to GlobalEnergyAlgos
140 
141  Pipeline<htComponentType> m_outputHxPipe;
142  Pipeline<htComponentType> m_outputHyPipe;
143 
144  //PRIVATE METHODS
146  bool checkSetup() const;
148  void storeJets(const JetVector& jets, unsigned short iLeaf, unsigned short offset);
150  void classifyJets();
152  void setupJetsVectors(const int16_t bx);
153 };
154 
155 std::ostream& operator<<(std::ostream& os, const L1GctWheelJetFpga& fpga);
156 
157 #endif /*L1GCTWHEELJETFPGA_H_*/
hfTowerSumsType inputHfSums(unsigned leafnum) const
get the input Hf Sums
L1GctWheelJetFpga(int id, const std::vector< L1GctJetLeafCard * > &inputLeafCards)
id must be 0 / 1 for -ve/+ve eta halves of CMS
L1GctJetLeafCard::hfTowerSumsType hfTowerSumsType
void setupJetsVectors(const int16_t bx)
Initialises all the jet vectors with jets of the correct type.
htComponentType m_outputHy
void setupObjects() override
Initialise inputs with null objects for the correct bunch crossing if required.
htComponentType getOutputHy() const
JetVector getTauJets() const
get the output jets
JetVector getCentralJets() const
get the output jets
Represents a GCT Wheel Jet FPGA.
static const unsigned int MAX_LEAF_CARDS
Max number of leaf card pointers.
std::vector< htComponentType > m_inputHy
std::vector< htComponentType > m_inputHx
void process() override
process the data, fill output buffers
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:17
JetVector m_inputJets
input data. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B...
Pipeline< htComponentType > m_outputHxPipe
L1GctTwosComplement< L1GctInternHtMiss::kMissHxOrHyNBits > htComponentType
htComponentType inputHy(unsigned leafnum) const
void fetchInput() override
get input data from sources
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
std::vector< L1GctInternHtMiss > getInternalHtMiss() const
get the Et sums in internal component format
std::vector< L1GctJetCand > JetVector
void resetPipelines() override
ABC for a GCT trigger data processing unit.
void resetProcessor() override
Separate reset methods for the processor itself and any data stored in pipelines. ...
void storeJets(const JetVector &jets, unsigned short iLeaf, unsigned short offset)
Puts the output from a jetfinder into the correct index range of the m_inputJets array.
htComponentType inputHx(unsigned leafnum) const
get the input Ht components
std::vector< hfTowerSumsType > m_inputHfSums
L1GctJetSorter * m_centralJetSorter
Jet sorters.
vector< PseudoJet > jets
htComponentType m_outputHx
friend std::ostream & operator<<(std::ostream &os, const L1GctWheelJetFpga &fpga)
Overload &lt;&lt; operator.
hfTowerSumsType getOutputHfSums() const
get the output Hf Sums
Pipeline< htComponentType > m_outputHyPipe
JetVector getInputJets() const
get the input jets. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0...
void setInputJet(int i, const L1GctJetCand &jet)
set input data
~L1GctWheelJetFpga() override
destructor
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
std::vector< L1GctJetLeafCard * > m_inputLeafCards
the jet leaf cards
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
void classifyJets()
Classifies jets into central, forward or tau.
bool setupOk() const
Public access to setup check.