Exemple #1
0
from Configurables import PythiaInterface, GenAlg
### PYTHIA algorithm
pythia8gentool = PythiaInterface("Pythia8Interface", Filename=pythiafile)
pythia8gen = GenAlg("Pythia8",
                    SignalProvider=pythia8gentool,
                    PileUpProvider=pileupreader,
                    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'
Exemple #2
0
pileuptool = ConstPileUp(numPileUpEvents=2)
pileupreader = HepMCFileReader(Filename="/eos/project/f/fccsw-web/testsamples/FCC_minbias_100TeV.dat")

from Configurables import PythiaInterface, GenAlg
### PYTHIA algorithm
pythia8gentool = PythiaInterface("Pythia8Interface", Filename=pythiafile)
pythia8gen = GenAlg("Pythia8", SignalProvider=pythia8gentool, PileUpProvider=pileupreader, 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'
Exemple #3
0
from Gaudi.Configuration import *
from GaudiKernel import SystemOfUnits as units

from Configurables import FCCDataSvc
## Data service

podioevent = FCCDataSvc("EventDataSvc")
from Configurables import HepMCFromScratch

hepmc_producer = HepMCFromScratch()
hepmc_producer.hepmc.Path = "hepmc"

from Configurables import HepMCToEDMConverter

hepmc_converter = HepMCToEDMConverter("Converter")
hepmc_converter.hepmcStatusList = []
hepmc_converter.hepmc.Path = "hepmc"
hepmc_converter.genparticles.Path = "allGenParticles"
hepmc_converter.genvertices.Path = "allGenVertices"

# convert (final state) EDM back to HepMC
from Configurables import EDMToHepMCConverter

edm_converter = EDMToHepMCConverter("BackConverter")
edm_converter.hepmc.Path = "hepmcconverted"
edm_converter.genparticles.Path = "allGenParticles"
edm_converter.genvertices.Path = "allGenVertices"

from Configurables import HepMCDumper

dumper = HepMCDumper("Dumper")
Exemple #4
0
pythia8gentool.Filename = os.path.join(os.environ.get("FCCSWSHAREDIR", ""),"Generation/data/Pythia_ttbar.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"
hepmc_converter.hepmcStatusList = [] # convert particles with all statuses, keeping not just stable final state ones
hepmc_converter.genparticles.Path = "genParticles"
hepmc_converter.genvertices.Path = "genVertices"
ApplicationMgr().TopAlg += [hepmc_converter]


# Define all output tools that convert the Delphes collections to FCC-EDM:

from Configurables import DelphesSaveChargedParticles

muonSaveTool = DelphesSaveChargedParticles("muons")
muonSaveTool.delphesArrayName = "MuonMomentumSmearing/muons"
muonSaveTool.particles.Path      = "muons"
muonSaveTool.mcAssociations.Path = "muonsToMC"
muonSaveTool.isolationTags.Path  = "muonITags"
Exemple #5
0
from Configurables import FCCDataSvc
## Data service

podioevent = FCCDataSvc("EventDataSvc")
from Configurables import HepMCFromScratch

hepmc_producer = HepMCFromScratch()
hepmc_producer.hepmc.Path="hepmc"





from Configurables import HepMCToEDMConverter
hepmc_converter = HepMCToEDMConverter("Converter")
hepmc_converter.hepmcStatusList = []
hepmc_converter.hepmc.Path="hepmc"
hepmc_converter.genparticles.Path="allGenParticles"
hepmc_converter.genvertices.Path="allGenVertices"


# convert (final state) EDM back to HepMC
from Configurables import EDMToHepMCConverter
edm_converter = EDMToHepMCConverter("BackConverter")
edm_converter.hepmc.Path="hepmcconverted"
edm_converter.genparticles.Path="allGenParticles"
edm_converter.genvertices.Path="allGenVertices"

from Configurables import HepMCDumper
dumper = HepMCDumper("Dumper")
dumper.hepmc.Path="hepmc"