Command not found </gun/particle gamma>

Hello,I’m new to geant4. Thesedays when I try to change B1 to generate my program, this message occurred:

***** COMMAND NOT FOUND </gun/particle gamma> *****

***** Batch is interrupted!! *****

And I’m certain that the particlegun has been defined.

class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
PrimaryGeneratorAction();
~PrimaryGeneratorAction() override;

// method from the base class
void GeneratePrimaries(G4Event*) override;

// method to access particle gun
const G4ParticleGun* GetParticleGun() const { return fParticleGun; }

private:
G4ParticleGun* fParticleGun = nullptr; // pointer a to G4 gun class
G4Tubs* fEnvelopeTub = nullptr;
};

What problem may it be ?

It’s already been solved. I found that I had deleted the sentences by mistake when I change the codes. Just after I typed them down, the program worked.
// User action initialization

runManager->SetUserInitialization(new ActionInitialization());

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.