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

Add a Phase2 HLT tracking DQM monitoring #42783

Merged
merged 5 commits into from
Sep 18, 2023
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
5 changes: 5 additions & 0 deletions Configuration/EventContent/python/EventContent_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,11 @@ def SwapKeepAndDrop(l):
'keep *_hltSiStripClusters2ApproxClusters_*_*',
'keep DetIds_hltSiStripRawToDigi_*_*'
])
phase2_tracker.toModify(FEVTDEBUGHLTEventContent,
outputCommands = FEVTDEBUGHLTEventContent.outputCommands+[
'keep *_hltPhase2PixelTracks_*_*',
'keep *_hltPhase2PixelVertices_*_*'
])
phase2_muon.toModify(FEVTDEBUGHLTEventContent,
outputCommands = FEVTDEBUGHLTEventContent.outputCommands + ['keep recoMuons_muons1stStep_*_*'])

Expand Down
6 changes: 6 additions & 0 deletions DQM/SiTrackerPhase2/plugins/Phase2ITMonitorCluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ void Phase2ITMonitorCluster::dqmBeginRun(const edm::Run& iRun, const edm::EventS
void Phase2ITMonitorCluster::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
// Getting the clusters
const auto& itPixelClusterHandle = iEvent.getHandle(itPixelClusterToken_);

if (!itPixelClusterHandle.isValid()) {
edm::LogWarning("Phase2ITMonitorCluster") << "No SiPixelCluster Collection found in the event. Skipping!";
return;
}

// Number of clusters
std::map<std::string, unsigned int> nClsmap;
unsigned int nclusGlobal = 0;
Expand Down
6 changes: 6 additions & 0 deletions DQM/SiTrackerPhase2/plugins/Phase2OTMonitorCluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ void Phase2OTMonitorCluster::dqmBeginRun(const edm::Run& iRun, const edm::EventS
void Phase2OTMonitorCluster::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
// Getting the clusters
const auto& clusterHandle = iEvent.getHandle(clustersToken_);

if (!clusterHandle.isValid()) {
edm::LogWarning("Phase2OTMonitorCluster") << "No Phase2TrackerCluster1D Collection found in the event. Skipping!";
return;
}

// Number of clusters
std::map<std::string, unsigned int> nClustersCounter_P; //map of detidkey vs #cls
std::map<std::string, unsigned int> nClustersCounter_S; //map of detidkey vs #cls
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Configuration/python/autoDQM.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
'DQMNone'],
}

_phase2_allowed = ['trackingOnlyDQM','outerTracker', 'trackerPhase2', 'muon','hcal','hcal2','egamma','L1TMonPhase2']
_phase2_allowed = ['trackingOnlyDQM','outerTracker', 'trackerPhase2', 'muon','hcal','hcal2','egamma','L1TMonPhase2','HLTMon']
autoDQM['phase2'] = ['','','']
for i in [0,2]:
autoDQM['phase2'][i] = '+'.join([autoDQM[m][i] for m in _phase2_allowed])
Expand Down
16 changes: 15 additions & 1 deletion DQMOffline/Trigger/python/DQMOffline_Trigger_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
from DQMOffline.Trigger.TrackingMonitoringPA_cff import*
from DQMOffline.Trigger.TrackToTrackMonitoring_cff import *


# hcal
from DQMOffline.Trigger.HCALMonitoring_cff import *

Expand All @@ -59,6 +58,9 @@
# pixel
from DQMOffline.Trigger.SiPixel_OfflineMonitoring_cff import *

# phase2 tracker
from DQMOffline.Trigger.SiTrackerPhase2_OfflineMonitoring_cff import *

# B2G
from DQMOffline.Trigger.B2GMonitoring_cff import *

Expand Down Expand Up @@ -204,6 +206,18 @@
particleNetMonitoringHLT # HIG: monitoring of HLT PNET taggers (incl. comparisons to Offline PNET)
)

_offlineHLTSource4HLTMonitorPDPh2 = cms.Sequence(
dqmInfoHLTMon *
HLTtrackerphase2DQMSource * # phase-2 IT and OT clusters
trackingMonitorHLT * # tracking
hltToOfflineTrackValidatorSequence * # Relative Online to Offline performace
vertexingMonitorHLT # vertexing
)

# remove Strip HLT monitoring in the phase-2 sequence
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
Copy link
Contributor

@srimanob srimanob Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phase2_common is not more appropriate here, to represent what it will do (i.e. for future when other modules will be added back) ?
However, it should give the same result as phase2_tracker is always in phase-2 workflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well at the moment, it's fully tracker specific, so I'd rather not change it. In case it gets updated you can make sure the appropriate modifier is used

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thx.

phase2_tracker.toReplaceWith(offlineHLTSource4HLTMonitorPD,_offlineHLTSource4HLTMonitorPDPh2)

# sequences run @tier0 on HLTMonitor PD
OfflineHLTMonitoring = cms.Sequence(
offlineHLTSource4HLTMonitorPD
Expand Down
11 changes: 11 additions & 0 deletions DQMOffline/Trigger/python/PrimaryVertexMonitoring_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@
hltVerticesMonitoring = pvMonitor.clone(
beamSpotLabel = "hltOnlineBeamSpot"
)

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(hltVerticesMonitoring,
TopFolderName = "HLT/Vertexing/hltFullVertices",
vertexLabel = cms.InputTag("offlinePrimaryVertices","","HLT"))

hltPixelVerticesMonitoring = hltVerticesMonitoring.clone(
TopFolderName = "HLT/Vertexing/hltPixelVertices",
vertexLabel = "hltPixelVertices",
ndof = 1,
useHPforAlignmentPlots = False
)

phase2_tracker.toModify(hltPixelVerticesMonitoring,
vertexLabel = "hltPhase2PixelVertices")

hltTrimmedPixelVerticesMonitoring = hltVerticesMonitoring.clone(
TopFolderName = "HLT/Vertexing/hltTrimmedPixelVertices",
vertexLabel = "hltTrimmedPixelVertices",
Expand All @@ -34,3 +44,4 @@
# + hltVerticesL3PFBjets
)

phase2_tracker.toReplaceWith(vertexingMonitorHLT, cms.Sequence(hltPixelVerticesMonitoring + hltVerticesMonitoring))
16 changes: 16 additions & 0 deletions DQMOffline/Trigger/python/SiTrackerPhase2_OfflineMonitoring_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import FWCore.ParameterSet.Config as cms
from DQM.SiTrackerPhase2.Phase2ITMonitorCluster_cff import *
from DQM.SiTrackerPhase2.Phase2OTMonitorCluster_cff import *

HLTclusterMonitorIT = clusterMonitorIT.clone(
TopFolderName = cms.string('HLT/TrackerPhase2ITCluster'),
InnerPixelClusterSource = cms.InputTag('siPixelClusters','','HLT'),
)
HLTclusterMonitorOT = clusterMonitorOT.clone(
TopFolderName = cms.string('HLT/TrackerPhase2OTCluster'),
clusterSrc = cms.InputTag('siPhase2Clusters','','HLT'),
)

HLTtrackerphase2DQMSource = cms.Sequence(HLTclusterMonitorIT +
HLTclusterMonitorOT)

11 changes: 11 additions & 0 deletions DQMOffline/Trigger/python/TrackToTrackMonitoring_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
monitoredPrimaryVertices = "hltVerticesPFSelector"
)

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(hltMerged2highPurity,
monitoredTrack = cms.InputTag("generalTracks","","HLT"),
monitoredPrimaryVertices = cms.InputTag("offlinePrimaryVertices","","HLT"))

hltMerged2highPurityPV = TrackToTrackComparisonHists.clone(
dzWRTPvCut = 0.1,
monitoredTrack = "hltMergedTracks",
Expand All @@ -32,6 +37,12 @@
referencePrimaryVertices = "offlinePrimaryVertices",
monitoredPrimaryVertices = "hltVerticesPFSelector"
)

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(hltMerged2highPurityPV,
monitoredTrack = cms.InputTag("generalTracks","","HLT"),
monitoredPrimaryVertices = cms.InputTag("offlinePrimaryVertices","","HLT"))

hltToOfflineTrackValidatorSequence = cms.Sequence(
cms.ignore(highPurityTracks)
+ hltMerged2highPurity
Expand Down
14 changes: 14 additions & 0 deletions DQMOffline/Trigger/python/TrackingMonitoring_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
doEffFromHitPatternVsBX = False,
doEffFromHitPatternVsLUMI = False
)

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(pixelTracksMonitoringHLT,
TrackProducer = 'hltPhase2PixelTracks',
allTrackProducer = 'hltPhase2PixelTracks')

iter0TracksMonitoringHLT = trackingMonHLT.clone(
FolderName = 'HLT/Tracking/iter0',
TrackProducer = 'hltIter0PFlowCtfWithMaterialTracks',
Expand Down Expand Up @@ -94,6 +100,12 @@
doBSPlots = cms.bool(True),
doSIPPlots = cms.bool(True)
)

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(iterHLTTracksMonitoringHLT,
TrackProducer = cms.InputTag("generalTracks","","HLT"),
allTrackProducer = cms.InputTag("generalTracks","","HLT"))

iter3TracksMonitoringHLT = trackingMonHLT.clone(
FolderName = 'HLT/Tracking/iter3Merged',
TrackProducer = 'hltIter3Merged',
Expand Down Expand Up @@ -213,5 +225,7 @@

from Configuration.Eras.Modifier_run3_common_cff import run3_common
run3_common.toReplaceWith(trackingMonitorHLT, cms.Sequence(pixelTracksMonitoringHLT + iterHLTTracksMonitoringHLT + doubletRecoveryHPTracksMonitoringHLT )) # + iter0HPTracksMonitoringHLT ))
phase2_tracker.toReplaceWith(trackingMonitorHLT, cms.Sequence(pixelTracksMonitoringHLT + iterHLTTracksMonitoringHLT))

run3_common.toReplaceWith(trackingMonitorHLTall, cms.Sequence(pixelTracksMonitoringHLT + iter0TracksMonitoringHLT + iterHLTTracksMonitoringHLT))
run3_common.toReplaceWith(egmTrackingMonitorHLT, cms.Sequence(gsfTracksMonitoringHLT))