Example #1
0
def getMcAODBuilder(putype):
    """ putype is expected to be a string ! """
    builder =  createMcAodBuilder(
        name = "McAodBuilder"+putype,
        outMcEvtCollection  = "GEN_AOD", # this is the input to the CnvTool
        outTruthParticles   = "SpclMC"+putype,
        )
    builder.CnvTool.SelectSignalType =  PileUpClassification.fromString(putype) # min bias only

    objKeyStore.addStreamAOD("TruthParticleContainer","SpclMC"+putype)
    return builder
Example #2
0
fileName = buildFileName(derivationFlags.WriteDAOD_TRUTH5Stream)
TRUTH5Stream = MSMgr.NewPoolRootStream(streamName, fileName)
augStream = MSMgr.GetStream(streamName)
evtStream = augStream.GetEventStream()

# Only events that pass the filters listed are written out
# AcceptAlgs  = logical OR of filters
# RequireAlgs = logical AND of filters
TRUTH5Stream.AcceptAlgs(['TRUTH5Kernel'])

#====================================================================
# GEN_AOD and xAOD truth making
#====================================================================

from McParticleAlgs.JobOptCfg import McAodBuilder, createMcAodBuilder
builder = createMcAodBuilder(inMcEvtCollection="GEN_EVENT")
DerivationFrameworkJob += builder
DerivationFrameworkJob += xAODMaker__xAODTruthCnvAlg(
    "GEN_AOD2xAOD", AODContainerName="GEN_AOD")

#====================================================================
# JET/MET
#====================================================================
# Set jet flags
from JetRec.JetRecFlags import jetFlags
jetFlags.useTruth = True
jetFlags.useTracks = False
# Add jet algorithms
from JetRec.JetAlgorithm import addJetRecoToAlgSequence
addJetRecoToAlgSequence(DerivationFrameworkJob, eventShapeTools=None)
from JetRec.JetRecStandard import jtm