Back to home page

Project CMSSW displayed by LXR

 
 

    


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         # defined watches
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).*"), #this one regular expression is needed to look for ~HIP*, anti_~HIP*, ~tau1, anti_~tau1, ~g_rho0, ~g_Deltabar0, ~T_uu1++, etc
0023                 stopRegularParticles = cms.untracked.bool (False)
0024                 )        
0025             )
0026         )
0027         # defined custom Physics List
0028         process.g4SimHits.Physics.type = cms.string('SimG4Core/Physics/CustomPhysics')
0029         # add verbosity
0030         process.g4SimHits.Physics.Verbosity = cms.untracked.int32(0)
0031         #process.g4SimHits.G4Commands = cms.vstring("/control/cout/ignoreThreadsExcept 0")
0032         # check flavor of exotics and choose exotica Physics List
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         # add custom options
0041         process.g4SimHits.Physics = cms.PSet(
0042             process.g4SimHits.Physics, #keep all default value and add others
0043             process.customPhysicsSetup
0044         )   
0045 
0046         return (process)
0047