Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-11 23:32:38

0001 import FWCore.ParameterSet.Config as cms
0002 from PhysicsTools.NanoAOD.common_cff import *
0003 
0004 from CommonTools.RecoUtils.leptonFSRProducer_cfi import leptonFSRProducer
0005 leptonFSRphotons = leptonFSRProducer.clone(
0006   packedPFCandidates = "packedPFCandidates",
0007   slimmedElectrons = "slimmedElectrons", #for footrprint veto
0008   muons = "linkedObjects:muons",
0009   electrons = "linkedObjects:electrons",
0010 )
0011 
0012 fsrTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
0013     src = cms.InputTag("leptonFSRphotons"),
0014     cut = cms.string(""), #we should not filter on cross linked collections
0015     name = cms.string("FsrPhoton"),
0016     doc  = cms.string("Final state radiation photons emitted by muons or electrons"),
0017     singleton = cms.bool(False), # the number of entries is variable
0018     extension = cms.bool(False), # this is the main table for the muons
0019     variables = cms.PSet(P3Vars,
0020         relIso03 = Var("userFloat('relIso03')",float,doc="relative isolation in a 0.3 cone without CHS"),
0021         dROverEt2 = Var("userFloat('dROverEt2')",float,doc="deltaR to associated muon divided by photon et2"),
0022         muonIdx = Var("?hasUserCand('associatedMuon')?userCand('associatedMuon').key():-1",int, doc="index of associated muon"),
0023         electronIdx = Var("?hasUserCand('associatedElectron')?userCand('associatedElectron').key():-1",int, doc="index of associated electron")
0024         )
0025     )
0026 
0027 fsrTablesTask =  cms.Task(leptonFSRphotons,fsrTable)