# How to implement multiple X ray sources?

**URL:** <https://geant4-forum.web.cern.ch/t/how-to-implement-multiple-x-ray-sources/10162>\
**Category:** Particles, Track, Event, Run and Biasing\
**Created:** [March 6, 2023, 7:32pm UTC](https://geant4-forum.web.cern.ch/t/how-to-implement-multiple-x-ray-sources/10162 "2023-03-06T19:32:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdel23-dev](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/abdel23-dev/32/4343_2.png) [@abdel23-dev](https://geant4-forum.web.cern.ch/u/abdel23-dev)\
**Post date:** [March 6, 2023, 7:32pm UTC](https://geant4-forum.web.cern.ch/t/how-to-implement-multiple-x-ray-sources/10162/1 "2023-03-06T19:32:15Z")

</div>

Hi All,

I want to simulate the geometry bellow in Geant4.

My question is how to implement a multiple focal X-ray sources : 250 focal spot (focal spot size = 2mm) spaced 4mm apart ?

 ![source](https://geant4-forum.web.cern.ch/uploads/default/original/2X/0/007fc74be2b3c6ca79bd3ed6b8864301fe236e7b.png)

Thank you very much for any response I get.

---

<div class="post-metadata">

**Author:** ![mkelsey](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/mkelsey/32/49_2.png) [@mkelsey](https://geant4-forum.web.cern.ch/u/mkelsey)\
**Post date:** [March 6, 2023, 9:25pm UTC](https://geant4-forum.web.cern.ch/t/how-to-implement-multiple-x-ray-sources/10162/2 "2023-03-06T21:25:17Z")

</div>

This might be something you can do with GPS, where you define a whole bunch of sources, with different coordinates for each one. You may also write your own `G4PrimaryGeneratorAction` subclass, and have complete control over everything you simulate.
