Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-06 04:13:41

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0004 from Configuration.Eras.Modifier_h2tb_cff import h2tb
0005 process = cms.Process("PROD", dd4hep, h2tb)
0006 
0007 process.load('FWCore.MessageService.MessageLogger_cfi')
0008 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0009 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0010 process.load("Geometry.HcalTestBeamData.hcalDDDSimConstants_cff")
0011 process.load('GeneratorInterface.Core.generatorSmeared_cfi')
0012 process.load("Configuration.EventContent.EventContent_cff")
0013 process.load("SimG4Core.Application.g4SimHits_cfi")
0014 
0015 process.maxEvents = cms.untracked.PSet(
0016     input = cms.untracked.int32(10)
0017 )
0018 process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
0019                                             confGeomXMLFiles = cms.FileInPath('Geometry/HcalTestBeamData/data/dd4hep/cms-test-ddTB2004-algorithm.xml'),
0020                                             appendToDataLabel = cms.string('')
0021                                             )
0022 
0023 process.DDCompactViewESProducer = cms.ESProducer("DDCompactViewESProducer",
0024                                                 appendToDataLabel = cms.string('')
0025 )
0026 
0027 process.TFileService = cms.Service("TFileService",
0028     fileName = cms.string('hcaltb04.root')
0029 )
0030 
0031 process.MessageLogger.cerr.FwkReport.reportEvery = 5
0032 if hasattr(process,'MessageLogger'):
0033     process.MessageLogger.HCalGeom=dict()
0034     process.MessageLogger.EcalGeom=dict()
0035     process.MessageLogger.HcalSim=dict()
0036     process.MessageLogger.HcalTBSim=dict()
0037     process.MessageLogger.EcalSim=dict()
0038     process.MessageLogger.CaloSim=dict()
0039     process.MessageLogger.SimHCalData=dict()
0040     process.MessageLogger.VertexGenerator=dict()
0041 
0042 process.load("IOMC.RandomEngine.IOMC_cff")
0043 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0044 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0045 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0046 
0047 beamPosition = -521.5
0048 process.common_beam_direction_parameters = cms.PSet(
0049     MinEta       = cms.double(0.5655),
0050     MaxEta       = cms.double(0.5655),
0051     MinPhi       = cms.double(-0.1309),
0052     MaxPhi       = cms.double(-0.1309),
0053     BeamPosition = cms.double(beamPosition)
0054 )
0055 
0056 from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import *
0057 process.VtxSmeared = cms.EDProducer("BeamProfileVtxGenerator",
0058     process.common_beam_direction_parameters,
0059     VtxSmearedCommon,
0060     BeamMeanX       = cms.double(0.0),
0061     BeamMeanY       = cms.double(0.0),
0062     BeamSigmaX      = cms.double(0.0001),
0063     BeamSigmaY      = cms.double(0.0001),
0064     Psi             = cms.double(999.9),
0065     GaussianProfile = cms.bool(False),
0066     BinX            = cms.int32(50),
0067     BinY            = cms.int32(50),
0068     File            = cms.string('beam.profile'),
0069     UseFile         = cms.bool(False),
0070     TimeOffset      = cms.double(0.)
0071 )
0072 
0073 process.source = cms.Source("EmptySource")
0074 
0075 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0076     PGunParameters = cms.PSet(
0077         process.common_beam_direction_parameters,
0078         MinE   = cms.double(9.99),
0079         MaxE   = cms.double(10.01),
0080         PartID = cms.vint32(211)
0081     ),
0082     Verbosity       = cms.untracked.int32(0),
0083     AddAntiParticle = cms.bool(False),
0084     firstRun        = cms.untracked.uint32(1)
0085 )
0086 
0087 process.o1 = cms.OutputModule("PoolOutputModule",
0088     process.FEVTSIMEventContent,
0089     fileName = cms.untracked.string('sim2004.root')
0090 )
0091 
0092 process.Timing = cms.Service("Timing")
0093 
0094 process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits)
0095 process.outpath = cms.EndPath(process.o1)
0096 
0097 process.g4SimHits.NonBeamEvent = True
0098 process.g4SimHits.UseMagneticField = False
0099 process.g4SimHits.Physics.type = 'SimG4Core/Physics/QGSP_FTFP_BERT_EML'
0100 process.g4SimHits.Physics.Region = 'HcalRegion'
0101 process.g4SimHits.Physics.DefaultCutValue = 1.
0102 process.hcalParameters.fromDD4hep = True
0103 process.caloSimulationParameters.fromDD4hep = True
0104 
0105 process.g4SimHits.StackingAction.KillGamma = False
0106 process.g4SimHits.CaloSD.BeamPosition = beamPosition
0107 process.g4SimHits.CaloTrkProcessing.TestBeam = True
0108 process.g4SimHits.ECalSD.UseBirkLaw = True
0109 process.g4SimHits.ECalSD.BirkL3Parametrization = True
0110 process.g4SimHits.ECalSD.BirkC1 = 0.033
0111 process.g4SimHits.ECalSD.BirkC2 = 0.0
0112 process.g4SimHits.ECalSD.SlopeLightYield = 0.05
0113 process.g4SimHits.ECalSD.Detectors = 1
0114 process.g4SimHits.HCalSD.UseBirkLaw = True
0115 process.g4SimHits.HCalSD.BirkC1 = 0.0052
0116 process.g4SimHits.HCalSD.BirkC2 = 0.142
0117 process.g4SimHits.HCalSD.BirkC3 = 1.75
0118 process.g4SimHits.HCalSD.UseLayerWt = False
0119 process.g4SimHits.HCalSD.WtFile     = ' '
0120 process.g4SimHits.HCalSD.UseShowerLibrary = False
0121 process.g4SimHits.HCalSD.TestNumberingScheme = True
0122 process.g4SimHits.HCalSD.UseHF   = False
0123 process.g4SimHits.HCalSD.ForTBHCAL = True
0124 process.g4SimHits.HCalSD.ForTBH2 = True
0125 process.g4SimHits.OnlySDs = ['HcalTB06BeamDetector',
0126                              'EcalSensitiveDetector',
0127                              'CaloTrkProcessing',
0128                              'HcalSensitiveDetector']
0129 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0130     HcalTB04Analysis = cms.PSet(
0131         process.common_beam_direction_parameters,
0132         HcalOnly  = cms.bool(False),
0133         Type      = cms.int32(2),
0134         Mode      = cms.int32(1),
0135         ScaleHB0  = cms.double(0.5),
0136         ScaleHB16 = cms.double(0.5),
0137         ScaleHE0  = cms.double(0.5),
0138         ScaleHO   = cms.double(0.4),
0139         EcalNoise = cms.double(0.13),
0140         Names     = cms.vstring('HcalHits', 'EcalHitsEB'),
0141         Verbose   = cms.untracked.bool(True),
0142         FileName  = cms.untracked.string('HcalTB04.root'),
0143         ETtotMax  = cms.untracked.double(20.0),
0144         EHCalMax  = cms.untracked.double(2.0)
0145     ),
0146     HcalQie = cms.PSet(
0147         NumOfBuckets  = cms.int32(10),
0148         BaseLine      = cms.int32(4),
0149         BinOfMax      = cms.int32(6),
0150         PreSamples    = cms.int32(0),
0151         EDepPerPE     = cms.double(0.0005),
0152         SignalBuckets = cms.int32(2),
0153         SigmaNoise    = cms.double(0.5),
0154         qToPE         = cms.double(4.0)
0155     ),
0156     type = cms.string('HcalTB04Analysis')
0157 ))