Exemple #1
0
# PythiaInterface parameter
#pythia8gen = PythiaInterface("Pythia8Interface",Filename="main03.cmnd")
pythia8gen = PythiaInterface(Filename=pythiafile)
# write the HepMC::GenEvent to the data service
pythia8gen.Outputs.hepmc.Path = "hepmc"

from Configurables import HepMCConverter
# 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 = "all_genparticles"

from Configurables import GenParticleFilter
genfilter = GenParticleFilter("StableParticles")
genfilter.Inputs.genparticles.Path = "all_genparticles"
genfilter.Outputs.genparticles.Path = "genparticles"

from Configurables import JetClustering_MCParticleCollection_GenJetCollection_GenJetParticleAssociationCollection_ as JetClustering
genjet_clustering = JetClustering("GenJetClustering", verbose=False)
genjet_clustering.Inputs.particles.Path = 'genparticles'
# giving a meaningful name for the output product
genjet_clustering.Outputs.jets.Path = 'genjets'
genjet_clustering.Outputs.constituents.Path = 'genjets_particles'

from Configurables import AlbersWrite, AlbersOutput
out = AlbersOutput("out", OutputLevel=DEBUG)
out.outputCommands = ["keep *"]

ApplicationMgr(
Exemple #2
0
                    VertexSmearingTool=smeartool)
pythia8gen.PileUpTool = pileuptool
pythia8gen.hepmc.Path = "hepmcevent"

from Configurables import HepMCToEDMConverter
### Reads an HepMC::GenEvent from the data service and writes a collection of EDM Particles
hepmc_converter = HepMCToEDMConverter("Converter")
hepmc_converter.hepmc.Path = "hepmcevent"
hepmc_converter.hepmcStatusList = []  # convert particles with all statuses
hepmc_converter.genparticles.Path = "all_genparticles"
hepmc_converter.genvertices.Path = "all_genvertices"

from Configurables import GenParticleFilter
### Filters generated particles
# accept is a list of particle statuses that should be accepted
genfilter = GenParticleFilter("StableParticles", accept=[1], OutputLevel=DEBUG)
genfilter.allGenParticles.Path = "all_genparticles"
genfilter.filteredGenParticles.Path = "genparticles"

from Configurables import JetClustering_fcc__MCParticleCollection_fcc__GenJetCollection_ as JetClustering
genjet_clustering = JetClustering("GenJetClustering", OutputLevel=DEBUG)
genjet_clustering.particles.Path = 'genparticles'
genjet_clustering.jets.Path = 'genjets'

from Configurables import PodioOutput
### PODIO algorithm
out = PodioOutput("out", OutputLevel=DEBUG)
out.outputCommands = ["keep *"]

from Configurables import ApplicationMgr
ApplicationMgr(
Exemple #3
0
genalg_pgun.SignalProvider = ConstPtParticleGun('ToolSvc.ConstPtParticleGun')
genalg_pgun.VertexSmearingTool = smeartool
genalg_pgun.hepmc.Path = "hepmc"
ApplicationMgr().TopAlg += [genalg_pgun]

from Configurables import HepMCToEDMConverter
hepmc_converter = HepMCToEDMConverter()
hepmc_converter.hepmc.Path = "hepmc"
hepmc_converter.genparticles.Path = "GenParticlesAll"
hepmc_converter.genvertices.Path = "GenVertices"
ApplicationMgr().TopAlg += [hepmc_converter]

from Configurables import GenParticleFilter
### Filters generated particles
# accept is a list of particle statuses that should be accepted
genfilter = GenParticleFilter("StableParticleFilter")
genfilter.accept = [1]
genfilter.OutputLevel = DEBUG
genfilter.allGenParticles.Path = "GenParticlesAll"
genfilter.filteredGenParticles.Path = "GenParticles"
ApplicationMgr().TopAlg += [genfilter]

from Configurables import GeoSvc
geoservice = GeoSvc("GeoSvc")
# if FCC_DETECTORS is empty, this should use relative path to working directory
path_to_detector = os.environ.get("FCC_DETECTORS", "")
detectors_to_use = [
    'Detector/DetFCChhTrackerTkLayout/compact/FCChh_DectEmptyTracker.xml',
    'Detector/DetFCChhTrackerTkLayout/compact/Tracker.xml',
]
geoservice.detectors = [
Exemple #4
0
from Configurables import GenAlg
pythia8gen = GenAlg("Pythia8")
pythia8gen.SignalProvider = pythia8gentool
pythia8gen.VertexSmearingTool = smeartool
pythia8gen.hepmc.Path = "hepmc"
ApplicationMgr().TopAlg += [pythia8gen]

### Reads an HepMC::GenEvent from the data service and writes a collection of EDM Particles
from Configurables import HepMCToEDMConverter
hepmc_converter = HepMCToEDMConverter()
hepmc_converter.hepmc.Path = "hepmc"
hepmc_converter.hepmcStatusList = []  # convert particles with all statuses
hepmc_converter.GenParticles.Path = "GenParticles"
ApplicationMgr().TopAlg += [hepmc_converter]

### Filters generated particles
# accept is a list of particle statuses that should be accepted
from Configurables import GenParticleFilter
genfilter = GenParticleFilter("StableParticles")
genfilter.accept = [1]
genfilter.GenParticles.Path = "GenParticles"
genfilter.GenParticlesFiltered.Path = "GenParticlesStable"
ApplicationMgr().TopAlg += [genfilter]

from Configurables import PodioOutput
out = PodioOutput("out")
out.filename = "out_pythia.root"
out.outputCommands = ["keep *"]
ApplicationMgr().TopAlg += [out]