How to define a new particle in addition to physics list

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?

1 Like

I was able to get this to work by constructing all particles as I suspected would be the case. I added

G4BosonConstructor  pBosonConstructor;
pBosonConstructor.ConstructParticle();

G4LeptonConstructor pLeptonConstructor;
pLeptonConstructor.ConstructParticle();

G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();

G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();

G4IonConstructor pIonConstructor;
pIonConstructor.ConstructParticle();

G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();

and the appropriate header files. But I still don’t understand why for example the dmparticle and monopole examples don’t have to do this? If someone could explain it be very helpful, thank you.

1 Like

Hello,

please, have a look into $G4INSTALL/examples/extended/exoticphysics/monopole and dmparticle.

You should not override existing standard EM physics but add a new physics constructor for your new particle only - RegisterPhysics() method check the type of the constructor and override if it is electromagnetic. This was done to avoid double counting of main processes. You need to add only ctau and its decay products and physics for this particles only.

VI