forked from HEP-FCC/FCCSW
-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple_workflow.py
49 lines (41 loc) · 1.74 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
39
40
41
42
43
44
45
46
47
48
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, FCCDataSvc, AlbersWrite, AlbersOutput
albersevent = FCCDataSvc("EventDataSvc")
# reads HepMC text file and write the HepMC::GenEvent to the data service
from Configurables import HepMCReader
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
from Configurables import HepMCConverter
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="all_genparticles"
from Configurables import JetClustering_MCParticleCollection_GenJetCollection_GenJetParticleAssociationCollection_ as JetClustering
genjet_clustering = JetClustering(
"GenJetClustering",
verbose = False
)
genjet_clustering.Inputs.particles.Path='all_genparticles'
# giving a meaningful name for the output product
genjet_clustering.Outputs.jets.Path='genjets'
out = AlbersOutput("out",
OutputLevel=DEBUG)
out.outputCommands = ["keep *"]
ApplicationMgr(
TopAlg = [reader,hepmc_converter,
genjet_clustering,
out
],
EvtSel = 'NONE',
EvtMax = 1000,
ExtSvc = [albersevent],
# EventLoop = eventloopmgr,
# OutputLevel=DEBUG
)