CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
std::vector< L1GctInternHtMiss > getInternalHtMiss() const
Pipeline< htComponentType > m_hxSumPipe
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 &lt;&lt; operator.
~L1GctJetLeafCard() override
L1GctJetFinderBase * m_jetFinderC
highest jetFinder in phi
Pipeline< etHadType > m_htSumPipe
Pipeline< etTotalType > m_etSumPipe
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:17
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etHadType
std::vector< hfTowerSumsType > getAllOutputHfSums() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
std::vector< htComponentType > getAllOutputHy() const
Base class to allow implementation of jetFinder algorithms.
std::vector< L1GctInternEtSum > getInternalEtSums() const
get the Et sums in internal component format
ABC for a GCT trigger data processing unit.
void process() override
process the data and set outputs
std::vector< L1GctJetCand > getOutputJetsA() const
Output jetfinder A jets (lowest jetFinder in phi)
void resetProcessor() override
Separate reset methods for the processor itself and any data stored in pipelines. ...
std::vector< etHadType > getAllOutputHt() const
Pipeline< etComponentType > m_eySumPipe
Pipeline< htComponentType > m_hySumPipe
void fetchInput() override
set the input buffers
std::vector< etTotalType > getAllOutputEt() const
get the Et output history
L1GctJetFinderBase * getJetFinderB() const
std::vector< L1GctJetCand > getOutputJetsB() const
Output jetfinder B jets (middle jetFinder in phi)
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
etTotalType getOutputEt() const
get the Et output
etHadType getOutputHt() const
L1GctTwosComplement< L1GctInternHtMiss::kMissHxOrHyNBits > htComponentType
jetFinderType m_whichJetFinder
std::vector< htComponentType > getAllOutputHx() const
get the output Ht components history
void setNextBx(const int bx)
partially clear buffers
void setNeighbourLeafCards(const std::vector< L1GctJetLeafCard * > &neighbours)
set pointers to neighbours - needed to complete the setup
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etTotalType
etComponentType getOutputEx() const
get the Ex output
static const int MAX_JET_FINDERS
Number of jetfinders per jet leaf card.
std::vector< etComponentType > getAllOutputEx() const
std::vector< L1GctJetCand > getOutputJetsC() const
Ouptut jetfinder C jets (highest jetFinder in phi)
void setupObjects() override
Initialise inputs with null objects for the correct bunch crossing if required.
L1GctJetLeafCard(int id, int iphi, jetFinderType jfType=tdrJetFinder)
hfTowerSumsType m_hfSums
etComponentType getOutputEy() const
get the Ey output
hfTowerSumsType getOutputHfSums() const
etComponentType getOutputHx() const
get the output Ht components
etComponentType getOutputHy() const
L1GctJetFinderBase * m_jetFinderA
lowest jetFinder in phi
Pipeline< hfTowerSumsType > m_hfSumsPipe
L1GctJetFinderBase * getJetFinderA() const
get pointers to associated jetfinders
etComponentType m_eySum
bool setupOk() const
Check setup is Ok.
Pipeline< etComponentType > m_exSumPipe
L1GctJetFinderBase * getJetFinderC() const
void resetPipelines() override
htComponentType m_hxSum
std::vector< etComponentType > getAllOutputEy() const
get the Ey output history
L1GctTwosComplement< L1GctInternEtSum::kMissExOrEyNBits > etComponentType
etComponentType m_exSum