1 import FWCore.ParameterSet.Config
as cms
4 finalIsolatedTracks = cms.EDProducer(
"IsolatedTrackCleaner",
5 tracks = cms.InputTag(
"isolatedTracks"),
6 cut = cms.string(
"((pt>5 && (abs(pdgId) == 11 || abs(pdgId) == 13)) || pt > 10) && (abs(pdgId) < 15 || abs(eta) < 2.5) && ((abs(dxy) < 0.2 && abs(dz) < 0.1) || pt>15) && ((pfIsolationDR03().chargedHadronIso < 5 && pt < 25) || pfIsolationDR03().chargedHadronIso/pt < 0.2)"),
7 finalLeptons = cms.VInputTag(
8 cms.InputTag(
"finalElectrons"),
9 cms.InputTag(
"finalLooseMuons"),
13 isoForIsoTk = cms.EDProducer(
"IsoTrackIsoValueMapProducer",
14 src = cms.InputTag(
"finalIsolatedTracks"),
15 relative = cms.bool(
True),
16 rho_MiniIso = cms.InputTag(
"fixedGridRhoFastjetAll"),
17 EAFile_MiniIso = cms.FileInPath(
"PhysicsTools/NanoAOD/data/effAreaMuons_cone03_pfNeuHadronsAndPhotons_80X.txt"),
20 isFromLostTrackForIsoTk = cms.EDProducer(
"IsFromLostTrackMapProducer",
21 srcIsoTracks = cms.InputTag(
"finalIsolatedTracks"),
22 packedPFCandidates = cms.InputTag(
"packedPFCandidates"),
23 lostTracks = cms.InputTag(
"lostTracks"),
26 isoTrackTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
27 src = cms.InputTag(
"finalIsolatedTracks"),
29 name = cms.string(
"IsoTrack"),
30 doc = cms.string(
"isolated tracks after basic selection (" + finalIsolatedTracks.cut.value() +
") and lepton veto"),
31 singleton = cms.bool(
False),
32 extension = cms.bool(
False),
33 variables = cms.PSet(P3Vars,
34 dz =
Var(
"dz",float,doc=
"dz (with sign) wrt first PV, in cm",precision=10),
35 dxy =
Var(
"dxy",float,doc=
"dxy (with sign) wrt first PV, in cm",precision=10),
36 pfRelIso03_chg =
Var(
"pfIsolationDR03().chargedHadronIso/pt",float,doc=
"PF relative isolation dR=0.3, charged component",precision=10),
37 pfRelIso03_all =
Var(
"(pfIsolationDR03().chargedHadronIso + max(pfIsolationDR03().neutralHadronIso + pfIsolationDR03().photonIso - pfIsolationDR03().puChargedHadronIso/2,0.0))/pt",float,doc=
"PF relative isolation dR=0.3, total (deltaBeta corrections)",precision=10),
38 isPFcand =
Var(
"packedCandRef().isNonnull()",bool,doc=
"if isolated track is a PF candidate"),
39 fromPV =
Var(
"fromPV", int, doc=
"isolated track comes from PV"),
40 pdgId =
Var(
"pdgId",int,doc=
"PDG id of PF cand"),
41 isHighPurityTrack =
Var(
"isHighPurityTrack",bool,doc=
"track is high purity"),
42 charge =
Var(
"charge", int, doc=
"electric charge"),
44 externalVariables = cms.PSet(
45 miniPFRelIso_chg =
ExtVar(
"isoForIsoTk:miniIsoChg",float,doc=
"mini PF relative isolation, charged component",precision=10),
46 miniPFRelIso_all =
ExtVar(
"isoForIsoTk:miniIsoAll",float,doc=
"mini PF relative isolation, total (with scaled rho*EA PU corrections)",precision=10),
47 isFromLostTrack =
ExtVar(
"isFromLostTrackForIsoTk:isFromLostTrack",bool,doc=
"if isolated track comes from a lost track"),
51 isoTrackSequence = cms.Sequence(finalIsolatedTracks + isoForIsoTk + isFromLostTrackForIsoTk)
52 isoTrackTables = cms.Sequence(isoTrackTable)