File indexing completed on 2024-04-06 12:18:28
0001 #ifndef HLTfilters_HLTLevel1GTSeed_h
0002 #define HLTfilters_HLTLevel1GTSeed_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include <string>
0022 #include <vector>
0023
0024
0025 #include "FWCore/Utilities/interface/InputTag.h"
0026 #include "CondFormats/DataRecord/interface/L1GtTriggerMenuRcd.h"
0027 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskAlgoTrigRcd.h"
0028 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskTechTrigRcd.h"
0029 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenu.h"
0030 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenuFwd.h"
0031 #include "CondFormats/L1TObjects/interface/L1GtTriggerMask.h"
0032 #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h"
0033 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0034 #include "DataFormats/L1GlobalTrigger/interface/L1GtLogicParser.h"
0035 #include "HLTrigger/HLTcore/interface/HLTStreamFilter.h"
0036
0037
0038 class L1GlobalTriggerReadoutRecord;
0039 class L1GlobalTriggerObjectMapRecord;
0040 namespace edm {
0041 class ConfigurationDescriptions;
0042 }
0043
0044 #include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h"
0045 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
0046 #include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
0047 #include "DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h"
0048
0049
0050 class HLTLevel1GTSeed : public HLTStreamFilter {
0051 public:
0052
0053 explicit HLTLevel1GTSeed(const edm::ParameterSet &);
0054
0055
0056 ~HLTLevel1GTSeed() override;
0057
0058
0059 static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
0060
0061
0062 bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) override;
0063
0064 private:
0065
0066 const std::vector<L1GtObject> *objectTypeVec(const int chipNumber, const std::string &cndName) const;
0067
0068
0069
0070 void updateAlgoLogicParser(const L1GtTriggerMenu *, const AlgorithmMap &);
0071
0072
0073
0074 void updateAlgoLogicParser(const std::vector<bool> >Word,
0075 const std::vector<unsigned int> &triggerMask,
0076 const int physicsDaqPartition);
0077
0078
0079
0080 void convertStringToBitNumber();
0081
0082
0083
0084 void debugPrint(bool) const;
0085
0086
0087 bool seedsL1TriggerObjectMaps(edm::Event &,
0088 trigger::TriggerFilterObjectWithRefs &,
0089 const L1GtTriggerMask *,
0090 const L1GlobalTriggerReadoutRecord *,
0091 const int physicsDaqPartition);
0092
0093
0094
0095
0096
0097
0098 bool seedsL1Extra(edm::Event &, trigger::TriggerFilterObjectWithRefs &) const;
0099
0100
0101 void dumpTriggerFilterObjectWithRefs(trigger::TriggerFilterObjectWithRefs &) const;
0102
0103 private:
0104
0105
0106
0107 const L1GtTriggerMenu *m_l1GtMenu;
0108 unsigned long long m_l1GtMenuCacheID;
0109
0110
0111 edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> const m_l1GtTriggerMenuToken;
0112 edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd> const m_l1GtTriggerMaskAlgoTrigRcdToken;
0113 edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd> const m_l1GtTriggerMaskTechTrigRcdToken;
0114
0115
0116 L1GtLogicParser m_l1AlgoLogicParser;
0117
0118
0119 std::vector<L1GtLogicParser::OperandToken> m_l1AlgoSeeds;
0120
0121
0122 std::vector<const std::vector<L1GtLogicParser::TokenRPN> *> m_l1AlgoSeedsRpn;
0123
0124
0125 std::vector<std::vector<const std::vector<L1GtObject> *> > m_l1AlgoSeedsObjType;
0126
0127 private:
0128
0129
0130
0131
0132
0133
0134
0135
0136 bool m_l1UseL1TriggerObjectMaps;
0137
0138
0139
0140 int m_l1NrBxInEvent;
0141
0142
0143 bool m_l1TechTriggerSeeding;
0144
0145
0146 bool m_l1UseAliasesForSeeding;
0147
0148
0149
0150 std::string m_l1SeedsLogicalExpression;
0151
0152
0153 edm::InputTag m_l1GtReadoutRecordTag;
0154 edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> m_l1GtReadoutRecordToken;
0155
0156
0157 edm::InputTag m_l1GtObjectMapTag;
0158 edm::EDGetTokenT<L1GlobalTriggerObjectMapRecord> m_l1GtObjectMapToken;
0159
0160
0161 edm::InputTag m_l1CollectionsTag;
0162
0163
0164 edm::InputTag m_l1MuonCollectionTag;
0165
0166
0167 edm::InputTag m_l1ExtraTag;
0168 edm::InputTag m_l1MuonTag;
0169 edm::EDGetTokenT<l1extra::L1MuonParticleCollection> m_l1MuonToken;
0170 edm::InputTag m_l1IsoEGTag;
0171 edm::EDGetTokenT<l1extra::L1EmParticleCollection> m_l1IsoEGToken;
0172 edm::InputTag m_l1NoIsoEGTag;
0173 edm::EDGetTokenT<l1extra::L1EmParticleCollection> m_l1NoIsoEGToken;
0174 edm::InputTag m_l1CenJetTag;
0175 edm::EDGetTokenT<l1extra::L1JetParticleCollection> m_l1CenJetToken;
0176 edm::InputTag m_l1ForJetTag;
0177 edm::EDGetTokenT<l1extra::L1JetParticleCollection> m_l1ForJetToken;
0178 edm::InputTag m_l1TauJetTag;
0179 edm::EDGetTokenT<l1extra::L1JetParticleCollection> m_l1TauJetToken;
0180 edm::InputTag m_l1IsoTauJetTag;
0181 edm::EDGetTokenT<l1extra::L1JetParticleCollection> m_l1IsoTauJetToken;
0182 edm::InputTag m_l1EtMissMETTag;
0183 edm::EDGetTokenT<l1extra::L1EtMissParticleCollection> m_l1EtMissMETToken;
0184 edm::InputTag m_l1EtMissMHTTag;
0185 edm::EDGetTokenT<l1extra::L1EtMissParticleCollection> m_l1EtMissMHTToken;
0186
0187
0188 bool m_l1GlobalDecision;
0189
0190
0191 bool m_isDebugEnabled;
0192 };
0193
0194 #endif