-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update to the ZMuSkim #20693
Update to the ZMuSkim #20693
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,166 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
from Configuration.StandardSequences.MagneticField_cff import * | ||
### HLT filter | ||
import copy | ||
from HLTrigger.HLTfilters.hltHighLevel_cfi import * | ||
from SimGeneral.HepPDTESSource.pythiapdt_cfi import * | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'm not sure I see why this and the next several imports are needed? [I do see why genericParticleProducer_cfi is needed] |
||
from TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAny_cfi import * | ||
from TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff import * | ||
from RecoMuon.MuonIsolationProducers.isoDepositProducerIOBlocks_cff import * | ||
from PhysicsTools.PatAlgos.producersLayer1.genericParticleProducer_cfi import patGenericParticles | ||
|
||
|
||
ZMuHLTFilter = copy.deepcopy(hltHighLevel) | ||
ZMuHLTFilter.throw = cms.bool(False) | ||
ZMuHLTFilter.HLTPaths = ["HLT_Mu*","HLT_IsoMu*","HLT_DoubleMu*"] | ||
ZMuHLTFilter.HLTPaths = ["HLT_Mu*","HLT_IsoMu*"] | ||
|
||
### Z -> MuMu candidates | ||
|
||
# Get muons of needed quality for Zs | ||
looseMuonsForZMuSkim = cms.EDFilter("MuonSelector", | ||
src = cms.InputTag("muons"), | ||
cut = cms.string('pt > 10 && abs(eta)<2.4 && isGlobalMuon = 1 && isTrackerMuon = 1 && abs(innerTrack().dxy)<2.0'), | ||
|
||
###create a track collection with generic kinematic cuts | ||
looseMuonsForZMuSkim = cms.EDFilter("TrackSelector", | ||
src = cms.InputTag("generalTracks"), | ||
cut = cms.string('pt > 10 && abs(eta)<2.4 && (charge!=0)'), | ||
filter = cms.bool(True) | ||
) | ||
|
||
tightMuonsForZMuSkim = cms.EDFilter("MuonSelector", | ||
src = cms.InputTag("looseMuonsForZMuSkim"), | ||
cut = cms.string('pt > 20'), | ||
filter = cms.bool(True) | ||
|
||
|
||
###cloning the previous collection into a collection of candidates | ||
ConcretelooseMuonsForZMuSkim = cms.EDProducer("ConcreteChargedCandidateProducer", | ||
src = cms.InputTag("looseMuonsForZMuSkim"), | ||
particleType = cms.string("mu+") | ||
) | ||
|
||
|
||
|
||
###create iso deposits | ||
tkIsoDepositTk = cms.EDProducer("CandIsoDepositProducer", | ||
src = cms.InputTag("ConcretelooseMuonsForZMuSkim"), | ||
MultipleDepositsFlag = cms.bool(False), | ||
trackType = cms.string('track'), | ||
ExtractorPSet = cms.PSet( | ||
#MIsoTrackExtractorBlock | ||
Diff_z = cms.double(0.2), | ||
inputTrackCollection = cms.InputTag("generalTracks"), | ||
BeamSpotLabel = cms.InputTag("offlineBeamSpot"), | ||
ComponentName = cms.string('TrackExtractor'), | ||
DR_Max = cms.double(0.5), | ||
Diff_r = cms.double(0.1), | ||
Chi2Prob_Min = cms.double(-1.0), | ||
DR_Veto = cms.double(0.01), | ||
NHits_Min = cms.uint32(0), | ||
Chi2Ndof_Max = cms.double(1e+64), | ||
Pt_Min = cms.double(-1.0), | ||
DepositLabel = cms.untracked.string('tracker'), | ||
BeamlineOption = cms.string('BeamSpotFromEvent') | ||
) | ||
) | ||
|
||
###adding isodeposits to candidate collection | ||
allPatTracks = patGenericParticles.clone( | ||
src = cms.InputTag("ConcretelooseMuonsForZMuSkim"), | ||
# isolation configurables | ||
userIsolation = cms.PSet( | ||
tracker = cms.PSet( | ||
veto = cms.double(0.015), | ||
src = cms.InputTag("tkIsoDepositTk"), | ||
deltaR = cms.double(0.3), | ||
#threshold = cms.double(1.5) | ||
), | ||
), | ||
isoDeposits = cms.PSet( | ||
tracker = cms.InputTag("tkIsoDepositTk"), | ||
), | ||
) | ||
|
||
|
||
|
||
|
||
###create the "probe collection" of isolated tracks | ||
looseIsoMuonsForZMuSkim = cms.EDFilter("PATGenericParticleSelector", | ||
src = cms.InputTag("allPatTracks"), | ||
cut = cms.string("(userIsolation('pat::TrackIso')/pt)<0.4"), | ||
filter = cms.bool(True) | ||
) | ||
|
||
|
||
|
||
|
||
|
||
MyPatMuons = cms.EDProducer("PATMuonProducer", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please pick a more descriptive name for your producer (presumably one connected with the skim name) |
||
muonSource = cms.InputTag("muons"), | ||
useParticleFlow = cms.bool( False ), | ||
pfMuonSource = cms.InputTag("particleFlow"), | ||
embedMuonBestTrack = cms.bool(True), | ||
embedTunePMuonBestTrack = cms.bool(True), | ||
forceBestTrackEmbedding = cms.bool(True), | ||
embedTrack = cms.bool(True), ## embed in AOD externally stored tracker track | ||
embedCombinedMuon = cms.bool(True), ## embed in AOD externally stored combined muon track | ||
embedStandAloneMuon = cms.bool(True), ## embed in AOD externally stored standalone muon track | ||
embedPickyMuon = cms.bool(True), ## embed in AOD externally stored TeV-refit picky muon track | ||
embedTpfmsMuon = cms.bool(True), ## embed in AOD externally stored TeV-refit TPFMS muon track | ||
embedDytMuon = cms.bool(True), ## embed in AOD externally stored TeV-refit DYT muon track | ||
embedPFCandidate = cms.bool(False), ## embed in AOD externally stored particle flow candidate | ||
embedCaloMETMuonCorrs = cms.bool(False), | ||
caloMETMuonCorrs = cms.InputTag("muonMETValueMapProducer" , "muCorrData"), | ||
# embedding of muon MET corrections for tcMET | ||
embedTcMETMuonCorrs = cms.bool(False), # removed from RECO/AOD! | ||
tcMETMuonCorrs = cms.InputTag("muonTCMETValueMapProducer", "muCorrData"), | ||
embedPfEcalEnergy = cms.bool(False), | ||
addPuppiIsolation = cms.bool(False), | ||
addGenMatch = cms.bool(False), | ||
embedGenMatch = cms.bool(False), | ||
|
||
addEfficiencies = cms.bool(False), | ||
efficiencies = cms.PSet(), | ||
|
||
# resolution configurables | ||
addResolutions = cms.bool(False), | ||
resolutions = cms.PSet(), | ||
# high level selections | ||
embedHighLevelSelection = cms.bool(True), | ||
beamLineSrc = cms.InputTag("offlineBeamSpot"), | ||
pvSrc = cms.InputTag("offlinePrimaryVertices"), | ||
|
||
computeMiniIso = cms.bool(False), | ||
pfCandsForMiniIso = cms.InputTag("packedPFCandidates"), | ||
miniIsoParams = cms.vdouble(0.05, 0.2, 10.0, 0.5, 0.0001, 0.01, 0.01, 0.01, 0.0), | ||
) | ||
|
||
|
||
tightMuonsForZMuSkim = cms.EDFilter("PATMuonSelector", | ||
src = cms.InputTag("MyPatMuons"), | ||
cut = cms.string('(pt > 28) && (abs(eta)<2.4) && (isPFMuon>0) && (isGlobalMuon = 1) && (globalTrack().normalizedChi2() < 10) && (globalTrack().hitPattern().numberOfValidMuonHits()>0)&& (numberOfMatchedStations() > 1)&& (innerTrack().hitPattern().numberOfValidPixelHits() > 0)&& (innerTrack().hitPattern().trackerLayersWithMeasurement() > 5) && (abs(dB)<0.2) && ((isolationR03().sumPt/pt)<0.1)'), | ||
filter = cms.bool(True) | ||
) | ||
|
||
|
||
# build Z-> MuMu candidates | ||
dimuonsZMuSkim = cms.EDProducer("CandViewShallowCloneCombiner", | ||
checkCharge = cms.bool(False), | ||
cut = cms.string('mass > 30'), | ||
decay = cms.string("tightMuonsForZMuSkim looseMuonsForZMuSkim") | ||
) | ||
cut = cms.string('(mass > 60) && (charge=0) && (abs(daughter(0).vz - daughter(1).vz) < 0.1)'), | ||
decay = cms.string("tightMuonsForZMuSkim looseIsoMuonsForZMuSkim") | ||
) | ||
|
||
|
||
# Z filter | ||
dimuonsFilterZMuSkim = cms.EDFilter("CandViewCountFilter", | ||
src = cms.InputTag("dimuonsZMuSkim"), | ||
minNumber = cms.uint32(1) | ||
) | ||
|
||
# Z Skim sequence | ||
diMuonSelSeq = cms.Sequence(ZMuHLTFilter * | ||
|
||
|
||
diMuonSelSeq = cms.Sequence( | ||
ZMuHLTFilter * | ||
looseMuonsForZMuSkim * | ||
ConcretelooseMuonsForZMuSkim * | ||
tkIsoDepositTk * | ||
allPatTracks * | ||
looseIsoMuonsForZMuSkim * | ||
MyPatMuons * | ||
tightMuonsForZMuSkim * | ||
dimuonsZMuSkim * | ||
dimuonsFilterZMuSkim | ||
dimuonsFilterZMuSkim | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @rvenditti - the magnetic field is set at a much higher level than within a skim. Please remove this.