Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-20 22:55:07

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("PROD")
0004 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0005 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0006 process.load("Geometry.CMSCommonData.ecalhcalGeometryXML_cfi")
0007 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0008 process.load("Geometry.HcalCommonData.hcalDDConstants_cff")
0009 process.load("Geometry.MuonNumbering.muonGeometryConstants_cff")
0010 process.load("Geometry.MuonNumbering.muonOffsetESProducer_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('FWCore.MessageService.MessageLogger_cfi')
0016 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0017 from Configuration.AlCa.autoCond import autoCond
0018 process.GlobalTag.globaltag = autoCond['run1_mc']
0019 
0020 if hasattr(process,'MessageLogger'):
0021     process.MessageLogger.G4cerr = dict()
0022     process.MessageLogger.G4cout = dict()
0023     process.MessageLogger.HcalSim = dict()
0024     process.MessageLogger.SimG4CoreApplication = dict()
0025 
0026 process.load("IOMC.RandomEngine.IOMC_cff")
0027 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0028 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0029 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0030 
0031 process.maxEvents = cms.untracked.PSet(
0032     input = cms.untracked.int32(20)
0033 )
0034 
0035 process.source = cms.Source("EmptySource",
0036     firstRun        = cms.untracked.uint32(1),
0037     firstEvent      = cms.untracked.uint32(1)
0038 )
0039 
0040 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0041     PGunParameters = cms.PSet(
0042         PartID = cms.vint32(211),
0043         MinEta = cms.double(-5.5),
0044         MaxEta = cms.double(5.5),
0045         MinPhi = cms.double(-3.14159265359),
0046         MaxPhi = cms.double(3.14159265359),
0047         MinE   = cms.double(99.99),
0048         MaxE   = cms.double(100.01)
0049     ),
0050     Verbosity       = cms.untracked.int32(0),
0051     AddAntiParticle = cms.bool(False)
0052 )
0053 
0054 process.output = cms.OutputModule("PoolOutputModule",
0055     process.FEVTSIMEventContent,
0056     fileName = cms.untracked.string('simevent.root')
0057 )
0058 
0059 process.Timing = cms.Service("Timing")
0060 
0061 process.Tracer = cms.Service("Tracer")
0062 
0063 process.load('SimG4CMS.Calo.hcalTestAnalyzer_cfi')
0064 
0065 process.generation_step = cms.Path(process.pgen)
0066 process.simulation_step = cms.Path(process.psim)
0067 process.analysis_step = cms.Path(process.hcalTestAnalyzer)
0068 process.out_step = cms.EndPath(process.output)
0069 
0070 process.TFileService = cms.Service("TFileService",
0071     fileName = cms.string('PionHcalTestAnalysis.root')
0072 )
0073 
0074 process.g4SimHits.Physics.type = 'SimG4Core/Physics/QGSP_BERT_EML'
0075 process.g4SimHits.G4Commands = ['/tracking/verbose 1']
0076 process.common_maximum_timex = cms.PSet(
0077     MaxTrackTime  = cms.double(1000.0),
0078     MaxTimeNames  = cms.vstring(),
0079     MaxTrackTimes = cms.vdouble(),
0080     DeadRegions   = cms.vstring(),
0081     CriticalEnergyForVacuum = cms.double(2.0),
0082     CriticalDensity         = cms.double(1e-15)
0083 )
0084 process.g4SimHits.StackingAction = cms.PSet(
0085     process.common_heavy_suppression,
0086     process.common_maximum_timex,
0087     TrackNeutrino = cms.bool(False),
0088     KillDeltaRay  = cms.bool(False),
0089     KillHeavy     = cms.bool(False),
0090     KillGamma     = cms.bool(False),
0091     GammaThreshold= cms.double(0.0001),  ## (MeV)
0092     SaveFirstLevelSecondary = cms.untracked.bool(True),
0093     SavePrimaryDecayProductsAndConversionsInTracker = cms.untracked.bool(True),
0094     SavePrimaryDecayProductsAndConversionsInCalo    = cms.untracked.bool(True),
0095     SavePrimaryDecayProductsAndConversionsInMuon    = cms.untracked.bool(True),
0096         RusRoGammaEnergyLimit  = cms.double(5.0), ## (MeV)
0097         RusRoEcalGamma         = cms.double(0.3),
0098         RusRoHcalGamma         = cms.double(0.3),
0099         RusRoMuonIronGamma     = cms.double(0.3),
0100         RusRoPreShowerGamma    = cms.double(0.3),
0101         RusRoCastorGamma       = cms.double(0.3),
0102         RusRoWorldGamma        = cms.double(0.3),
0103         RusRoNeutronEnergyLimit= cms.double(10.0), ## (MeV)
0104         RusRoEcalNeutron       = cms.double(0.1),
0105         RusRoHcalNeutron       = cms.double(0.1),
0106         RusRoMuonIronNeutron   = cms.double(0.1),
0107         RusRoPreShowerNeutron  = cms.double(0.1),
0108         RusRoCastorNeutron     = cms.double(0.1),
0109         RusRoWorldNeutron      = cms.double(0.1),
0110         RusRoProtonEnergyLimit = cms.double(0.0),
0111         RusRoEcalProton        = cms.double(1.0),
0112         RusRoHcalProton        = cms.double(1.0),
0113         RusRoMuonIronProton    = cms.double(1.0),
0114         RusRoPreShowerProton   = cms.double(1.0),
0115         RusRoCastorProton      = cms.double(1.0),
0116         RusRoWorldProton       = cms.double(1.0)
0117 )
0118 process.g4SimHits.SteppingAction = cms.PSet(
0119     process.common_maximum_timex,
0120     EkinNames               = cms.vstring(),
0121     EkinThresholds          = cms.vdouble(),
0122     EkinParticles           = cms.vstring(),
0123     Verbosity               = cms.untracked.int32(2)
0124 )
0125 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0126     HcalQie = cms.PSet(
0127         NumOfBuckets = cms.int32(10),
0128         BaseLine = cms.int32(4),
0129         BinOfMax = cms.int32(6),
0130         PreSamples = cms.int32(0),
0131         EDepPerPE = cms.double(0.0005),
0132         SignalBuckets = cms.int32(2),
0133         SigmaNoise = cms.double(0.5),
0134         qToPE = cms.double(4.0)
0135     ),
0136     type = cms.string('HcalTestAnalysis'),
0137     HcalTestAnalysis = cms.PSet(
0138         Eta0 = cms.double(0.0),
0139         LayerGrouping = cms.int32(1),
0140         FileName = cms.string('PionHcalTestAnalysis.root'),
0141         Names = cms.vstring('HcalHits',
0142             'EcalHitsEB',
0143             'EcalHitsEE'),
0144         CentralTower = cms.int32(404),
0145         Phi0 = cms.double(0.0)
0146     )
0147 ))
0148 
0149 # Schedule definition 
0150 process.schedule = cms.Schedule(process.generation_step,
0151                                 process.simulation_step,
0152                                 process.analysis_step,
0153                                 process.out_step
0154                                 )
0155 
0156 # filter all path with the production filter sequence
0157 for path in process.paths:
0158         getattr(process,path)._seq = process.generator * getattr(process,path)._seq