118 LogDebug(
"L1TExtCondProducer") <<
"L1TExtCondProducer::produce function called...\n";
131 std::map<std::string, unsigned int> extBitMap = gtParser.
getExternalSignals(utml1GtMenu);
141 bool TriggerRulePrefireVetoBit(
false);
149 std::vector<uint64_t> eventHistory;
150 for (
auto&& l1a :
tcdsRecord.getFullL1aHistory()) {
151 eventHistory.push_back(thisEvent - ((l1a.getBXID() - 1) + l1a.getOrbitNr() * 3564ull));
155 if (eventHistory.size() >= 4) {
157 if (eventHistory[0] < 3ull) {
158 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (1 in 3)";
161 if (eventHistory[0] == 3ull)
162 TriggerRulePrefireVetoBit =
true;
165 if (eventHistory[0] < 25ull and eventHistory[1] < 25ull) {
166 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (2 in 25)";
168 if (eventHistory[0] < 25ull and eventHistory[1] == 25ull)
169 TriggerRulePrefireVetoBit =
true;
172 if (eventHistory[0] < 100ull and eventHistory[1] < 100ull and eventHistory[2] <= 100ull) {
173 if (eventHistory[2] == 100ull)
174 TriggerRulePrefireVetoBit =
true;
176 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (3 in 100)";
180 if (eventHistory[0] < 240ull and eventHistory[1] < 240ull and eventHistory[2] < 240ull and
181 eventHistory[3] <= 240ull) {
182 if (eventHistory[3] == 240ull)
183 TriggerRulePrefireVetoBit =
true;
185 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (4 in 240)";
227 if (TriggerRulePrefireVetoBit)
232 extCond->push_back(iBx, extCond_bx);
edm::ESGetToken< L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd > l1GtMenuToken_
BXVector< GlobalExtBlk > GlobalExtBlkBxCollection
edm::EDGetTokenT< TCDSRecord > tcdsRecordToken_
T const * product() const
Log< level::Error, false > LogError
T const * product() const
unsigned int m_triggerRulePrefireVetoBit
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void setExternalDecision(unsigned int bit, bool val)
Set decision bits.
unsigned long long m_l1GtMenuCacheID
unsigned long long uint64_t
bool makeTriggerRulePrefireVetoBit_
std::map< std::string, unsigned int > m_extBitMap