Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:06

0001 import FWCore.ParameterSet.Config as cms
0002 from Configuration.Eras.Modifier_h2tb_cff import h2tb
0003 
0004 process = cms.Process("PROD", h2tb)
0005 
0006 process.load('SimG4CMS.HcalTestBeam.TB2006GeometryXML_cfi')
0007 process.load('SimGeneral.HepPDTESSource.pdt_cfi')
0008 process.load('Configuration.StandardSequences.Services_cff')
0009 process.load('FWCore.MessageService.MessageLogger_cfi')
0010 process.load('Geometry.HcalTestBeamData.hcalDDDSimConstants_cff')
0011 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0012 process.load('Configuration.EventContent.EventContent_cff')
0013 process.load('IOMC.EventVertexGenerators.VtxSmearedFlat_cfi')
0014 process.load('GeneratorInterface.Core.generatorSmeared_cfi')
0015 process.load('SimG4Core.Application.g4SimHits_cfi')
0016 process.load('IOMC.RandomEngine.IOMC_cff')
0017 
0018 if hasattr(process,'MessageLogger'):
0019     process.MessageLogger.HCalGeom=dict()
0020     process.MessageLogger.HcalSim=dict()
0021     process.MessageLogger.CaloSim=dict()
0022 
0023 process.TFileService = cms.Service("TFileService",
0024                                    fileName = cms.string('hcaltb06.root')
0025                                    )
0026 
0027 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0028 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0029 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0030 
0031 beamPosition = -800.0
0032 
0033 process.common_beam_direction_parameters = cms.PSet(
0034     MinE   = cms.double(50.0),
0035     MaxE   = cms.double(50.0),
0036     PartID = cms.vint32(-211),
0037     MinEta       = cms.double(0.5655),
0038     MaxEta       = cms.double(0.5655),
0039     MinPhi       = cms.double(-0.1309),
0040     MaxPhi       = cms.double(-0.1309),
0041     BeamPosition = cms.double(beamPosition)
0042     )
0043 
0044 process.source = cms.Source("EmptySource",
0045                             firstRun        = cms.untracked.uint32(1),
0046                             firstEvent      = cms.untracked.uint32(1)
0047                             )
0048 
0049 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0050                                    PGunParameters = cms.PSet(
0051         process.common_beam_direction_parameters,
0052         ),
0053                                    Verbosity       = cms.untracked.int32(0),
0054                                    AddAntiParticle = cms.bool(False)
0055                                    )
0056 
0057 process.maxEvents = cms.untracked.PSet(
0058     input = cms.untracked.int32(100)
0059     )
0060 
0061 process.o1 = cms.OutputModule("PoolOutputModule",
0062                               process.FEVTSIMEventContent,
0063                               fileName = cms.untracked.string('sim2006.root')
0064                               )
0065 
0066 process.Timing = cms.Service("Timing")
0067 
0068 from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import *
0069 process.VtxSmeared = cms.EDProducer("BeamProfileVtxGenerator",
0070     process.common_beam_direction_parameters,
0071                                     VtxSmearedCommon,
0072                                     BeamMeanX       = cms.double(0.0),
0073                                     BeamMeanY       = cms.double(0.0),
0074                                     BeamSigmaX      = cms.double(0.0001),
0075                                     BeamSigmaY      = cms.double(0.0001),
0076                                     Psi             = cms.double(999.9),
0077                                     GaussianProfile = cms.bool(False),
0078                                     BinX            = cms.int32(50),
0079                                     BinY            = cms.int32(50),
0080                                     File            = cms.string('beam.profile'),
0081                                     UseFile         = cms.bool(False),
0082                                     TimeOffset      = cms.double(0.)
0083                                     )
0084 
0085 process.testbeam = cms.EDAnalyzer("HcalTB06Analysis",
0086                                   process.common_beam_direction_parameters,
0087                                   ECAL = cms.bool(True),
0088                                   TestBeamAnalysis = cms.PSet(
0089         EHCalMax   = cms.untracked.double(400.0),
0090         ETtotMax   = cms.untracked.double(400.0),
0091         beamEnergy = cms.untracked.double(50.),
0092         TimeLimit  = cms.double(180.0),
0093         EcalWidth  = cms.double(0.362),
0094         HcalWidth  = cms.double(0.640),
0095         EcalFactor = cms.double(1.0),
0096         HcalFactor = cms.double(100.0),
0097         MIP        = cms.double(0.8),
0098         Verbose    = cms.untracked.bool(True),
0099         MakeTree   = cms.untracked.bool(True)
0100         )
0101                                   )
0102 
0103 process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits*process.testbeam)
0104 process.outpath = cms.EndPath(process.o1)
0105 
0106 process.g4SimHits.NonBeamEvent = True
0107 process.g4SimHits.UseMagneticField = False
0108 process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMM'
0109 process.g4SimHits.Physics.Region = 'HcalRegion'
0110 process.g4SimHits.Physics.DefaultCutValue = 1.
0111 
0112 process.g4SimHits.StackingAction.KillGamma = False
0113 process.g4SimHits.CaloSD.BeamPosition = beamPosition
0114 process.g4SimHits.ECalSD.UseBirkLaw = True
0115 process.g4SimHits.ECalSD.BirkL3Parametrization = True
0116 process.g4SimHits.ECalSD.BirkC1 = 0.033
0117 process.g4SimHits.ECalSD.BirkC2 = 0.0
0118 process.g4SimHits.ECalSD.SlopeLightYield = 0.02
0119 process.g4SimHits.HCalSD.UseBirkLaw = True
0120 process.g4SimHits.HCalSD.BirkC1 = 0.0052
0121 process.g4SimHits.HCalSD.BirkC2 = 0.142
0122 process.g4SimHits.HCalSD.BirkC3 = 1.75
0123 process.g4SimHits.HCalSD.UseLayerWt = False
0124 process.g4SimHits.HCalSD.WtFile     = ' '
0125 process.g4SimHits.HCalSD.UseShowerLibrary    = False
0126 process.g4SimHits.HCalSD.TestNumberingScheme = False
0127 process.g4SimHits.HCalSD.UseHF   = False
0128 process.g4SimHits.HCalSD.ForTBH2 = True