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
l1t::GlobalBoard
Definition: GlobalBoard.h:52
HIPAlignmentAlgorithm_cfi.verbosity
verbosity
Definition: HIPAlignmentAlgorithm_cfi.py:7
l1t::GlobalBoard::m_algInitialOr
bool m_algInitialOr
Definition: GlobalBoard.h:241
l1t::GlobalBoard::reset
void reset()
clear uGT
Definition: GlobalBoard.cc:984
GlobalObjectMapRecord.h
l1t::GlobalBoard::m_candL1Tau
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:207
l1t::GlobalBoard::getCandL1External
const BXVector< const GlobalExtBlk * > * getCandL1External() const
pointer to Tau data list
Definition: GlobalBoard.h:153
l1t::GlobalBoard::m_currentLumi
uint m_currentLumi
Definition: GlobalBoard.h:233
l1t::GlobalBoard::m_candL1Jet
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:208
l1t::GlobalBoard::m_uGtFinalBoard
bool m_uGtFinalBoard
Definition: GlobalBoard.h:252
l1t::GlobalBoard::receiveExternalData
void receiveExternalData(edm::Event &, const edm::EDGetTokenT< BXVector< GlobalExtBlk >> &, const bool receiveExt)
Definition: GlobalBoard.cc:386
l1t::GlobalBoard::m_algFinalOr
bool m_algFinalOr
Definition: GlobalBoard.h:244
l1t::GlobalBoard::setBxFirst
void setBxFirst(int bx)
Definition: GlobalBoard.cc:102
l1t::GlobalBoard::m_algPrescaledOr
bool m_algPrescaledOr
Definition: GlobalBoard.h:243
edm::EDGetTokenT
Definition: EDGetToken.h:33
GlobalExtBlk.h
l1t::GlobalBoard::m_firstEvLumiSegment
bool m_firstEvLumiSegment
Definition: GlobalBoard.h:232
Muon.h
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
l1t::GlobalBoard::m_verbosity
int m_verbosity
verbosity level
Definition: GlobalBoard.h:237
Jet.h
l1t::GlobalBoard::runFDL
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
l1t::GlobalBoard::getCandL1Mu
const BXVector< const l1t::Muon * > * getCandL1Mu() const
return global muon trigger candidate
Definition: GlobalBoard.h:138
l1t::GlobalBoard::m_l1GtMenu
const TriggerMenu * m_l1GtMenu
Definition: GlobalBoard.h:191
parallelization.uint
uint
Definition: parallelization.py:124
l1t::GlobalBoard::getCandL1Jet
const BXVector< const l1t::L1Candidate * > * getCandL1Jet() const
pointer to Jet data list
Definition: GlobalBoard.h:144
l1t::GlobalBoard::m_isDebugEnabled
bool m_isDebugEnabled
Definition: GlobalBoard.h:238
l1t::GlobalBoard::getAlgorithmOR
const std::bitset< GlobalAlgBlk::maxPhysicsTriggers > & getAlgorithmOR() const
return algorithm OR decision
Definition: GlobalBoard.h:135
BXVector
Definition: BXVector.h:15
EGamma.h
l1t::GlobalBoard::getCandL1EtSum
const BXVector< const l1t::EtSum * > * getCandL1EtSum() const
pointer to Tau data list
Definition: GlobalBoard.h:150
l1t::GlobalBoard::~GlobalBoard
virtual ~GlobalBoard()
Definition: GlobalBoard.cc:89
typedefs.h
l1t::GlobalBoard::m_algIntermOr
bool m_algIntermOr
Definition: GlobalBoard.h:242
l1t::GlobalBoard::getCandL1Tau
const BXVector< const l1t::L1Candidate * > * getCandL1Tau() const
pointer to Tau data list
Definition: GlobalBoard.h:147
l1t::GlobalBoard::getCandL1EG
const BXVector< const l1t::L1Candidate * > * getCandL1EG() const
pointer to EG data list
Definition: GlobalBoard.h:141
l1t::GlobalBoard::m_conditionResultMaps
std::vector< AlgorithmEvaluation::ConditionEvaluationMap > m_conditionResultMaps
Definition: GlobalBoard.h:226
l1t::GlobalBoard::getDecisionWord
const std::bitset< GlobalAlgBlk::maxPhysicsTriggers > & getDecisionWord() const
return decision
Definition: GlobalBoard.h:132
Event.h
l1t::GlobalBoard::m_prescaleCounterAlgoTrig
std::vector< std::vector< int > > m_prescaleCounterAlgoTrig
prescale counters: NumberPhysTriggers counters per bunch cross in event
Definition: GlobalBoard.h:229
L1CaloGeometry
Definition: L1CaloGeometry.h:33
l1t
delete x;
Definition: CaloConfig.h:22
l1t::GlobalBoard::m_candL1Mu
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:205
iEvent
int iEvent
Definition: GenABIO.cc:224
l1t::GlobalBoard::setVerbosity
void setVerbosity(const int verbosity)
Definition: GlobalBoard.h:185
l1t::GlobalBoard::receiveMuonObjectData
void receiveMuonObjectData(edm::Event &, const edm::EDGetTokenT< BXVector< l1t::Muon >> &, const bool receiveMu, const int nrL1Mu)
Definition: GlobalBoard.cc:332
l1t::GlobalBoard::m_l1MuTriggerScalesCacheID
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GlobalBoard.h:199
GlobalAlgBlk.h
l1t::GlobalBoard::m_uGtBoardNumber
int m_uGtBoardNumber
Definition: GlobalBoard.h:251
l1t::GlobalBoard::m_gtlAlgorithmOR
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:220
edm::EventSetup
Definition: EventSetup.h:57
l1t::GlobalBoard::runGTL
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
L1MuTriggerScales
Definition: L1MuTriggerScales.h:33
l1t::GlobalBoard::m_candL1EtSum
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:209
l1t::GlobalBoard::m_candL1EG
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:206
l1t::GlobalBoard::resetCalo
void resetCalo()
Definition: GlobalBoard.cc:1002
InputTag.h
l1t::GlobalBoard::m_l1MuTriggerScales
const L1MuTriggerScales * m_l1MuTriggerScales
Definition: GlobalBoard.h:198
l1t::GlobalBoard::m_l1CaloGeometry
const L1CaloGeometry * m_l1CaloGeometry
Definition: GlobalBoard.h:195
simCaloStage2Layer1Digis_cfi.bxFirst
bxFirst
Definition: simCaloStage2Layer1Digis_cfi.py:7
l1t::GlobalBoard::resetExternal
void resetExternal()
Definition: GlobalBoard.cc:1014
l1t::GlobalBoard::m_l1CaloGeometryCacheID
unsigned long long m_l1CaloGeometryCacheID
Definition: GlobalBoard.h:196
l1t::GlobalBoard::m_firstEv
bool m_firstEv
Definition: GlobalBoard.h:231
l1t::GlobalBoard::fillAlgRecord
void fillAlgRecord(int iBxInEvent, std::unique_ptr< GlobalAlgBlkBxCollection > &uGtAlgRecord, int prescaleSet, int menuUUID, int firmwareUUID)
Fill the Daq Records.
Definition: GlobalBoard.cc:961
simCaloStage2Layer1Digis_cfi.bxLast
bxLast
Definition: simCaloStage2Layer1Digis_cfi.py:8
TriggerMenu
Definition: TriggerMenu.h:46
l1t::GlobalBoard::GlobalBoard
GlobalBoard()
Definition: GlobalBoard.cc:59
l1t::GlobalBoard::m_gtlDecisionWord
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:221
l1t::GlobalBoard::m_bxFirst_
int m_bxFirst_
Definition: GlobalBoard.h:217
GlobalScales.h
EventSetup.h
AlgorithmEvaluation.h
l1t::GlobalBoard::m_l1GtMenuCacheID
unsigned long long m_l1GtMenuCacheID
Definition: GlobalBoard.h:192
l1t::GlobalBoard::printGmtData
void printGmtData(const int iBxInEvent) const
print received Muon dataWord
Definition: GlobalBoard.cc:1020
l1t::GlobalBoard::receiveCaloObjectData
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
l1t::GlobalBoard::setBxLast
void setBxLast(int bx)
Definition: GlobalBoard.cc:104
l1t::GlobalBoard::m_uGtAlgBlk
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:223
l1t::GlobalBoard::m_bxLast_
int m_bxLast_
Definition: GlobalBoard.h:218
l1t::GlobalBoard::m_candL1External
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:210
EtSum.h
l1t::GlobalBoard::m_algFinalOrVeto
bool m_algFinalOrVeto
Definition: GlobalBoard.h:245
l1t::GlobalBoard::resetMu
void resetMu()
Definition: GlobalBoard.cc:996
GlobalAlgBlk
Definition: GlobalAlgBlk.h:41
edm::Event
Definition: Event.h:73
l1t::GlobalBoard::m_boardEventCount
unsigned int m_boardEventCount
Definition: GlobalBoard.h:248
l1t::GlobalBoard::init
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
Tau.h