1 import FWCore.ParameterSet.Config
as cms
3 from PhysicsTools.NanoAOD.simpleCandidateFlatTableProducer_cfi
import simpleCandidateFlatTableProducer
4 from PhysicsTools.NanoAOD.simpleSingletonCandidateFlatTableProducer_cfi
import simpleSingletonCandidateFlatTableProducer
5 from PhysicsTools.NanoAOD.simpleHTXSFlatTableProducer_cfi
import simpleHTXSFlatTableProducer
9 mergedGenParticles = cms.EDProducer(
"MergedGenParticleProducer",
10 inputPruned = cms.InputTag(
"prunedGenParticles"),
11 inputPacked = cms.InputTag(
"packedGenParticles"),
14 genParticles2HepMC = cms.EDProducer(
"GenParticles2HepMCConverter",
15 genParticles = cms.InputTag(
"mergedGenParticles"),
16 genEventInfo = cms.InputTag(
"generator"),
17 signalParticlePdgIds = cms.vint32(),
20 genParticles2HepMCHiggsVtx = cms.EDProducer(
"GenParticles2HepMCConverter",
21 genParticles = cms.InputTag(
"mergedGenParticles"),
22 genEventInfo = cms.InputTag(
"generator"),
23 signalParticlePdgIds = cms.vint32(25),
27 particleLevel = cms.EDProducer(
"ParticleLevelProducer",
28 src = cms.InputTag(
"genParticles2HepMC:unsmeared"),
30 doJetClustering = cms.bool(
False),
31 usePromptFinalStates = cms.bool(
True),
32 excludePromptLeptonsFromJetClustering = cms.bool(
False),
33 excludeNeutrinosFromJetClustering = cms.bool(
True),
35 particleMinPt = cms.double(0.),
36 particleMaxEta = cms.double(5.),
38 lepConeSize = cms.double(0.1),
39 lepMinPt = cms.double(1.),
40 lepMaxEta = cms.double(2.5),
42 jetConeSize = cms.double(0.4),
43 jetMinPt = cms.double(10.),
44 jetMaxEta = cms.double(999.),
46 fatJetConeSize = cms.double(0.8),
47 fatJetMinPt = cms.double(170.),
48 fatJetMaxEta = cms.double(999.),
50 phoIsoConeSize = cms.double(0.4),
51 phoMaxRelIso = cms.double(0.5),
52 phoMinPt = cms.double(1.),
53 phoMaxEta = cms.double(2.5),
56 rivetProducerHTXS = cms.EDProducer(
'HTXSRivetProducer',
57 HepMCCollection = cms.InputTag(
'genParticles2HepMCHiggsVtx',
'unsmeared'),
58 LHERunInfo = cms.InputTag(
'externalLHEProducer'),
59 ProductionMode = cms.string(
'AUTO'),
64 rivetLeptonTable = simpleCandidateFlatTableProducer.clone(
65 src = cms.InputTag(
"particleLevel:leptons"),
66 cut = cms.string(
"pt > 15"),
67 name= cms.string(
"GenDressedLepton"),
68 doc = cms.string(
"Dressed leptons from Rivet-based ParticleLevelProducer"),
69 externalVariables = cms.PSet(
70 hasTauAnc =
ExtVar(cms.InputTag(
"tautagger"),bool, doc=
"true if Dressed lepton has a tau as ancestor"),
74 pdgId =
Var(
"pdgId", int, doc=
"PDG id"),
78 rivetPhotonTable = simpleCandidateFlatTableProducer.clone(
79 src = cms.InputTag(
"particleLevel:photons"),
80 cut = cms.string(
"pt > 10"),
81 name= cms.string(
"GenIsolatedPhoton"),
82 doc = cms.string(
"Isolated photons from Rivet-based ParticleLevelProducer"),
88 tautagger = cms.EDProducer(
"GenJetTauTaggerProducer",
89 src = rivetLeptonTable.src,
92 rivetMetTable = simpleSingletonCandidateFlatTableProducer.clone(
93 src = cms.InputTag(
"particleLevel:mets"),
94 name = cms.string(
"MET"),
95 doc = cms.string(
"MET from Rivet-based ParticleLevelProducer in fiducial volume abs(eta)<5"),
96 extension = cms.bool(
True),
98 fiducialGenPt =
Var(
"pt", float, precision=10),
99 fiducialGenPhi =
Var(
"phi", float, precision=10),
103 HTXSCategoryTable = simpleHTXSFlatTableProducer.clone(
104 src = cms.InputTag(
"rivetProducerHTXS",
"HiggsClassification"),
105 name = cms.string(
"HTXS"),
106 doc = cms.string(
"HTXS classification"),
108 stage_0 =
Var(
"stage0_cat",int, doc=
"HTXS stage-0 category"),
109 stage_1_pTjet30 =
Var(
"stage1_cat_pTjet30GeV",int, doc=
"HTXS stage-1 category (jet pt>30 GeV)"),
110 stage_1_pTjet25 =
Var(
"stage1_cat_pTjet25GeV",int, doc=
"HTXS stage-1 category (jet pt>25 GeV)"),
111 stage1_1_cat_pTjet30GeV =
Var(
"stage1_1_cat_pTjet30GeV",int,doc=
"HTXS stage-1.1 category(jet pt>30 GeV)"),
112 stage1_1_cat_pTjet25GeV =
Var(
"stage1_1_cat_pTjet25GeV",int,doc=
"HTXS stage-1.1 category(jet pt>25 GeV)"),
113 stage1_1_fine_cat_pTjet30GeV =
Var(
"stage1_1_fine_cat_pTjet30GeV",int,doc=
"HTXS stage-1.1-fine category(jet pt>30 GeV)"),
114 stage1_1_fine_cat_pTjet25GeV =
Var(
"stage1_1_fine_cat_pTjet25GeV",int,doc=
"HTXS stage-1.1-fine category(jet pt>25 GeV)"),
115 stage1_2_cat_pTjet30GeV =
Var(
"stage1_2_cat_pTjet30GeV",int,doc=
"HTXS stage-1.2 category(jet pt>30 GeV)"),
116 stage1_2_cat_pTjet25GeV =
Var(
"stage1_2_cat_pTjet25GeV",int,doc=
"HTXS stage-1.2 category(jet pt>25 GeV)"),
117 stage1_2_fine_cat_pTjet30GeV =
Var(
"stage1_2_fine_cat_pTjet30GeV",int,doc=
"HTXS stage-1.2-fine category(jet pt>30 GeV)"),
118 stage1_2_fine_cat_pTjet25GeV =
Var(
"stage1_2_fine_cat_pTjet25GeV",int,doc=
"HTXS stage-1.2-fine category(jet pt>25 GeV)"),
119 Higgs_pt =
Var(
"higgs.Pt()",float, doc=
"pt of the Higgs boson as identified in HTXS", precision=14),
120 Higgs_y =
Var(
"higgs.Rapidity()",float, doc=
"rapidity of the Higgs boson as identified in HTXS", precision=12),
121 njets30 =
Var(
"jets30.size()",
"uint8", doc=
"number of jets with pt>30 GeV as identified in HTXS"),
122 njets25 =
Var(
"jets25.size()",
"uint8", doc=
"number of jets with pt>25 GeV as identified in HTXS"),
126 lheInfoTable = cms.EDProducer(
"LHETablesProducer",
127 lheInfo = cms.VInputTag(cms.InputTag(
"externalLHEProducer"), cms.InputTag(
"source")),
128 precision = cms.int32(14),
129 storeLHEParticles = cms.bool(
True)
132 particleLevelTask = cms.Task(mergedGenParticles,genParticles2HepMC,particleLevel,tautagger,genParticles2HepMCHiggsVtx,rivetProducerHTXS)
133 particleLevelTablesTask = cms.Task(rivetLeptonTable,rivetPhotonTable,rivetMetTable,HTXSCategoryTable,lheInfoTable)
def ExtVar(tag, valtype, doc=None, precision=-1)
def Var(expr, valtype, doc=None, precision=-1)