File indexing completed on 2024-04-06 12:24:15
0001 import FWCore.ParameterSet.Config as cms
0002
0003 process = cms.Process("TagProbe")
0004
0005 process.load('FWCore.MessageService.MessageLogger_cfi')
0006 process.options = cms.untracked.PSet(
0007 wantSummary = cms.untracked.bool(True),
0008 )
0009 process.MessageLogger.cerr.FwkReport.reportEvery = 100
0010
0011 process.source = cms.Source("PoolSource",
0012 fileNames = cms.untracked.vstring('file:JpsiMM_7TeV_cfi_py_GEN_FASTSIM.root'),
0013 )
0014 process.maxEvents = cms.untracked.PSet(
0015 input = cms.untracked.int32(-1),
0016 )
0017
0018
0019 from RecoMuon.MuonIdentification.calomuons_cfi import calomuons;
0020 process.allMuons = cms.EDProducer("CaloMuonMerger",
0021 muons = cms.InputTag("muons"),
0022 caloMuons = cms.InputTag("calomuons"),
0023 minCaloCompatibility = calomuons.minCaloCompatibility,
0024 )
0025
0026
0027 process.muMcMatch = cms.EDFilter("MCTruthDeltaRMatcherNew",
0028 pdgId = cms.vint32(13),
0029 src = cms.InputTag("allMuons"),
0030 distMin = cms.double(0.1),
0031 matched = cms.InputTag("genParticles"),
0032 )
0033
0034
0035 process.tagMuons = cms.EDFilter("MuonRefSelector",
0036 src = cms.InputTag("allMuons"),
0037 cut = cms.string("isGlobalMuon"),
0038 )
0039
0040
0041 process.caloProbes = cms.EDFilter("MuonRefSelector",
0042 src = cms.InputTag("allMuons"),
0043 cut = cms.string("isCaloMuon"),
0044 )
0045
0046
0047 process.caloPassingGlb = cms.EDFilter("MuonRefSelector",
0048 src = cms.InputTag("allMuons"),
0049 cut = cms.string("isCaloMuon && isGlobalMuon"),
0050 )
0051
0052
0053 process.tagProbePairs = cms.EDProducer("CandViewShallowCloneCombiner",
0054 decay = cms.string("tagMuons@+ caloProbes@-"),
0055 cut = cms.string("2.6 < mass < 3.6"),
0056 )
0057
0058
0059 process.MuonID = cms.EDAnalyzer("TagProbeFitTreeProducer",
0060 tagProbePairs = cms.InputTag("tagProbePairs"),
0061 arbitration = cms.string("OneProbe"),
0062 variables = cms.PSet(
0063 pt = cms.string("pt"),
0064 eta = cms.string("eta"),
0065 abseta = cms.string("abs(eta)"),
0066 ),
0067 flags = cms.PSet(
0068 Glb = cms.InputTag("caloPassingGlb"),
0069 TM = cms.string("isTrackerMuon"),
0070 ),
0071 isMC = cms.bool(True),
0072 tagMatches = cms.InputTag("muMcMatch"),
0073 probeMatches = cms.InputTag("muMcMatch"),
0074 motherPdgId = cms.int32(443),
0075 makeMCUnbiasTree = cms.bool(False),
0076
0077
0078 addRunLumiInfo = cms.bool(True),
0079 )
0080
0081 process.tagAndProbe = cms.Path(
0082 process.allMuons *
0083 process.muMcMatch *
0084 process.tagMuons *
0085 process.caloProbes *
0086 process.caloPassingGlb *
0087 process.tagProbePairs *
0088 process.MuonID
0089 )
0090
0091 process.TFileService = cms.Service("TFileService", fileName = cms.string("testTagProbeFitTreeProducer_JPsiMuMu.root"))