コード例 #1
0
### 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(
    TopAlg=[pythia8gen, hepmc_converter, genfilter, genjet_clustering, out],
    EvtSel='NONE',
    EvtMax=2,
    ExtSvc=[podioevent],
    OutputLevel=INFO)
コード例 #2
0
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(
    TopAlg=[pythia8gen, hepmc_converter, genfilter, genjet_clustering, out],
    EvtSel='NONE',
    EvtMax=100,
    ExtSvc=[albersevent],
    OutputLevel=DEBUG)
コード例 #3
0
from Configurables import JetClustering_MCParticleCollection_GenJetCollection_GenJetParticleAssociationCollection_ as GenJetClustering
genjet_clustering = GenJetClustering("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 DummySimulation
dummysimulation = DummySimulation("Simulation")
dummysimulation.Inputs.genparticles.Path = "genparticles"
dummysimulation.Outputs.particles.Path = "particles"

# reads EDM Particles and creates EDM jets
from Configurables import JetClustering_ParticleCollection_JetCollection_JetParticleAssociationCollection_ as JetClustering
jet_clustering = JetClustering("JetClustering", verbose=False)
jet_clustering.Inputs.particles.Path = 'particles'
# giving a meaningful name for the output product
jet_clustering.Outputs.jets.Path = 'jets'
jet_clustering.Outputs.constituents.Path = 'jets_particles'

out = AlbersOutput("out", OutputLevel=DEBUG)
out.outputCommands = ["drop *", "keep *jets*", "keep particles"]

ApplicationMgr(
    TopAlg=[
        reader,
        hepmc_converter,
        genfilter,
        #              genjet_clustering,
        dummysimulation,