Message: UserSpecialCut applied to all particles Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None UserSpecialCut applied to all particles 

Forum: Physics List
Date: 06 Nov, 2015
From: Paola Ferrario <Paola Ferrario>

Hi! I'm finding a problem, trying to apply a cut on energy to electrons in a specific region, using the example explained in https://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch05s04.html, paragraph 5.4.7: the cut seems to be applied to all the particles (gammas, neutrinos...) although I define it just for electrons.

I set the user limits I want in the geometry, attached to a specific logical volume (see class NextNew.cc attached):

_buffer_gas_logic->SetUserLimits(new G4UserLimits( DBL_MAX, DBL_MAX, DBL_MAX,100.*keV,0.));

and in my physics list, I add the process just for electrons (see the NexusStepLimiterBuilder class attached):

  fStepLimiter = new G4StepLimiter();
  fUserSpecialCuts = new G4UserSpecialCuts();
  while ((*aParticleIterator)()) {
    G4ParticleDefinition* particle = aParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();

    if (particle->GetParticleName()=="e-") {
       pmanager->AddDiscreteProcess(fStepLimiter);
	pmanager->AddProcess(fUserSpecialCuts,-1,-1,1);
    }
  }

In my macro, I'm registering the related physics lists with the command:

/PhysicsList/RegisterPhysics G4StepLimiterPhysics /PhysicsList/RegisterPhysics NexusStepLimiterBuilder

Is that enough? Am I doing something wrong?

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2015/11/06/04.08-25076-NextNew.cc
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2015/11/06/04.08-8281-exusStepLimiterBuilder.cc

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

1 Idea: Re: UserSpecialCut applied to all particles   (Vladimir Ivanchenko - 15 Nov, 2015)
(_ None: Re: UserSpecialCut applied to all particles   (Paola Ferrario - 20 Nov, 2015)
 Add Message Add Message
to: "UserSpecialCut applied to all particles"

 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 ]