I’m having some issues with using GPS commands (they don’t seem to appear to be in the dropdown). It seems like OpenGL is not taking them. Has anybody else run into this issue?
Does your application instantiate a
G4GeneralParticleSource instance as a member of your
G4PrimaryGeneratorAction? The Messenger (which creates the UI commands) isn’t instantiated until the object is.
I have this under a particle generator class which is called by my main(). What else do I need to do?
particleGenerator::particleGenerator(G4int n_particle, G4String particleName, G4ThreeVector particlePosition)
numParticle = n_particle;
fParticleSource = new G4GeneralParticleSource();
fParticleSource → SetNumberOfParticles(numParticle);
particleTable = G4ParticleTable::GetParticleTable();
particle = particleTable → FindParticle(particleName);
void particleGenerator::GeneratePrimaries(G4Event* anEvent)
Ok. I see what’s going on. Looks like there was a separate wrapper like PrimaryGeneratorAction.hh class that calls G4VUserActionInitialization that needs to be declared in order to prevent a different class like G4MTRunManager from calling SetUserAction instead …
can you please elaborate? I’m facing the same issue and I’m uncertain what to do.