13 nanoMetadata = cms.EDProducer(
"UniqueStringProducer",
15 tag = cms.string(
"untagged"),
19 nanogenSequence = cms.Sequence(
24 genJetFlavourAssociation+
27 genJetAK8FlavourAssociation+
28 genJetAK8FlavourTable+
30 tauGenJetsSelectorAllHadrons+
45 process.rivetMetTable.extension =
False
46 process.lheInfoTable.storeLHEParticles =
True
47 process.lheInfoTable.precision = 14
48 process.genWeightsTable.keepAllPSWeights =
True
49 process.genJetFlavourAssociation.jets = process.genJetTable.src
50 process.genJetFlavourTable.src = process.genJetTable.src
51 process.genJetAK8FlavourAssociation.jets = process.genJetAK8Table.src
52 process.genJetAK8FlavourTable.src = process.genJetAK8Table.src
53 process.particleLevel.particleMaxEta = 999.
54 process.particleLevel.lepMinPt = 0.
55 process.particleLevel.lepMaxEta = 999.
56 process.genJetFlavourTable.jetFlavourInfos =
"genJetFlavourAssociation"
63 process.nanogenSequence.insert(0, process.genParticles2HepMCHiggsVtx)
64 process.nanogenSequence.insert(0, process.genParticles2HepMC)
65 process.nanogenSequence.insert(0, process.mergedGenParticles)
67 (run2_nanoAOD_92X | run2_miniAOD_80XLegacy | run2_nanoAOD_94X2016 | run2_nanoAOD_94X2016 | \
68 run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94XMiniAODv2 | \
69 run2_nanoAOD_102Xv1).toReplaceWith(nanogenSequence, nanogenSequence.copyAndExclude([genVertexTable, genVertexT0Table]))
71 process.metMCTable.src =
"slimmedMETs"
72 process.metMCTable.variables.pt =
Var(
"genMET.pt", float, doc=
"pt")
73 process.metMCTable.variables.phi =
Var(
"genMET.phi", float, doc=
"phi")
74 process.metMCTable.variables.phi.precision = CandVars.phi.precision
76 process.rivetProducerHTXS.HepMCCollection =
"genParticles2HepMCHiggsVtx:unsmeared"
77 process.genParticleTable.src =
"prunedGenParticles"
78 process.patJetPartons.particles =
"prunedGenParticles"
79 process.particleLevel.src =
"genParticles2HepMC:unsmeared"
81 process.genJetTable.src =
"slimmedGenJets"
82 process.genJetAK8Table.src =
"slimmedGenJetsAK8"
83 process.tauGenJets.GenParticles =
"prunedGenParticles"
84 process.genVisTaus.srcGenParticles =
"prunedGenParticles"
91 process.metMCTable.src =
"genMetTrue"
92 process.metMCTable.variables = cms.PSet(PTVars)
94 process.rivetProducerHTXS.HepMCCollection =
"generatorSmeared"
95 process.genParticleTable.src =
"genParticles"
96 process.patJetPartons.particles =
"genParticles"
97 process.particleLevel.src =
"generatorSmeared"
99 process.genJetTable.src =
"ak4GenJets"
100 process.genJetAK8Table.src =
"ak8GenJets"
101 process.tauGenJets.GenParticles =
"genParticles"
102 process.genVisTaus.srcGenParticles =
"genParticles"
105 process.nanogenSequence.remove(process.genParticles2HepMCHiggsVtx)
106 process.nanogenSequence.remove(process.genParticles2HepMC)
107 process.nanogenSequence.remove(process.mergedGenParticles)
113 process.finalGenParticles = finalGenParticles.clone()
114 process.genParticleTable.src =
"prunedGenParticles"
115 process.patJetPartons.particles =
"prunedGenParticles"
116 process.nanogenSequence.insert(0, process.finalGenParticles)
121 if process.nanogenSequence.contains(process.mergedGenParticles):
122 raise ValueError(
"Applying the MiniAOD genParticle pruner to MiniAOD is redunant. " \
123 "Use a different customization.")
125 process.prunedGenParticles = prunedGenParticles.clone()
126 process.genParticleTable.src =
"prunedGenParticles"
127 process.patJetPartons.particles =
"prunedGenParticles"
128 process.nanogenSequence.insert(0, process.prunedGenParticles)
137 process.genParticleTable.variables.pt.precision = precision
138 process.genJetTable.variables.pt.precision = precision
139 process.metMCTable.variables.pt.precision = precision
143 process.genParticleTable.variables.eta.precision = precision
144 process.genJetTable.variables.eta.precision = precision
148 process.genParticleTable.variables.phi.precision = precision
149 process.genJetTable.variables.phi.precision = precision
150 process.metMCTable.variables.phi.precision = precision
154 process.lheInfoTable.precision = 23
158 process.genWeightsTable.lheWeightPrecision = 23