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("SimGeneral.HepPDTESSource.pdt_cfi")
0007 process.load("SimG4CMS.HcalTestBeam.TB2003GeometryXML_cfi")
0008 process.load("Geometry.HcalTestBeamData.hcalDDDSimConstants_cff")
0009 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0010 process.load('GeneratorInterface.Core.generatorSmeared_cfi')
0011 process.load("Configuration.EventContent.EventContent_cff")
0012 process.load("SimG4Core.Application.g4SimHits_cfi")
0013 
0014 process.TFileService = cms.Service("TFileService",
0015     fileName = cms.string('hcaltb03.root')
0016 )
0017 
0018 process.load('FWCore.MessageService.MessageLogger_cfi')
0019 if hasattr(process,'MessageLogger'):
0020     process.MessageLogger.HcalTBSim=dict()
0021 
0022 process.load("IOMC.RandomEngine.IOMC_cff")
0023 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0024 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0025 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0026 
0027 process.maxEvents = cms.untracked.PSet(
0028     input = cms.untracked.int32(100)
0029 )
0030 
0031 beamPosition = -408.50
0032 process.common_beam_direction_parameters = cms.PSet(
0033     MinEta       = cms.double(0.5655),
0034     MaxEta       = cms.double(0.5655),
0035     MinPhi       = cms.double(0.1309),
0036     MaxPhi       = cms.double(0.1309),
0037     BeamPosition = cms.double(beamPosition)
0038 )
0039 
0040 from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import *
0041 process.VtxSmeared = cms.EDProducer("BeamProfileVtxGenerator",
0042     process.common_beam_direction_parameters,
0043     VtxSmearedCommon,
0044     BeamMeanX       = cms.double(0.0),
0045     BeamMeanY       = cms.double(0.0),
0046     BeamSigmaX      = cms.double(0.0001),
0047     BeamSigmaY      = cms.double(0.0001),
0048     Psi             = cms.double(999.9),
0049     GaussianProfile = cms.bool(False),
0050     BinX            = cms.int32(50),
0051     BinY            = cms.int32(50),
0052     File            = cms.string('beam.profile'),
0053     UseFile         = cms.bool(False),
0054     TimeOffset      = cms.double(0.)
0055 )
0056 
0057 process.source = cms.Source("EmptySource",
0058     firstRun        = cms.untracked.uint32(1),
0059     firstEvent      = cms.untracked.uint32(1)
0060 )
0061 
0062 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0063     PGunParameters = cms.PSet(
0064         process.common_beam_direction_parameters,
0065         MinE   = cms.double(9.99),
0066         MaxE   = cms.double(10.01),
0067         PartID = cms.vint32(211)
0068     ),
0069     Verbosity       = cms.untracked.int32(0),
0070     AddAntiParticle = cms.bool(False)
0071 )
0072 
0073 process.o1 = cms.OutputModule("PoolOutputModule",
0074     process.FEVTSIMEventContent,
0075     fileName = cms.untracked.string('sim2003.root')
0076 )
0077 
0078 process.Timing = cms.Service("Timing")
0079 
0080 process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits)
0081 process.outpath = cms.EndPath(process.o1)
0082 process.g4SimHits.NonBeamEvent = True
0083 process.g4SimHits.UseMagneticField = False
0084 process.g4SimHits.Physics.type = 'SimG4Core/Physics/QGSP_FTFP_BERT_EML'
0085 process.g4SimHits.Physics.Region = 'HcalRegion'
0086 process.g4SimHits.Physics.DefaultCutValue = 1.
0087 
0088 process.g4SimHits.StackingAction.KillGamma = False
0089 process.g4SimHits.CaloSD.BeamPosition = beamPosition
0090 process.g4SimHits.ECalSD.UseBirkLaw = True
0091 process.g4SimHits.ECalSD.BirkL3Parametrization = True
0092 process.g4SimHits.ECalSD.BirkC1 = 0.033
0093 process.g4SimHits.ECalSD.BirkC2 = 0.0
0094 process.g4SimHits.ECalSD.SlopeLightYield = 0.02
0095 process.g4SimHits.HCalSD.UseBirkLaw = True
0096 process.g4SimHits.HCalSD.BirkC1 = 0.0052
0097 process.g4SimHits.HCalSD.BirkC2 = 0.142
0098 process.g4SimHits.HCalSD.BirkC3 = 1.75
0099 process.g4SimHits.HCalSD.UseLayerWt = False
0100 process.g4SimHits.HCalSD.WtFile     = ' '
0101 process.g4SimHits.HCalSD.UseShowerLibrary    = False
0102 process.g4SimHits.HCalSD.TestNumberingScheme = False
0103 process.g4SimHits.HCalSD.UseHF   = False
0104 process.g4SimHits.HCalSD.ForTBH2 = True
0105 
0106 #process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0107 #    HcalTB04Analysis = cms.PSet(
0108 #        process.common_beam_direction_parameters,
0109 #        HcalOnly  = cms.bool(False),
0110 #        Type      = cms.int32(2),
0111 #        Mode      = cms.int32(1),
0112 #        ScaleHB0  = cms.double(0.5),
0113 #        ScaleHB16 = cms.double(0.5),
0114 #        ScaleHE0  = cms.double(0.5),
0115 #        ScaleHO   = cms.double(0.4),
0116 #        EcalNoise = cms.double(0.13),
0117 #        Names     = cms.vstring('HcalHits', 'EcalHitsEB'),
0118 #        Verbose   = cms.untracked.bool(True),
0119 #        FileName  = cms.untracked.string('HcalTB03.root'),
0120 #        ETtotMax  = cms.untracked.double(20.0),
0121 #        EHCalMax  = cms.untracked.double(2.0)
0122 #    ),
0123 #    HcalQie = cms.PSet(
0124 #        NumOfBuckets  = cms.int32(10),
0125 #        BaseLine      = cms.int32(4),
0126 #        BinOfMax      = cms.int32(6),
0127 #        PreSamples    = cms.int32(0),
0128 #        EDepPerPE     = cms.double(0.0005),
0129 #        SignalBuckets = cms.int32(2),
0130 #        SigmaNoise    = cms.double(0.5),
0131 #        qToPE         = cms.double(4.0)
0132 #    ),
0133 #    type = cms.string('HcalTB04Analysis')
0134 #))
0135