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_*/
L1GctJetLeafCard::getJetFinderA
L1GctJetFinderBase * getJetFinderA() const
get pointers to associated jetfinders
Definition: L1GctJetLeafCard.h:80
L1GctJetLeafCard::jetFinderType
jetFinderType
Definition: L1GctJetLeafCard.h:31
L1GctJetLeafCard::phiPosition
int phiPosition
Definition: L1GctJetLeafCard.h:148
L1GctJetLeafCard::m_exSum
etComponentType m_exSum
Definition: L1GctJetLeafCard.h:150
L1GctJetLeafCard::getAllOutputHx
std::vector< htComponentType > getAllOutputHx() const
get the output Ht components history
Definition: L1GctJetLeafCard.h:113
L1GctJetLeafCard::m_ctorInputOk
bool m_ctorInputOk
Definition: L1GctJetLeafCard.h:168
L1GctJetLeafCard::m_hxSum
htComponentType m_hxSum
Definition: L1GctJetLeafCard.h:152
L1GctJetLeafCard::resetProcessor
void resetProcessor() override
Separate reset methods for the processor itself and any data stored in pipelines.
Definition: L1GctJetLeafCard.cc:168
L1GctJetLeafCard::~L1GctJetLeafCard
~L1GctJetLeafCard() override
Definition: L1GctJetLeafCard.cc:91
L1GctJetCand
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:17
L1GctEtTotal.h
L1GctJetLeafCard::m_hfSumsPipe
Pipeline< hfTowerSumsType > m_hfSumsPipe
Definition: L1GctJetLeafCard.h:166
L1GctJetLeafCard::m_hySum
htComponentType m_hySum
Definition: L1GctJetLeafCard.h:153
L1GctUnsignedInt.h
L1GctJetLeafCard::m_exSumPipe
Pipeline< etComponentType > m_exSumPipe
Definition: L1GctJetLeafCard.h:160
L1GctJetLeafCard::m_whichJetFinder
jetFinderType m_whichJetFinder
Definition: L1GctJetLeafCard.h:139
L1GctJetLeafCard::m_hxSumPipe
Pipeline< htComponentType > m_hxSumPipe
Definition: L1GctJetLeafCard.h:162
L1GctJetLeafCard::m_id
int m_id
Definition: L1GctJetLeafCard.h:136
L1GctJetFinderBase
Base class to allow implementation of jetFinder algorithms.
Definition: L1GctJetFinderBase.h:48
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1GctJetLeafCard::m_htSumPipe
Pipeline< etHadType > m_htSumPipe
Definition: L1GctJetLeafCard.h:165
L1GctJetLeafCard::setNeighbourLeafCards
void setNeighbourLeafCards(const std::vector< L1GctJetLeafCard * > &neighbours)
set pointers to neighbours - needed to complete the setup
Definition: L1GctJetLeafCard.cc:98
L1GctJetLeafCard::getAllOutputEx
std::vector< etComponentType > getAllOutputEx() const
Definition: L1GctJetLeafCard.h:107
L1GctJetLeafCard::getJetFinderB
L1GctJetFinderBase * getJetFinderB() const
Definition: L1GctJetLeafCard.h:81
L1GctJetLeafCard::getInternalEtSums
std::vector< L1GctInternEtSum > getInternalEtSums() const
get the Et sums in internal component format
Definition: L1GctJetLeafCard.cc:251
L1GctJetLeafCard::m_hySumPipe
Pipeline< htComponentType > m_hySumPipe
Definition: L1GctJetLeafCard.h:163
L1GctJetLeafCard::operator<<
friend std::ostream & operator<<(std::ostream &os, const L1GctJetLeafCard &card)
Overload << operator.
Definition: L1GctJetLeafCard.cc:124
L1GctJetLeafCard::getOutputEy
etComponentType getOutputEy() const
get the Ey output
Definition: L1GctJetLeafCard.h:93
L1GctJetLeafCard::tdrJetFinder
Definition: L1GctJetLeafCard.h:31
L1GctJetLeafCard::getJetFinderC
L1GctJetFinderBase * getJetFinderC() const
Definition: L1GctJetLeafCard.h:82
L1GctInternEtSum::kTotEtOrHtMaxValue
Definition: L1GctInternEtSum.h:33
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
L1GctJetLeafCard::m_htSum
etHadType m_htSum
Definition: L1GctJetLeafCard.h:155
L1GctJetLeafCard::m_jetFinderC
L1GctJetFinderBase * m_jetFinderC
highest jetFinder in phi
Definition: L1GctJetLeafCard.h:144
L1GctJetLeafCard::getOutputHy
etComponentType getOutputHy() const
Definition: L1GctJetLeafCard.h:97
L1GctJetLeafCard::process
void process() override
process the data and set outputs
Definition: L1GctJetLeafCard.cc:194
L1GctJetLeafCard::setBxRange
void setBxRange(const int firstBx, const int numberOfBx)
define the bunch crossing range to process
Definition: L1GctJetLeafCard.cc:154
L1GctJetLeafCard::m_etSum
etTotalType m_etSum
Definition: L1GctJetLeafCard.h:154
L1GctJetLeafCard::getOutputHt
etHadType getOutputHt() const
Definition: L1GctJetLeafCard.h:101
L1GctJetLeafCard::resetPipelines
void resetPipelines() override
Definition: L1GctJetLeafCard.cc:178
L1GctJetFinderBase.h
L1GctJetLeafCard::hardwareJetFinder
Definition: L1GctJetLeafCard.h:31
L1GctJetLeafCard::setupOk
bool setupOk() const
Check setup is Ok.
Definition: L1GctJetLeafCard.cc:235
L1GctJetLeafCard::getAllOutputHt
std::vector< etHadType > getAllOutputHt() const
Definition: L1GctJetLeafCard.h:118
L1GctJetLeafCard::getOutputHx
etComponentType getOutputHx() const
get the output Ht components
Definition: L1GctJetLeafCard.h:96
L1GctTwosComplement< L1GctInternEtSum::kMissExOrEyNBits >
L1GctJetLeafCard::reset
void reset()
clear internal buffers
Definition: L1GctJetLeafCard.cc:146
L1GctJetLeafCard::etHadType
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etHadType
Definition: L1GctJetLeafCard.h:38
L1GctTwosComplement.h
operator<<
std::ostream & operator<<(std::ostream &os, const L1GctJetLeafCard &card)
Definition: L1GctJetLeafCard.cc:124
L1GctJetLeafCard::etTotalMaxValue
Definition: L1GctJetLeafCard.h:46
L1GctJetLeafCard::setNextBx
void setNextBx(const int bx)
partially clear buffers
Definition: L1GctJetLeafCard.cc:161
L1GctJetLeafCard::nullJetFinder
Definition: L1GctJetLeafCard.h:31
L1GctJetLeafCard::getOutputHfSums
hfTowerSumsType getOutputHfSums() const
Definition: L1GctJetLeafCard.h:103
L1GctJetLeafCard::maxValues
maxValues
Definition: L1GctJetLeafCard.h:45
L1GctJetLeafCard::getOutputEt
etTotalType getOutputEt() const
get the Et output
Definition: L1GctJetLeafCard.h:100
L1GctJetLeafCard::getInternalHtMiss
std::vector< L1GctInternHtMiss > getInternalHtMiss() const
Definition: L1GctJetLeafCard.cc:270
L1GctEtHad.h
L1GctJetLeafCard::MAX_JET_FINDERS
static const int MAX_JET_FINDERS
Number of jetfinders per jet leaf card.
Definition: L1GctJetLeafCard.h:34
L1GctJetLeafCard::etComponentType
L1GctTwosComplement< L1GctInternEtSum::kMissExOrEyNBits > etComponentType
Definition: L1GctJetLeafCard.h:40
L1GctJetLeafCard::getOutputJetsB
std::vector< L1GctJetCand > getOutputJetsB() const
Output jetfinder B jets (middle jetFinder in phi)
Definition: L1GctJetLeafCard.cc:243
L1GctJetLeafCard::htComponentType
L1GctTwosComplement< L1GctInternHtMiss::kMissHxOrHyNBits > htComponentType
Definition: L1GctJetLeafCard.h:41
L1GctJetLeafCard::getAllOutputHy
std::vector< htComponentType > getAllOutputHy() const
Definition: L1GctJetLeafCard.h:114
L1GctJetLeafCard::m_etSumPipe
Pipeline< etTotalType > m_etSumPipe
Definition: L1GctJetLeafCard.h:164
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits >
L1GctJetLeafCard::fetchInput
void fetchInput() override
set the input buffers
Definition: L1GctJetLeafCard.cc:188
L1GctJetLeafCard::getAllOutputEt
std::vector< etTotalType > getAllOutputEt() const
get the Et output history
Definition: L1GctJetLeafCard.h:117
L1GctJetLeafCard::getAllOutputEy
std::vector< etComponentType > getAllOutputEy() const
get the Ey output history
Definition: L1GctJetLeafCard.h:110
L1GctJetLeafCard::getAllOutputHfSums
std::vector< hfTowerSumsType > getAllOutputHfSums() const
Definition: L1GctJetLeafCard.h:120
L1GctJetLeafCard::m_hfSums
hfTowerSumsType m_hfSums
Definition: L1GctJetLeafCard.h:157
L1GctJetLeafCard::getOutputJetsA
std::vector< L1GctJetCand > getOutputJetsA() const
Output jetfinder A jets (lowest jetFinder in phi)
Definition: L1GctJetLeafCard.cc:240
L1GctJetLeafCard::htTotalMaxValue
Definition: L1GctJetLeafCard.h:47
L1GctJetLeafCard::etTotalType
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etTotalType
Definition: L1GctJetLeafCard.h:37
L1GctJetLeafCard::getOutputEx
etComponentType getOutputEx() const
get the Ex output
Definition: L1GctJetLeafCard.h:90
L1GctEtMiss.h
L1GctJetLeafCard::getOutputJetsC
std::vector< L1GctJetCand > getOutputJetsC() const
Ouptut jetfinder C jets (highest jetFinder in phi)
Definition: L1GctJetLeafCard.cc:246
L1GctJetFinderBase::hfTowerSumsType
Definition: L1GctJetFinderBase.h:73
L1GctJetLeafCard::hfTowerSumsType
L1GctJetFinderBase::hfTowerSumsType hfTowerSumsType
Definition: L1GctJetLeafCard.h:43
L1GctJetLeafCard::m_eySumPipe
Pipeline< etComponentType > m_eySumPipe
Definition: L1GctJetLeafCard.h:161
L1GctProcessor.h
L1GctJetLeafCard::m_eySum
etComponentType m_eySum
Definition: L1GctJetLeafCard.h:151
L1GctProcessor
ABC for a GCT trigger data processing unit.
Definition: L1GctProcessor.h:22
L1GctProcessor::Pipeline
Definition: L1GctProcessor.h:84
L1GctJetLeafCard::L1GctJetLeafCard
L1GctJetLeafCard(int id, int iphi, jetFinderType jfType=tdrJetFinder)
Definition: L1GctJetLeafCard.cc:15
L1GctJetLeafCard
Definition: L1GctJetLeafCard.h:28
L1GctJetLeafCard::m_jetFinderB
L1GctJetFinderBase * m_jetFinderB
middle jetFinder in phi
Definition: L1GctJetLeafCard.h:143
L1GctJetLeafCard::m_jetFinderA
L1GctJetFinderBase * m_jetFinderA
lowest jetFinder in phi
Definition: L1GctJetLeafCard.h:142
L1GctJetLeafCard::setupObjects
void setupObjects() override
Initialise inputs with null objects for the correct bunch crossing if required.
Definition: L1GctJetLeafCard.h:132