annotation = cms.untracked.string('step2 nevts:1000'),
    name = cms.untracked.string('Applications')
)

# Output definition

process.RAWSIMoutput = cms.OutputModule("PoolOutputModule",
    splitLevel = cms.untracked.int32(0),
    eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
    outputCommands = process.RAWSIMEventContent.outputCommands,
    fileName = cms.untracked.string('file:step2.root'),
    dataset = cms.untracked.PSet(
        filterName = cms.untracked.string(''),
        dataTier = cms.untracked.string('GEN-SIM-RAW')
    )
)

process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput)

process.schedule = cms.Schedule(process.RAWSIMoutput_step)

# customisation of the process.
# Automatic addition of the customisation function from Validation.Performance.TimeMemoryInfo
from Validation.Performance.TimeMemoryInfo import customise 

#call to customisation function customise imported from Validation.Performance.TimeMemoryInfo
process = customise(process)

# End of customisation functions

Beispiel #2
0
    process.MessageLogger.categories.append('GeantVProducer')
    process.MessageLogger.cerr.GeantVProducer = cms.untracked.PSet(
        optionalPSet=cms.untracked.bool(True),
        limit=cms.untracked.int32(10000000),
    )

# Path and EndPath definitions
process.simulation_step = cms.Path(process.psim)
process.endjob_step = cms.EndPath(process.endOfProcess)
process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput)

# Schedule definition
process.schedule = cms.Schedule(process.simulation_step, process.endjob_step,
                                process.RAWSIMoutput_step)
from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
associatePatAlgosToolsTask(process)

# Customisation from command line

# Add early deletion of temporary data products to reduce peak memory need
from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
process = customiseEarlyDelete(process)
# End adding early deletion

process.options.numberOfThreads = cms.untracked.uint32(options.threads)
process.options.numberOfStreams = cms.untracked.uint32(options.streams)

from Validation.Performance.TimeMemoryInfo import customise
process = customise(process)
Beispiel #3
0
def init_process(options):
    from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
    if options.dofinecalo:
        from Configuration.ProcessModifiers.fineCalo_cff import fineCalo
        process = cms.Process('SIM', Phase2C11, fineCalo)
    else:
        process = cms.Process('SIM', Phase2C11)
    process.load('Configuration.StandardSequences.Services_cff')
    process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
    process.load('FWCore.MessageService.MessageLogger_cfi')
    # process.load("Configuration.Geometry.GeometryExtended2026D71_cff")
    # process.load('Configuration.Geometry.GeometryExtended2026D71Reco_cff')
    process.load("Configuration.Geometry.GeometryExtended2026D84_cff")
    process.load('Configuration.Geometry.GeometryExtended2026D84Reco_cff')
    process.load("SimGeneral.MixingModule.mixNoPU_cfi")
    process.load('Configuration.StandardSequences.MagneticField_cff')
    process.load('Configuration.StandardSequences.Generator_cff')
    process.load('Configuration.StandardSequences.VtxSmearedNoSmear_cff')
    process.load('GeneratorInterface.Core.genFilterSummary_cff')
    process.load('Configuration.StandardSequences.SimIdeal_cff')
    process.load('Configuration.StandardSequences.Digi_cff')
    process.load('Configuration.StandardSequences.SimL1Emulator_cff')
    process.load('Configuration.StandardSequences.L1TrackTrigger_cff')
    process.load('Configuration.StandardSequences.DigiToRaw_cff')
    process.load('HLTrigger.Configuration.HLT_Fake2_cff')
    process.load('Configuration.StandardSequences.EndOfProcess_cff')
    process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

    # reset all random numbers to ensure statistically distinct but reproducible jobs
    from IOMC.RandomEngine.RandomServiceHelper import RandomNumberServiceHelper
    randHelper = RandomNumberServiceHelper(process.RandomNumberGeneratorService)
    randHelper.resetSeeds(options.seed)

    process.maxEvents = cms.untracked.PSet(
        input = cms.untracked.int32(options.maxEvents),
        output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
        )

    process.source = cms.Source("EmptySource")

    process.options = cms.untracked.PSet(
        FailPath = cms.untracked.vstring(),
        IgnoreCompletely = cms.untracked.vstring(),
        Rethrow = cms.untracked.vstring(),
        SkipEvent = cms.untracked.vstring(),
        allowUnscheduled = cms.obsolete.untracked.bool,
        canDeleteEarly = cms.untracked.vstring(),
        emptyRunLumiMode = cms.obsolete.untracked.string,
        eventSetup = cms.untracked.PSet(
            forceNumberOfConcurrentIOVs = cms.untracked.PSet(),
            numberOfConcurrentIOVs = cms.untracked.uint32(1)
            ),
        fileMode = cms.untracked.string('FULLMERGE'),
        forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
        makeTriggerResults = cms.obsolete.untracked.bool,
        numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
        numberOfConcurrentRuns = cms.untracked.uint32(1),
        numberOfStreams = cms.untracked.uint32(0),
        numberOfThreads = cms.untracked.uint32(1),
        printDependencies = cms.untracked.bool(False),
        sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
        throwIfIllegalParameter = cms.untracked.bool(True),
        wantSummary = cms.untracked.bool(False)
        )

    # Production Info
    process.configurationMetadata = cms.untracked.PSet(
        annotation = cms.untracked.string('SingleMuPt1000_pythia8_cfi nevts:10'),
        name = cms.untracked.string('Applications'),
        version = cms.untracked.string('$Revision: 1.19 $')
        )

    from Configuration.AlCa.autoCond import autoCond
    process.GlobalTag.globaltag = autoCond['phase2_realistic']


    # _____________________________
    # Main customisations

    if options.minpt == -1. and options.maxpt == -1.:
        minpt = options.pt - 0.01
        maxpt = options.pt + 0.01
        ptstring = str(int(options.pt))
    else:
        minpt = options.minpt
        maxpt = options.maxpt
        ptstring = str(int(options.minpt)) + 'to' + str(int(options.maxpt))
    if abs(options.pdgid) == 6: ptstring = '14000'
    print('Using pdgid={}, minpt={}, maxpt={}'.format(options.pdgid, minpt, maxpt))
    add_single_particle_gun(process, options.pdgid, minpt=minpt, maxpt=maxpt)
    if options.debug: add_debug_module(process, 'DoFineCalo')

    # _____________________________
    # Finalizing

    # The standard steps
    process.generation_step = cms.Path(process.pgen)
    process.simulation_step = cms.Path(process.psim)
    process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
    process.endjob_step = cms.EndPath(process.endOfProcess)

    # Make nicely formatted output root file
    if options.outputFile.startswith('default'):
        from time import strftime
        outputFile = '{outputlvl}_seed{seed}_pdgid{pdgid}_{pt}GeV_{date}_{finecalo}_n{nevents}.root'.format(
            outputlvl = 'NTUPLE' if options.ntuple else 'SIM',
            seed = options.seed,
            pdgid = abs(options.pdgid),
            pt = ptstring,
            date = strftime('%b%d'),
            finecalo = 'finecalo' if options.dofinecalo else 'nofine',
            nevents = options.maxEvents
            )
    else:
        outputFile = options.outputFile

    # Figure out the output format
    if options.ntuple:
        process.TFileService = cms.Service("TFileService",
            fileName = cms.string(outputFile)
            )
        process.ntupler = cms.EDAnalyzer('HistoryNTupler')
        process.ntupler_step = cms.Path(process.HistoryNTupler)
        process.schedule = cms.Schedule(
            process.generation_step,
            process.genfiltersummary_step,
            process.simulation_step,
            process.ntupler_step,
            process.endjob_step,
            )
    else:
        process.load('Configuration.EventContent.EventContent_cff')
        process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule",
            SelectEvents = cms.untracked.PSet(
                SelectEvents = cms.vstring('generation_step')
                ),
            dataset = cms.untracked.PSet(
                dataTier = cms.untracked.string('GEN-SIM'),
                filterName = cms.untracked.string('')
                ),
            fileName = cms.untracked.string('file:{}'.format(outputFile)),
            outputCommands = process.FEVTDEBUGEventContent.outputCommands,
            splitLevel = cms.untracked.int32(0)
            )
        process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput)
        process.schedule = cms.Schedule(
            process.generation_step,
            process.genfiltersummary_step,
            process.simulation_step,
            process.endjob_step,
            process.FEVTDEBUGoutput_step,
            )

    from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
    associatePatAlgosToolsTask(process)
    # filter all path with the production filter sequence
    for path in process.paths:
        getattr(process,path).insert(0, process.generator)

    if options.profiling:
        # customisation function from Validation.Performance.TimeMemoryInfo
        from Validation.Performance.TimeMemoryInfo import customise 
        process = customise(process)

    if options.dofinecalo:
        for _pset in ["CaloSD", "CaloTrkProcessing", "TrackingAction"]:
            getattr(process.g4SimHits,_pset).UseFineCalo = [2]

    # Add early deletion of temporary data products to reduce peak memory need
    from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
    process = customiseEarlyDelete(process)
    return process