5 trackingParticlesNoSimHits = mix.clone(
7 mergedtruth = theDigitizersValid.mergedtruth.clone(
8 simHitCollections = cms.PSet(
9 pixel = cms.VInputTag(),
10 tracker = cms.VInputTag(),
11 muon = cms.VInputTag(),
15 mixObjects = cms.PSet(
16 mixHepMC = mix.mixObjects.mixHepMC.clone(),
17 mixVertices = mix.mixObjects.mixVertices.clone(),
18 mixTracks = mix.mixObjects.mixTracks.clone(),
24 classByHitsTM = cms.EDProducer(
"MuonMCClassifier",
25 muons = cms.InputTag(
"muons"),
26 muonPreselection = cms.string(
"muonID('TrackerMuonArbitrated')"),
27 trackType = cms.string(
"segments"),
28 trackingParticles = cms.InputTag(
"trackingParticlesNoSimHits",
"MergedTrackTruth"),
29 associatorLabel = cms.InputTag(
"muonAssociatorByHitsNoSimHitsHelper"),
30 decayRho = cms.double(200),
31 decayAbsZ = cms.double(400),
32 linkToGenParticles = cms.bool(
True),
33 genParticles = cms.InputTag(
"genParticles"),
35 classByHitsTMLSAT = classByHitsTM.clone(
36 muonPreselection = cms.string(
"muonID('TMLastStationAngTight')")
38 classByHitsGlb = classByHitsTM.clone(
39 muonPreselection = cms.string(
"isGlobalMuon"),
42 classByHitsSta = classByHitsTM.clone(
43 muonPreselection = cms.string(
"isStandAloneMuon"),
46 classByHitsGlbOrTrk = classByHitsTM.clone(
47 muonPreselection = cms.string(
"isGlobalMuon || muonID('TrackerMuonArbitrated')"),
48 trackType =
"glb_or_trk" 52 muonClassificationByHits = cms.Sequence(
53 trackingParticlesNoSimHits +
54 muonAssociatorByHitsNoSimHitsHelper +
64 def addUserData(patMuonProducer,labels=['classByHitsGlbOrTrk'], extraInfo = False):
66 patMuonProducer.userData.userInts.src.append( cms.InputTag(label) )
67 patMuonProducer.userData.userInts.src.append( cms.InputTag(label,
"ext") )
69 for ints
in (
"flav",
"hitsPdgId",
"G4processType",
"momPdgId",
"gmomPdgId",
"momFlav",
"gmomFlav",
"hmomFlav",
"tpId",
"tpBx",
"tpEv",
"momStatus"):
70 patMuonProducer.userData.userInts.src.append(cms.InputTag(label, ints))
71 for ins
in (
"signp",
"pt",
"eta",
"phi",
"prodRho",
"prodZ",
"tpAssoQuality",
"momRho",
"momZ"):
73 patMuonProducer.userData.userFloats.src.append(cms.InputTag(label, ins))
76 patMuonProducer.addGenMatch =
True 77 patMuonProducer.genParticleMatch = cms.VInputTag(cms.InputTag(label,
"toPrimaries"), cms.InputTag(label,
"toSecondaries"))
def addGenParticleRef(patMuonProducer, label='classByHitsGlbOrTrk')
def addUserData(patMuonProducer, labels=['classByHitsGlbOrTrk'], extraInfo=False)