Пример #1
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)
Пример #2
0
dummysimulation = DummySimulation("Simulation")
dummysimulation.DataInputs.genparticles.Path = "genparticles"
dummysimulation.DataOutputs.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.DataInputs.particles.Path='particles'
# giving a meaningful name for the output product
jet_clustering.DataOutputs.jets.Path='jets'
jet_clustering.DataOutputs.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,
              jet_clustering,
              out
              ],
    EvtSel = 'NONE',
    EvtMax   = 10,
    ExtSvc = [albersevent],
    #                EventLoop = eventloopmgr,
Пример #3
0
## Delphes simulator
from Configurables import DelphesSimulation
delphessim = DelphesSimulation(DelphesCard=delphesCard, 
                               OutputCollections=delphesOutCol,
                               HepMCInputFile=delphesHepMCInFile, 
                               ROOTOutputFile=delphesRootOutFile, 
                               OutputLevel=DEBUG)
delphessim.DataInputs.hepmc.Path               = "hepmc"
delphessim.DataOutputs.allParticles.Path       = "allParticles"
delphessim.DataOutputs.genPartons.Path         = "genPartons"
delphessim.DataOutputs.genStableParticles.Path = "genStableParticles"

## FCC event-data model output
from Configurables import AlbersWrite, AlbersOutput

out = AlbersOutput("out",OutputLevel=DEBUG)
#out.outputCommands = ["keep *"]
out.outputCommands = ["drop *",
                      "keep allParticles",
                      "keep genPartons",
                      "keep genStableParticles"]

############################################################
#
# Run modules
#
############################################################

# Run Pythia + Delphes
if delphesHepMCInFile == "": 
  ApplicationMgr( TopAlg = [ pythia8gen, delphessim, out ],
Пример #4
0
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,
        jet_clustering,
        out
    ],
    EvtSel='NONE',
    EvtMax=10,
    ExtSvc=[albersevent],
Пример #5
0
    ],
    debug_delphes=True)
#delphessimulation = DelphesSimulation("Simulation", filename="example_MyPythia.dat" , detectorcard = "Simulation/examples/delphes_card_FCC_basic.tcl" , outputcollections =  [ "ElectronEnergySmearing/electrons", "MuonMomentumSmearing/muons",  "JetEnergyScale/jets",  "MissingET/momentum", "ScalarHT/energy" ] )

# we shouls add b-jets and track inpact parameters, fixme
delphessimulation.Outputs.genparticles.Path = "genparticles"
delphessimulation.Outputs.particles.Path = "particles"
delphessimulation.Outputs.partons.Path = "partons"
delphessimulation.Outputs.muons.Path = "muons"
delphessimulation.Outputs.electrons.Path = "electrons"
delphessimulation.Outputs.photons.Path = "photons"
delphessimulation.Outputs.jets.Path = "jets"
delphessimulation.Outputs.mets.Path = "met"
delphessimulation.Outputs.hts.Path = "ht"

out = AlbersOutput("out", OutputLevel=DEBUG)
out.outputCommands = [
    "drop *", "keep genparticles", "keep partons", "keep particles",
    "keep muons", "keep electrons", "keep photons", "keep jets", "keep met",
    "keep ht"
]

ApplicationMgr(
    TopAlg=[delphessimulation, out],
    EvtSel='NONE',
    EvtMax=10000,  # n of events are decided by Delphes, fixme!
    ExtSvc=[albersevent],
    #                EventLoop = eventloopmgr,
    #                OutputLevel=DEBUG
)
Пример #6
0
# 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
)

Пример #7
0
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, HepMCReader, HepMCDumper, FCCDataSvc, AlbersWrite, AlbersOutput

albersevent   = FCCDataSvc("EventDataSvc")

reader = HepMCReader("Reader", Filename="example_MyPythia.dat")
reader.Outputs.hepmc.Path = "hepmc"

dumper = HepMCDumper("Dumper")
dumper.Inputs.hepmc.Path="hepmc"

alberswrite = AlbersWrite("AlbersWrite",OutputLevel=DEBUG)
alberswrite.Outputs.albersJets.Path = "albersJets"
out = AlbersOutput("out")


ApplicationMgr( TopAlg = [reader,dumper,alberswrite,out],
                EvtSel = 'NONE',
                EvtMax   = -1,
                ExtSvc = [albersevent],
#                EventLoop = eventloopmgr,
                OutputLevel=INFO
 )
Пример #8
0
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, HepMCReader, HepMCDumper, FCCDataSvc

albersevent   = FCCDataSvc("EventDataSvc")

reader = HepMCReader("Reader", Filename="example_MyPythia.dat")
reader.Outputs.hepmc.Path = "hepmc"

from Configurables import Geant4Simulation
geant4simulation = Geant4Simulation("Geant4Simulation")
geant4simulation.Inputs.hepmcevent.Path = "hepmc"
# geant4simulation.Outputs.particles.Path = "particles"

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

ApplicationMgr( TopAlg = [reader, geant4simulation, out],
                EvtSel = 'NONE',
                EvtMax   = 10,
                ExtSvc = [albersevent],
                OutputLevel=DEBUG
 )
Пример #9
0
## Delphes simulator
from Configurables import DelphesSimulation
delphessim = DelphesSimulation(DelphesCard=delphesCard,
                               OutputCollections=delphesOutCol,
                               HepMCInputFile=delphesHepMCInFile,
                               ROOTOutputFile=delphesRootOutFile,
                               OutputLevel=DEBUG)
delphessim.Inputs.hepmc.Path = "hepmc"
delphessim.Outputs.allParticles.Path = "allParticles"
delphessim.Outputs.genPartons.Path = "genPartons"
delphessim.Outputs.genStableParticles.Path = "genStableParticles"

## FCC event-data model output
from Configurables import AlbersWrite, AlbersOutput

out = AlbersOutput("out", OutputLevel=DEBUG)
#out.outputCommands = ["keep *"]
out.outputCommands = [
    "drop *", "keep allParticles", "keep genPartons", "keep genStableParticles"
]

############################################################
#
# Run modules
#
############################################################

# Run Pythia + Delphes
if delphesHepMCInFile == "":
    ApplicationMgr(TopAlg=[pythia8gen, delphessim, out],
                   EvtSel='NONE',
Пример #10
0
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, HepMCReader, HepMCDumper, FCCDataSvc

albersevent = FCCDataSvc("EventDataSvc")

reader = HepMCReader("Reader", Filename="example_MyPythia.dat")
reader.Outputs.hepmc.Path = "hepmc"

from Configurables import Geant4Simulation
geant4simulation = Geant4Simulation("Geant4Simulation")
geant4simulation.Inputs.hepmcevent.Path = "hepmc"
# geant4simulation.Outputs.particles.Path = "particles"

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

ApplicationMgr(TopAlg=[reader, geant4simulation, out],
               EvtSel='NONE',
               EvtMax=10,
               ExtSvc=[albersevent],
               OutputLevel=DEBUG)
Пример #11
0
delphessimulation = DelphesSimulation("Simulation", filename="/afs/cern.ch/user/d/degrutto/public/forFCC/ZLEP_toAll.hepmc" , detectorcard = "Simulation/examples/delphes_card_CMS.tcl" , outputcollections =  [ "UniqueObjectFinder/electrons", "UniqueObjectFinder/muons",  "UniqueObjectFinder/jets",    "UniqueObjectFinder/photons",  "MissingET/momentum", "ScalarHT/energy" ] , debug_delphes= True )
#delphessimulation = DelphesSimulation("Simulation", filename="example_MyPythia.dat" , detectorcard = "Simulation/examples/delphes_card_FCC_basic.tcl" , outputcollections =  [ "ElectronEnergySmearing/electrons", "MuonMomentumSmearing/muons",  "JetEnergyScale/jets",  "MissingET/momentum", "ScalarHT/energy" ] )

# we shouls add b-jets and track inpact parameters, fixme
delphessimulation.Outputs.genparticles.Path = "genparticles"
delphessimulation.Outputs.particles.Path = "particles"
delphessimulation.Outputs.partons.Path = "partons"
delphessimulation.Outputs.muons.Path = "muons"
delphessimulation.Outputs.electrons.Path = "electrons"
delphessimulation.Outputs.photons.Path = "photons"
delphessimulation.Outputs.jets.Path = "jets"
delphessimulation.Outputs.mets.Path = "met"
delphessimulation.Outputs.hts.Path = "ht"


out = AlbersOutput("out",
                   OutputLevel=DEBUG)
out.outputCommands = ["drop *",
                      "keep genparticles",
                      "keep partons",
                      "keep particles",
                      "keep muons",
                      "keep electrons",
                      "keep photons",
                      "keep jets",
                      "keep met",
                      "keep ht"

]

ApplicationMgr( 
    TopAlg = [