File indexing completed on 2024-04-06 12:30:19
0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003
0004 def customise(process):
0005
0006 FLAVOR = process.generator.hscpFlavor.value()
0007 PROCESS_FILE = process.generator.processFile.value()
0008 PARTICLE_FILE = process.generator.particleFile.value()
0009 USE_REGGE = process.generator.useregge.value()
0010
0011 process.load("SimG4Core.CustomPhysics.CustomPhysics_cfi")
0012 process.customPhysicsSetup.particlesDef = PARTICLE_FILE
0013 process.customPhysicsSetup.reggeModel = USE_REGGE
0014
0015 if hasattr(process,'g4SimHits'):
0016
0017 process.g4SimHits.Physics.type = cms.string('SimG4Core/Physics/CustomPhysics')
0018
0019 process.g4SimHits.Physics.Verbosity = cms.untracked.int32(0)
0020
0021
0022 if FLAVOR=="gluino" or FLAVOR=="stop":
0023 process.customPhysicsSetup.processesDef = PROCESS_FILE
0024 process.g4SimHits.Physics.ExoticaPhysicsSS = cms.untracked.bool(False)
0025 elif FLAVOR =="stau":
0026 process.g4SimHits.Physics.ExoticaPhysicsSS = cms.untracked.bool(False)
0027 else:
0028 print("Wrong flavor %s. Only accepted are gluino, stau, stop." % FLAVOR)
0029
0030 process.g4SimHits.Physics = cms.PSet(
0031 process.g4SimHits.Physics,
0032 process.customPhysicsSetup
0033 )
0034
0035 return (process)
0036