File indexing completed on 2024-04-06 12:19:59
0001 #ifndef GlobalTrigger_L1GlobalTriggerPSB_h
0002 #define GlobalTrigger_L1GlobalTriggerPSB_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <vector>
0023
0024
0025 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetup.h"
0026 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0027 #include "DataFormats/L1GlobalTrigger/interface/L1GtTechnicalTriggerRecord.h"
0028
0029 #include "DataFormats/Common/interface/Handle.h"
0030
0031 #include "FWCore/Framework/interface/Event.h"
0032 #include "FWCore/Utilities/interface/InputTag.h"
0033
0034 #include "CondFormats/L1TObjects/interface/L1GtBoard.h"
0035 #include "CondFormats/L1TObjects/interface/L1GtBoardMaps.h"
0036 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0037 #include "FWCore/Framework/interface/ConsumesCollector.h"
0038 #include <cstdint>
0039
0040
0041 class L1GctCand;
0042
0043 class L1GctEmCand;
0044 class L1GctJetCand;
0045
0046 class L1GctEtMiss;
0047 class L1GctEtTotal;
0048 class L1GctEtHad;
0049 class L1GctHtMiss;
0050
0051 class L1GctJetCounts;
0052 class L1GctHFBitCounts;
0053 class L1GctHFRingEtSums;
0054
0055 class L1GlobalTriggerReadoutRecord;
0056
0057
0058 class L1GlobalTriggerPSB {
0059 public:
0060
0061 L1GlobalTriggerPSB(const edm::InputTag &caloTag,
0062 const std::vector<edm::InputTag> &vecTag,
0063 edm::ConsumesCollector &&iC);
0064
0065
0066 virtual ~L1GlobalTriggerPSB();
0067
0068 public:
0069
0070 void init(const int nrL1NoIsoEG,
0071 const int nrL1IsoEG,
0072 const int nrL1CenJet,
0073 const int nrL1ForJet,
0074 const int nrL1TauJet,
0075 const int numberTechnicalTriggers);
0076
0077
0078 void receiveGctObjectData(edm::Event &iEvent,
0079 const edm::InputTag &caloGctInputTag,
0080 const int iBxInEvent,
0081 const bool receiveNoIsoEG,
0082 const int nrL1NoIsoEG,
0083 const bool receiveIsoEG,
0084 const int nrL1IsoEG,
0085 const bool receiveCenJet,
0086 const int nrL1CenJet,
0087 const bool receiveForJet,
0088 const int nrL1ForJet,
0089 const bool receiveTauJet,
0090 const int nrL1TauJet,
0091 const bool receiveETM,
0092 const bool receiveETT,
0093 const bool receiveHTT,
0094 const bool receiveHTM,
0095 const bool receiveJetCounts,
0096 const bool receiveHfBitCounts,
0097 const bool receiveHfRingEtSums);
0098
0099
0100 void receiveCastorData(edm::Event &iEvent,
0101 const edm::InputTag &castorInputTag,
0102 const int iBxInEvent,
0103 const bool receiveCastor,
0104 const bool readFromPsb);
0105
0106
0107 void receiveBptxData(edm::Event &iEvent,
0108 const edm::InputTag &bptxInputTag,
0109 const int iBxInEvent,
0110 const bool receiveBptx,
0111 const bool readFromPsb);
0112
0113
0114 void receiveExternalData(edm::Event &iEvent,
0115 const std::vector<edm::InputTag> &externalInputTags,
0116 const int iBxInEvent,
0117 const bool receiveExternal,
0118 const bool readFromPsb);
0119
0120
0121 void receiveTechnicalTriggers(edm::Event &iEvent,
0122 const std::vector<edm::InputTag> &technicalTriggersInputTags,
0123 const int iBxInEvent,
0124 const bool receiveTechTr,
0125 const int nrL1TechTr);
0126
0127
0128 void fillPsbBlock(edm::Event &iEvent,
0129 const uint16_t &activeBoardsGtDaq,
0130 const int recordLength0,
0131 const int recordLength1,
0132 const unsigned int altNrBxBoardDaq,
0133 const std::vector<L1GtBoard> &boardMaps,
0134 const int iBxInEvent,
0135 L1GlobalTriggerReadoutRecord *gtDaqReadoutRecord);
0136
0137
0138 void reset();
0139
0140
0141 void printGctObjectData(const int iBxInEvent) const;
0142
0143
0144 inline const std::vector<const L1GctCand *> *getCandL1NoIsoEG() const { return m_candL1NoIsoEG; }
0145
0146
0147 inline const std::vector<const L1GctCand *> *getCandL1IsoEG() const { return m_candL1IsoEG; }
0148
0149
0150 inline const std::vector<const L1GctCand *> *getCandL1CenJet() const { return m_candL1CenJet; }
0151
0152
0153 inline const std::vector<const L1GctCand *> *getCandL1ForJet() const { return m_candL1ForJet; }
0154
0155
0156 inline const std::vector<const L1GctCand *> *getCandL1TauJet() const { return m_candL1TauJet; }
0157
0158
0159 inline const L1GctEtMiss *getCandL1ETM() const { return m_candETM; }
0160
0161
0162 inline const L1GctEtTotal *getCandL1ETT() const { return m_candETT; }
0163
0164
0165 inline const L1GctEtHad *getCandL1HTT() const { return m_candHTT; }
0166
0167
0168 inline const L1GctHtMiss *getCandL1HTM() const { return m_candHTM; }
0169
0170
0171 inline const L1GctJetCounts *getCandL1JetCounts() const { return m_candJetCounts; }
0172
0173
0174 inline const L1GctHFBitCounts *getCandL1HfBitCounts() const { return m_candHfBitCounts; }
0175
0176
0177 inline const L1GctHFRingEtSums *getCandL1HfRingEtSums() const { return m_candHfRingEtSums; }
0178
0179
0180 inline const std::vector<bool> *getGtTechnicalTriggers() const { return &m_gtTechnicalTriggers; }
0181
0182 public:
0183 inline void setVerbosity(const int verbosity) { m_verbosity = verbosity; }
0184
0185 private:
0186 std::vector<const L1GctCand *> *m_candL1NoIsoEG;
0187 std::vector<const L1GctCand *> *m_candL1IsoEG;
0188 std::vector<const L1GctCand *> *m_candL1CenJet;
0189 std::vector<const L1GctCand *> *m_candL1ForJet;
0190 std::vector<const L1GctCand *> *m_candL1TauJet;
0191
0192 const L1GctEtMiss *m_candETM;
0193 const L1GctEtTotal *m_candETT;
0194 const L1GctEtHad *m_candHTT;
0195 const L1GctHtMiss *m_candHTM;
0196
0197 const L1GctJetCounts *m_candJetCounts;
0198
0199 const L1GctHFBitCounts *m_candHfBitCounts;
0200 const L1GctHFRingEtSums *m_candHfRingEtSums;
0201
0202
0203 std::vector<bool> m_gtTechnicalTriggers;
0204
0205 private:
0206
0207 int m_verbosity;
0208 bool m_isDebugEnabled;
0209 };
0210
0211 #endif