File indexing completed on 2024-04-06 12:19:59
0001 #ifndef GlobalTrigger_L1GlobalTrigger_h
0002 #define GlobalTrigger_L1GlobalTrigger_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #include <string>
0024 #include <vector>
0025
0026
0027
0028 #include "CondFormats/L1TObjects/interface/L1GtBoard.h"
0029 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0030
0031 #include "FWCore/Framework/interface/Frameworkfwd.h"
0032 #include "FWCore/Framework/interface/stream/EDProducer.h"
0033
0034 #include "FWCore/Framework/interface/Event.h"
0035 #include "FWCore/Framework/interface/EventSetup.h"
0036
0037 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0038 #include "FWCore/Utilities/interface/InputTag.h"
0039 #include "FWCore/Utilities/interface/ESGetToken.h"
0040
0041 #include "CondFormats/DataRecord/interface/L1GtStableParametersRcd.h"
0042 #include "CondFormats/L1TObjects/interface/L1GtStableParameters.h"
0043
0044 #include "CondFormats/DataRecord/interface/L1GtParametersRcd.h"
0045 #include "CondFormats/L1TObjects/interface/L1GtParameters.h"
0046
0047 #include "CondFormats/DataRecord/interface/L1GtBoardMapsRcd.h"
0048 #include "CondFormats/L1TObjects/interface/L1GtBoard.h"
0049 #include "CondFormats/L1TObjects/interface/L1GtBoardMaps.h"
0050 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0051
0052 #include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsAlgoTrigRcd.h"
0053 #include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsTechTrigRcd.h"
0054 #include "CondFormats/L1TObjects/interface/L1GtPrescaleFactors.h"
0055
0056 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskAlgoTrigRcd.h"
0057 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskTechTrigRcd.h"
0058 #include "CondFormats/L1TObjects/interface/L1GtTriggerMask.h"
0059
0060 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskVetoAlgoTrigRcd.h"
0061 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskVetoTechTrigRcd.h"
0062
0063 #include <cstdint>
0064
0065
0066 class L1GlobalTriggerPSB;
0067 class L1GlobalTriggerGTL;
0068 class L1GlobalTriggerFDL;
0069
0070 class L1GtStableParameters;
0071 class L1GtParameters;
0072 class L1GtBoardMaps;
0073
0074 class L1GtPrescaleFactors;
0075 class L1GtTriggerMask;
0076
0077
0078 class L1GlobalTrigger : public edm::stream::EDProducer<> {
0079 public:
0080 explicit L1GlobalTrigger(const edm::ParameterSet &);
0081 ~L1GlobalTrigger() override;
0082
0083 void produce(edm::Event &, const edm::EventSetup &) override;
0084
0085
0086 inline const L1GlobalTriggerPSB *gtPSB() const { return m_gtPSB; }
0087
0088
0089 inline const L1GlobalTriggerGTL *gtGTL() const { return m_gtGTL; }
0090
0091
0092 inline const L1GlobalTriggerFDL *gtFDL() const { return m_gtFDL; }
0093
0094 private:
0095
0096
0097
0098 const L1GtStableParameters *m_l1GtStablePar;
0099 unsigned long long m_l1GtStableParCacheID;
0100
0101
0102 unsigned int m_numberPhysTriggers;
0103
0104
0105 unsigned int m_numberTechnicalTriggers;
0106
0107
0108 unsigned int m_numberDaqPartitions;
0109
0110
0111
0112
0113 int m_nrL1Mu;
0114
0115 int m_nrL1NoIsoEG;
0116 int m_nrL1IsoEG;
0117
0118 int m_nrL1CenJet;
0119 int m_nrL1ForJet;
0120 int m_nrL1TauJet;
0121
0122 int m_nrL1JetCounts;
0123
0124
0125
0126 int m_ifMuEtaNumberBits;
0127 int m_ifCaloEtaNumberBits;
0128
0129
0130 const L1GtParameters *m_l1GtPar;
0131 unsigned long long m_l1GtParCacheID;
0132
0133
0134 int m_totalBxInEvent;
0135
0136
0137 uint16_t m_activeBoardsGtDaq;
0138 uint16_t m_activeBoardsGtEvm;
0139
0140
0141 unsigned int m_bstLengthBytes;
0142
0143
0144 const L1GtBoardMaps *m_l1GtBM;
0145 unsigned long long m_l1GtBMCacheID;
0146
0147
0148 const L1GtPrescaleFactors *m_l1GtPfAlgo;
0149 unsigned long long m_l1GtPfAlgoCacheID;
0150
0151 const L1GtPrescaleFactors *m_l1GtPfTech;
0152 unsigned long long m_l1GtPfTechCacheID;
0153
0154 const std::vector<std::vector<int>> *m_prescaleFactorsAlgoTrig;
0155 const std::vector<std::vector<int>> *m_prescaleFactorsTechTrig;
0156
0157
0158 const L1GtTriggerMask *m_l1GtTmAlgo;
0159 unsigned long long m_l1GtTmAlgoCacheID;
0160
0161 const L1GtTriggerMask *m_l1GtTmTech;
0162 unsigned long long m_l1GtTmTechCacheID;
0163
0164 const L1GtTriggerMask *m_l1GtTmVetoAlgo;
0165 unsigned long long m_l1GtTmVetoAlgoCacheID;
0166
0167 const L1GtTriggerMask *m_l1GtTmVetoTech;
0168 unsigned long long m_l1GtTmVetoTechCacheID;
0169
0170 std::vector<unsigned int> m_triggerMaskAlgoTrig;
0171 std::vector<unsigned int> m_triggerMaskTechTrig;
0172
0173 std::vector<unsigned int> m_triggerMaskVetoAlgoTrig;
0174 std::vector<unsigned int> m_triggerMaskVetoTechTrig;
0175
0176 L1GlobalTriggerPSB *m_gtPSB;
0177 L1GlobalTriggerGTL *m_gtGTL;
0178 L1GlobalTriggerFDL *m_gtFDL;
0179
0180
0181 const edm::InputTag m_muGmtInputTag;
0182
0183
0184 const edm::InputTag m_caloGctInputTag;
0185
0186
0187 const edm::InputTag m_castorInputTag;
0188
0189
0190 const std::vector<edm::InputTag> m_technicalTriggersInputTags;
0191
0192
0193 const bool m_produceL1GtDaqRecord;
0194
0195
0196 const bool m_produceL1GtEvmRecord;
0197
0198
0199 const bool m_produceL1GtObjectMapRecord;
0200
0201
0202 const bool m_writePsbL1GtDaqRecord;
0203
0204
0205 const bool m_readTechnicalTriggerRecords;
0206
0207
0208
0209
0210
0211
0212 int m_emulateBxInEvent;
0213
0214
0215
0216
0217 const std::vector<int> m_recordLength;
0218
0219
0220
0221 const unsigned int m_alternativeNrBxBoardDaq;
0222
0223
0224
0225 const unsigned int m_alternativeNrBxBoardEvm;
0226
0227
0228 const int m_psBstLengthBytes;
0229
0230
0231
0232
0233 const bool m_algorithmTriggersUnprescaled;
0234
0235
0236
0237 const bool m_algorithmTriggersUnmasked;
0238
0239
0240
0241
0242 const bool m_technicalTriggersUnprescaled;
0243
0244
0245
0246 const bool m_technicalTriggersUnmasked;
0247
0248
0249
0250 const bool m_technicalTriggersVetoUnmasked;
0251
0252
0253 const int m_verbosity;
0254 const bool m_isDebugEnabled;
0255
0256
0257 edm::ESGetToken<L1GtStableParameters, L1GtStableParametersRcd> m_l1GtStableParToken;
0258 edm::ESGetToken<L1GtParameters, L1GtParametersRcd> m_l1GtParToken;
0259 edm::ESGetToken<L1GtBoardMaps, L1GtBoardMapsRcd> m_l1GtBMToken;
0260 edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd> m_l1GtPfAlgoToken;
0261 edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd> m_l1GtPfTechToken;
0262 edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd> m_l1GtTmAlgoToken;
0263 edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd> m_l1GtTmTechToken;
0264 edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd> m_l1GtTmVetoAlgoToken;
0265 edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd> m_l1GtTmVetoTechToken;
0266 };
0267
0268 #endif