8 trackingParticlesNoSimHits = mix.clone(
10 mergedtruth = mix.digitizers.mergedtruth.clone(
11 simHitCollections = cms.PSet(
12 pixel = cms.VInputTag(),
13 tracker = cms.VInputTag(),
14 muon = cms.VInputTag(),
18 mixObjects = cms.PSet(
19 mixHepMC = mix.mixObjects.mixHepMC.clone(),
20 mixVertices = mix.mixObjects.mixVertices.clone(),
21 mixTracks = mix.mixObjects.mixTracks.clone(),
26 classByHitsTM = cms.EDProducer(
"MuonMCClassifier",
27 muons = cms.InputTag(
"muons"),
28 muonPreselection = cms.string(
"isTrackerMuon"),
30 trackType = cms.string(
"segments"),
31 trackingParticles = cms.InputTag(
"trackingParticlesNoSimHits",
"MergedTrackTruth"),
32 associatorLabel = cms.string(
"muonAssociatorByHitsNoSimHitsHelper"),
33 decayRho = cms.double(200),
34 decayAbsZ = cms.double(400),
35 linkToGenParticles = cms.bool(
True),
36 genParticles = cms.InputTag(
"genParticles"),
38 classByHitsTMLSAT = classByHitsTM.clone(
39 muonPreselection = cms.string(
"muonID('TMLastStationAngTight')")
41 classByHitsGlb = classByHitsTM.clone(
42 muonPreselection = cms.string(
"isGlobalMuon"),
45 classByHitsSta = classByHitsTM.clone(
46 muonPreselection = cms.string(
"isStandAloneMuon"),
51 muonClassificationByHits = cms.Sequence(
53 trackingParticlesNoSimHits +
54 muonAssociatorByHitsNoSimHitsHelper +
60 def addUserData(patMuonProducer,labels=['classByHitsGlb', 'classByHitsTM', 'classByHitsTMLSAT', 'classByHitsSta'], extraInfo = False):
62 patMuonProducer.userData.userInts.src.append( cms.InputTag(label) )
63 patMuonProducer.userData.userInts.src.append( cms.InputTag(label,
"ext") )
65 for ints
in (
"flav",
"hitsPdgId",
"momPdgId",
"gmomPdgId",
"momFlav",
"gmomFlav",
"hmomFlav",
"tpId",
"momStatus"):
66 patMuonProducer.userData.userInts.src.append(cms.InputTag(label, ints))
67 for ins
in (
"prodRho",
"prodZ",
"tpAssoQuality",
"momRho",
"momZ"):
68 patMuonProducer.userData.userFloats.src.append(cms.InputTag(label, ins))
70 patMuonProducer.addGenMatch =
True 71 patMuonProducer.genParticleMatch = cms.VInputTag(cms.InputTag(label,
"toPrimaries"), cms.InputTag(label,
"toSecondaries"))
def addGenParticleRef(patMuonProducer, label='classByHitsGlb')
def addUserData(patMuonProducer, labels=['classByHitsGlb', classByHitsTM, classByHitsTMLSAT, classByHitsSta, extraInfo=False)