Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-27 14:07:58

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
0004 process = cms.Process("Sim",Run2_2018)
0005 
0006 process.load("SimG4CMS.Calo.PythiaMinBias_cfi")
0007 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0008 process.load('FWCore.MessageService.MessageLogger_cfi')
0009 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0010 process.load("Configuration.Geometry.GeometryExtended2018NoSD_cff")
0011 process.load("Geometry.HcalCommonData.hcalDDDRecConstants_cfi")
0012 process.load("Configuration.StandardSequences.MagneticField_cff")
0013 process.load("Configuration.EventContent.EventContent_cff")
0014 process.load('Configuration.StandardSequences.Generator_cff')
0015 process.load('Configuration.StandardSequences.SimIdeal_cff')
0016 process.load("SimG4CMS.Calo.CaloSimHitStudy_cfi")
0017 
0018 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0019 from Configuration.AlCa.autoCond import autoCond
0020 process.GlobalTag.globaltag = autoCond['run2_mc']
0021 
0022 if 'MessageLogger' in process.__dict__:
0023     process.MessageLogger.G4cerr=dict()
0024     process.MessageLogger.Step=dict()
0025     process.MessageLogger.HCalGeom=dict()
0026     process.MessageLogger.HcalSim=dict()
0027 
0028 process.maxEvents = cms.untracked.PSet(
0029     input = cms.untracked.int32(10000)
0030 )
0031 
0032 process.source = cms.Source("EmptySource",
0033     firstRun        = cms.untracked.uint32(1),
0034     firstEvent      = cms.untracked.uint32(1)
0035 )
0036 
0037 process.generator = cms.EDProducer("FlatRandomPtGunProducer",
0038     PGunParameters = cms.PSet(
0039         PartID = cms.vint32(13),
0040         MinEta = cms.double(-3.0),
0041         MaxEta = cms.double(3.0),
0042         MinPhi = cms.double(-3.14159265359),
0043         MaxPhi = cms.double(3.14159265359),
0044         MinPt  = cms.double(100.),
0045         MaxPt  = cms.double(100.)
0046     ),
0047     Verbosity       = cms.untracked.int32(0),
0048     AddAntiParticle = cms.bool(True)
0049 )
0050 
0051 process.Timing = cms.Service("Timing")
0052 
0053 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",
0054     oncePerEventMode = cms.untracked.bool(True),
0055     showMallocInfo = cms.untracked.bool(True),
0056     dump = cms.untracked.bool(True),
0057     ignoreTotal = cms.untracked.int32(1)
0058 )
0059 
0060 process.load("IOMC.RandomEngine.IOMC_cff")
0061 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0062 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0063 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0064 process.rndmStore = cms.EDProducer("RandomEngineStateProducer")
0065 
0066 process.TFileService = cms.Service("TFileService",
0067     fileName = cms.string('singleMuon_FTFP_BERT_EMM.root')
0068 )
0069 
0070 # Event output
0071 process.output = cms.OutputModule("PoolOutputModule",
0072     process.FEVTSIMEventContent,
0073     fileName = cms.untracked.string('simevent_singleMuon_FTFP_BERT_EMM.root')
0074 )
0075 
0076 process.generation_step = cms.Path(process.pgen)
0077 process.simulation_step = cms.Path(process.psim)
0078 process.analysis_step   = cms.Path(process.CaloSimHitStudy)
0079 process.out_step = cms.EndPath(process.output)
0080 
0081 process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMM'
0082 process.CaloSimHitStudy.TestNumbering = True
0083 
0084 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0085         type         = cms.string('CaloSteppingAction'),
0086         CaloSteppingAction = cms.PSet(
0087             EBSDNames       = cms.vstring('EBRY'),
0088             EESDNames       = cms.vstring('EFRY'),
0089             HCSDNames       = cms.vstring('HBS','HES','HTS'),
0090             AllSteps        = cms.int32(100),
0091             SlopeLightYield = cms.double(0.02),
0092             BirkC1EC        = cms.double(0.03333),
0093             BirkSlopeEC     = cms.double(0.253694),
0094             BirkCutEC       = cms.double(0.1),
0095             BirkC1HC        = cms.double(0.0052),
0096             BirkC2HC        = cms.double(0.142),
0097             BirkC3HC        = cms.double(1.75),
0098             HitCollNames    = cms.vstring('EcalHitsEB1','EcalHitsEE1',
0099                                           'HcalHits1'),
0100             EtaTable        = cms.vdouble(0.000, 0.087, 0.174, 0.261, 0.348,
0101                                           0.435, 0.522, 0.609, 0.696, 0.783,
0102                                           0.870, 0.957, 1.044, 1.131, 1.218,
0103                                           1.305, 1.392, 1.479, 1.566, 1.653,
0104                                           1.740, 1.830, 1.930, 2.043, 2.172,
0105                                           2.322, 2.500, 2.650, 2.868, 3.000),
0106             PhiBin         = cms.vdouble(5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0,
0107                                          5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0,
0108                                          5.0, 5.0, 5.0, 5.0, 5.0, 5.0,10.0,
0109                                         10.0,10.0,10.0,10.0,10.0,10.0,10.0,
0110                                         10.0),
0111             PhiOffset      = cms.vdouble( 0.0, 0.0, 0.0,10.0),
0112             EtaMin         = cms.vint32(1, 16, 29, 1),
0113             EtaMax         = cms.vint32(16, 29, 41, 15),
0114             EtaHBHE        = cms.int32(16),
0115             DepthHBHE      = cms.vint32(2,4),
0116             Depth29Max     = cms.int32(3),
0117             RMinHO         = cms.double(3800),
0118             ZHO            = cms.vdouble(0,1255,1418,3928,4100,6610),
0119             Eta1           = cms.untracked.vint32(1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0120                                                   1, 1, 1, 1, 1, 1, 1, 4, 4),
0121             Eta15          = cms.untracked.vint32(1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0122                                                   1, 1, 1, 2, 2, 2, 2, 4, 4),
0123             Eta16          = cms.untracked.vint32(1, 1, 2, 2, 2, 2, 2, 2, 2, 4,
0124                                                   4, 4, 4, 4, 4, 4, 4, 4, 4),
0125             Eta17          = cms.untracked.vint32(2, 2, 2, 2, 2, 2, 2, 2, 3, 3,
0126                                                   3, 3, 3, 3, 3, 3, 3, 3, 3),
0127             Eta18          = cms.untracked.vint32(1, 2, 2, 2, 3, 3, 3, 3, 4, 4,
0128                                                   4, 5, 5, 5, 5, 5, 5, 5, 5),
0129             Eta19          = cms.untracked.vint32(1, 1, 2, 2, 2, 3, 3, 3, 4, 4,
0130                                                   4, 5, 5, 5, 5, 6, 6, 6, 6),
0131             Eta26          = cms.untracked.vint32(1, 1, 2, 2, 3, 3, 4, 4, 5, 5,
0132                                                   5, 6, 6, 6, 6, 7, 7, 7, 7),
0133             )))
0134 
0135 # Schedule definition                                                          
0136 process.schedule = cms.Schedule(process.generation_step,
0137                                 process.simulation_step,
0138                                 process.analysis_step,
0139                                 process.out_step
0140                                 )
0141 
0142 # filter all path with the production filter sequence                          
0143 for path in process.paths:
0144         getattr(process,path)._seq = process.generator * getattr(process,path)._seq
0145