Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-09 23:31:58

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0004 process = cms.Process("PROD", dd4hep)
0005 
0006 process.load('FWCore.MessageService.MessageLogger_cfi')
0007 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0008 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0009 process.load("Geometry.HcalTestBeamData.hcalDDDSimConstants_cff")
0010 process.load('GeneratorInterface.Core.generatorSmeared_cfi')
0011 process.load("Configuration.EventContent.EventContent_cff")
0012 
0013 process.maxEvents = cms.untracked.PSet(
0014     input = cms.untracked.int32(1)
0015 )
0016 
0017 process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
0018                                             confGeomXMLFiles = cms.FileInPath('Geometry/HcalTestBeamData/data/dd4hep/cms-test-ddTB2004-algorithm.xml'),
0019 #                                           confGeomXMLFiles = cms.FileInPath('Geometry/HcalTestBeamData/data/dd4hep/cms-test-ddTB2002-algorithm.xml'),
0020                                             appendToDataLabel = cms.string('')
0021                                             )
0022 
0023 process.DDCompactViewESProducer = cms.ESProducer("DDCompactViewESProducer",
0024                                                 appendToDataLabel = cms.string('')
0025 )
0026 
0027 process.MessageLogger.cerr.FwkReport.reportEvery = 5
0028 if hasattr(process,'MessageLogger'):
0029     process.MessageLogger.HCalGeom=dict()
0030     process.MessageLogger.EcalGeom=dict()
0031     process.MessageLogger.HcalSim=dict()
0032     process.MessageLogger.HcalTBSim=dict()
0033     process.MessageLogger.EcalSim=dict()
0034     process.MessageLogger.CaloSim=dict()
0035 
0036 process.load("IOMC.RandomEngine.IOMC_cff")
0037 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0038 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0039 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0040 
0041 process.common_beam_direction_parameters = cms.PSet(
0042     MinEta       = cms.double(0.5655),
0043     MaxEta       = cms.double(0.5655),
0044     MinPhi       = cms.double(-0.1309),
0045     MaxPhi       = cms.double(-0.1309),
0046     BeamPosition = cms.double(-521.5)
0047 )
0048 
0049 from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import *
0050 process.VtxSmeared = cms.EDProducer("BeamProfileVtxGenerator",
0051     process.common_beam_direction_parameters,
0052     VtxSmearedCommon,
0053     BeamMeanX       = cms.double(0.0),
0054     BeamMeanY       = cms.double(0.0),
0055     BeamSigmaX      = cms.double(0.0001),
0056     BeamSigmaY      = cms.double(0.0001),
0057     Psi             = cms.double(999.9),
0058     GaussianProfile = cms.bool(False),
0059     BinX            = cms.int32(50),
0060     BinY            = cms.int32(50),
0061     File            = cms.string('beam.profile'),
0062     UseFile         = cms.bool(False),
0063     TimeOffset      = cms.double(0.)
0064 )
0065 
0066 process.source = cms.Source("EmptySource")
0067 
0068 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0069     PGunParameters = cms.PSet(
0070         process.common_beam_direction_parameters,
0071         MinE   = cms.double(9.99),
0072         MaxE   = cms.double(10.01),
0073         PartID = cms.vint32(211)
0074     ),
0075     Verbosity       = cms.untracked.int32(0),
0076     AddAntiParticle = cms.bool(False),
0077     firstRun        = cms.untracked.uint32(1)
0078 )
0079 
0080 process.Timing = cms.Service("Timing")
0081 
0082 process.testH4 = cms.EDAnalyzer("HcalTBParameterTester",
0083                                 Name = cms.untracked.string("EcalHitsEB"),
0084                                 Mode = cms.untracked.int32(1)
0085 )
0086 
0087 process.testH2EE = cms.EDAnalyzer("HcalTBParameterTester",
0088                                   Name = cms.untracked.string("EcalHitsEB"),
0089                                   Mode = cms.untracked.int32(0)
0090 )
0091 
0092 process.testH2HC = cms.EDAnalyzer("HcalTBParameterTester",
0093                                   Name = cms.untracked.string("HcalHits"),
0094                                   Mode = cms.untracked.int32(0)
0095 )
0096 
0097 process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.testH4)
0098 #process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.testH2EE*process.testH2HC)