Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:31:17

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("PROD")
0004 process.load("SimG4CMS.Calo.pythiapdt_cfi")
0005 process.load('FWCore.MessageService.MessageLogger_cfi')
0006 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0007 process.load("Geometry.CMSCommonData.cmsExtendedGeometry2021XML_cfi")
0008 process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi")
0009 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0010 process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff")
0011 process.load("Configuration.StandardSequences.MagneticField_cff")
0012 process.load("Configuration.EventContent.EventContent_cff")
0013 process.load('Configuration.StandardSequences.Generator_cff')
0014 process.load('Configuration.StandardSequences.SimIdeal_cff')
0015 process.load("SimG4CMS.Calo.CaloSimHitStudy_cfi")
0016 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0017 from Configuration.AlCa.autoCond import autoCond
0018 process.GlobalTag.globaltag = autoCond['run2_mc']
0019 
0020 if 'MessageLogger' in process.__dict__:
0021     process.MessageLogger.G4cerr=dict()
0022     process.MessageLogger.EcalSim=dict()
0023 
0024 process.load("IOMC.RandomEngine.IOMC_cff")
0025 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0026 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0027 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0028 
0029 process.maxEvents = cms.untracked.PSet(
0030     input = cms.untracked.int32(100)
0031 )
0032 
0033 process.source = cms.Source("EmptySource",
0034     firstRun        = cms.untracked.uint32(1),
0035     firstEvent      = cms.untracked.uint32(1)
0036 )
0037 
0038 process.generator = cms.EDProducer("FlatRandomPtGunProducer",
0039     PGunParameters = cms.PSet(
0040         PartID = cms.vint32(13),
0041         MinEta = cms.double(-3.0),
0042         MaxEta = cms.double(3.0),
0043         MinPhi = cms.double(-3.14159265359),
0044         MaxPhi = cms.double(3.14159265359),
0045         MinPt  = cms.double(100.),
0046         MaxPt  = cms.double(100.)
0047     ),
0048     Verbosity       = cms.untracked.int32(0),
0049     AddAntiParticle = cms.bool(True)
0050 )
0051 
0052 process.output = cms.OutputModule("PoolOutputModule",
0053     process.FEVTSIMEventContent,
0054     fileName = cms.untracked.string('simevent_QGSP_FTFP_BERT_EML.root')
0055 )
0056 
0057 process.Timing = cms.Service("Timing")
0058 
0059 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",
0060     oncePerEventMode = cms.untracked.bool(True),
0061     showMallocInfo = cms.untracked.bool(True),
0062     dump = cms.untracked.bool(True),
0063     ignoreTotal = cms.untracked.int32(1)
0064 )
0065 
0066 #process.Tracer = cms.Service("Tracer")
0067 
0068 process.TFileService = cms.Service("TFileService",
0069     fileName = cms.string('runWithGun_FTFP_BERT_EMM.root')
0070 )
0071 
0072 process.generation_step = cms.Path(process.pgen)
0073 process.simulation_step = cms.Path(process.psim)
0074 process.analysis_step   = cms.Path(process.CaloSimHitStudy)
0075 process.out_step = cms.EndPath(process.output)
0076 
0077 process.CaloSimHitStudy.MaxEnergy = 1000.0
0078 process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMM'
0079 process.g4SimHits.Physics.MonopoleCharge = 1
0080 process.g4SimHits.Physics.Verbosity = 0
0081 process.g4SimHits.CaloSD.UseResponseTables = [1,1,0,1]
0082 process.g4SimHits.CaloSD.EminHits[0] = 0
0083 process.g4SimHits.ECalSD.StoreSecondary = True
0084 process.g4SimHits.ECalSD.StoreRadLength = True
0085 process.g4SimHits.ECalSD.ScaleRadLength = 100.0
0086 process.g4SimHits.CaloTrkProcessing.PutHistory = True
0087 process.g4SimHits.CaloResponse.UseResponseTable  = True
0088 process.g4SimHits.CaloResponse.ResponseScale = 1.0
0089 process.g4SimHits.CaloResponse.ResponseFile = 'SimG4CMS/Calo/data/responsTBpim50.dat'
0090 process.g4SimHits.G4Commands = ['/run/verbose 2']
0091 process.CaloSimHitStudy.StoreRL = True
0092 process.common_maximum_timex = cms.PSet(
0093     MaxTrackTime  = cms.double(1000.0),
0094     MaxTimeNames  = cms.vstring(),
0095     MaxTrackTimes = cms.vdouble(),
0096     DeadRegions   = cms.vstring(),
0097     CriticalEnergyForVacuum = cms.double(2.0),
0098     CriticalDensity         = cms.double(1e-15)
0099 )
0100 process.g4SimHits.StackingAction = cms.PSet(
0101     process.common_heavy_suppression,
0102     process.common_maximum_timex,
0103     TrackNeutrino = cms.bool(True),
0104     KillDeltaRay  = cms.bool(False),
0105     KillHeavy     = cms.bool(False),
0106     KillGamma     = cms.bool(False),
0107     GammaThreshold= cms.double(0.0001),  ## (MeV)
0108     SaveFirstLevelSecondary = cms.untracked.bool(True),
0109     SavePrimaryDecayProductsAndConversionsInTracker = cms.untracked.bool(True),
0110     SavePrimaryDecayProductsAndConversionsInCalo    = cms.untracked.bool(True),
0111     SavePrimaryDecayProductsAndConversionsInMuon    = cms.untracked.bool(True),
0112         RusRoGammaEnergyLimit  = cms.double(5.0), ## (MeV)
0113         RusRoEcalGamma         = cms.double(0.3),
0114         RusRoHcalGamma         = cms.double(0.3),
0115         RusRoMuonIronGamma     = cms.double(0.3),
0116         RusRoPreShowerGamma    = cms.double(0.3),
0117         RusRoCastorGamma       = cms.double(0.3),
0118         RusRoWorldGamma        = cms.double(0.3),
0119         RusRoNeutronEnergyLimit= cms.double(10.0), ## (MeV)
0120         RusRoEcalNeutron       = cms.double(0.1),
0121         RusRoHcalNeutron       = cms.double(0.1),
0122         RusRoMuonIronNeutron   = cms.double(0.1),
0123         RusRoPreShowerNeutron  = cms.double(0.1),
0124         RusRoCastorNeutron     = cms.double(0.1),
0125         RusRoWorldNeutron      = cms.double(0.1),
0126         RusRoProtonEnergyLimit = cms.double(0.0),
0127         RusRoEcalProton        = cms.double(1.0),
0128         RusRoHcalProton        = cms.double(1.0),
0129         RusRoMuonIronProton    = cms.double(1.0),
0130         RusRoPreShowerProton   = cms.double(1.0),
0131         RusRoCastorProton      = cms.double(1.0),
0132         RusRoWorldProton       = cms.double(1.0)
0133 )
0134 process.g4SimHits.SteppingAction = cms.PSet(
0135     process.common_maximum_timex,
0136     EkinNames               = cms.vstring(),
0137     EkinThresholds          = cms.vdouble(),
0138     EkinParticles           = cms.vstring(),
0139     Verbosity               = cms.untracked.int32(2)
0140 )
0141 #process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0142 #    CheckForHighEtPhotons = cms.untracked.bool(False),
0143 #    TrackMin     = cms.untracked.int32(0),
0144 #    TrackMax     = cms.untracked.int32(0),
0145 #    TrackStep    = cms.untracked.int32(1),
0146 #    EventMin     = cms.untracked.int32(0),
0147 #    EventMax     = cms.untracked.int32(0),
0148 #    EventStep    = cms.untracked.int32(1),
0149 #    PDGids       = cms.untracked.vint32(),
0150 #    VerboseLevel = cms.untracked.int32(0),
0151 #    G4Verbose    = cms.untracked.bool(True),
0152 #    DEBUG        = cms.untracked.bool(False),
0153 #    type      = cms.string('TrackingVerboseAction')
0154 #))
0155 
0156 # Schedule definition
0157 process.schedule = cms.Schedule(process.generation_step,
0158                                 process.simulation_step,
0159                                 process.analysis_step,
0160                                 process.out_step
0161                                 )
0162 
0163 # filter all path with the production filter sequence
0164 for path in process.paths:
0165         getattr(process,path)._seq = process.generator * getattr(process,path)._seq