I’m currently working on a simulation with a detector that uses a collimator in front of Am241 source to measure it’s alpha and gamma energy spectrum.
Due to the collimator, we are only interested in a very limited angle in the simulation. I tried using a GPS with an isometric angle distribution in which I limited the angle, but it doesn’t seem to work. I guess the angle distribution only applies to the particle definition of the GPS, and since that is the ion and not the decay product, it doesn’t do anything.
Is there a simple way to apply an angle distribution to the decay products? Else, the efficiency of the simulation is really low (less than 1% of the events create a hit in the detector).
My current code:
Summary
fGenericParticleSource = new G4GeneralParticleSource();
fGenericParticleSource->SetParticleDefinition(G4IonTable::GetIonTable()->GetIon(95, 241));
auto* singleParticleSource = fGenericParticleSource->GetCurrentSource();
auto* energyDistribution = singleParticleSource->GetEneDist();
auto* positionDistribution = singleParticleSource->GetPosDist();
auto* angleDistribution = singleParticleSource->GetAngDist();
energyDistribution->SetEnergyDisType("Mono");
energyDistribution->SetMonoEnergy(0. * eV);
positionDistribution->SetPosDisType("Point");
positionDistribution->SetCentreCoords(G4ThreeVector(0., 0., -0.5 * worldSizeZ));
// NOTE: useless apperently
angleDistribution->SetAngDistType("iso");
angleDistribution->SetMinPhi(0.);
angleDistribution->SetMaxPhi(2 * M_PI);
angleDistribution->SetMinTheta(0.);
angleDistribution->SetMaxTheta(M_PI / 60);
fGenericParticleSource->SetParticleCharge(0. * eplus);
fGenericParticleSource->GeneratePrimaryVertex(event);