CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 {
30 public:
31  //Type declaration
33 
34  //Statics
35  static const int MAX_JET_FINDERS;
36 
37  //Typedefs
40 
43 
45 
46  enum maxValues {
49  };
50 
51  //Construtors/destructor
52  L1GctJetLeafCard(int id, int iphi, jetFinderType jfType = tdrJetFinder);
53 
55 
57  void setNeighbourLeafCards(std::vector<L1GctJetLeafCard*> neighbours);
58 
60  bool setupOk() const;
61 
63  friend std::ostream& operator << (std::ostream& os, const L1GctJetLeafCard& card);
64 
66  void reset();
67 
69  virtual void fetchInput();
70 
72  virtual void process();
73 
75  void setBxRange(const int firstBx, const int numberOfBx);
76 
78  void setNextBx(const int bx);
79 
84 
85  // get the jet output
86  std::vector<L1GctJetCand> getOutputJetsA() const;
87  std::vector<L1GctJetCand> getOutputJetsB() const;
88  std::vector<L1GctJetCand> getOutputJetsC() const;
89 
91  etComponentType getOutputEx() const { return m_exSum; }
92 
94  etComponentType getOutputEy() const { return m_eySum; }
95 
97  etComponentType getOutputHx() const { return m_hxSum; }
98  etComponentType getOutputHy() const { return m_hySum; }
99 
101  etTotalType getOutputEt() const { return m_etSum; }
102  etHadType getOutputHt() const { return m_htSum; }
103 
105 
108  std::vector< etComponentType > getAllOutputEx() const { return m_exSumPipe.contents; }
109 
111  std::vector< etComponentType > getAllOutputEy() const { return m_eySumPipe.contents; }
112 
114  std::vector< htComponentType > getAllOutputHx() const { return m_hxSumPipe.contents; }
115  std::vector< htComponentType > getAllOutputHy() const { return m_hySumPipe.contents; }
116 
118  std::vector< etTotalType > getAllOutputEt() const { return m_etSumPipe.contents; }
119  std::vector< etHadType > getAllOutputHt() const { return m_htSumPipe.contents; }
120 
121  std::vector< hfTowerSumsType > getAllOutputHfSums() const { return m_hfSumsPipe.contents; }
122 
124  std::vector< L1GctInternEtSum > getInternalEtSums() const;
125  std::vector< L1GctInternHtMiss > getInternalHtMiss() const;
126 
127  protected:
128 
130  virtual void resetProcessor();
131  virtual void resetPipelines();
132 
134  virtual void setupObjects() {}
135 
136  private:
137 
138  // Leaf card ID
139  int m_id;
140 
141  // Which jetFinder to use?
143 
144  // internal algorithms
148 
149  // internal data (other than jets)
150 
152 
159 
161 
162  // stored copies of output data
170 
172 
173 };
174 
175 std::ostream& operator << (std::ostream& os, const L1GctJetLeafCard& card);
176 
177 #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
std::vector< htComponentType > getAllOutputHx() const
get the output Ht components history
void reset()
clear internal buffers
friend std::ostream & operator<<(std::ostream &os, const L1GctJetLeafCard &card)
Overload &lt;&lt; operator.
virtual void resetProcessor()
Separate reset methods for the processor itself and any data stored in pipelines. ...
L1GctJetFinderBase * m_jetFinderC
highest jetFinder in phi
Pipeline< etHadType > m_htSumPipe
Pipeline< etTotalType > m_etSumPipe
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:18
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etHadType
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
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.
std::vector< etComponentType > getAllOutputEy() const
get the Ey output history
std::vector< L1GctJetCand > getOutputJetsA() const
Output jetfinder A jets (lowest jetFinder in phi)
virtual void process()
process the data and set outputs
Pipeline< etComponentType > m_eySumPipe
Pipeline< htComponentType > m_hySumPipe
L1GctJetFinderBase * getJetFinderB() const
std::vector< L1GctJetCand > getOutputJetsB() const
Output jetfinder B jets (middle jetFinder in phi)
virtual void fetchInput()
set the input buffers
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
std::vector< htComponentType > getAllOutputHy() const
jetFinderType m_whichJetFinder
std::vector< etComponentType > getAllOutputEx() const
virtual void setupObjects()
Initialise inputs with null objects for the correct bunch crossing if required.
void setNextBx(const int bx)
partially clear buffers
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etTotalType
etComponentType getOutputEx() const
get the Ex output
std::vector< etTotalType > getAllOutputEt() const
get the Et output history
static const int MAX_JET_FINDERS
Number of jetfinders per jet leaf card.
std::vector< L1GctJetCand > getOutputJetsC() const
Ouptut jetfinder C jets (highest jetFinder in phi)
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
L1GctTwosComplement< L1GctInternHtMiss::kMissHxOrHyNBits > htComponentType
L1GctJetFinderBase * m_jetFinderA
lowest jetFinder in phi
std::vector< hfTowerSumsType > getAllOutputHfSums() const
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
void setNeighbourLeafCards(std::vector< L1GctJetLeafCard * > neighbours)
set pointers to neighbours - needed to complete the setup
L1GctJetFinderBase * getJetFinderC() const
virtual void resetPipelines()
L1GctTwosComplement< L1GctInternEtSum::kMissExOrEyNBits > etComponentType
std::vector< etHadType > getAllOutputHt() const
htComponentType m_hxSum
etComponentType m_exSum