Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:57

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