CMS 3D CMS Logo

L1GctJetFinalStage.h
Go to the documentation of this file.
1 #ifndef L1GCTJETFINALSTAGE_H_
2 #define L1GCTJETFINALSTAGE_H_
3 
5 
7 
8 #include <vector>
9 
10 class L1GctWheelJetFpga;
11 class L1GctJetSorter;
12 
26 {
27 public:
28  typedef std::vector<L1GctJetCand> JetVector;
29  typedef Pipeline<L1GctJetCand> JetPipeline;
30  static const unsigned int MAX_WHEEL_FPGAS;
31 
33  L1GctJetFinalStage(const std::vector<L1GctWheelJetFpga*>& m_wheelFpgas);
34  ~L1GctJetFinalStage() override;
35 
37  friend std::ostream& operator << (std::ostream& os, const L1GctJetFinalStage& fpga);
38 
40  void fetchInput() override;
41 
43  void process() override;
44 
45  void setInputCentralJet(int i, const L1GctJetCand& jet);
46  void setInputForwardJet(int i, const L1GctJetCand& jet);
47  void setInputTauJet(int i, const L1GctJetCand& jet);
48 
49  JetVector getInputCentralJets() const { return m_inputCentralJets; }
50  JetVector getInputForwardJets() const { return m_inputForwardJets; }
51  JetVector getInputTauJets() const { return m_inputTauJets; }
52 
53  JetVector getCentralJets() const { return m_centralJets.contents; }
54  JetVector getForwardJets() const { return m_forwardJets.contents; }
55  JetVector getTauJets() const { return m_tauJets.contents; }
56 
57  bool setupOk() const { return m_setupOk; }
58  protected:
59 
61  void resetProcessor() override;
62  void resetPipelines() override;
63 
65  void setupObjects() override {}
66 
67 private:
68  static const int MAX_JETS_IN;
69  static const int MAX_JETS_OUT;
70 
72  std::vector<L1GctWheelJetFpga*> m_wheelFpgas;
73 
78 
79  // input data
80  JetVector m_inputCentralJets;
81  JetVector m_inputForwardJets;
82  JetVector m_inputTauJets;
83 
84  // output data
85  JetPipeline m_centralJets;
86  JetPipeline m_forwardJets;
87  JetPipeline m_tauJets;
88 
89  // setup flag
90  bool m_setupOk;
91 
92  //PRIVATE MEMBER FUNCTIONS
94  void storeJets(JetVector& storageVector, const JetVector& jets, unsigned short iWheel);
95 
96 };
97 
98 std::ostream& operator << (std::ostream& os, const L1GctJetFinalStage& fpga);
99 
100 #endif /*L1GCTJETFINALSTAGE_H_*/
void process() override
process the data, fill output buffers
void setInputTauJet(int i, const L1GctJetCand &jet)
set the tau jets input data
friend std::ostream & operator<<(std::ostream &os, const L1GctJetFinalStage &fpga)
Overload << operator.
void fetchInput() override
get input data from sources
Represents a GCT Wheel Jet FPGA.
Pipeline< L1GctJetCand > JetPipeline
JetVector getCentralJets() const
get the central jets output data
void setInputCentralJet(int i, const L1GctJetCand &jet)
set the central jets input data
L1GctJetFinalStage(const std::vector< L1GctWheelJetFpga * > &m_wheelFpgas)
Takes a vector of 2 wheel jet FPGA pointers, with which to get input data from.
JetVector getInputForwardJets() const
get the forward jets input data
void storeJets(JetVector &storageVector, const JetVector &jets, unsigned short iWheel)
Enters jets into the specified storageVector, according to which wheel card we are taking them from...
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:18
std::vector< L1GctJetCand > JetVector
JetVector getForwardJets() const
get the forward jets output data
static const int MAX_JETS_OUT
Max number of jets of each type going out.
~L1GctJetFinalStage() override
JetVector getTauJets() const
get the tau jets output data
static const int MAX_JETS_IN
Max number of jets of each type coming in.
ABC for a GCT trigger data processing unit.
Represents the final stage of L1 jet processing.
void setInputForwardJet(int i, const L1GctJetCand &jet)
set the forward jets input data
L1GctJetSorter * m_forwardJetSorter
L1GctJetSorter * m_tauJetSorter
L1GctJetSorter * m_centralJetSorter
Jet sorters.
vector< PseudoJet > jets
JetVector getInputTauJets() const
get the tau jets input data
std::vector< L1GctWheelJetFpga * > m_wheelFpgas
wheel jet FPGAs
JetVector getInputCentralJets() const
get the central jets input data
static const unsigned int MAX_WHEEL_FPGAS
Max number of wheel FPGA pointers.
void setupObjects() override
Initialise inputs with null objects for the correct bunch crossing if required.
void resetPipelines() override
void resetProcessor() override
Separate reset methods for the processor itself and any data stored in pipelines. ...