Message: G4UserLimit for gammas Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question G4UserLimit for gammas 

Forum: Physics List
Date: 17 Feb, 2011
From: Thomas Melzig <Thomas Melzig>

Hi,

as far as I understand the SetUserMinEkine()-method in G4UserLimits works only for charged particles. I want gammas to be affected by the same limit, so that they are not generated if their energy is below the threshold.

I thought the following code in the PhysicsList should do that:

  G4UserSpecialCuts* userCuts = new G4UserSpecialCuts();
  theParticleIterator->reset();
  while((*theParticleIterator)())
  {
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();
    if(particleName=="e-" ||
       particleName=="e+" ||
       particleName=="gamma")
    {
      pmanager ->AddDiscreteProcess(userCuts);
    }
  }

But that doesn't work as I can see in the tracking output. Is there a simple method to prevent gammas from a certain energy on to be tracked?

Thanks in advance

Thomas

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: G4UserLimit for gammas   (Randolph Moellenberg - 18 Feb, 2011)
2 Sad: Re: G4UserLimit for gammas   (Vladimir Ivanchenko - 20 Feb, 2011)
 Add Message Add Message
to: "G4UserLimit for gammas"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]