Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TriggerResultsFilter: migrate to L1 Stage2 (81x) #14879

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import FWCore.ParameterSet.Config as cms

triggerStreamResultsFilter = cms.EDFilter('TriggerResultsFilter',
hltResults = cms.InputTag('TriggerResults'), # HLT results - set to empty to ignore HLT
l1tResults = cms.InputTag(''), # L1 GT results - set to empty to ignore L1
l1tIgnoreMask = cms.bool(False), # use L1 mask
l1techIgnorePrescales = cms.bool(False), # read L1 technical bits from PSB#9, bypassing the prescales
daqPartitions = cms.uint32(0x01), # used by the definition of the L1 mask
throw = cms.bool(True), # throw exception on unknown trigger names
hltResults = cms.InputTag('TriggerResults'), # HLT results - set to empty to ignore HLT
l1tResults = cms.InputTag(''), # L1 uGT results - set to empty to ignore L1
l1tIgnoreMaskAndPrescale = cms.bool(False), # use L1 results before masks and prescales
throw = cms.bool(True), # throw exception on unknown trigger names
triggerConditions = cms.vstring(
'HLT_Ele27_eta2p1_WP85_Gsf_v1',
'HLT_Ele27_eta2p1_WP85_PFMET_MT50_Gsf_v1',
Expand Down
6 changes: 2 additions & 4 deletions DQM/DataScouting/python/dijetScouting_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@
triggerConfiguration = cms.PSet(
hltResults = cms.InputTag('TriggerResults','','HLT'),
l1tResults = cms.InputTag(''),
daqPartitions = cms.uint32(1),
l1tIgnoreMask = cms.bool( False ),
l1techIgnorePrescales = cms.bool( False ),
throw = cms.bool( True )
l1tIgnoreMaskAndPrescale = cms.bool( False ),
throw = cms.bool( True )
)
)

Expand Down
40 changes: 15 additions & 25 deletions DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -39270,29 +39270,26 @@
offset = cms.uint32( 0 )
)
process.hltPreExpressOutputSmart = cms.EDFilter( "TriggerResultsFilter",
l1tIgnoreMask = cms.bool( False ),
l1tResults = cms.InputTag( "hltGtDigis" ),
l1techIgnorePrescales = cms.bool( False ),
hltResults = cms.InputTag( "TriggerResults" ),
l1tResults = cms.InputTag( "hltGtDigis" ),
l1tIgnoreMaskAndPrescale = cms.bool( False ),
triggerConditions = cms.vstring( 'HLT_MET400_v5',
'HLT_Mu17_Mu8_v17',
'HLT_Photon75_CaloIdVL_IsoL_v17',
'HLT_DoublePhoton80_v6',
'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v17',
'HLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v7',
'HLT_ZeroBias_v6' ),
throw = cms.bool( True ),
daqPartitions = cms.uint32( 1 )
throw = cms.bool( True )
)
process.hltPreHLTDQMOutput = cms.EDFilter( "HLTPrescaler",
L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ),
offset = cms.uint32( 0 )
)
process.hltPreHLTDQMOutputSmart = cms.EDFilter( "TriggerResultsFilter",
l1tIgnoreMask = cms.bool( False ),
l1tResults = cms.InputTag( "hltGtDigis" ),
l1techIgnorePrescales = cms.bool( False ),
hltResults = cms.InputTag( "TriggerResults" ),
l1tResults = cms.InputTag( "hltGtDigis" ),
l1tIgnoreMaskAndPrescale = cms.bool( False ),
triggerConditions = cms.vstring( 'HLT_Jet20_NoL1FastJet_v2',
'HLT_PFJet40_v5',
'HLT_Jet50_NoL1FastJet_v2',
Expand Down Expand Up @@ -39338,31 +39335,27 @@
'HLT_Ele32_CaloIdL_CaloIsoVL_TrkIdVL_TrkIsoVL_v10',
'HLT_Ele80_CaloIdVT_GsfTrkIdT_v1',
'HLT_Ele90_CaloIdVT_GsfTrkIdT_v1' ),
throw = cms.bool( True ),
daqPartitions = cms.uint32( 1 )
throw = cms.bool( True )
)
process.hltPreHLTDQMResultsOutput = cms.EDFilter( "HLTPrescaler",
L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ),
offset = cms.uint32( 0 )
)
process.hltPreHLTDQMResultsOutputSmart = cms.EDFilter( "TriggerResultsFilter",
l1tIgnoreMask = cms.bool( False ),
l1tResults = cms.InputTag( "hltGtDigis" ),
l1techIgnorePrescales = cms.bool( False ),
hltResults = cms.InputTag( "TriggerResults" ),
l1tResults = cms.InputTag( "hltGtDigis" ),
l1tIgnoreMaskAndPrescale = cms.bool( False ),
triggerConditions = cms.vstring( 'HLT_* AND NOT HLT_*Calibration*' ),
throw = cms.bool( True ),
daqPartitions = cms.uint32( 1 )
throw = cms.bool( True )
)
process.hltPreHLTMONOutput = cms.EDFilter( "HLTPrescaler",
L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ),
offset = cms.uint32( 0 )
)
process.hltPreHLTMONOutputSmart = cms.EDFilter( "TriggerResultsFilter",
l1tIgnoreMask = cms.bool( False ),
l1tResults = cms.InputTag( "hltGtDigis" ),
l1techIgnorePrescales = cms.bool( False ),
hltResults = cms.InputTag( "TriggerResults" ),
l1tResults = cms.InputTag( "hltGtDigis" ),
l1tIgnoreMaskAndPrescale = cms.bool( False ),
triggerConditions = ( cms.vstring( 'HLT_Activity_Ecal_SC7_v12',
'HLT_L1SingleJet16_v6',
'HLT_L1SingleJet36_v6',
Expand Down Expand Up @@ -39788,24 +39781,21 @@
'AlCa_LumiPixels_v6 / 100',
'AlCa_LumiPixels_ZeroBias_v3 / 100',
'AlCa_LumiPixels_Random_v1 / 100') ),
throw = cms.bool( True ),
daqPartitions = cms.uint32( 1 )
throw = cms.bool( True )
)
process.hltPreNanoDSTOutput = cms.EDFilter( "HLTPrescaler",
L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ),
offset = cms.uint32( 0 )
)
process.hltPrePhysicsDSTOutputSmart = cms.EDFilter( "TriggerResultsFilter",
l1tIgnoreMask = cms.bool( False ),
l1tResults = cms.InputTag( "hltGtDigis" ),
l1techIgnorePrescales = cms.bool( False ),
hltResults = cms.InputTag( "TriggerResults" ),
l1tResults = cms.InputTag( "hltGtDigis" ),
l1tIgnoreMaskAndPrescale = cms.bool( False ),
triggerConditions = cms.vstring( 'DST_HT250_v1',
'DST_L1HTT_Or_L1MultiJet_v1 / 100',
'DST_Mu5_HT250_v1',
'DST_Ele8_CaloIdL_CaloIsoVL_TrkIdVL_TrkIsoVL_HT250_v1' ),
throw = cms.bool( True ),
daqPartitions = cms.uint32( 1 )
throw = cms.bool( True )
)
process.hltPreRPCMONOutput = cms.EDFilter( "HLTPrescaler",
L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ),
Expand Down
7 changes: 2 additions & 5 deletions DQMOffline/Trigger/python/FSQHLTOfflineSource_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,11 +598,8 @@ def getFSQHI():
triggerConfiguration = cms.PSet(
hltResults = cms.InputTag('TriggerResults','',processName),
l1tResults = cms.InputTag(''),
#l1tResults = cms.InputTag('gtDigis'),
daqPartitions = cms.uint32(1),
l1tIgnoreMask = cms.bool( False ),
l1techIgnorePrescales = cms.bool( False ),
throw = cms.bool( False )
l1tIgnoreMaskAndPrescale = cms.bool( False ),
throw = cms.bool( False )
),

#dirname = cms.untracked.string("HLT/FSQ/DiJETAve/"),
Expand Down
7 changes: 2 additions & 5 deletions DQMOffline/Trigger/python/HILowLumiHLTOfflineSource_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,8 @@ def getHILowLumi():
triggerConfiguration = cms.PSet(
hltResults = cms.InputTag('TriggerResults','',processName),
l1tResults = cms.InputTag(''),
#l1tResults = cms.InputTag('gtDigis'),
daqPartitions = cms.uint32(1),
l1tIgnoreMask = cms.bool( False ),
l1techIgnorePrescales = cms.bool( False ),
throw = cms.bool( False )
l1tIgnoreMaskAndPrescale = cms.bool( False ),
throw = cms.bool( False )
),

# hltProcessName = cms.string("HLT"),
Expand Down
9 changes: 9 additions & 0 deletions DataFormats/L1TGlobal/interface/GlobalAlgBlk.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ class GlobalAlgBlk
void setAlgoDecisionFinal(unsigned int bit, bool val);

/// Get decision bits
std::vector<bool> const & getAlgoDecisionInitial() const {
return m_algoDecisionInitial;
}
std::vector<bool> const & getAlgoDecisionInterm() const {
return m_algoDecisionPreScaled;
}
std::vector<bool> const & getAlgoDecisionFinal() const {
return m_algoDecisionFinal;
}
bool getAlgoDecisionInitial(unsigned int bit) const;
bool getAlgoDecisionInterm(unsigned int bit) const;
bool getAlgoDecisionFinal(unsigned int bit) const;
Expand Down
108 changes: 32 additions & 76 deletions HLTrigger/HLTcore/interface/TriggerExpressionData.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
#include "DataFormats/Provenance/interface/ParameterSetID.h"
#include "DataFormats/Provenance/interface/EventID.h"
#include "DataFormats/Common/interface/TriggerResults.h"
#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"
#include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h"

namespace edm {
class Event;
class EventSetup;
class TriggerNames;
}

class L1GtTriggerMenu;
class L1GtTriggerMask;
class L1TUtmTriggerMenu;

namespace triggerExpression {

Expand All @@ -29,15 +28,11 @@ class Data {
m_hltResultsToken(),
m_l1tResultsTag(""),
m_l1tResultsToken(),
m_daqPartitions(0x01),
m_l1tIgnoreMask(false),
m_l1techIgnorePrescales(false),
m_l1tIgnoreMaskAndPrescale(false),
m_throw(true),
// l1 values and status
m_l1tResults(0),
m_l1tResults(nullptr),
m_l1tMenu(0),
m_l1tAlgoMask(0),
m_l1tTechMask(0),
m_l1tCacheID(),
m_l1tUpdated(false),
// hlt values and status
Expand All @@ -56,15 +51,11 @@ class Data {
m_hltResultsToken(),
m_l1tResultsTag(config.getParameter<edm::InputTag>("l1tResults")),
m_l1tResultsToken(),
m_daqPartitions(config.getParameter<unsigned int>("daqPartitions")),
m_l1tIgnoreMask(config.getParameter<bool>("l1tIgnoreMask")),
m_l1techIgnorePrescales(config.getParameter<bool>("l1techIgnorePrescales")),
m_l1tIgnoreMaskAndPrescale(config.getParameter<bool>("l1tIgnoreMaskAndPrescale")),
m_throw(config.getParameter<bool>("throw")),
// l1 values and status
m_l1tResults(0),
m_l1tResults(nullptr),
m_l1tMenu(0),
m_l1tAlgoMask(0),
m_l1tTechMask(0),
m_l1tCacheID(),
m_l1tUpdated(false),
// hlt values and status
Expand All @@ -76,32 +67,26 @@ class Data {
m_eventNumber()
{
if (not m_hltResultsTag.label().empty()) m_hltResultsToken = iC.consumes<edm::TriggerResults>(m_hltResultsTag);
if (not m_l1tResultsTag.label().empty()) m_l1tResultsToken = iC.consumes<L1GlobalTriggerReadoutRecord>(m_l1tResultsTag);
if (not m_l1tResultsTag.label().empty()) m_l1tResultsToken = iC.consumes<GlobalAlgBlkBxCollection>(m_l1tResultsTag);
}

// explicit c'tor from single arguments
Data(
edm::InputTag const & hltResultsTag,
edm::InputTag const & l1tResultsTag,
unsigned int daqPartitions,
bool l1tIgnoreMask,
bool l1techIgnorePrescales,
bool l1tIgnoreMaskAndPrescale,
bool doThrow,
edm::ConsumesCollector && iC ) :
// configuration
m_hltResultsTag(hltResultsTag),
m_hltResultsToken(),
m_l1tResultsTag(l1tResultsTag),
m_l1tResultsToken(),
m_daqPartitions(daqPartitions),
m_l1tIgnoreMask(l1tIgnoreMask),
m_l1techIgnorePrescales(l1techIgnorePrescales),
m_l1tIgnoreMaskAndPrescale(l1tIgnoreMaskAndPrescale),
m_throw(doThrow),
// l1 values and status
m_l1tResults(0),
m_l1tResults(nullptr),
m_l1tMenu(0),
m_l1tAlgoMask(0),
m_l1tTechMask(0),
m_l1tCacheID(),
m_l1tUpdated(false),
// hlt values and status
Expand All @@ -113,7 +98,7 @@ class Data {
m_eventNumber()
{
if (not m_hltResultsTag.label().empty()) m_hltResultsToken = iC.consumes<edm::TriggerResults>(m_hltResultsTag);
if (not m_l1tResultsTag.label().empty()) m_l1tResultsToken = iC.consumes<L1GlobalTriggerReadoutRecord>(m_l1tResultsTag);
if (not m_l1tResultsTag.label().empty()) m_l1tResultsToken = iC.consumes<GlobalAlgBlkBxCollection>(m_l1tResultsTag);
}

// set the new event
Expand All @@ -129,16 +114,8 @@ class Data {
m_l1tResultsTag = tag;
}

void setDaqPartitions(unsigned int daqPartitions) {
m_daqPartitions = daqPartitions;
}

void setL1tIgnoreMask(bool l1tIgnoreMask) {
m_l1tIgnoreMask = l1tIgnoreMask;
}

void setL1techIgnorePrescales(bool l1techIgnorePrescales) {
m_l1techIgnorePrescales = l1techIgnorePrescales;
void setL1tIgnoreMaskAndPrescale(bool l1tIgnoreMaskAndPrescale) {
m_l1tIgnoreMaskAndPrescale = l1tIgnoreMaskAndPrescale;
}

void setThrow(bool doThrow) {
Expand All @@ -163,22 +140,14 @@ class Data {
return * m_hltMenu;
}

const L1GlobalTriggerReadoutRecord & l1tResults() const {
const std::vector<bool> & l1tResults() const {
return * m_l1tResults;
}

const L1GtTriggerMenu & l1tMenu() const {
const L1TUtmTriggerMenu & l1tMenu() const {
return * m_l1tMenu;
}

const L1GtTriggerMask & l1tAlgoMask() const {
return * m_l1tAlgoMask;
}

const L1GtTriggerMask & l1tTechMask() const {
return * m_l1tTechMask;
}

bool hltConfigurationUpdated() const {
return m_hltUpdated;
}
Expand All @@ -199,45 +168,32 @@ class Data {
return m_throw;
}

bool ignoreL1Mask() const {
return m_l1tIgnoreMask;
}

bool ignoreL1TechPrescales() const {
return m_l1techIgnorePrescales;
}

unsigned int daqPartitions() const {
return m_daqPartitions;
bool ignoreL1MaskAndPrescale() const {
return m_l1tIgnoreMaskAndPrescale;
}

private:
// configuration
edm::InputTag m_hltResultsTag;
edm::EDGetTokenT<edm::TriggerResults> m_hltResultsToken;
edm::InputTag m_l1tResultsTag;
edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> m_l1tResultsToken;
unsigned int m_daqPartitions;
bool m_l1tIgnoreMask;
bool m_l1techIgnorePrescales;
bool m_throw;
edm::InputTag m_hltResultsTag;
edm::EDGetTokenT<edm::TriggerResults> m_hltResultsToken;
edm::InputTag m_l1tResultsTag;
edm::EDGetTokenT<GlobalAlgBlkBxCollection> m_l1tResultsToken;
bool m_l1tIgnoreMaskAndPrescale;
bool m_throw;

// l1 values and status
const L1GlobalTriggerReadoutRecord * m_l1tResults;
const L1GtTriggerMenu * m_l1tMenu;
const L1GtTriggerMask * m_l1tAlgoMask;
const L1GtTriggerMask * m_l1tTechMask;
unsigned long long m_l1tCacheID;
bool m_l1tUpdated;
const std::vector<bool> * m_l1tResults;
const L1TUtmTriggerMenu * m_l1tMenu;
unsigned long long m_l1tCacheID;
bool m_l1tUpdated;

// hlt values and status
const edm::TriggerResults * m_hltResults;
const edm::TriggerNames * m_hltMenu;
edm::ParameterSetID m_hltCacheID;
bool m_hltUpdated;
const edm::TriggerResults * m_hltResults;
const edm::TriggerNames * m_hltMenu;
edm::ParameterSetID m_hltCacheID;
bool m_hltUpdated;

// event values
edm::EventNumber_t m_eventNumber;
edm::EventNumber_t m_eventNumber;
};

} // namespace triggerExpression
Expand Down
Loading