Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-14 23:39:53

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Configuration.Eras.Era_Phase2_cff import Phase2
0004 from Configuration.Eras.Modifier_hgcaltb_cff import hgcaltb
0005 process = cms.Process('SIM',Phase2,hgcaltb)
0006 
0007 # import of standard configurations
0008 process.load('Configuration.StandardSequences.Services_cff')
0009 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0010 process.load('FWCore.MessageService.MessageLogger_cfi')
0011 process.load('Configuration.EventContent.EventContent_cff')
0012 process.load('Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi')
0013 process.load('Geometry.HGCalCommonData.hgcalParametersInitialization_cfi')
0014 process.load('Geometry.HcalTestBeamData.hcalTB06Parameters_cff')
0015 process.load('Configuration.StandardSequences.MagneticField_0T_cff')
0016 process.load('Configuration.StandardSequences.Generator_cff')
0017 process.load('IOMC.EventVertexGenerators.VtxSmearedFlat_cfi')
0018 #process.load('IOMC.EventVertexGenerators.VtxSmearedGauss_cfi')
0019 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0020 process.load('Configuration.StandardSequences.SimIdeal_cff')
0021 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0022 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0023 process.load('SimG4CMS.HGCalTestBeam.HGCalTBCheckGunPosition_cfi')
0024 process.load('SimG4CMS.HGCalTestBeam.HGCalTBAnalyzer_cfi')
0025 process.load('SimG4CMS.HGCalTestBeam.HGCalTB181Oct1XML_cfi')
0026 process.load('SimG4CMS.HGCalTestBeam.hgcalTBMBCERNBeam18Oct1_cfi')
0027 process.load('SimG4CMS.HGCalTestBeam.hgcalTBMBAnalyzerCERNBeam18Oct1_cfi')
0028 
0029 process.maxEvents = cms.untracked.PSet(
0030     input = cms.untracked.int32(1000)
0031 )
0032 
0033 if 'MessageLogger' in process.__dict__:
0034     process.MessageLogger.HGCalGeom=dict()
0035     process.MessageLogger.HGCSim=dict()
0036 
0037 # Input source
0038 process.source = cms.Source("EmptySource")
0039 
0040 process.options = cms.untracked.PSet(
0041 )
0042 
0043 # Production Info
0044 process.configurationMetadata = cms.untracked.PSet(
0045     annotation = cms.untracked.string('SingleNeutrinoE100_cfi nevts:1000'),
0046     name = cms.untracked.string('Applications'),
0047     version = cms.untracked.string('$Revision: 1.19 $')
0048 )
0049 
0050 # Output definition
0051 
0052 process.RAWSIMoutput = cms.OutputModule("PoolOutputModule",
0053     SelectEvents = cms.untracked.PSet(
0054         SelectEvents = cms.vstring('generation_step')
0055     ),
0056     dataset = cms.untracked.PSet(
0057         dataTier = cms.untracked.string('GEN-SIM'),
0058         filterName = cms.untracked.string('')
0059     ),
0060     eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0061     fileName = cms.untracked.string('file:gensim.root'),
0062     outputCommands = process.RAWSIMEventContent.outputCommands,
0063     splitLevel = cms.untracked.int32(0)
0064 )
0065 
0066 # Additional output definition
0067 process.TFileService = cms.Service("TFileService",
0068                                    fileName = cms.string('TBCERNBeamOct1MB.root')
0069                                    )
0070 
0071 # Other statements
0072 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0073 from Configuration.AlCa.GlobalTag import GlobalTag
0074 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0075 
0076 process.generator = cms.EDProducer("FlatRandomEThetaGunProducer",
0077     AddAntiParticle = cms.bool(False),
0078     PGunParameters = cms.PSet(
0079         MinE = cms.double(99.99),
0080         MaxE = cms.double(100.01),
0081         MinTheta = cms.double(0.0),
0082         MaxTheta = cms.double(0.0),
0083         MinPhi = cms.double(-3.14159265359),
0084         MaxPhi = cms.double(3.14159265359),
0085         PartID = cms.vint32(14)
0086     ),
0087     Verbosity = cms.untracked.int32(0),
0088     firstRun = cms.untracked.uint32(1),
0089     psethack = cms.string('single neutrino E 100')
0090 )
0091 
0092 process.VtxSmeared.MinZ = -800.0
0093 process.VtxSmeared.MaxZ = -800.0
0094 process.VtxSmeared.MinX = 0
0095 process.VtxSmeared.MaxX =  0
0096 process.VtxSmeared.MinY = 0
0097 process.VtxSmeared.MaxY =  0
0098 process.HGCalTBAnalyzer.doDigis = False
0099 process.HGCalTBAnalyzer.doRecHits = False
0100 process.g4SimHits.StackingAction.TrackNeutrino = True
0101 
0102 # Path and EndPath definitions
0103 process.generation_step = cms.Path(process.pgen)
0104 process.simulation_step = cms.Path(process.psim)
0105 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0106 process.analysis_step = cms.Path(process.HGCalTBCheckGunPostion*process.HGCalTBAnalyzer*process.hgcalTBMBAnalyzerCERNBeam18Oct1)
0107 process.endjob_step = cms.EndPath(process.endOfProcess)
0108 process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput)
0109 
0110 # Schedule definition
0111 process.schedule = cms.Schedule(
0112     process.generation_step,
0113     process.genfiltersummary_step,
0114     process.simulation_step,
0115     process.analysis_step,
0116     process.endjob_step,
0117     process.RAWSIMoutput_step
0118 )
0119 
0120 # filter all path with the production filter sequence
0121 for path in process.paths:
0122     getattr(process,path)._seq = process.generator * getattr(process,path)._seq 
0123 
0124 
0125 #print process.dumpPython()