Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:04:12

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.TB2006Geometry37XML_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.EcalCommonData.ecalSimulationParameters_cff")
0011 process.load('Geometry.HcalTestBeamData.hcalDDDSimConstants_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 
0022 process.TFileService = cms.Service("TFileService",
0023                                    fileName = cms.string('hcaltb06_37.root')
0024                                    )
0025 
0026 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0027 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0028 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0029 
0030 beamPosition = -800.0
0031 
0032 process.common_beam_direction_parameters = cms.PSet(
0033     MinE   = cms.double(50.0),
0034     MaxE   = cms.double(50.0),
0035     PartID = cms.vint32(-211),
0036     MinEta       = cms.double(0.2175),
0037     MaxEta       = cms.double(0.2175),
0038     MinPhi       = cms.double(0.15708),
0039     MaxPhi       = cms.double(0.15708),
0040     BeamPosition = cms.double(beamPosition)
0041     )
0042 
0043 process.source = cms.Source("EmptySource",
0044                             firstRun        = cms.untracked.uint32(1),
0045                             firstEvent      = cms.untracked.uint32(1)
0046                             )
0047 
0048 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0049                                    PGunParameters = cms.PSet(
0050         process.common_beam_direction_parameters,
0051         ),
0052                                    Verbosity       = cms.untracked.int32(0),
0053                                    AddAntiParticle = cms.bool(False)
0054                                    )
0055 
0056 process.maxEvents = cms.untracked.PSet(
0057     input = cms.untracked.int32(100)
0058     )
0059 
0060 process.o1 = cms.OutputModule("PoolOutputModule",
0061                               process.FEVTSIMEventContent,
0062                               fileName = cms.untracked.string('sim2006_37.root')
0063                               )
0064 
0065 process.Timing = cms.Service("Timing")
0066 
0067 from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import *
0068 process.VtxSmeared = cms.EDProducer("BeamProfileVtxGenerator",
0069                                     process.common_beam_direction_parameters,
0070                                     VtxSmearedCommon,
0071                                     BeamMeanX       = cms.double(0.0),
0072                                     BeamMeanY       = cms.double(0.0),
0073                                     BeamSigmaX      = cms.double(0.0001),
0074                                     BeamSigmaY      = cms.double(0.0001),
0075                                     Psi             = cms.double(999.9),
0076                                     GaussianProfile = cms.bool(False),
0077                                     BinX            = cms.int32(50),
0078                                     BinY            = cms.int32(50),
0079                                     File            = cms.string('beam.profile'),
0080                                     UseFile         = cms.bool(False),
0081                                     TimeOffset      = cms.double(0.)
0082                                     )
0083 
0084 process.testbeam = cms.EDAnalyzer("HcalTB06Analysis",
0085                                   process.common_beam_direction_parameters,
0086                                   ECAL = cms.bool(True),
0087                                   TestBeamAnalysis = cms.PSet(
0088         EHCalMax   = cms.untracked.double(400.0),
0089         ETtotMax   = cms.untracked.double(400.0),
0090         beamEnergy = cms.untracked.double(50.),
0091         TimeLimit  = cms.double(180.0),
0092         EcalWidth  = cms.double(0.362),
0093         HcalWidth  = cms.double(0.640),
0094         EcalFactor = cms.double(1.0),
0095         HcalFactor = cms.double(100.0),
0096         MIP        = cms.double(0.8),
0097         Verbose    = cms.untracked.bool(True),
0098         MakeTree   = cms.untracked.bool(True)
0099         )
0100                                   )
0101 
0102 process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits*process.testbeam)
0103 process.outpath = cms.EndPath(process.o1)
0104 
0105 process.g4SimHits.NonBeamEvent = True
0106 process.g4SimHits.UseMagneticField = False
0107 process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMM'
0108 process.g4SimHits.Physics.Region = 'HcalRegion'
0109 process.g4SimHits.Physics.DefaultCutValue = 1.
0110 
0111 process.g4SimHits.StackingAction.KillGamma = False
0112 process.g4SimHits.CaloSD.BeamPosition = beamPosition
0113 process.g4SimHits.ECalSD.UseBirkLaw = True
0114 process.g4SimHits.ECalSD.BirkL3Parametrization = True
0115 process.g4SimHits.ECalSD.BirkC1 = 0.033
0116 process.g4SimHits.ECalSD.BirkC2 = 0.0
0117 process.g4SimHits.ECalSD.SlopeLightYield = 0.02
0118 process.g4SimHits.HCalSD.UseBirkLaw = True
0119 process.g4SimHits.HCalSD.BirkC1 = 0.0052
0120 process.g4SimHits.HCalSD.BirkC2 = 0.142
0121 process.g4SimHits.HCalSD.BirkC3 = 1.75
0122 process.g4SimHits.HCalSD.UseLayerWt = False
0123 process.g4SimHits.HCalSD.WtFile     = ' '
0124 process.g4SimHits.HCalSD.UseShowerLibrary    = False
0125 process.g4SimHits.HCalSD.TestNumberingScheme = False
0126 process.g4SimHits.HCalSD.UseHF   = False
0127 process.g4SimHits.HCalSD.ForTBH2 = True