Hi everyone. I am trying to make a simulation with a supersymmetric particle. Before setting this up I made a simple geometry and physics list just to make sure everything was running. Instead of using a physics list like FTFP_BERT I derived a class from G4VModularPhysicsList and in it’s constructor I used RegisterPhysics (new G4EmStandardPhysics());
This worked fine and I used the particle gun to generate a proton.
Now, when I have made a new particle class from G4ParticleDefinition, I understand I have to tell Geant what processes apply to it so back in my physics list hh and cc files I now declare:
virtual void ConstructParticle(); virtual void ConstructProcess();
with
void MyPhysicsList::ConstructParticle()
{
fStau = StauParticle::StauDefinition();
}
void MyPhysicsList::ConstructProcess()
{
AddTransportation();
G4ProcessManager* pmanager = fStau->GetProcessManager();
pmanager->AddProcess(new G4hMultipleScattering,-1,1,1);
pmanager->AddProcess(new G4hIonisation,-1,2,2);
}
This compiles and runs, until I try to generate a proton like before when i get
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : Event0101
issued by : G4ParticleGun::SetParticleDefinition()
Null pointer is given.
*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment
-------- EEEE -------- G4Exception-END --------- EEEE -------
From the documentation I assume this means that the proton is no longer defined, I have only defined my new “stau” particle. But I still have the RegisterPhysics (new G4EmStandardPhysics());
command in the constructor. My understanding from the documentation and also from looking at the dmparticle and monopole examples is that by using the modular physics class I don’t have to generate everything from scratch. Can someone shed some light on how I can define a new particle efficiently?