forked from HEP-FCC/FCCSW
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimple_workflow.py
39 lines (31 loc) · 1.53 KB
/
simple_workflow.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, HepMCReader, HepMCConverter, JetClustering, FCCDataSvc, AlbersWrite, AlbersOutput
albersevent = FCCDataSvc("EventDataSvc")
# reads HepMC text file and write the HepMC::GenEvent to the data service
reader = HepMCReader("Reader", Filename="example_MyPythia.dat")
# have a look at the source code of HepMCReader, in Generation/src/HepMCReader
# In the following line,
# reader.Outputs.YYY.Path = "ZZZ"
# YYY matches the string passed to declareOutput in the constructor of the algorithm
# XXX declares a name for the product (the HepMC::GenEvent)
reader.Outputs.hepmc.Path = "hepmc"
# reads an HepMC::GenEvent from the data service and writes
# a collection of EDM Particles
hepmc_converter = HepMCConverter("Converter")
# the input product name matches the output product name of the previous module
hepmc_converter.Inputs.hepmc.Path="hepmc"
hepmc_converter.Outputs.genparticles.Path="genparticles"
# reads EDM Particles and creates EDM jets
jet_clustering = JetClustering("JetClustering")
jet_clustering.Inputs.genparticles.Path='genparticles'
# giving a meaningful name for the output product
jet_clustering.Outputs.jets.Path='genjets'
out = AlbersOutput("out",
OutputLevel=DEBUG)
ApplicationMgr( TopAlg = [reader,hepmc_converter,jet_clustering],
EvtSel = 'NONE',
EvtMax = 1000,
ExtSvc = [albersevent],
# EventLoop = eventloopmgr,
# OutputLevel=DEBUG
)