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

[14_1_X] Update the PbPb skims for 2024 data taking #46458

Merged
merged 5 commits into from
Nov 1, 2024
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
6 changes: 3 additions & 3 deletions Configuration/Skimming/python/PbPb_EMuSkim_cff.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import FWCore.ParameterSet.Config as cms

# HLT dimuon trigger
# Electron or muon HLT trigger
import HLTrigger.HLTfilters.hltHighLevel_cfi
hltEMuHI = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
hltEMuHI.HLTPaths = ["HLT_HIEle*Gsf_v*","HLT_HIL3SingleMu*_v*"]
hltEMuHI.HLTPaths = ["HLT_HIEle*Gsf_v*","HLT_HIL2SingleMu*_v*","HLT_HIL3SingleMu*_v*"]
hltEMuHI.throw = False
hltEMuHI.andOr = True

Expand All @@ -22,7 +22,7 @@

muonSelectorForEMu = cms.EDFilter("MuonSelector",
src = cms.InputTag("muons"),
cut = cms.string("isPFMuon && isGlobalMuon && pt > 20."),
cut = cms.string("isPFMuon && isGlobalMuon && pt > 20. && abs(eta)<2.4 && (globalTrack().normalizedChi2() < 10) && (globalTrack().hitPattern().numberOfValidMuonHits()>0) && (numberOfMatchedStations() > 1)"),
filter = cms.bool(True)
)

Expand Down
2 changes: 1 addition & 1 deletion Configuration/Skimming/python/PbPb_ZEESkim_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# HLT dimuon trigger
import HLTrigger.HLTfilters.hltHighLevel_cfi
hltZEEHI = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
hltZEEHI.HLTPaths = ["HLT_HIEle*Gsf_v*"]
hltZEEHI.HLTPaths = ["HLT_HIEle*Gsf_v*","HLT_HIDoubleEle*"]
hltZEEHI.throw = False
hltZEEHI.andOr = True

Expand Down
4 changes: 2 additions & 2 deletions Configuration/Skimming/python/PbPb_ZMMSkim_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# HLT dimuon trigger
import HLTrigger.HLTfilters.hltHighLevel_cfi
hltZMMPbPb = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
hltZMMPbPb.HLTPaths = ["HLT_HIL3SingleMu*_v*"]
hltZMMPbPb.HLTPaths = ["HLT_HIL2SingleMu*_v*","HLT_HIL3SingleMu*_v*"]
hltZMMPbPb.throw = False
hltZMMPbPb.andOr = True

Expand All @@ -17,7 +17,7 @@
# selection of dimuons with mass in Z range
muonSelectorForZMM = cms.EDFilter("MuonSelector",
src = cms.InputTag("muons"),
cut = cms.string("(isPFMuon && isGlobalMuon) && pt > 20."),
cut = cms.string("(isPFMuon && isGlobalMuon) && pt > 15. && abs(eta) < 2.4"),
filter = cms.bool(True)
)

Expand Down
26 changes: 17 additions & 9 deletions Configuration/Skimming/python/PbPb_ZMuSkimMuonDPG_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@

PbPbZMuHLTFilter = copy.deepcopy(hltHighLevel)
PbPbZMuHLTFilter.throw = cms.bool(False)
PbPbZMuHLTFilter.HLTPaths = ["HLT_HIL3Mu*"]
PbPbZMuHLTFilter.HLTPaths = ["HLT_HIL2SingleMu*","HLT_HIL3SingleMu*"]

# selection of valid vertex
primaryVertexFilterForPbPbZMuSkim = cms.EDFilter("VertexSelector",
src = cms.InputTag("offlinePrimaryVertices"),
cut = cms.string("!isFake && abs(z) <= 25 && position.Rho <= 2"),
filter = cms.bool(True),
)

### Z -> MuMu candidates
# Get muons of needed quality for Zs

###create a track collection with generic kinematic cuts
looseMuonsForPbPbZMuSkim = cms.EDFilter("TrackSelector",
src = cms.InputTag("generalTracks"),
cut = cms.string('pt > 10 && abs(eta)<2.4 && (charge!=0)'),
cut = cms.string('pt > 10 && abs(eta)<2.4 && (charge!=0)'),
filter = cms.bool(True)
)

Expand Down Expand Up @@ -86,7 +93,7 @@

tightMuonsForPbPbZMuSkim = cms.EDFilter("MuonSelector",
src = cms.InputTag("muons"),
cut = cms.string("(isGlobalMuon) && pt > 25. && (abs(eta)<2.4) && (isPFMuon>0) && (globalTrack().normalizedChi2() < 10) && (globalTrack().hitPattern().numberOfValidMuonHits()>0)&& (numberOfMatchedStations() > 1)&& (innerTrack().hitPattern().numberOfValidPixelHits() > 0)&& (innerTrack().hitPattern().trackerLayersWithMeasurement() > 5) && ((isolationR03().sumPt/pt)<0.1)"),
cut = cms.string("(isGlobalMuon) && pt > 15. && (abs(eta)<2.4) && (isPFMuon>0) && (globalTrack().normalizedChi2() < 10) && (globalTrack().hitPattern().numberOfValidMuonHits()>0) && (numberOfMatchedStations() > 1) && (innerTrack().hitPattern().numberOfValidPixelHits() > 0) && (innerTrack().hitPattern().trackerLayersWithMeasurement() > 5)"),
filter = cms.bool(True)
)

Expand All @@ -96,8 +103,8 @@
# build Z-> MuMu candidates
dimuonsForPbPbZMuSkim = cms.EDProducer("CandViewShallowCloneCombiner",
checkCharge = cms.bool(False),
cut = cms.string('(mass > 60) && (charge=0)'),
decay = cms.string("tightMuonsForPbPbZMuSkim looseIsoMuonsForPbPbZMuSkim")
cut = cms.string('(mass > 60)'),
decay = cms.string("tightMuonsForPbPbZMuSkim looseMuonsForPbPbZMuSkim")
Copy link
Contributor

Choose a reason for hiding this comment

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

@flodamas it appears that this change made the Tier0 replay with CMSSW_14_1_4_patch4 fail with the following error:

2024-11-01 22:25:10,703:CRITICAL:CMSSW:Error message: An exception of category 'ProductNotFound' occurred while
   [0] Processing  Event run: 374951 lumi: 31 event: 43921116 stream: 2
   [1] Running path 'ZMuSkimPathPbPb'
   [2] Calling method for module CandViewShallowCloneCombiner/'dimuonsForPbPbZMuSkim'
Exception Message:
Principal::getByToken: Found zero products matching all criteria
Looking for a container with elements of type: reco::Candidate
Looking for module label: looseMuonsForPbPbZMuSkim
Looking for productInstanceName: 

   Additional Info:
      [a] If you wish to continue processing events after a ProductNotFound exception,
add "TryToContinue = cms.untracked.vstring('ProductNotFound')" to the "options" PSet in the configuration.

looseMuonsForPbPbZMuSkim produces a skimmed reco::TrackCollection while CandViewShallowCloneCombiner necessitates of a collection of reco::Candidate-s in input.
Shouldn't this be ConcretelooseMuonsForPbPbZMuSkim instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, indeed it should be and I have already made a PR #46584 (and #46585 for backport) to fix it.

Sorry for not having caught it before!

)


Expand All @@ -111,11 +118,12 @@

diMuonSelSeqForPbPbZMuSkim = cms.Sequence(
PbPbZMuHLTFilter *
primaryVertexFilterForPbPbZMuSkim *
looseMuonsForPbPbZMuSkim *
ConcretelooseMuonsForPbPbZMuSkim *
tkIsoDepositTkForPbPbZMuSkim *
allPatTracksForPbPbZMuSkim *
looseIsoMuonsForPbPbZMuSkim *
#ConcretelooseMuonsForPbPbZMuSkim *
#tkIsoDepositTkForPbPbZMuSkim *
#allPatTracksForPbPbZMuSkim *
#looseIsoMuonsForPbPbZMuSkim *
tightMuonsForPbPbZMuSkim *
dimuonsForPbPbZMuSkim *
dimuonsFilterForPbPbZMuSkim
Expand Down
4 changes: 2 additions & 2 deletions Configuration/Skimming/python/autoSkim.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
autoSkim[f'HIForward{i_split}'] = 'UPCMonopole+LogError+LogErrorMonitor'

# For 2023 PbPb skims
for i_split in range(32):
autoSkim[f'HIPhysicsRawPrime{i_split}'] = 'PbPbEMu+PbPbZEE+PbPbZMM+PbPbHighPtJets+LogError+LogErrorMonitor'
for i_split in range(60):
autoSkim[f'HIPhysicsRawPrime{i_split}'] = 'PbPbEMu+PbPbZEE+PbPbZMu+PbPbHighPtJets+LogError+LogErrorMonitor'

autoSkimRunII = {
'BTagCSV' : 'LogError+LogErrorMonitor',
Expand Down