No Sampler Hits For Reference Beam
When running a simulation with a reference beam, only the primaries are recorded, all trees for the other samplers are empty. Attached a zip of an example lattice with reference beam. (I am up to date with commits, last pulled and compiled ~ 1hr ago).
Comments (8)
-
-
reporter Root.
-
Running it interactively, the track isn't produced. The reason the particle isn't recorded in the samplers is because it doesn't pass through them. There is no track of the particle hitting something. It appears never to exist.
Setting the energy to 3GeV the track runs fine. This means there is a bug in the energy of the particle and it doesn't have sufficient energy to cover the mass. The input looks good so either the units MeV are wrong in the parser or the units in the bunch generation are wrong somewhere along the line (not the output).
Since the input file shows a Gauss distribution which presumably worked, then this is restricted to the reference distribution - this is in fact the base class I believe.
-
The kinetic energy is below zero. Probably it would be good to put a check in for this and abort / try to regenerate particle again.
BDSPrimaryGeneratorAction: position= (0,0,0) m total energy= 0.249999987 GeV kinetic energy= -0.688272026 GeV momentum direction= (0,0,1) weight= 1
-
BDSBunchInterface has:
E = BDSGlobalConstants::Instance()->ParticleKineticEnergy();
With Will's recent change BDSBunch is supposed to return the total energy. Assigning to Will.
-
-
assigned issue to
-
assigned issue to
-
reporter Ok, it should now have been fixed. I think I confused myself in trying to correct my energy spread problem, and I overlooked that the line:
E = BDSGlobalConstants::Instance()->ParticleKineticEnergy();
is where a reference particle get its energy (from global constants), and not through a BDSBunchX class. I've tested on a reference beam and Gaussian beam (both N=10000), they are showing the correct distributions and energies now.
-
reporter - changed status to resolved
Resolved with commit b760d40a9260fcf11416097b9ebffad98f658e71
- Log in to comment
Is this root or rootevent?