Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-12-01 23:40:31

0001 #########################
0002 #
0003 # Configuration file for simple MBias events
0004 # production in tracker only
0005 # Produces 100 minbias events, to be used as an input in
0006 # SLHC_PU_TkOnly.py (of course with the same geometry)
0007 #
0008 # UE tuning is UE_P8M1
0009 #
0010 # Author: S.Viret (viret@in2p3.fr)
0011 # Date        : 16/02/2017
0012 #
0013 # Script tested with release CMSSW_10_0_0_pre1
0014 #
0015 #########################
0016 #
0017 # Here you choose if you want flat (True) or tilted (False) geometry
0018 #
0019 
0020 flat=False
0021 
0022 ###################
0023 
0024 import FWCore.ParameterSet.Config as cms
0025 
0026 process = cms.Process('SIM')
0027 
0028 # import of standard configurations
0029 process.load('Configuration.StandardSequences.Services_cff')
0030 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0031 process.load('FWCore.MessageService.MessageLogger_cfi')
0032 process.load('Configuration.EventContent.EventContent_cff')
0033 process.load('Configuration.StandardSequences.MagneticField_cff')
0034 process.load('Configuration.StandardSequences.Generator_cff')
0035 process.load('Configuration.StandardSequences.SimIdeal_cff')
0036 process.load('IOMC.EventVertexGenerators.VtxSmearedGauss_cfi')
0037 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0038 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0039 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0040 
0041 from Configuration.Generator.Pythia8CommonSettings_cfi import *
0042 from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
0043 
0044 if flat:
0045     print('You choose the flat geometry')
0046     process.load('L1Trigger.TrackTrigger.TkOnlyFlatGeom_cff') # Special config file for TkOnly geometry
0047 else:
0048     print('You choose the tilted geometry')
0049     process.load('L1Trigger.TrackTrigger.TkOnlyTiltedGeom_cff') # Special config file for TkOnly geometry
0050 
0051 process.maxEvents = cms.untracked.PSet(
0052     input = cms.untracked.int32(100)
0053 )
0054 
0055 # Input source
0056 process.source = cms.Source("EmptySource")
0057 
0058 
0059 # Additional output definition
0060 
0061 # Global tag for PromptReco
0062 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0063 from Configuration.AlCa.GlobalTag import GlobalTag
0064 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
0065 
0066 # Random seeds
0067 process.RandomNumberGeneratorService.generator.initialSeed      = 1
0068 process.RandomNumberGeneratorService.VtxSmeared.initialSeed     = 2
0069 process.RandomNumberGeneratorService.g4SimHits.initialSeed      = 3
0070 
0071 
0072 # Generate particle gun events
0073 
0074 # From
0075 # http://cmslxr.fnal.gov/lxr/source/Configuration/Generator/python/MinBias_14TeV_pythia8_TuneCUETP8M1_cfi.py?v=CMSSW_8_1_0_pre7 
0076 #
0077 
0078 process.generator = cms.EDFilter("Pythia8GeneratorFilter",
0079                           crossSection = cms.untracked.double(71.39e+09),
0080                           maxEventsToPrint = cms.untracked.int32(0),
0081                           pythiaPylistVerbosity = cms.untracked.int32(1),
0082                           filterEfficiency = cms.untracked.double(1.0),
0083                           pythiaHepMCVerbosity = cms.untracked.bool(False),
0084                           comEnergy = cms.double(14000.0),
0085                           PythiaParameters = cms.PSet(
0086          pythia8CommonSettingsBlock,
0087          pythia8CUEP8M1SettingsBlock,
0088          processParameters = cms.vstring(
0089              'SoftQCD:nonDiffractive = on',
0090              'SoftQCD:singleDiffractive = on',
0091              'SoftQCD:doubleDiffractive = on'),
0092          parameterSets = cms.vstring('pythia8CommonSettings',
0093                                      'pythia8CUEP8M1Settings',
0094                                      'processParameters',
0095                                      )
0096          )
0097 )
0098 
0099 
0100 # Output definition
0101 
0102 process.RAWSIMoutput = cms.OutputModule("PoolOutputModule",
0103     splitLevel = cms.untracked.int32(0),
0104     eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0105     outputCommands = process.RAWSIMEventContent.outputCommands,
0106     fileName = cms.untracked.string('MBias_100_TkOnly.root'),
0107     dataset = cms.untracked.PSet(
0108         filterName = cms.untracked.string(''),
0109         dataTier = cms.untracked.string('GEN-SIM')
0110     ),
0111     SelectEvents = cms.untracked.PSet(
0112         SelectEvents = cms.vstring('generation_step')
0113     )
0114 )
0115 
0116 # Path and EndPath definitions
0117 process.generation_step      = cms.Path(process.pgen)
0118 process.simulation_step      = cms.Path(process.psim)
0119 process.genfiltersummary_step= cms.EndPath(process.genFilterSummary)
0120 process.endjob_step          = cms.EndPath(process.endOfProcess)
0121 process.RAWSIMoutput_step    = cms.EndPath(process.RAWSIMoutput)
0122 
0123 process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.RAWSIMoutput_step)
0124 
0125 # filter all path with the production filter sequence
0126 for path in process.paths:
0127     getattr(process,path)._seq = process.generator * getattr(process,path)._seq
0128 
0129     
0130