Example #1
0
# geometry_option = "CepC_v4-onlyTracker.xml"
geometry_option = "det.xml"

if not os.getenv("DETDRIFTCHAMBERROOT"):
    print("Can't find the geometry. Please setup envvar DETCEPCV4ROOT.")
    sys.exit(-1)

geometry_path = os.path.join(os.getenv("DETDRIFTCHAMBERROOT"), "compact",
                             geometry_option)
if not os.path.exists(geometry_path):
    print("Can't find the compact geometry file: %s" % geometry_path)
    sys.exit(-1)

from Configurables import GeoSvc
geosvc = GeoSvc("GeoSvc")
geosvc.compact = geometry_path

##############################################################################
# Physics Generator
##############################################################################
from Configurables import GenAlgo
from Configurables import GtGunTool
from Configurables import StdHepRdr
from Configurables import SLCIORdr
from Configurables import HepMCRdr
from Configurables import GenPrinter

gun = GtGunTool("GtGunTool")
# gun.Particles = ["pi+"]
# gun.EnergyMins = [100.] # GeV
# gun.EnergyMaxs = [100.] # GeV
Example #2
0
geometry_option = "CepC_v4-onlyVXD.xml"

if not os.getenv("DETCEPCV4ROOT"):
    print("Can't find the geometry. Please setup envvar DETCEPCV4ROOT.")
    sys.exit(-1)

geometry_path = os.path.join(os.getenv("DETCEPCV4ROOT"), "compact",
                             geometry_option)
if not os.path.exists(geometry_path):
    print("Can't find the compact geometry file: %s" % geometry_path)
    sys.exit(-1)

from Configurables import GeoSvc
geosvc = GeoSvc("GeoSvc")
#geosvc.compact = geometry_path
geosvc.compact = "./Detector/DetEcalMatrix/compact/det.xml"

##############################################################################
# Physics Generator
##############################################################################
from Configurables import GenAlgo
from Configurables import GtGunTool
from Configurables import StdHepRdr
from Configurables import SLCIORdr
from Configurables import HepMCRdr
from Configurables import GenPrinter

gun = GtGunTool("GtGunTool")
gun.Particles = ["gamma", "gamma"]
gun.EnergyMins = [5, 10]  # GeV
gun.EnergyMaxs = [5, 10]  # GeV