Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:23:55

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 patMuons = cms.EDProducer("PATMuonProducer",
0004     # input
0005     muonSource      = cms.InputTag("muons"),
0006 
0007     # use particle flow instead of std reco
0008     useParticleFlow =  cms.bool( False ),
0009     pfMuonSource    = cms.InputTag("particleFlow"),
0010 
0011     # add user data
0012     userData = cms.PSet(
0013       # add custom classes here
0014       userClasses = cms.PSet(
0015         src = cms.VInputTag('')
0016       ),
0017       # add doubles here
0018       userFloats = cms.PSet(
0019         src = cms.VInputTag('')
0020       ),
0021       # add ints here
0022       userInts = cms.PSet(
0023         src = cms.VInputTag('')
0024       ),
0025       # add candidate ptrs here
0026       userCands = cms.PSet(
0027         src = cms.VInputTag('')
0028       ),
0029       # add "inline" functions here
0030       userFunctions = cms.vstring(),
0031       userFunctionLabels = cms.vstring()
0032     ),
0033 
0034     # embedding objects
0035     embedMuonBestTrack      = cms.bool(True),  ## embed in AOD externally stored muon best track from global pflow
0036     embedTunePMuonBestTrack = cms.bool(True),  ## embed in AOD externally stored muon best track from muon only
0037     forceBestTrackEmbedding = cms.bool(False), ## force embedding separately the best tracks even if they're already embedded e.g. as tracker or global tracks
0038     embedTrack          = cms.bool(False), ## embed in AOD externally stored tracker track
0039     embedCombinedMuon   = cms.bool(True),  ## embed in AOD externally stored combined muon track
0040     embedStandAloneMuon = cms.bool(True),  ## embed in AOD externally stored standalone muon track
0041     embedPickyMuon      = cms.bool(True),  ## embed in AOD externally stored TeV-refit picky muon track
0042     embedTpfmsMuon      = cms.bool(True),  ## embed in AOD externally stored TeV-refit TPFMS muon track
0043     embedDytMuon        = cms.bool(True),  ## embed in AOD externally stored TeV-refit DYT muon track
0044     embedPFCandidate    = cms.bool(True),  ## embed in AOD externally stored particle flow candidate
0045 
0046     # embedding of muon MET corrections for caloMET
0047     embedCaloMETMuonCorrs = cms.bool(True),
0048     caloMETMuonCorrs = cms.InputTag("muonMETValueMapProducer"  , "muCorrData"),
0049     # embedding of muon MET corrections for tcMET
0050     embedTcMETMuonCorrs   = cms.bool(False), # removed from RECO/AOD!
0051     tcMETMuonCorrs   = cms.InputTag("muonTCMETValueMapProducer", "muCorrData"),
0052 
0053     # embed IsoDeposits
0054     isoDeposits = cms.PSet(
0055         #user    = cms.VInputTag(
0056         #             cms.InputTag("muIsoDepositCalByAssociatorTowers","ho"),
0057         #             cms.InputTag("muIsoDepositJets")
0058         #          ),
0059     ),
0060 
0061     # user defined isolation variables the variables defined here will be accessible
0062     # via pat::Muon::userIsolation(IsolationKeys key) with the key as defined in
0063     # DataFormats/PatCandidates/interface/Isolation.h
0064     userIsolation = cms.PSet(
0065         #user = cms.VPSet(cms.PSet(
0066         #    src = cms.InputTag("muIsoDepositCalByAssociatorTowers","ho"),
0067         #    deltaR = cms.double(0.3)
0068         #    ),
0069         #    cms.PSet(
0070         #        src = cms.InputTag("muIsoDepositJets"),
0071         #        deltaR = cms.double(0.3)
0072         #    )),
0073     ),
0074     # Read and store combined inverse beta
0075     addInverseBeta    = cms.bool(True),  
0076     sourceMuonTimeExtra = cms.InputTag("muons","combined"), #Use combined info, not only csc or dt
0077     # mc matching
0078     addGenMatch   = cms.bool(True),
0079     embedGenMatch = cms.bool(True),
0080     genParticleMatch = cms.required.allowed(cms.InputTag, cms.VInputTag, default = cms.InputTag("muonMatch")), ## particles source to be used for the matching
0081 
0082     # efficiencies
0083     addEfficiencies = cms.bool(False),
0084     efficiencies    = cms.PSet(),
0085 
0086     # resolution configurables
0087     addResolutions  = cms.bool(False),
0088     resolutions      = cms.PSet(),
0089 
0090     # high level selections
0091     embedHighLevelSelection = cms.bool(True),
0092     beamLineSrc             = cms.InputTag("offlineBeamSpot"),
0093     pvSrc                   = cms.InputTag("offlinePrimaryVertices"),
0094 
0095     # ecal PF energy
0096     embedPfEcalEnergy = cms.bool(True),
0097     addPuppiIsolation = cms.bool(False),
0098 
0099     # Compute and store Mini-Isolation.
0100     # Implemention and a description of parameters can be found in:
0101     # PhysicsTools/PatUtils/src/PFIsolation.cc
0102     # only works in miniaod, so set to True in miniAOD_tools.py
0103     computeMiniIso = cms.bool(False),
0104     effectiveAreaVec = cms.vdouble(0.0566, 0.0562, 0.0363, 0.0119, 0.0064),
0105     pfCandsForMiniIso = cms.InputTag("packedPFCandidates"),
0106     miniIsoParams = cms.vdouble(0.05, 0.2, 10.0, 0.5, 0.0001, 0.01, 0.01, 0.01, 0.0),
0107 
0108     computePuppiCombinedIso = cms.bool(False),
0109     # Standard Muon Selectors and Jet-related observables
0110     # Depends on MiniIsolation, so only works in miniaod
0111     # Don't forget to set flags properly in miniAOD_tools.py                      
0112     computeMuonIDMVA = cms.bool(False),
0113     mvaIDTrainingFile      = cms.FileInPath("RecoMuon/MuonIdentification/data/mvaID.onnx"),
0114     mvaIDwpMedium = cms.double(0.08),
0115     mvaIDwpTight = cms.double(0.20),
0116     recomputeBasicSelectors = cms.bool(True),
0117     useJec = cms.bool(True),
0118     mvaDrMax = cms.double(0.4),
0119     mvaJetTag = cms.InputTag("pfCombinedInclusiveSecondaryVertexV2BJetTags"),
0120     mvaL1Corrector = cms.InputTag("ak4PFCHSL1FastjetCorrector"),
0121     mvaL1L2L3ResCorrector = cms.InputTag("ak4PFCHSL1FastL2L3Corrector"),
0122     rho = cms.InputTag("fixedGridRhoFastjetCentralNeutral"),
0123 
0124     computeSoftMuonMVA = cms.bool(False),
0125     softMvaTrainingFile = cms.FileInPath("RecoMuon/MuonIdentification/data/TMVA-muonid-bmm4-B-25.weights.xml"),
0126     softMvaRun3Model = cms.string("RecoMuon/MuonIdentification/data/Run2022-20231030-1731-Event0"),
0127 
0128     # MC Info
0129     muonSimInfo = cms.InputTag("muonSimClassifier"),                 
0130 
0131     # Trigger Info 
0132     addTriggerMatching = cms.bool(False),                      
0133     triggerObjects = cms.InputTag("slimmedPatTrigger"),
0134     triggerResults = cms.InputTag("TriggerResults","","HLT"),
0135     hltCollectionFilters = cms.vstring('*')
0136 )
0137 
0138 from Configuration.Eras.Modifier_run3_common_cff import run3_common
0139 run3_common.toModify(patMuons,
0140                      mvaJetTag = cms.InputTag("pfDeepCSVJetTags:probb"),
0141 )
0142 
0143