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 custom Physics List
0017         process.g4SimHits.Physics.type = cms.string('SimG4Core/Physics/CustomPhysics')
0018         # add verbosity
0019         process.g4SimHits.Physics.Verbosity = cms.untracked.int32(0)
0020         #process.g4SimHits.G4Commands = cms.vstring("/control/cout/ignoreThreadsExcept 0")
0021         # check flavor of exotics and choose exotica Physics List
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         # add custom options
0030         process.g4SimHits.Physics = cms.PSet(
0031             process.g4SimHits.Physics, #keep all default value and add others
0032             process.customPhysicsSetup
0033         )   
0034 
0035         return (process)
0036