CMS 3D CMS Logo

L1GctJetLeafCard.h
Go to the documentation of this file.
1 #ifndef L1GCTJETLEAFCARD_H_
2 #define L1GCTJETLEAFCARD_H_
3 
7 
12 
13 #include <vector>
14 
15 /*
16  * \class L1GctJetLeafCard
17  * \brief Emulates a leaf card programmed for jetfinding
18  *
19  * Represents a GCT Leaf Card
20  * programmed for jet finding
21  * author: Jim Brooke
22  * date: 20/2/2006
23  *
24  */
25 
26 class L1GctJetCand;
27 
29 public:
30  //Type declaration
32 
33  //Statics
34  static const int MAX_JET_FINDERS;
35 
36  //Typedefs
39 
42 
44 
45  enum maxValues {
48  };
49 
50  //Construtors/destructor
51  L1GctJetLeafCard(int id, int iphi, jetFinderType jfType = tdrJetFinder);
52 
53  ~L1GctJetLeafCard() override;
54 
56  void setNeighbourLeafCards(const std::vector<L1GctJetLeafCard*>& neighbours);
57 
59  bool setupOk() const;
60 
62  friend std::ostream& operator<<(std::ostream& os, const L1GctJetLeafCard& card);
63 
65  void reset();
66 
68  void fetchInput() override;
69 
71  void process() override;
72 
74  void setBxRange(const int firstBx, const int numberOfBx);
75 
77  void setNextBx(const int bx);
78 
83 
84  // get the jet output
85  std::vector<L1GctJetCand> getOutputJetsA() const;
86  std::vector<L1GctJetCand> getOutputJetsB() const;
87  std::vector<L1GctJetCand> getOutputJetsC() const;
88 
90  etComponentType getOutputEx() const { return m_exSum; }
91 
93  etComponentType getOutputEy() const { return m_eySum; }
94 
96  etComponentType getOutputHx() const { return m_hxSum; }
97  etComponentType getOutputHy() const { return m_hySum; }
98 
100  etTotalType getOutputEt() const { return m_etSum; }
101  etHadType getOutputHt() const { return m_htSum; }
102 
104 
107  std::vector<etComponentType> getAllOutputEx() const { return m_exSumPipe.contents; }
108 
110  std::vector<etComponentType> getAllOutputEy() const { return m_eySumPipe.contents; }
111 
113  std::vector<htComponentType> getAllOutputHx() const { return m_hxSumPipe.contents; }
114  std::vector<htComponentType> getAllOutputHy() const { return m_hySumPipe.contents; }
115 
117  std::vector<etTotalType> getAllOutputEt() const { return m_etSumPipe.contents; }
118  std::vector<etHadType> getAllOutputHt() const { return m_htSumPipe.contents; }
119 
120  std::vector<hfTowerSumsType> getAllOutputHfSums() const { return m_hfSumsPipe.contents; }
121 
123  std::vector<L1GctInternEtSum> getInternalEtSums() const;
124  std::vector<L1GctInternHtMiss> getInternalHtMiss() const;
125 
126 protected:
128  void resetProcessor() override;
129  void resetPipelines() override;
130 
132  void setupObjects() override {}
133 
134 private:
135  // Leaf card ID
136  int m_id;
137 
138  // Which jetFinder to use?
140 
141  // internal algorithms
145 
146  // internal data (other than jets)
147 
149 
156 
158 
159  // stored copies of output data
167 
169 };
170 
171 std::ostream& operator<<(std::ostream& os, const L1GctJetLeafCard& card);
172 
173 #endif /*L1GCTJETLEAFCARD_H_*/
htComponentType m_hySum
Pipeline< htComponentType > m_hxSumPipe
L1GctJetFinderBase * getJetFinderA() const
get pointers to associated jetfinders
L1GctJetFinderBase * m_jetFinderB
middle jetFinder in phi
L1GctJetFinderBase::hfTowerSumsType hfTowerSumsType
void reset()
clear internal buffers
friend std::ostream & operator<<(std::ostream &os, const L1GctJetLeafCard &card)
Overload << operator.
~L1GctJetLeafCard() override
etComponentType getOutputHy() const
L1GctJetFinderBase * m_jetFinderC
highest jetFinder in phi
L1GctJetFinderBase * getJetFinderB() const
std::vector< htComponentType > getAllOutputHx() const
get the output Ht components history
etComponentType getOutputEx() const
get the Ex output
std::vector< L1GctInternEtSum > getInternalEtSums() const
get the Et sums in internal component format
std::vector< L1GctJetCand > getOutputJetsC() const
Ouptut jetfinder C jets (highest jetFinder in phi)
L1GctJetFinderBase * getJetFinderC() const
Pipeline< etHadType > m_htSumPipe
Pipeline< etTotalType > m_etSumPipe
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:17
bool setupOk() const
Check setup is Ok.
void setNeighbourLeafCards(const std::vector< L1GctJetLeafCard *> &neighbours)
set pointers to neighbours - needed to complete the setup
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etHadType
std::vector< etComponentType > getAllOutputEy() const
get the Ey output history
std::vector< L1GctJetCand > getOutputJetsB() const
Output jetfinder B jets (middle jetFinder in phi)
etComponentType getOutputEy() const
get the Ey output
Base class to allow implementation of jetFinder algorithms.
ABC for a GCT trigger data processing unit.
void process() override
process the data and set outputs
void resetProcessor() override
Separate reset methods for the processor itself and any data stored in pipelines. ...
etHadType getOutputHt() const
Pipeline< etComponentType > m_eySumPipe
std::vector< etComponentType > getAllOutputEx() const
Pipeline< htComponentType > m_hySumPipe
std::vector< htComponentType > getAllOutputHy() const
void fetchInput() override
set the input buffers
std::vector< L1GctJetCand > getOutputJetsA() const
Output jetfinder A jets (lowest jetFinder in phi)
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
L1GctTwosComplement< L1GctInternHtMiss::kMissHxOrHyNBits > htComponentType
jetFinderType m_whichJetFinder
std::vector< etTotalType > getAllOutputEt() const
get the Et output history
std::vector< etHadType > getAllOutputHt() const
void setNextBx(const int bx)
partially clear buffers
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etTotalType
std::vector< hfTowerSumsType > getAllOutputHfSums() const
static const int MAX_JET_FINDERS
Number of jetfinders per jet leaf card.
void setupObjects() override
Initialise inputs with null objects for the correct bunch crossing if required.
etTotalType getOutputEt() const
get the Et output
L1GctJetLeafCard(int id, int iphi, jetFinderType jfType=tdrJetFinder)
etComponentType getOutputHx() const
get the output Ht components
hfTowerSumsType getOutputHfSums() const
hfTowerSumsType m_hfSums
std::vector< L1GctInternHtMiss > getInternalHtMiss() const
L1GctJetFinderBase * m_jetFinderA
lowest jetFinder in phi
Pipeline< hfTowerSumsType > m_hfSumsPipe
etComponentType m_eySum
Pipeline< etComponentType > m_exSumPipe
void resetPipelines() override
htComponentType m_hxSum
std::ostream & operator<<(std::ostream &os, const L1GctJetLeafCard &card)
L1GctTwosComplement< L1GctInternEtSum::kMissExOrEyNBits > etComponentType
etComponentType m_exSum