Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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