Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-09-02 06:14:34

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