Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-27 03:18:08

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 def customise(process):
0004 
0005     FLAVOR = process.generator.hscpFlavor.value()
0006     PROCESS_FILE = process.generator.processFile.value()
0007     PARTICLE_FILE = process.generator.particleFile.value()
0008     USE_REGGE = process.generator.useregge.value()
0009 
0010     process.load("SimG4Core.CustomPhysics.CustomPhysics_cfi")
0011     process.customPhysicsSetup.particlesDef = PARTICLE_FILE
0012     process.customPhysicsSetup.reggeModel = USE_REGGE
0013 
0014     if hasattr(process,'g4SimHits'):
0015         # defined watches
0016         process.g4SimHits.Watchers = cms.VPSet (
0017             cms.PSet(
0018                 type = cms.string('RHStopTracer'),
0019                 RHStopTracer = cms.PSet(
0020                 verbose = cms.untracked.bool (False),
0021                 traceParticle = cms.string ("((anti_)?~|tau1).*"), #this one regular expression is needed to look for ~HIP*, anti_~HIP*, ~tau1, anti_~tau1, ~g_rho0, ~g_Deltabar0, ~T_uu1++, etc
0022                 stopRegularParticles = cms.untracked.bool (False)
0023                 )        
0024             )
0025         )
0026         # defined custom Physics List
0027         process.g4SimHits.Physics.type = cms.string('SimG4Core/Physics/CustomPhysics')
0028         # add verbosity
0029         process.g4SimHits.Physics.Verbosity = cms.untracked.int32(0)
0030         #process.g4SimHits.G4Commands = cms.vstring("/control/cout/ignoreThreadsExcept 0")
0031         # check flavor of exotics and choose exotica Physics List
0032         if FLAVOR=="gluino" or FLAVOR=="stop":
0033             process.customPhysicsSetup.processesDef = PROCESS_FILE
0034             process.g4SimHits.Physics.ExoticaPhysicsSS = cms.untracked.bool(False)
0035         elif FLAVOR =="stau":
0036             process.g4SimHits.Physics.ExoticaPhysicsSS = cms.untracked.bool(False)
0037         else:
0038             print("Wrong flavor %s. Only accepted are gluino, stau, stop." % FLAVOR)
0039         # add custom options
0040         process.g4SimHits.Physics = cms.PSet(
0041             process.g4SimHits.Physics, #keep all default value and add others
0042             process.customPhysicsSetup
0043         )   
0044 
0045         return (process)
0046