1 from __future__
import print_function
2 import FWCore.ParameterSet.Config
as cms
13 myParList = cms.vdouble(1.006, 1.0, 0.0, 1.82790e+00, 3.66237e+00, 0.965, 1.0)
14 myNameTag = mySample +
"_" + myEnergy +
"_" + mySection
16 process = cms.Process(
"TBSim")
21 process.load(
"FWCore.MessageLogger.MessageLogger_cfi")
24 process.load(
"SimGeneral.HepPDTESSource.pythiapdt_cfi")
26 process.RandomNumberGeneratorService = cms.Service(
"RandomNumberGeneratorService",
27 saveFileName = cms.untracked.string(
''),
29 initialSeed = cms.untracked.uint32(7824367),
30 engineName = cms.untracked.string(
'HepJamesRandom')
33 initialSeed = cms.untracked.uint32(
int(mySeed)),
34 engineName = cms.untracked.string(
'HepJamesRandom')
36 VtxSmeared = cms.PSet(
37 initialSeed = cms.untracked.uint32(98765432),
38 engineName = cms.untracked.string(
'HepJamesRandom')
41 initialSeed = cms.untracked.uint32(11),
42 engineName = cms.untracked.string(
'HepJamesRandom')
44 SimEcalTBG4Object = cms.PSet(
45 initialSeed = cms.untracked.uint32(12),
46 engineName = cms.untracked.string(
'HepJamesRandom')
49 initialSeed = cms.untracked.uint32(12345),
50 engineName = cms.untracked.string(
'HepJamesRandom')
54 process.randomEngineStateProducer = cms.EDProducer(
"RandomEngineStateProducer")
57 process.maxEvents = cms.untracked.PSet(
58 input = cms.untracked.int32(
int(myEvent)*10)
64 process.common_beam_direction_parameters = cms.PSet(
65 BeamMeanY = cms.double(0.0),
66 BeamMeanX = cms.double(0.0),
67 MinEta = cms.double(0.221605),
68 MaxEta = cms.double(0.221605),
69 MinPhi = cms.double(0.0467487),
70 MaxPhi = cms.double(0.0467487),
72 BeamPosition = cms.double(-26733.5)
78 process.MuonNumberingInitialization = cms.ESProducer(
"MuonNumberingInitialization")
79 process.XMLIdealGeometryESSource = cms.ESSource(
"XMLIdealGeometryESSource",
80 geomXMLFiles = cms.vstring(
'Geometry/CMSCommonData/data/materials.xml',
81 'Geometry/CMSCommonData/data/rotations.xml',
82 'Geometry/EcalTestBeam/data/ebcon.xml',
83 'Geometry/EcalCommonData/data/ebrot.xml',
84 'Geometry/EcalTestBeam/data/eregalgo.xml',
85 'Geometry/EcalCommonData/data/ebalgo.xml',
86 'Geometry/EcalTestBeam/data/tbrot.xml',
87 'Geometry/EcalTestBeam/data/TBH4.xml',
88 'Geometry/EcalTestBeam/data/TBH4ecalsens.xml',
89 'Geometry/HcalSimData/data/CaloUtil.xml',
92 'SimG4Core/GFlash/TB/gflashTBH4ProdCuts.xml',
93 'Geometry/CMSCommonData/data/FieldParameters.xml'),
94 rootNodeName = cms.string(
'TBH4:OCMS')
98 process.load(
"Geometry.CaloEventSetup.CaloGeometry_cff")
99 process.load(
"Geometry.CaloEventSetup.CaloTopology_cfi")
100 process.load(
"Geometry.EcalMapping.EcalMapping_cfi")
101 process.load(
"Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi")
102 process.CaloGeometryBuilder.SelectedCalos = [
'EcalBarrel']
108 process.load(
"MagneticField.Engine.uniformMagneticField_cfi")
110 process.source = cms.Source(
"EmptySource")
112 process.generator = cms.EDProducer(
"FlatRandomEGunProducer",
113 PGunParameters = cms.PSet(
114 process.common_beam_direction_parameters,
115 PartID = cms.vint32(11),
119 Verbosity = cms.untracked.int32(0),
121 psethack = cms.string(
'single electron'),
122 AddAntiParticle = cms.bool(
False),
125 process.ProductionFilterSequence = cms.Sequence(process.generator)
133 process.VtxSmeared = cms.EDProducer(
"BeamProfileVtxGenerator",
134 process.common_beam_direction_parameters,
139 BeamSigmaX = cms.double(5.0),
140 BeamSigmaY = cms.double(5.0),
141 Psi = cms.double(999.9),
142 GaussianProfile = cms.bool(
True),
143 BinX = cms.int32(50),
144 BinY = cms.int32(50),
145 File = cms.string(
'beam.profile'),
146 UseFile = cms.bool(
False),
147 TimeOffset = cms.double(0.)
152 process.load(
"SimG4Core.Application.g4SimHits_cfi")
154 process.g4SimHits.UseMagneticField = cms.bool(
False)
155 process.g4SimHits.Physics.DefaultCutValue = 1.
156 process.g4SimHits.NonBeamEvent = cms.bool(
True)
157 process.g4SimHits.Generator.HepMCProductLabel = cms.string(
'generatorSmeared')
158 process.g4SimHits.Generator.ApplyPCuts = cms.bool(
False)
159 process.g4SimHits.Generator.ApplyEtaCuts = cms.bool(
True)
160 process.g4SimHits.Generator.ApplyPhiCuts = cms.bool(
False)
161 process.g4SimHits.Generator.MaxEtaCut = cms.double(1.5)
162 process.g4SimHits.Generator.MinEtaCut = cms.double(0.0)
163 process.g4SimHits.CaloSD.CorrectTOFBeam = cms.bool(
True)
164 process.g4SimHits.CaloSD.BeamPosition = cms.double(-26733.5)
165 process.g4SimHits.CaloTrkProcessing.TestBeam = cms.bool(
True)
166 process.g4SimHits.StackingAction.MaxTrackTime = cms.double(10000.)
167 process.g4SimHits.SteppingAction.MaxTrackTime = cms.double(10000.)
168 process.g4SimHits.CaloSD.TmaxHit = cms.double(10000.)
169 process.g4SimHits.CaloSD.TmaxHits = cms.vdouble(10000.,10000.,10000.,10000.,10000.)
170 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
171 type = cms.string(
'EcalTBH4Trigger'),
172 verbose = cms.untracked.bool(
False),
174 trigEvents = cms.untracked.int32(
int(myEvent))
180 process.SimEcalTBG4Object = cms.EDProducer(
"EcalTBMCInfoProducer",
181 process.common_beam_direction_parameters,
182 CrystalMapFile = cms.FileInPath(
'Geometry/EcalTestBeam/data/BarrelSM1CrystalCenterElectron120GeV.dat'),
183 moduleLabelVtx = cms.untracked.string(
'generatorSmeared')
188 process.SimEcalTBHodoscope = cms.EDProducer(
"TBHodoActiveVolumeRawInfoProducer")
192 process.SimEcalEventHeader = cms.EDProducer(
"FakeTBEventHeaderProducer",
193 EcalTBInfoLabel = cms.untracked.string(
'SimEcalTBG4Object')
200 process.load(
"SimGeneral.MixingModule.mixNoPU_cfi")
204 process.load(
"CalibCalorimetry.EcalTrivialCondModules.EcalTrivialCondRetrieverTB_cfi")
206 process.load(
"CalibCalorimetry.EcalTrivialCondModules.ESTrivialCondRetriever_cfi")
210 process.load(
"SimCalorimetry.EcalTestBeam.ecaldigi_testbeam_cfi")
213 process.load(
"Configuration.EcalTB.localReco_tbsim_cff")
232 process.ecal_notCont_sim.EBs25notContainment = 1.0
233 process.ecal_notCont_sim.EEs25notContainment = 1.0
234 process.g4SimHits.Physics.type =
'SimG4Core/Physics/GFlash'
235 process.g4SimHits.Physics.GFlash = cms.PSet(
236 bField = cms.double(0.0),
237 GflashEMShowerModel = cms.bool(
True),
238 GflashHadronShowerModel = cms.bool(
True),
239 GflashHistogram = cms.bool(
True),
240 GflashHistogramName = cms.string(
"gflash_histogram_"+myNameTag+
".root"),
241 GflashHadronPhysics = cms.string(
'QGSP_BERT'),
242 GflashHcalOuter = cms.bool(
True),
243 GflashExportToFastSim = cms.bool(
False),
244 watcherOn = cms.bool(
False),
245 Verbosity = cms.untracked.int32(0),
246 tuning_pList = myParList
249 print(
"physics type : ", process.g4SimHits.Physics.type)
252 process.doSimHits = cms.Sequence(process.ProductionFilterSequence*process.VtxSmeared*process.g4SimHits)
253 process.doSimTB = cms.Sequence(process.SimEcalTBG4Object*process.SimEcalTBHodoscope*process.SimEcalEventHeader)
254 process.doEcalDigis = cms.Sequence(process.mix)
256 process.p1 = cms.Path(process.doSimHits*process.doSimTB*process.doEcalDigis*process.localReco_tbsim)
262 process.MessageLogger.destinations=cms.untracked.vstring(
'cout'
266 process.MessageLogger.categories=cms.untracked.vstring(
'FwkJob'
277 ,
'BeamProfileVtxGenerator'
283 process.MessageLogger.G4msg = cms.untracked.PSet(
284 noTimeStamps = cms.untracked.bool(
True)
286 ,threshold = cms.untracked.string(
'INFO')
288 ,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
289 ,FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
290 ,FwkSummary = cms.untracked.PSet(limit = cms.untracked.int32(0))
291 ,Root_NoDictionary = cms.untracked.PSet(limit = cms.untracked.int32(0))
292 ,FwkJob = cms.untracked.PSet(limit = cms.untracked.int32(0))
293 ,TimeReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
294 ,TimeModule = cms.untracked.PSet(limit = cms.untracked.int32(0))
295 ,TimeEvent = cms.untracked.PSet(limit = cms.untracked.int32(0))
296 ,MemoryCheck = cms.untracked.PSet(limit = cms.untracked.int32(0))
302 ,PhysicsList = cms.untracked.PSet(limit = cms.untracked.int32(-1))
303 ,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(-1))
304 ,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(-1))
305 ,BeamProfileVtxGenerator = cms.untracked.PSet(limit = cms.untracked.int32(-1))
310 process.options = cms.untracked.PSet(
311 wantSummary = cms.untracked.bool(
True)
316 process.options = cms.untracked.PSet()
317 process.options.SkipEvent = cms.untracked.vstring(
'EventCorruption')