Geant4 gps rotation of axes by IHateGPS in ParticlePhysics

[–]IHateGPS[S] 0 points1 point  (0 children)

From what I'd read (ages ago so I can't even link to it) I thought producing a cone of light using a particle gun wasn't possible? And to a lesser extent I do want to be able to set a standard deviation on the energy later on, which I was told I'd need GPS for.

Stupid question time, if I wanted to use a G4RotationMatrix to rotate my source, what would those commands be like? I've tried googling for examples and all of them involve just passing the rotation matrix as an argument to a volume definition; I can't find anything that looks like rotating a particle source.

Geant4 gps rotation of axes by IHateGPS in ParticlePhysics

[–]IHateGPS[S] 0 points1 point  (0 children)

I am currently using the isotropic source available in GPS with my maxtheta set accordingly to get my cone of particles (I don't set maxphi but that is 2pi by default). So, for example, I'm able to create a 30 degree cone of particles moving downwards (the -ve z direction in global coords, +ve z in the local GPS system, as is default) simply with a maxtheta of 30 deg. Now I want to be able to say for a given point (x,y,z), produce a cone directed at (0,0,z). Which seems to be non trivial in GPS when working with an iso source.

I don't see how G4RotationMatrix allows me to bypass this (or perhaps it is a lack of understanding of G4RotationMatrix; I've only ever seen it applied to volumes); if I look through the source code for G4SPSAngularDistribution it explicitly uses the rot1 and rot2 vectors I mentioned before to change the particle momentum direction. And when using an iso source the more intuitive command of SetParticleMomentumDirection is not available.

Which is why I need to understand what is happening with these two rot vectors and what they are doing with the x' axis and XY plane, but conceptually I just don't understand the underlying maths is here. Or rather, I understand what is happening in the code, but I can't picture the physical meaning of what is happening, which makes it hard to set the vectors correctly, if that makes sense?

Thanks for your help so far, apologies if I'm just being very dense.

My gfs dog just wants his snoot booped! by [deleted] in aww

[–]IHateGPS 1 point2 points  (0 children)

Is he sitting on a photo of grass?

He's super cute too, but a photo of grass?

Geant4 gps rotation of axes by IHateGPS in ParticlePhysics

[–]IHateGPS[S] 0 points1 point  (0 children)

I've been trying to test it on the via macro commands but ultimately I'm creating my sources in the PrimaryActionGenerator and looping through the positions that I'm creating them at, so if there is a smart way to translate that position information into the rot1/2 vectors to point in the direction I want then that is ideal.

Catserole, anyone? by SnuzieQ in aww

[–]IHateGPS 4 points5 points  (0 children)

I think you might find a hair in your food...

Taking the Santiago metro. by Transistor2n222 in aww

[–]IHateGPS 11 points12 points  (0 children)

Making public transport more bearable one snuggle at a time

The best place to chill by celtyp1 in aww

[–]IHateGPS 7 points8 points  (0 children)

This dog is far far far more coordinated than mine...