import calzone

geometry = calzone.GeometryBuilder({
    "Environment": {
        "sphere": 100,
        "Source": {
            "sphere": 1,
            "position": [0, 10, 0],
        },
        "Detector": {
            "sphere": 5,
            "material": "G4_Ne",
            "role": [
                "record_deposits",
                "catch_ingoing",
            ],
        },
    },
}).build()

simulation = calzone.Simulation(geometry=geometry)

source = simulation.geometry.find("Source")
particles = simulation.particles()  \
    .pid("gamma")                   \
    .energy(0.662)                  \
    .inside(source)                 \
    .generate(100000)

result = simulation.run(particles)

for (layer, deposits) in result.deposits.items():
    print(f"# deposits: {deposits.size}")
for (layer, particles) in result.particles.items():
    print(f"# particles: {particles.size}")
