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.Watchers = cms.VPSet (
0018 cms.PSet(
0019 type = cms.string('RHStopTracer'),
0020 RHStopTracer = cms.PSet(
0021 verbose = cms.untracked.bool (False),
0022 traceParticle = cms.string ("((anti_)?~|tau1).*"),
0023 stopRegularParticles = cms.untracked.bool (False)
0024 )
0025 )
0026 )
0027
0028 process.g4SimHits.Physics.type = cms.string('SimG4Core/Physics/CustomPhysics')
0029
0030 process.g4SimHits.Physics.Verbosity = cms.untracked.int32(0)
0031
0032
0033 if FLAVOR=="gluino" or FLAVOR=="stop":
0034 process.customPhysicsSetup.processesDef = PROCESS_FILE
0035 process.g4SimHits.Physics.ExoticaPhysicsSS = cms.untracked.bool(False)
0036 elif FLAVOR =="stau":
0037 process.g4SimHits.Physics.ExoticaPhysicsSS = cms.untracked.bool(False)
0038 else:
0039 print("Wrong flavor %s. Only accepted are gluino, stau, stop." % FLAVOR)
0040
0041 process.g4SimHits.Physics = cms.PSet(
0042 process.g4SimHits.Physics,
0043 process.customPhysicsSetup
0044 )
0045
0046 return (process)
0047