An electron-positron pair source that shoots both particles in one go (per event)

Hi all,

I am simulating electron-positron pairs into a SiLi detector (and into a segmented Ge (LEPS) detector alternatively) and I used the GPS to set my source parameters. I am able to set individual sources of these particles in a macro, assign them properties like so

/gps/source/add 72.43
/gps/particle e-

source type & position

/gps/pos/type Point
/gps/position 0. 0. -50.0 mm

angular distribution

/gps/ang/type iso
/gps/ang/mintheta 153 deg #140 deg

energy type & level

/gps/ene/type Mono #Pow #Gauss
/gps/energy 976. keV

#########positron
/gps/source/add 72.43
/gps/particle e+

source type & position

/gps/pos/type Point
/gps/position 0. 0. -50.0 mm

angular distribution

/gps/ang/type iso
/gps/ang/mintheta 153 deg #140 deg

energy type & level

/gps/ene/type Mono #Pow #Gauss
/gps/energy 976. keV
#/gps/source/multiplevertex true

What this does is allow one particle to emerge after another, meanwhile what I’m trying to do is to have electron and positron emerge in one go (per event) as a pair, obviously separated by an angle less than 90 degrees. It might not be as simple to do using the GPS, I don’t know, but I would really appreciated assistance on how to code the source to work like this.

Thank you

I think it is not possible to make the ratio of e-/e+ exactly equal to 1 in GPS.
But if the number of event is large enough, it can be close to 1.
So set 2E+09 events in GPS, and you know it is 1E+09 events.

1 Like

Thank you for your feedback Lichuanlong.
I may not have come out clear enough (going by this part of your response “…ratio of e-/e+ equal to or close to 1”). Like I have shown in the example macro given, I can easily set individual sources for each particle and they sort of alternate but this isn’t quite what I am looking for. What I had in mind is the flexibility in GPS that allows me to set up a single source that shoots out a monoenergetic e-/e+ pair per event, preferably with the capability to randomize the separation angle btwn the e- and e+, like an actual source, that decay by IPF emission, would. I have resorted to this approach because I have noticed that conversion electron (or IPF) emitter sources (e.g. Bi207, Ba133, etc) in Geant4, defined using GPS like so: /gps/particle ion, /gps/ion 56 133 0 0, etc, don’t give enough statistics within computationally reasonable number of events. I don’t know if I am not doing it right but I find them to not work properly in general. I would really appreciate suggestions on this as well if anyone out there has some experience simulating conversion electrons and internal pairs in Geant4.

Thank you

Maybe you can using gun not GPS by coding your e-/e+ pair source.

1 Like

If you want to have two tracks, with proper angular correlation, you will probably have to do it yourself, by writing a subclass of G4VPrimaryGeneratorAction. You can make it simple with everything hardcoded, or you can write an associated Messenger class to define UI commands to set parameters. Lots of the examples have this sort of code.

1 Like

Yes, thank you. I have been experimenting with the G4ParticleGun. I haven’t yet got it right, but it appears to give better room for tweaking compared to GPS.
Not quite adept yet with coding however.

Thanks mkelsey for the ideas. Yeah I am looking for examples like that. I would like to look into subclass in which I hardcode the emergence of a pair with a somewhat randomized angular correlation. Only difficulty is I am still gaining experience with my C++, let alone Geant4. But will sure look into it if the G4ParticleGun fails. I am looking for a quick fix, easy way out :wink: :smile:

Cheers!

1- you may wish have a look at examples/extended/eventgenerator/userPrimaryGenerator
2- you can do the same thing using particle gun. See example particleGun : PrimaryGeneratorAction1

2 Likes

Thank you Michel for a pointer. Will look into those.

Cheers!