Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-10 02:35:02

0001 import FWCore.ParameterSet.Config as cms
0002 from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0003 from Configuration.Eras.Modifier_hgcaltb_cff import hgcaltb
0004 
0005 process = cms.Process('SIM',dd4hep,hgcaltb)
0006 
0007 # import of standard configurations
0008 process.load("FWCore.MessageService.MessageLogger_cfi")
0009 process.load('Configuration.StandardSequences.Services_cff')
0010 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0011 process.load('Configuration.EventContent.EventContent_cff')
0012 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0013 process.load("Configuration.Geometry.GeometryDD4hep_cff")
0014 process.load('Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi')
0015 process.load('Geometry.HGCalCommonData.hgcalParametersInitialization_cfi')
0016 process.load('Geometry.HcalTestBeamData.hcalTB06Parameters_cff')
0017 process.load('Configuration.StandardSequences.MagneticField_0T_cff')
0018 process.load('Configuration.StandardSequences.Generator_cff')
0019 process.load('IOMC.EventVertexGenerators.VtxSmearedFlat_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.HGCalTBAnalyzer_cfi')
0025 process.load('SimG4CMS.HGCalTestBeam.HGCalTBCheckGunPosition_cfi')
0026 
0027 process.maxEvents = cms.untracked.PSet(
0028     input = cms.untracked.int32(10)
0029 )
0030 
0031 if 'MessageLogger' in process.__dict__:
0032     process.MessageLogger.HGCalGeom=dict()
0033     process.MessageLogger.HGCSim=dict()
0034     process.MessageLogger.HcalSim=dict()
0035     process.MessageLogger.HcalTB06BeamSD=dict()
0036 #    process.MessageLogger.SimG4CoreGeometry=dict()
0037 
0038 # Input source
0039 process.source = cms.Source("EmptySource")
0040 
0041 process.options = cms.untracked.PSet(
0042 )
0043 
0044 # Production Info
0045 process.configurationMetadata = cms.untracked.PSet(
0046     annotation = cms.untracked.string('SingleMuonE200_cfi nevts:10'),
0047     name = cms.untracked.string('Applications'),
0048     version = cms.untracked.string('$Revision: 1.19 $')
0049 )
0050 
0051 # Output definition
0052 
0053 process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule",
0054     SelectEvents = cms.untracked.PSet(
0055         SelectEvents = cms.vstring('generation_step')
0056     ),
0057     dataset = cms.untracked.PSet(
0058         dataTier = cms.untracked.string('GEN-SIM'),
0059         filterName = cms.untracked.string('')
0060     ),
0061     fileName = cms.untracked.string('file:TBGenSim181Oct1DD4hep.root'),
0062     outputCommands = process.FEVTDEBUGEventContent.outputCommands,
0063     splitLevel = cms.untracked.int32(0)
0064 )
0065 
0066 # Additional output definition
0067 process.TFileService = cms.Service("TFileService",
0068                                    fileName = cms.string('TBGenSimDD4hep.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(11)
0086     ),
0087     Verbosity = cms.untracked.int32(0),
0088     firstRun = cms.untracked.uint32(1),
0089     psethack = cms.string('single muon E 100')
0090 )
0091 process.VtxSmeared.MinZ                 = -800.0
0092 process.VtxSmeared.MaxZ                 = -800.0
0093 process.VtxSmeared.MinX                 = -7.5
0094 process.VtxSmeared.MaxX                 =  7.5
0095 process.VtxSmeared.MinY                 = -7.5
0096 process.VtxSmeared.MaxY                 =  7.5
0097 process.g4SimHits.HGCSD.RejectMouseBite = True
0098 process.g4SimHits.HGCSD.RotatedWafer    = True
0099 process.DDDetectorESProducer.confGeomXMLFiles = cms.FileInPath("SimG4CMS/HGCalTestBeam/data/dd4hep/HGCalTB181Oct1.xml")
0100 
0101 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0102         HGCalTBPassive = cms.PSet(
0103                     LVNames = cms.vstring('HGCalEE','HGCalHE','HGCalAH', 'HGCalBeam', 'CMSE'),
0104                     MotherName = cms.string('OCMS'),
0105                     IfDD4hep = cms.bool(True),
0106                 ),
0107         type = cms.string('HGCalTBPassive'),
0108         )
0109                        )
0110 process.HGCalTBAnalyzer.doDigis         = False
0111 process.HGCalTBAnalyzer.doRecHits       = False
0112 process.HGCalTBAnalyzer.useFH           = True
0113 process.HGCalTBAnalyzer.useBH           = True
0114 process.HGCalTBAnalyzer.useBeam         = True
0115 process.HGCalTBAnalyzer.zFrontEE        = 1110.0
0116 process.HGCalTBAnalyzer.zFrontFH        = 1176.5
0117 process.HGCalTBAnalyzer.zFrontFH        = 1307.5
0118 process.HGCalTBAnalyzer.maxDepth        = 39
0119 process.HGCalTBAnalyzer.deltaZ          = 26.2
0120 process.HGCalTBAnalyzer.zFirst          = 22.8
0121 process.HGCalTBAnalyzer.doPassive       = True
0122 process.HGCalTBAnalyzer.doPassiveEE     = True
0123 process.HGCalTBAnalyzer.doPassiveHE     = True
0124 process.HGCalTBAnalyzer.doPassiveBH     = True
0125 
0126 # Path and EndPath definitions
0127 process.generation_step = cms.Path(process.pgen)
0128 process.gunfilter_step  = cms.Path(process.HGCalTBCheckGunPostion)
0129 process.simulation_step = cms.Path(process.psim)
0130 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0131 process.analysis_step = cms.Path(process.HGCalTBAnalyzer)
0132 process.endjob_step = cms.EndPath(process.endOfProcess)
0133 process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput)
0134 
0135 # Schedule definition
0136 process.schedule = cms.Schedule(process.generation_step,
0137                 process.genfiltersummary_step,
0138                 process.simulation_step,
0139                 process.gunfilter_step,
0140                 process.analysis_step,
0141                 process.endjob_step,
0142                                 process.FEVTDEBUGoutput_step
0143                 )
0144 # filter all path with the production filter sequence
0145 for path in process.paths:
0146     getattr(process,path)._seq = process.generator * getattr(process,path)._seq 
0147 
0148