Exemplo n.º 1
0
#!/usr/bin/env python

from Gaudi.Configuration import *

from Configurables import K4DataSvc
dsvc = K4DataSvc("EventDataSvc")

from Configurables import PlcioWriteAlg
alg = PlcioWriteAlg("PlcioWriteAlg")
alg.HeaderCol.Path = "EventHeader"
alg.OutputCol.Path = "MCParticle"

from Configurables import PodioOutput
out = PodioOutput("out")
out.filename = "test.root"
out.outputCommands = ["keep *"]

# ApplicationMgr
from Configurables import ApplicationMgr
ApplicationMgr(TopAlg=[alg, out],
               EvtSel='NONE',
               EvtMax=10,
               ExtSvc=[dsvc],
               OutputLevel=DEBUG)
Exemplo n.º 2
0
from Gaudi.Configuration import *

from Configurables import K4DataSvc
podioevent = K4DataSvc("EventDataSvc")
podioevent.input = "output_k4test_exampledata.root"
from Configurables import CreateExampleEventData
producer = CreateExampleEventData()

from Configurables import PodioInput
inp = PodioInput("InputReader")
inp.collections = ["MCParticles", "SimTrackerHit"]

from Configurables import ApplicationMgr
ApplicationMgr( TopAlg=[inp],
                EvtSel="NONE",
                EvtMax=100,
                ExtSvc=[podioevent],
                OutputLevel=DEBUG,
                )


Exemplo n.º 3
0
#!/usr/bin/env python

from Gaudi.Configuration import *

from Configurables import K4DataSvc
dsvc = K4DataSvc("EventDataSvc", input="test.root")

from Configurables import PodioInput
podioinput = PodioInput("PodioReader", collections=[
    "EventHeader",
    "MCParticle",
    "SimCalorimeterHit"
    ])

from Configurables import Edm4hepReadAlg
alg = Edm4hepReadAlg("Edm4hepReadAlg")
#alg.HeaderCol.Path = "EventHeader"
#alg.MCParticleCol.Path = "MCParticle"
alg.SimCalorimeterHitCol.Path = "SimCalorimeterHit"

# ApplicationMgr
from Configurables import ApplicationMgr
ApplicationMgr( TopAlg = [podioinput, alg],
                EvtSel = 'NONE',
                EvtMax = 10,
                ExtSvc = [dsvc],
                OutputLevel=DEBUG
)
Exemplo n.º 4
0
#!/usr/bin/env python

import os
import sys

from Gaudi.Configuration import *

##############################################################################
# Event Data Svc
##############################################################################
from Configurables import K4DataSvc
dsvc = K4DataSvc("EventDataSvc", input="you_input.root")
##############################################################################
from Configurables import PodioInput  ## set the input collection data
podioinput = PodioInput("PodioReader",
                        collections=["MCParticle", "ECALBarrel"])
##############################################################################
from Configurables import GearSvc
gearSvc = GearSvc("GearSvc")
gearSvc.GearXMLFile = "../Pandora/FullDetGear.xml"
##############################################################################
from Configurables import PandoraPFAlg

pandoralg = PandoraPFAlg("PandoraPFAlg")
## KEEP same with lcioinput name for the ReadXXX ###########
pandoralg.ReadMCParticle = "MCParticle"
pandoralg.ReadECALBarrel = "ECALBarrel"
pandoralg.ReadECALEndcap = "ECALEndcap"
pandoralg.ReadECALOther = "ECALOther"
pandoralg.ReadHCALBarrel = "HCALBarrel"
pandoralg.ReadHCALEndcap = "HCALEndcap"
Exemplo n.º 5
0
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

##############################################################################
# Event Data Svc
##############################################################################

from Configurables import K4DataSvc
dsvc = K4DataSvc("EventDataSvc", input="test-detsim10.root")

##############################################################################
# NTuple Svc
##############################################################################

from Configurables import NTupleSvc
ntsvc = NTupleSvc("NTupleSvc")
ntsvc.Output = ["MyTuples DATAFILE='result.root' OPT='NEW' TYP='ROOT'"]

##############################################################################
# DumpAlg
##############################################################################

from Configurables import DumpIDAlg
alg = DumpIDAlg("DumpAlg")
Exemplo n.º 6
0
#!/usr/bin/env python

from Gaudi.Configuration import *
from Configurables import K4DataSvc
#dsvc = K4DataSvc("EventDataSvc", input="detsim_ECAL_gamma_10000evt.root")
dsvc = K4DataSvc("EventDataSvc", input="ECALonly_gamma_30degree_10000evt.root")

#########################################################################
geometry_option = "CepC_v4-onlyECAL.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 GeomSvc
geosvc = GeomSvc("GeomSvc")
geosvc.compact = geometry_path
########################################################################

from Configurables import PodioInput
podioinput = PodioInput("PodioReader",
                        collections=[
                            "MCParticle", "EcalBarrelCollection",
                            "EcalEndcapsCollection"
                        ])