test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
53 {
54 
55 public:
56 
57  // constructors
58  GlobalBoard();
59 
60  // destructor
61  virtual ~GlobalBoard();
62 
63 public:
64 
67  edm::Event&,
72  const bool receiveEG, const int nrL1EG,
73  const bool receiveTau, const int nrL1Tau,
74  const bool receiveJet, const int nrL1Jet,
75  const bool receiveEtSums);
76 
78  edm::Event&,
80  const bool receiveMu, const int nrL1Mu);
81 
83  edm::Event&,
85  const bool receiveExt);
86 
88  void init(const int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet,
89  int bxFirst, int bxLast);
90 
92  void runGTL(edm::Event& iEvent, const edm::EventSetup& evSetup, const TriggerMenu* m_l1GtMenu,
93  const bool produceL1GtObjectMapRecord,
94  const int iBxInEvent, std::unique_ptr<GlobalObjectMapRecord>& gtObjectMapRecord, //GTO
95  const unsigned int numberPhysTriggers,
96  const int nrL1Mu,
97  const int nrL1EG,
98  const int nrL1Tau,
99  const int nrL1Jet);
100 
102  void runFDL(edm::Event& iEvent,
103  const int iBxInEvent,
104  const int totalBxInEvent,
105  const unsigned int numberPhysTriggers,
106  const std::vector<int>& prescaleFactorsAlgoTrig,
107  const std::vector<unsigned int>& triggerMaskAlgoTrig,
108  const std::vector<int>& triggerMaskVetoAlgoTrig,
109  const bool algorithmTriggersUnprescaled,
110  const bool algorithmTriggersUnmasked );
111 
112 
114  void fillAlgRecord(int iBxInEvent,
115  std::unique_ptr<GlobalAlgBlkBxCollection>& uGtAlgRecord,
116  int prescaleSet,
117  int menuUUID,
118  int firmwareUUID);
119 
120 
122  void reset();
123  void resetMu();
124  void resetCalo();
125  void resetExternal();
126 
128  void printGmtData(const int iBxInEvent) const;
129 
131  inline const std::bitset<GlobalAlgBlk::maxPhysicsTriggers>& getDecisionWord() const
132  {
133  return m_gtlDecisionWord;
134  }
135 
137  inline const std::bitset<GlobalAlgBlk::maxPhysicsTriggers>& getAlgorithmOR() const
138  {
139  return m_gtlAlgorithmOR;
140  }
141 
144  {
145  return m_candL1Mu;
146  }
147 
150  {
151  return m_candL1EG;
152  }
153 
156  {
157  return m_candL1Jet;
158  }
159 
160 
163  {
164  return m_candL1Tau;
165  }
166 
169  {
170  return m_candL1EtSum;
171  }
172 
175  {
176  return m_candL1External;
177  }
178 
179 /* Drop individual EtSums for Now
181  inline const l1t::EtSum* getCandL1ETM() const
182  {
183  return m_candETM;
184  }
185 
187  inline const l1t::EtSum* getCandL1ETT() const
188  {
189  return m_candETT;
190  }
191 
193  inline const l1t::EtSum* getCandL1HTT() const
194  {
195  return m_candHTT;
196  }
197 
199  inline const l1t::EtSum* getCandL1HTM() const
200  {
201  return m_candHTM;
202  }
203 */
204 
205  void setBxFirst(int bx);
206  void setBxLast(int bx);
207 
208 public:
209 
210  inline void setVerbosity(const int verbosity) {
212  }
213 
214 private:
215 
216  // cached stuff
217 
218  // trigger menu
220  unsigned long long m_l1GtMenuCacheID;
221 
222  // L1 scales (phi, eta) for Mu, Calo and EnergySum objects
224  unsigned long long m_l1CaloGeometryCacheID;
225 
227  unsigned long long m_l1MuTriggerScalesCacheID;
228 
229  // conversions for eta and phi
230 // L1GtEtaPhiConversions* m_gtEtaPhiConversions;
231 
232 private:
233 
240 
241 // BXVector<const l1t::EtSum*>* m_candETM;
242 // BXVector<const l1t::EtSum*>* m_candETT;
243 // BXVector<const l1t::EtSum*>* m_candHTM;
244 // BXVector<const l1t::EtSum*>* m_candHTT;
245 
248 
249  std::bitset<GlobalAlgBlk::maxPhysicsTriggers> m_gtlAlgorithmOR;
250  std::bitset<GlobalAlgBlk::maxPhysicsTriggers> m_gtlDecisionWord;
251 
253 
254  // cache of maps
255  std::vector<AlgorithmEvaluation::ConditionEvaluationMap> m_conditionResultMaps;
256 
258  std::vector<std::vector<int> > m_prescaleCounterAlgoTrig;
259 
260  bool m_firstEv;
262 
263 private:
264 
268 
269  // Flags for the OR of all algorithms at various stages. (Single bx)
275 
276 
277  // Counter for number of events seen by this board
278  unsigned int m_boardEventCount;
279 
280  // Information about board
283 
284 
285 };
286 
287 }
288 #endif
const BXVector< const GlobalExtBlk * > * getCandL1External() const
pointer to Tau data list
Definition: GlobalBoard.h:174
void receiveMuonObjectData(edm::Event &, const edm::EDGetTokenT< BXVector< l1t::Muon > > &, const bool receiveMu, const int nrL1Mu)
Definition: GlobalBoard.cc:354
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
const BXVector< const l1t::L1Candidate * > * getCandL1Tau() const
pointer to Tau data list
Definition: GlobalBoard.h:162
const BXVector< const l1t::L1Candidate * > * getCandL1Jet() const
pointer to Jet data list
Definition: GlobalBoard.h:155
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:118
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
void fillAlgRecord(int iBxInEvent, std::unique_ptr< GlobalAlgBlkBxCollection > &uGtAlgRecord, int prescaleSet, int menuUUID, int firmwareUUID)
Fill the Daq Records.
Definition: GlobalBoard.cc:979
const L1MuTriggerScales * m_l1MuTriggerScales
Definition: GlobalBoard.h:226
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GlobalBoard.h:227
void setBxLast(int bx)
Definition: GlobalBoard.cc:112
unsigned long long m_l1GtMenuCacheID
Definition: GlobalBoard.h:220
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:141
void setVerbosity(const int verbosity)
Definition: GlobalBoard.h:210
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:250
void printGmtData(const int iBxInEvent) const
print received Muon dataWord
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
const BXVector< const l1t::L1Candidate * > * getCandL1EG() const
pointer to EG data list
Definition: GlobalBoard.h:149
int iEvent
Definition: GenABIO.cc:230
unsigned int m_boardEventCount
Definition: GlobalBoard.h:278
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
std::vector< std::vector< int > > m_prescaleCounterAlgoTrig
prescale counters: NumberPhysTriggers counters per bunch cross in event
Definition: GlobalBoard.h:258
const TriggerMenu * m_l1GtMenu
Definition: GlobalBoard.h:219
const L1CaloGeometry * m_l1CaloGeometry
Definition: GlobalBoard.h:223
void reset()
clear uGT
void receiveExternalData(edm::Event &, const edm::EDGetTokenT< BXVector< GlobalExtBlk > > &, const bool receiveExt)
Definition: GlobalBoard.cc:410
const BXVector< const l1t::EtSum * > * getCandL1EtSum() const
pointer to Tau data list
Definition: GlobalBoard.h:168
unsigned long long m_l1CaloGeometryCacheID
Definition: GlobalBoard.h:224
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
const BXVector< const l1t::Muon * > * getCandL1Mu() const
return global muon trigger candidate
Definition: GlobalBoard.h:143
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
void setBxFirst(int bx)
Definition: GlobalBoard.cc:106
bool m_firstEvLumiSegment
Definition: GlobalBoard.h:261
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:830
virtual ~GlobalBoard()
Definition: GlobalBoard.cc:91
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:249
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:458
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236
const std::bitset< GlobalAlgBlk::maxPhysicsTriggers > & getAlgorithmOR() const
return algorithm OR decision
Definition: GlobalBoard.h:137
const std::bitset< GlobalAlgBlk::maxPhysicsTriggers > & getDecisionWord() const
return decision
Definition: GlobalBoard.h:131
std::vector< AlgorithmEvaluation::ConditionEvaluationMap > m_conditionResultMaps
Definition: GlobalBoard.h:255