Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
from Gaudi.Configuration import *

# Data service
from Configurables import k4DataSvc
from Configurables import EventDataSvc
from k4FWCore import ApplicationMgr, IOSvc

podioevent = k4DataSvc("EventDataSvc")
podioevent = EventDataSvc("EventDataSvc")

# DD4hep geometry service
from Configurables import GeoSvc
Expand Down Expand Up @@ -82,12 +83,9 @@
OutputLevel=DEBUG,
)

# PODIO algorithm
from Configurables import PodioOutput

out = PodioOutput("out", OutputLevel=DEBUG)
out.outputCommands = ["keep *"]
out.filename = "output_ecalSim_e50GeV_" + str(num_events) + "events.root"
iosvc = IOSvc()
iosvc.Output = "output_ecalSim_e50GeV_" + str(num_events) + "events.root"
iosvc.outputCommands = ["keep *"]

# CPU information
from Configurables import AuditorSvc, ChronoAuditor
Expand All @@ -97,11 +95,8 @@
audsvc.Auditors = [chra]
geantsim.AuditExecute = True

# ApplicationMgr
from Configurables import ApplicationMgr

ApplicationMgr(
TopAlg=[geantsim, out],
TopAlg=[geantsim],
EvtSel="NONE",
EvtMax=num_events,
# order is important, as GeoSvc is needed by G4SimSvc
Expand Down
19 changes: 7 additions & 12 deletions RecCalorimeter/tests/options/geant_fullsim_hcal_singleparticles.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
from Gaudi.Configuration import *

# Data service
from Configurables import k4DataSvc
from Configurables import EventDataSvc
from k4FWCore import ApplicationMgr, IOSvc

podioevent = k4DataSvc("EventDataSvc")
podioevent = EventDataSvc("EventDataSvc")

# DD4hep geometry service
from Configurables import GeoSvc
Expand Down Expand Up @@ -89,18 +90,15 @@
OutputLevel=DEBUG,
)

# PODIO algorithm
from Configurables import PodioOutput

out = PodioOutput("out", OutputLevel=DEBUG)
out.outputCommands = ["keep *"]
out.filename = (
iosvc = IOSvc()
iosvc.Output = (
"output_hcalSim_e"
+ str(int(energy / 1000))
+ "GeV_eta036_"
+ str(num_events)
+ "events.root"
)
iosvc.outputCommands = ["keep *"]

# CPU information
from Configurables import AuditorSvc, ChronoAuditor
Expand All @@ -110,11 +108,8 @@
audsvc.Auditors = [chra]
geantsim.AuditExecute = True

# ApplicationMgr
from Configurables import ApplicationMgr

ApplicationMgr(
TopAlg=[geantsim, out],
TopAlg=[geantsim],
EvtSel="NONE",
EvtMax=num_events,
# order is important, as GeoSvc is needed by G4SimSvc
Expand Down
3 changes: 2 additions & 1 deletion RecCalorimeter/tests/options/genJetClustering.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, HepMCDumper, HepMCJetClustering
from Configurables import HepMCDumper, HepMCJetClustering
from Configurables import HepMCHistograms, JetHistograms
from k4FWCore import ApplicationMgr


# TODO: best to run pythia here?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,20 @@
hcalFieldValues = [8]

from Gaudi.Configuration import *
from Configurables import ApplicationMgr, k4DataSvc, PodioOutput
from Configurables import EventDataSvc
from k4FWCore import ApplicationMgr, IOSvc

iosvc = IOSvc()
iosvc.Input = "output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root"
iosvc.CollectionNames = [
"ECalBarrelCells",
"HCalBarrelCells",
"HCalExtBarrelCells",
"GenParticles",
"GenVertices",
]

podioevent = k4DataSvc(
"EventDataSvc",
input="output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root",
)

# reads HepMC text file and write the HepMC::GenEvent to the data service
from Configurables import PodioInput

podioinput = PodioInput(
"PodioReader",
collections=[
"ECalBarrelCells",
"HCalBarrelCells",
"HCalExtBarrelCells",
"GenParticles",
"GenVertices",
],
OutputLevel=DEBUG,
)
podioevent = EventDataSvc("EventDataSvc")

from Configurables import GeoSvc

Expand Down Expand Up @@ -315,10 +308,8 @@
OutputLevel=INFO,
)

out = PodioOutput(
"out", filename="output_BarrelTopo_electrNoise_50GeVe_3ev.root", OutputLevel=DEBUG
)
out.outputCommands = [
iosvc.Output = "output_BarrelTopo_electrNoise_50GeVe_3ev.root"
iosvc.outputCommands = [
"drop *",
"keep GenParticles",
"keep GenVertices",
Expand All @@ -333,7 +324,6 @@
chra = ChronoAuditor()
audsvc = AuditorSvc()
audsvc.Auditors = [chra]
podioinput.AuditExecute = True
createemptycells.AuditExecute = True
createEcalBarrelCells.AuditExecute = True
createHcalBarrelCells.AuditExecute = True
Expand All @@ -342,14 +332,12 @@

ApplicationMgr(
TopAlg=[
podioinput,
rewriteHCal,
createEcalBarrelCells,
createHcalBarrelCells,
createemptycells,
createTopoClusters,
positionsClusterBarrel,
out,
],
EvtSel="NONE",
EvtMax=3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,20 @@
hcalFieldValues = [8]

from Gaudi.Configuration import *
from Configurables import ApplicationMgr, k4DataSvc, PodioOutput
from Configurables import EventDataSvc
from k4FWCore import ApplicationMgr, IOSvc

iosvc = IOSvc()
iosvc.Input = "output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root"
iosvc.CollectionNames = [
"ECalBarrelCells",
"HCalBarrelCells",
"HCalExtBarrelCells",
"GenParticles",
"GenVertices",
]

podioevent = k4DataSvc(
"EventDataSvc",
input="output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root",
)

# reads HepMC text file and write the HepMC::GenEvent to the data service
from Configurables import PodioInput

podioinput = PodioInput(
"PodioReader",
collections=[
"ECalBarrelCells",
"HCalBarrelCells",
"HCalExtBarrelCells",
"GenParticles",
"GenVertices",
],
OutputLevel=DEBUG,
)
podioevent = EventDataSvc("EventDataSvc")

from Configurables import GeoSvc

Expand Down Expand Up @@ -348,10 +341,8 @@
)


out = PodioOutput(
"out", filename="output_BarrelTopo_electrNoise_100GeVpi_3ev.root", OutputLevel=DEBUG
)
out.outputCommands = [
iosvc.Output = "output_BarrelTopo_electrNoise_100GeVpi_3ev.root"
iosvc.outputCommands = [
"drop *",
"keep GenParticles",
"keep GenVertices",
Expand All @@ -368,7 +359,6 @@
chra = ChronoAuditor()
audsvc = AuditorSvc()
audsvc.Auditors = [chra]
podioinput.AuditExecute = True
createemptycells.AuditExecute = True
createEcalBarrelCells.AuditExecute = True
createHcalBarrelCells.AuditExecute = True
Expand All @@ -377,7 +367,6 @@

ApplicationMgr(
TopAlg=[
podioinput,
smear,
rewriteHCal,
createHcalCells,
Expand All @@ -389,7 +378,6 @@
createTopoClusters,
splitClusters,
# positionsClusterBarrel,
out,
],
EvtSel="NONE",
EvtMax=num_events,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,20 @@
hcalFieldValues = [8]

from Gaudi.Configuration import *
from Configurables import ApplicationMgr, k4DataSvc, PodioOutput

podioevent = k4DataSvc(
"EventDataSvc",
input="output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root",
)
from Configurables import EventDataSvc
from k4FWCore import ApplicationMgr, IOSvc

iosvc = IOSvc()
iosvc.Input = "output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root"
iosvc.CollectionNames = [
"ECalBarrelCells",
"HCalBarrelCells",
"HCalExtBarrelCells",
"GenParticles",
"GenVertices",
]

# reads HepMC text file and write the HepMC::GenEvent to the data service
from Configurables import PodioInput

podioinput = PodioInput(
"PodioReader",
collections=[
"ECalBarrelCells",
"HCalBarrelCells",
"HCalExtBarrelCells",
"GenParticles",
"GenVertices",
],
OutputLevel=DEBUG,
)
podioevent = EventDataSvc("EventDataSvc")

from Configurables import GeoSvc

Expand Down Expand Up @@ -348,20 +341,15 @@
)


out = PodioOutput(
"out",
filename="output_BarrelTopo_electrNoise_fullGran_100GeVpi_3ev.root",
OutputLevel=DEBUG,
)
out.outputCommands = ["keep *"]
iosvc.Output = "output_BarrelTopo_electrNoise_fullGran_100GeVpi_3ev.root"
iosvc.outputCommands = ["keep *"]

# CPU information
from Configurables import AuditorSvc, ChronoAuditor

chra = ChronoAuditor()
audsvc = AuditorSvc()
audsvc.Auditors = [chra]
podioinput.AuditExecute = True
createemptycells.AuditExecute = True
createEcalBarrelCells.AuditExecute = True
createHcalBarrelCells.AuditExecute = True
Expand All @@ -370,7 +358,6 @@

ApplicationMgr(
TopAlg=[
podioinput,
smear,
# rewriteHCal,
# createHcalCells,
Expand All @@ -382,7 +369,6 @@
createTopoClusters,
splitClusters,
positionsClusterBarrel,
out,
],
EvtSel="NONE",
EvtMax=num_events,
Expand Down
Loading
Loading