10 from PhysicsTools.NanoAOD.simpleSingletonCandidateFlatTableProducer_cfi
import simpleSingletonCandidateFlatTableProducer
12 nanoMetadata = cms.EDProducer(
"UniqueStringProducer",
14 tag = cms.string(
"untagged"),
18 nanogenSequence = cms.Sequence(
20 cms.Sequence(particleLevelTask)+
23 genJetFlavourAssociation+
26 genJetAK8FlavourAssociation+
27 genJetAK8FlavourTable+
28 cms.Sequence(genTauTask)+
32 cms.Sequence(genParticleTablesTask)+
33 cms.Sequence(genVertexTablesTask)+
36 cms.Sequence(particleLevelTablesTask)+
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 process.metMCTable.src =
"slimmedMETs" 66 process.metMCTable.variables.pt =
Var(
"genMET.pt", float, doc=
"pt")
67 process.metMCTable.variables.phi =
Var(
"genMET.phi", float, doc=
"phi")
68 process.metMCTable.variables.phi.precision = CandVars.phi.precision
70 process.rivetProducerHTXS.HepMCCollection =
"genParticles2HepMCHiggsVtx:unsmeared" 71 process.genParticleTable.src =
"prunedGenParticles" 72 process.patJetPartonsNano.particles =
"prunedGenParticles" 73 process.particleLevel.src =
"genParticles2HepMC:unsmeared" 75 process.genJetTable.src =
"slimmedGenJets" 76 process.genJetAK8Table.src =
"slimmedGenJetsAK8" 77 process.tauGenJetsForNano.GenParticles =
"prunedGenParticles" 78 process.genVisTaus.srcGenParticles =
"prunedGenParticles" 85 process.metMCTable = simpleSingletonCandidateFlatTableProducer.clone(
87 name = process.metMCTable.name,
88 doc = process.metMCTable.doc,
89 variables = cms.PSet(PTVars)
92 process.rivetProducerHTXS.HepMCCollection =
"generatorSmeared" 93 process.genParticleTable.src =
"genParticles" 94 process.patJetPartonsNano.particles =
"genParticles" 95 process.particleLevel.src =
"generatorSmeared" 97 process.genJetTable.src =
"ak4GenJetsNoNu" 98 process.genJetAK8Table.src =
"ak8GenJetsNoNu" 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)
106 process.nanogenSequence.remove(process.genIso)
107 delattr(process.genParticleTable.externalVariables,
"iso")
113 process.finalGenParticles.src = process.genParticleTable.src.getModuleLabel()
114 process.genParticleTable.src =
"finalGenParticles" 115 process.nanogenSequence.insert(0, process.finalGenParticles)
120 if process.nanogenSequence.contains(process.mergedGenParticles):
121 raise ValueError(
"Applying the MiniAOD genParticle pruner to MiniAOD is redunant. " \
122 "Use a different customization.")
124 process.prunedGenParticles = prunedGenParticles.clone()
125 process.prunedGenParticles.src =
"genParticles" 126 process.genParticleTable.src =
"prunedGenParticles" 128 process.nanogenSequence.insert(0, process.prunedGenParticles)
139 process.genParticleTable.variables.pt.precision = precision
140 process.genJetTable.variables.pt.precision = precision
141 process.metMCTable.variables.pt.precision = precision
145 process.genParticleTable.variables.eta.precision = precision
146 process.genJetTable.variables.eta.precision = precision
150 process.genParticleTable.variables.phi.precision = precision
151 process.genJetTable.variables.phi.precision = precision
152 process.metMCTable.variables.phi.precision = precision
156 process.genParticleTable.variables.mass.precision = precision
157 process.genJetTable.variables.mass.precision = precision
161 process.lheInfoTable.precision = 23
165 process.genWeightsTable.lheWeightPrecision = 23
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
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 pruneGenParticlesNano(process)
def setGenFullPrecision(process)
def setGenWeightsFullPrecision(process)
def customizeNanoGENFromMini(process)
def setGenEtaPrecision(process, precision)