CMS 3D CMS Logo

GlobalBoard.h
Go to the documentation of this file.
1 #ifndef GtBoard_h
2 #define GtBoard_h
3 
15 // system include files
16 #include <bitset>
17 #include <vector>
18 
19 // user include files
22 
24 
25 // Trigger Objects
32 
33 // Objects to produce for the output record.
36 
39 
41 
42 // forward declarations
43 class TriggerMenu;
44 class L1CaloGeometry;
45 class L1MuTriggerScales;
46 //class L1GtEtaPhiConversions;
47 
48 // class declaration
49 
50 namespace l1t {
51 
52  class GlobalBoard {
53  public:
54  // constructors
55  GlobalBoard();
56 
57  // destructor
58  virtual ~GlobalBoard();
59 
60  public:
67  const bool receiveEG,
68  const int nrL1EG,
69  const bool receiveTau,
70  const int nrL1Tau,
71  const bool receiveJet,
72  const int nrL1Jet,
73  const bool receiveEtSums);
74 
77  const bool receiveMu,
78  const int nrL1Mu);
79 
80  void receiveExternalData(edm::Event&, const edm::EDGetTokenT<BXVector<GlobalExtBlk>>&, const bool receiveExt);
81 
83  void init(const int numberPhysTriggers,
84  const int nrL1Mu,
85  const int nrL1EG,
86  const int nrL1Tau,
87  const int nrL1Jet,
88  int bxFirst,
89  int bxLast);
90 
92  void runGTL(edm::Event& iEvent,
93  const edm::EventSetup& evSetup,
94  const TriggerMenu* m_l1GtMenu,
95  const bool produceL1GtObjectMapRecord,
96  const int iBxInEvent,
97  std::unique_ptr<GlobalObjectMapRecord>& gtObjectMapRecord, //GTO
98  const unsigned int numberPhysTriggers,
99  const int nrL1Mu,
100  const int nrL1EG,
101  const int nrL1Tau,
102  const int nrL1Jet);
103 
105  void runFDL(edm::Event& iEvent,
106  const int iBxInEvent,
107  const int totalBxInEvent,
108  const unsigned int numberPhysTriggers,
109  const std::vector<int>& prescaleFactorsAlgoTrig,
110  const std::vector<unsigned int>& triggerMaskAlgoTrig,
111  const std::vector<int>& triggerMaskVetoAlgoTrig,
112  const bool algorithmTriggersUnprescaled,
113  const bool algorithmTriggersUnmasked);
114 
116  void fillAlgRecord(int iBxInEvent,
117  std::unique_ptr<GlobalAlgBlkBxCollection>& uGtAlgRecord,
118  int prescaleSet,
119  int menuUUID,
120  int firmwareUUID);
121 
123  void reset();
124  void resetMu();
125  void resetCalo();
126  void resetExternal();
127 
129  void printGmtData(const int iBxInEvent) const;
130 
132  inline const std::bitset<GlobalAlgBlk::maxPhysicsTriggers>& getDecisionWord() const { return m_gtlDecisionWord; }
133 
135  inline const std::bitset<GlobalAlgBlk::maxPhysicsTriggers>& getAlgorithmOR() const { return m_gtlAlgorithmOR; }
136 
138  inline const BXVector<const l1t::Muon*>* getCandL1Mu() const { return m_candL1Mu; }
139 
141  inline const BXVector<const l1t::L1Candidate*>* getCandL1EG() const { return m_candL1EG; }
142 
145 
148 
150  inline const BXVector<const l1t::EtSum*>* getCandL1EtSum() const { return m_candL1EtSum; }
151 
154 
155  /* Drop individual EtSums for Now
157  inline const l1t::EtSum* getCandL1ETM() const
158  {
159  return m_candETM;
160  }
161 
163  inline const l1t::EtSum* getCandL1ETT() const
164  {
165  return m_candETT;
166  }
167 
169  inline const l1t::EtSum* getCandL1HTT() const
170  {
171  return m_candHTT;
172  }
173 
175  inline const l1t::EtSum* getCandL1HTM() const
176  {
177  return m_candHTM;
178  }
179 */
180 
181  void setBxFirst(int bx);
182  void setBxLast(int bx);
183 
184  public:
185  inline void setVerbosity(const int verbosity) { m_verbosity = verbosity; }
186 
187  private:
188  // cached stuff
189 
190  // trigger menu
192  unsigned long long m_l1GtMenuCacheID;
193 
194  // L1 scales (phi, eta) for Mu, Calo and EnergySum objects
196  unsigned long long m_l1CaloGeometryCacheID;
197 
199  unsigned long long m_l1MuTriggerScalesCacheID;
200 
201  // conversions for eta and phi
202  // L1GtEtaPhiConversions* m_gtEtaPhiConversions;
203 
204  private:
211 
212  // BXVector<const l1t::EtSum*>* m_candETM;
213  // BXVector<const l1t::EtSum*>* m_candETT;
214  // BXVector<const l1t::EtSum*>* m_candHTM;
215  // BXVector<const l1t::EtSum*>* m_candHTT;
216 
219 
220  std::bitset<GlobalAlgBlk::maxPhysicsTriggers> m_gtlAlgorithmOR;
221  std::bitset<GlobalAlgBlk::maxPhysicsTriggers> m_gtlDecisionWord;
222 
224 
225  // cache of maps
226  std::vector<AlgorithmEvaluation::ConditionEvaluationMap> m_conditionResultMaps;
227 
229  std::vector<std::vector<int>> m_prescaleCounterAlgoTrig;
230 
231  bool m_firstEv;
234 
235  private:
239 
240  // Flags for the OR of all algorithms at various stages. (Single bx)
246 
247  // Counter for number of events seen by this board
248  unsigned int m_boardEventCount;
249 
250  // Information about board
253  };
254 
255 } // namespace l1t
256 #endif
const BXVector< const GlobalExtBlk * > * getCandL1External() const
pointer to Tau data list
Definition: GlobalBoard.h:153
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:205
const BXVector< const l1t::L1Candidate * > * getCandL1Tau() const
pointer to Tau data list
Definition: GlobalBoard.h:147
const BXVector< const l1t::L1Candidate * > * getCandL1Jet() const
pointer to Jet data list
Definition: GlobalBoard.h:144
void init(const int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet, int bxFirst, int bxLast)
initialize the class (mainly reserve)
Definition: GlobalBoard.cc:106
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:206
void fillAlgRecord(int iBxInEvent, std::unique_ptr< GlobalAlgBlkBxCollection > &uGtAlgRecord, int prescaleSet, int menuUUID, int firmwareUUID)
Fill the Daq Records.
Definition: GlobalBoard.cc:955
const L1MuTriggerScales * m_l1MuTriggerScales
Definition: GlobalBoard.h:198
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GlobalBoard.h:199
delete x;
Definition: CaloConfig.h:22
void setBxLast(int bx)
Definition: GlobalBoard.cc:104
unsigned long long m_l1GtMenuCacheID
Definition: GlobalBoard.h:192
void receiveCaloObjectData(edm::Event &, const edm::EDGetTokenT< BXVector< l1t::EGamma >> &, const edm::EDGetTokenT< BXVector< l1t::Tau >> &, const edm::EDGetTokenT< BXVector< l1t::Jet >> &, const edm::EDGetTokenT< BXVector< l1t::EtSum >> &, const bool receiveEG, const int nrL1EG, const bool receiveTau, const int nrL1Tau, const bool receiveJet, const int nrL1Jet, const bool receiveEtSums)
receive data from Global Muon Trigger
Definition: GlobalBoard.cc:130
void setVerbosity(const int verbosity)
Definition: GlobalBoard.h:185
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:221
void printGmtData(const int iBxInEvent) const
print received Muon dataWord
int m_verbosity
verbosity level
Definition: GlobalBoard.h:237
const BXVector< const l1t::L1Candidate * > * getCandL1EG() const
pointer to EG data list
Definition: GlobalBoard.h:141
int iEvent
Definition: GenABIO.cc:224
unsigned int m_boardEventCount
Definition: GlobalBoard.h:248
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:209
std::vector< std::vector< int > > m_prescaleCounterAlgoTrig
prescale counters: NumberPhysTriggers counters per bunch cross in event
Definition: GlobalBoard.h:229
const TriggerMenu * m_l1GtMenu
Definition: GlobalBoard.h:191
const L1CaloGeometry * m_l1CaloGeometry
Definition: GlobalBoard.h:195
void reset()
clear uGT
Definition: GlobalBoard.cc:978
const BXVector< const l1t::EtSum * > * getCandL1EtSum() const
pointer to Tau data list
Definition: GlobalBoard.h:150
unsigned long long m_l1CaloGeometryCacheID
Definition: GlobalBoard.h:196
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:208
const BXVector< const l1t::Muon * > * getCandL1Mu() const
return global muon trigger candidate
Definition: GlobalBoard.h:138
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:223
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:210
void setBxFirst(int bx)
Definition: GlobalBoard.cc:102
bool m_firstEvLumiSegment
Definition: GlobalBoard.h:232
void receiveMuonObjectData(edm::Event &, const edm::EDGetTokenT< BXVector< l1t::Muon >> &, const bool receiveMu, const int nrL1Mu)
Definition: GlobalBoard.cc:332
void runFDL(edm::Event &iEvent, const int iBxInEvent, const int totalBxInEvent, const unsigned int numberPhysTriggers, const std::vector< int > &prescaleFactorsAlgoTrig, const std::vector< unsigned int > &triggerMaskAlgoTrig, const std::vector< int > &triggerMaskVetoAlgoTrig, const bool algorithmTriggersUnprescaled, const bool algorithmTriggersUnmasked)
run the uGT FDL (Apply Prescales and Veto)
Definition: GlobalBoard.cc:829
virtual ~GlobalBoard()
Definition: GlobalBoard.cc:89
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:220
void runGTL(edm::Event &iEvent, const edm::EventSetup &evSetup, const TriggerMenu *m_l1GtMenu, const bool produceL1GtObjectMapRecord, const int iBxInEvent, std::unique_ptr< GlobalObjectMapRecord > &gtObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet)
run the uGT GTL (Conditions and Algorithms)
Definition: GlobalBoard.cc:428
void receiveExternalData(edm::Event &, const edm::EDGetTokenT< BXVector< GlobalExtBlk >> &, const bool receiveExt)
Definition: GlobalBoard.cc:386
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:207
const std::bitset< GlobalAlgBlk::maxPhysicsTriggers > & getAlgorithmOR() const
return algorithm OR decision
Definition: GlobalBoard.h:135
const std::bitset< GlobalAlgBlk::maxPhysicsTriggers > & getDecisionWord() const
return decision
Definition: GlobalBoard.h:132
std::vector< AlgorithmEvaluation::ConditionEvaluationMap > m_conditionResultMaps
Definition: GlobalBoard.h:226