jetSaveTool = DelphesSaveJets("jets", delphesArrayName="JetEnergyScale/jets")
apply_paths(jetSaveTool, out_names["jets"])

fatjetSaveTool = DelphesSaveJets("fatjets", delphesArrayName="FatJetFinder/jets", saveSubstructure=True)
apply_paths(fatjetSaveTool, out_names["fatjets"])

metSaveTool = DelphesSaveMet("met", delphesMETArrayName="MissingET/momentum", delphesSHTArrayName="ScalarHT/energy")
apply_paths(metSaveTool, out_names["met"])

#### Pythia generator
from Configurables import PythiaInterface
from Configurables import PoissonPileUp
from Configurables import HepMCFullMerge

pythia8gentool = PythiaInterface(Filename=pythiaConfFile, OutputLevel=messageLevelPythia)
mergetool = HepMCFullMerge()
pileuptool = PoissonPileUp(numPileUpEvents=140)
## Write the HepMC::GenEvent to the data service
from Configurables import GenAlg
pythia8gen = GenAlg("Pythia8", SignalProvider=pythia8gentool, PileUpProvider=pythia8gentool, PileUpTool=pileuptool, HepMCMergeTool=mergetool)
pythia8gen.hepmc.Path = "hepmc"

## Delphes simulator -> define objects to be written out
from Configurables import DelphesSimulation
delphessim = DelphesSimulation(DelphesCard=delphesCard,
                               ROOTOutputFile=delphesRootOutFile,
                               ApplyGenFilter=True,
                               OutputLevel=messageLevelDelphes,
                               outputs=["DelphesSaveChargedParticles/muons",
                                        "DelphesSaveChargedParticles/electrons",
예제 #2
0
from Configurables import ApplicationMgr

ApplicationMgr().EvtSel = 'NONE'
ApplicationMgr().EvtMax = 100

# Data event model based on Podio
from Configurables import FCCDataSvc

podioEvent = FCCDataSvc("EventDataSvc")
ApplicationMgr().ExtSvc += [podioEvent]
ApplicationMgr().OutputLevel = INFO

# Pythia generator
from Configurables import PythiaInterface

pythia8gentool = PythiaInterface()
pythia8gentool.Filename = "Pythia_ee_ZH_Htautau.cmd"

# Write the HepMC::GenEvent to the data service
from Configurables import GenAlg

pythia8gen = GenAlg()
pythia8gen.SignalProvider = pythia8gentool
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("Converter")
hepmc_converter.hepmc.Path = "hepmc"
예제 #3
0
from Gaudi.Configuration import *

from Configurables import ApplicationMgr, FCCDataSvc

#example of pythia configuration file to generate events
pythiafile = "config/Pythia_standard.cmd"

#example of pythia configuration file to read LH event file
#pythiafile="config/Pythia_LHEinput.cmd"

albersevent = FCCDataSvc("EventDataSvc")

from Configurables import PythiaInterface
# PythiaInterface parameter
#pythia8gen = PythiaInterface("Pythia8Interface",Filename="main03.cmnd")
pythia8gen = PythiaInterface(Filename=pythiafile)
# write the HepMC::GenEvent to the data service
pythia8gen.DataOutputs.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.DataInputs.hepmc.Path = "hepmc"
hepmc_converter.DataOutputs.genparticles.Path = "all_genparticles"

from Configurables import GenParticleFilter
genfilter = GenParticleFilter("StableParticles")
genfilter.DataInputs.genparticles.Path = "all_genparticles"
genfilter.DataOutputs.genparticles.Path = "genparticles"
예제 #4
0
### Example of pythia configuration file to generate events
pythiafile="Generation/data/Pythia_standard.cmd"
# Example of pythia configuration file to read LH event file
#pythiafile="options/Pythia_LHEinput.cmd"

from Configurables import FCCDataSvc
#### Data service
podioevent = FCCDataSvc("EventDataSvc")

from Configurables import ConstPileUp

pileuptool = ConstPileUp(numPileUpEvents=2, Filename="Generation/data/Pythia_minbias_pp_100TeV.cmd")

from Configurables import PythiaInterface
### PYTHIA algorithm
pythia8gen = PythiaInterface("Pythia8Interface", Filename=pythiafile)
pythia8gen.PileUpTool = pileuptool
pythia8gen.DataOutputs.hepmc.Path = "hepmcevent"


from Configurables import HepMCConverter
### Reads an HepMC::GenEvent from the data service and writes a collection of EDM Particles
hepmc_converter = HepMCConverter("Converter")
hepmc_converter.DataInputs.hepmc.Path="hepmcevent"
hepmc_converter.DataOutputs.genparticles.Path="all_genparticles"
hepmc_converter.DataOutputs.genvertices.Path="all_genvertices"

from Configurables import GenParticleFilter
### Filters generated particles
genfilter = GenParticleFilter("StableParticles")
genfilter.DataInputs.genparticles.Path = "all_genparticles"
예제 #5
0
        energyMax=energy * 1000,
        etaMin=etaMin,
        etaMax=etaMax,
        phiMin=phiMin,
        phiMax=phiMax)
    geantsim.eventProvider = pgun
else:
    from Configurables import PythiaInterface, GenAlg, GaussSmearVertex
    smeartool = GaussSmearVertex("GaussSmearVertex")
    if simargs.useVertexSmearTool:
        smeartool.xVertexSigma = 0.5 * units.mm
        smeartool.yVertexSigma = 0.5 * units.mm
        smeartool.zVertexSigma = 40 * units.mm
        smeartool.tVertexSigma = 180 * units.picosecond

    pythia8gentool = PythiaInterface("Pythia8", Filename=card)
    pythia8gen = GenAlg("Pythia8",
                        SignalProvider=pythia8gentool,
                        VertexSmearingTool=smeartool)
    pythia8gen.hepmc.Path = "hepmc"
    from Configurables import HepMCToEDMConverter
    hepmc_converter = HepMCToEDMConverter("Converter")
    hepmc_converter.hepmc.Path = "hepmc"
    hepmc_converter.genparticles.Path = "allGenParticles"
    hepmc_converter.genvertices.Path = "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)
예제 #6
0
podioevent = FCCDataSvc("EventDataSvc")

## N-events
from FWCore.joboptions import parse_standard_job_options
args = parse_standard_job_options()
nEvents=1
if args.nevents is not None:
    nEvents = args.nevents

from Configurables import PoissonPileUp

pileuptool = PoissonPileUp(numPileUpEvents=pileupconf['numPileUpEvents'], Filename="Generation/data/Pythia_minbias_pp_100TeV.cmd")

from Configurables import PythiaInterface
### PYTHIA algorithm
pythia8gen = PythiaInterface("Pythia8Interface", Filename="Generation/data/Pythia_minbias_pp_100TeV.cmd")
pythia8gen.PileUpTool = pileuptool
pythia8gen.DataOutputs.hepmc.Path = "hepmcevent"


from Configurables import HepMCConverter
### Reads an HepMC::GenEvent from the data service and writes a collection of EDM Particles
hepmc_converter = HepMCConverter("Converter")
hepmc_converter.DataInputs.hepmc.Path="hepmcevent"
hepmc_converter.DataOutputs.genparticles.Path="all_genparticles"
hepmc_converter.DataOutputs.genvertices.Path="all_genvertices"

from Configurables import GenParticleFilter
### Filters generated particles
genfilter = GenParticleFilter("StableParticles")
genfilter.DataInputs.genparticles.Path = "all_genparticles"
예제 #7
0
delphesRootOutFile = "DelphesOutput.root"
#delphesRootOutFile=""

## Data event model based on Albers
albersEvent = FCCDataSvc("EventDataSvc")

############################################################
#
# Configure individual modules (algorithms)
#
############################################################

## Pythia generator
from Configurables import PythiaInterface

pythia8gen = PythiaInterface(Filename=pythiaConfFile, OutputLevel=INFO)
## Write the HepMC::GenEvent to the data service
pythia8gen.Outputs.hepmc.Path = "hepmc"

## 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"
예제 #8
0
"""
to run example
> export PYTHIA8_XML=/afs/cern.ch/sw/lcg/releases/LCG_68/MCGenerators/pythia8/186/x86_64-slc6-gcc48-opt/xmldoc
> ./run gaudirun.py simple_pythia.py
"""
from Gaudi.Configuration import *

from Configurables import ApplicationMgr, FCCDataSvc

albersevent = FCCDataSvc("EventDataSvc")

from Configurables import PythiaInterface
# PythiaInterface parameter
#pythia8gen = PythiaInterface("Pythia8Interface",Filename="main03.cmnd")
pythia8gen = PythiaInterface(Filename="main03.cmnd")
# 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"