Пример #1
0
#### Data service
podioevent = FCCDataSvc("EventDataSvc")

from Configurables import ConstPileUp, HepMCFileReader, GaussSmearVertex

smeartool = GaussSmearVertex(xVertexMean=0. * units.mm,
                             xVertexSigma=0.5 * units.mm,
                             yVertexMean=0 * units.mm,
                             yVertexSigma=0.5 * units.mm,
                             zVertexMean=0 * units.mm,
                             zVertexSigma=70 * units.mm,
                             tVertexMean=0 * units.picosecond,
                             tVertexSigma=30 * units.picosecond)

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"
Пример #2
0
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, HepMCDumper

from Configurables import HepMCFileReader, GenAlg
readertool = HepMCFileReader("ReaderTool", Filename="Test/TestGeometry/data/testHepMCrandom.dat")
reader = GenAlg("Reader", SignalProvider=readertool)
reader.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="allGenVertices"

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

from Configurables import GeoSvc
geoservice = GeoSvc("GeoSvc", detectors=['file:Test/TestGeometry/data/TestBoxCaloSD_3readouts.xml'], OutputLevel = INFO)

from Configurables import SimG4Svc
geantservice = SimG4Svc("SimG4Svc", physicslist='SimG4TestPhysicsList')

from Configurables import SimG4Alg, SimG4SaveCalHits, InspectHitsCollectionsTool
inspecttool = InspectHitsCollectionsTool("inspect", readoutNames=["ECalHits"], OutputLevel = DEBUG)
savecaltool = SimG4SaveCalHits("saveECalHits", readoutNames = ["ECalHits"], OutputLevel = DEBUG)
savecaltool.positionedCaloHits.Path = "positionedCaloHits"
savecaltool.caloHits.Path = "caloHits"
geantsim = SimG4Alg("SimG4Alg", outputs= ["SimG4SaveCalHits/saveECalHits","InspectHitsCollectionsTool/inspect"])

from Configurables import RedoSegmentation
Пример #3
0
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, HepMCDumper

from Configurables import HepMCFileReader, GenAlg
readertool = HepMCFileReader(
    "ReaderTool",
    Filename="/eos/project/f/fccsw-web/testsamples/FCC_minbias_100TeV.dat")
reader = GenAlg("Reader", SignalProvider=readertool)
reader.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 = "allGenVertices"

from Configurables import GeoSvc
geoservice = GeoSvc(
    "GeoSvc",
    detectors=['file:Test/TestGeometry/data/Barrel_testCaloSD_phieta.xml'],
    OutputLevel=DEBUG)

from Configurables import SimG4Svc
geantservice = SimG4Svc("SimG4Svc")

from Configurables import SimG4Alg, SimG4SaveCalHits, InspectHitsCollectionsTool
inspecttool = InspectHitsCollectionsTool("inspect",
                                         readoutNames=["ECalHits"],
                                         OutputLevel=DEBUG)
savecaltool = SimG4SaveCalHits("saveECalHits",
                               readoutNames=["ECalHits"],
Пример #4
0
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, HepMCDumper, HepMCJetClustering
from Configurables import HepMCHistograms, JetHistograms

from Configurables import HepMCFileReader, GenAlg
readertool = HepMCFileReader(
    "ReaderTool",
    Filename="/eos/project/f/fccsw-web/testsamples/example_MyPythia.dat")
reader = GenAlg("Reader", SignalProvider=readertool)
reader.hepmc.Path = "hepmc"

# dumps the HepMC::GenEvent
dumper = HepMCDumper("Dumper")
dumper.hepmc.Path = "hepmc"

# creates histograms for HepMC
genHisto = HepMCHistograms("GenHistograms")
genHisto.hepmc.Path = "hepmc"

# runs sample jet clustering algorithm
jets = HepMCJetClustering("ktCluster")
jets.JetAlgorithm = "kt"
jets.RecominbationScheme = "E"
jets.ConeRadius = 0.7
jets.PtMin = 1
jets.hepmc.Path = "hepmc"
jets.jets.Path = "ktJets"

# creates histograms for jets
jetHisto = JetHistograms("JetHistograms")
jetHisto.jets.Path = "ktJets"
Пример #5
0
from Gaudi.Configuration import *

from Configurables import HepMCFileReader, GenAlg
# reads HepMC text file and write the HepMC::GenEvent to the data service
readertool = HepMCFileReader(
    "Reader", Filename="Test/TestGeometry/data/testHepMCborders.dat")
reader = GenAlg("Reader", SignalProvider=readertool)
reader.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 = "allGenVertices"

from Configurables import HepMCDumper
hepmc_dump = HepMCDumper("hepmc")
hepmc_dump.hepmc.Path = "hepmc"

from Configurables import GeoSvc
geoservice = GeoSvc(
    "GeoSvc",
    detectors=['file:Test/TestGeometry/data/TestBoxCaloSD_segmentation.xml'])

from Configurables import SimG4Svc
geantservice = SimG4Svc("SimG4Svc",
                        detector='SimG4DD4hepDetector',
                        physicslist='SimG4TestPhysicsList',
                        actions='SimG4FullSimActions')

from Configurables import SimG4Alg, SimG4SaveCalHits
from Gaudi.Configuration import *

from Configurables import HepMCFileReader, GenAlg
readertool = HepMCFileReader(
    "Reader",
    Filename="/eos/project/f/fccsw-web/testsamples/testHepMCpositionsEMcal.dat"
)
reader = GenAlg("Reader", SignalProvider=readertool)
reader.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 = "allGenVertices"

from Configurables import HepMCDumper
hepmc_dump = HepMCDumper("hepmc")
hepmc_dump.hepmc.Path = "hepmc"

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

# DD4hep geometry service
from Configurables import GeoSvc
geoservice = GeoSvc(
    "GeoSvc",
    detectors=[
        'file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml',
        'file:Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_withCryostat.xml'
Пример #7
0
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, HepMCDumper

from Configurables import HepMCFileReader, GenAlg
readertool = HepMCFileReader(
    "ReaderTool",
    Filename="/eos/project/f/fccsw-web/testsamples/testHepMCrandom.dat")
reader = GenAlg("Reader", SignalProvider=readertool)
reader.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 = "allGenVertices"

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

from Configurables import GeoSvc
geoservice = GeoSvc(
    "GeoSvc",
    detectors=['file:Test/TestGeometry/data/TestBoxCaloSD_3readouts.xml'],
    OutputLevel=INFO)

from Configurables import SimG4Svc
geantservice = SimG4Svc("SimG4Svc", physicslist='SimG4TestPhysicsList')

from Configurables import SimG4Alg, SimG4SaveCalHits, InspectHitsCollectionsTool
inspecttool = InspectHitsCollectionsTool("inspect",
                                         readoutNames=["ECalHits"],
from Gaudi.Configuration import *

from Configurables import HepMCFileReader, GenAlg
# reads HepMC text file and write the HepMC::GenEvent to the data service
readertool = HepMCFileReader(
    "Reader",
    Filename="/eos/project/f/fccsw-web/testsamples/testHepMCborders.dat")
reader = GenAlg("Reader", SignalProvider=readertool)
reader.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 = "allGenVertices"

from Configurables import HepMCDumper
hepmc_dump = HepMCDumper("hepmc")
hepmc_dump.hepmc.Path = "hepmc"

from Configurables import GeoSvc
geoservice = GeoSvc("GeoSvc",
                    detectors=['file:../data/TestBoxCaloSD_segmentation.xml'])

from Configurables import SimG4Svc
geantservice = SimG4Svc("SimG4Svc",
                        detector='SimG4DD4hepDetector',
                        physicslist='SimG4TestPhysicsList',
                        actions='SimG4FullSimActions')

from Configurables import SimG4Alg, SimG4SaveCalHits
Пример #9
0
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, HepMCFileReader, GenAlg, HepMCDumper

# reads HepMC text file and write the HepMC::GenEvent to the data service
readertool = HepMCFileReader()
readertool.Filename = "Test/TestGeometry/data/testHepMCrandom.dat"
reader = GenAlg("Reader")
reader.SignalProvider = readertool
reader.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="allGenVertices"

from Configurables import GeoSvc
geoservice = GeoSvc("GeoSvc")
geoservice.detectors = ['file:Test/TestGeometry/data/TestBoxCaloSD_segmentation.xml']

from Configurables import SimG4Svc
geantservice = SimG4Svc("SimG4Svc")
geantservice.detector='SimG4DD4hepDetector'
geantservice.physicslist='SimG4TestPhysicsList'
geantservice.actions='SimG4FullSimActions'

from Configurables import SimG4SaveCalHits
savecaltool = SimG4SaveCalHits("saveECalHits")
savecaltool.readoutNames = ["ECalHits"]
savecaltool.positionedCaloHits.Path = "positionedCaloHits"
savecaltool.caloHits.Path = "caloHits"
    "propagatedGenJets", delphesArrayName="PropagatedGenJetFinder/jets")
apply_paths(propagatedGenJetSaveTool, out_names["propagatedGenJets"])

metSaveTool = DelphesSaveMet(
    "genMET", delphesMETArrayName="GenMissingET/momentum", delphesSHTArrayName="GenScalarHT/energy")
apply_paths(metSaveTool, out_names["met"])

## Reading from HepMC
from Configurables import HepMCFileReader, GenAlg

hepMCFile = ""
if args.inputfile != '':
    hepMCFile = args.inputfile

readertool = HepMCFileReader("Reader",
                     Filename=hepMCFile
                     )
reader = GenAlg("Reader", SignalProvider=readertool)
reader.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/genMuons",
                                        "DelphesSaveChargedParticles/genElectrons",
                                        "DelphesSaveNeutralParticles/genPhotons",
                                        "DelphesSaveGenJets/nonPropagatedGenJets",
                                        "DelphesSaveGenJets/propagatedGenJets",
Пример #11
0
from Gaudi.Configuration import *

from Configurables import HepMCFileReader, GenAlg
readertool = HepMCFileReader(
    "Reader", Filename="Test/TestGeometry/data/testHepMCpositionsEMcal.dat")
reader = GenAlg("Reader", SignalProvider=readertool)
reader.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 = "allGenVertices"

from Configurables import HepMCDumper
hepmc_dump = HepMCDumper("hepmc")
hepmc_dump.hepmc.Path = "hepmc"

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

# DD4hep geometry service
from Configurables import GeoSvc
geoservice = GeoSvc(
    "GeoSvc",
    detectors=[
        'file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml',
        'file:Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_withCryostat.xml'
    ],
    OutputLevel=INFO)