1 import FWCore.ParameterSet.Config
as cms
4 from CommonTools.RecoUtils.leptonFSRProducer_cfi
import leptonFSRProducer
5 leptonFSRphotons = leptonFSRProducer.clone(
6 packedPFCandidates =
"packedPFCandidates",
7 slimmedElectrons =
"slimmedElectrons",
8 muons =
"linkedObjects:muons",
9 electrons =
"linkedObjects:electrons",
12 fsrTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
13 src = cms.InputTag(
"leptonFSRphotons"),
15 name = cms.string(
"FsrPhoton"),
16 doc = cms.string(
"Final state radiation photons emitted by muons or electrons"),
17 singleton = cms.bool(
False),
18 extension = cms.bool(
False),
19 variables = cms.PSet(P3Vars,
20 relIso03 =
Var(
"userFloat('relIso03')",float,doc=
"relative isolation in a 0.3 cone without CHS"),
21 dROverEt2 =
Var(
"userFloat('dROverEt2')",float,doc=
"deltaR to associated muon divided by photon et2"),
22 muonIdx =
Var(
"?hasUserCand('associatedMuon')?userCand('associatedMuon').key():-1",int, doc=
"index of associated muon"),
23 electronIdx =
Var(
"?hasUserCand('associatedElectron')?userCand('associatedElectron').key():-1",int, doc=
"index of associated electron")
27 fsrTablesTask = cms.Task(leptonFSRphotons,fsrTable)
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)