13 nanoMetadata = cms.EDProducer(
"UniqueStringProducer",
15 tag = cms.string(
"untagged"),
19 nanogenSequence = cms.Sequence(
24 genJetFlavourAssociation+
27 genJetAK8FlavourAssociation+
28 genJetAK8FlavourTable+
42 process.rivetMetTable.extension =
False 43 process.lheInfoTable.storeLHEParticles =
True 44 process.lheInfoTable.precision = 14
45 process.genWeightsTable.keepAllPSWeights =
True 46 process.genJetFlavourAssociation.jets = process.genJetTable.src
47 process.genJetFlavourTable.src = process.genJetTable.src
48 process.genJetAK8FlavourAssociation.jets = process.genJetAK8Table.src
49 process.genJetAK8FlavourTable.src = process.genJetAK8Table.src
50 process.particleLevel.particleMaxEta = 999.
51 process.particleLevel.lepMinPt = 0.
52 process.particleLevel.lepMaxEta = 999.
53 process.genJetFlavourTable.jetFlavourInfos =
"genJetFlavourAssociation" 61 process.nanogenSequence.insert(0, process.genParticles2HepMCHiggsVtx)
62 process.nanogenSequence.insert(0, process.genParticles2HepMC)
63 process.nanogenSequence.insert(0, process.mergedGenParticles)
65 (run2_nanoAOD_92X | run2_miniAOD_80XLegacy | run2_nanoAOD_94X2016 | run2_nanoAOD_94X2016 | \
66 run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94XMiniAODv2 | \
67 run2_nanoAOD_102Xv1).toReplaceWith(nanogenSequence, nanogenSequence.copyAndExclude([genVertexTable, genVertexT0Table]))
69 process.metMCTable.src =
"slimmedMETs" 70 process.metMCTable.variables.pt =
Var(
"genMET.pt", float, doc=
"pt")
71 process.metMCTable.variables.phi =
Var(
"genMET.phi", float, doc=
"phi")
72 process.metMCTable.variables.phi.precision = CandVars.phi.precision
74 process.rivetProducerHTXS.HepMCCollection =
"genParticles2HepMCHiggsVtx:unsmeared" 75 process.genParticleTable.src =
"prunedGenParticles" 76 process.patJetPartons.particles =
"prunedGenParticles" 77 process.particleLevel.src =
"genParticles2HepMC:unsmeared" 79 process.genJetTable.src =
"slimmedGenJets" 80 process.genJetAK8Table.src =
"slimmedGenJetsAK8" 81 process.tauGenJetsForNano.GenParticles =
"prunedGenParticles" 82 process.genVisTaus.srcGenParticles =
"prunedGenParticles" 89 process.metMCTable.src =
"genMetTrue" 90 process.metMCTable.variables = cms.PSet(PTVars)
92 process.rivetProducerHTXS.HepMCCollection =
"generatorSmeared" 93 process.genParticleTable.src =
"genParticles" 94 process.patJetPartons.particles =
"genParticles" 95 process.particleLevel.src =
"generatorSmeared" 97 process.genJetTable.src =
"ak4GenJets" 98 process.genJetAK8Table.src =
"ak8GenJets" 99 process.tauGenJetsForNano.GenParticles =
"genParticles" 100 process.genVisTaus.srcGenParticles =
"genParticles" 103 process.nanogenSequence.remove(process.genParticles2HepMCHiggsVtx)
104 process.nanogenSequence.remove(process.genParticles2HepMC)
105 process.nanogenSequence.remove(process.mergedGenParticles)
111 process.finalGenParticles.src = process.genParticleTable.src.getModuleLabel()
112 process.genParticleTable.src =
"finalGenParticles" 113 process.nanogenSequence.insert(0, process.finalGenParticles)
118 if process.nanogenSequence.contains(process.mergedGenParticles):
119 raise ValueError(
"Applying the MiniAOD genParticle pruner to MiniAOD is redunant. " \
120 "Use a different customization.")
122 process.prunedGenParticles = prunedGenParticles.clone()
123 process.prunedGenParticles.src =
"genParticles" 124 process.genParticleTable.src =
"prunedGenParticles" 126 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.genParticleTable.variables.mass.precision = precision
155 process.genJetTable.variables.mass.precision = precision
159 process.lheInfoTable.precision = 23
163 process.genWeightsTable.lheWeightPrecision = 23
def pruneGenParticlesMini(process)
def setGenMassPrecision(process, precision)
def customizeNanoGEN(process)
def setLHEFullPrecision(process)
def setGenPhiPrecision(process, precision)
def setGenPtPrecision(process, precision)
def nanoGenCommonCustomize(process)
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
def pruneGenParticlesNano(process)
def setGenFullPrecision(process)
def setGenWeightsFullPrecision(process)
def customizeNanoGENFromMini(process)
def setGenEtaPrecision(process, precision)