Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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