Message: Bug? G4UserSpecialCuts kills stopping particles Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Bug? G4UserSpecialCuts kills stopping particles 

Forum: Event and Track Management
Date: 01 Sep, 2004
From: Daniel Barna <Daniel Barna>

Hi

I encountered the following problem: I have set up G4UserLimits to my physical volumes, to limit the track length or time (whatever), and I have left the MinEkine and MinRange fields of this UserLimits class at its default value (0). Then I found much less eplus annihilations than before, so I increased the timelimit and track length cuts to their default (DBL_MAX): now everything is at its default value, so I would expect that in this case using or not using these (dummy) G4UserLimits should make no difference. But it still does: there are less eplus annihilations.

I *guess* the problem is the following:

1. If I don't use G4UserLimits, or do not add the G4UserSpecialCuts process to my particles, the positrons, when they loose all their energy and stop, nicely annihilate

2. If I use G4UserLimits and add the G4UserSpecialCuts process to my particles, and leave the MinEkin and MinRange at their default values (0), then the process G4UserSpecialCuts proposes a step length, during which the particles loose their energy completely, and stop.In many cases this process is the winner, and its PostStepDoIt function is called for the particles - which KILLS the particles, not leaving time for their annihilation. I think the G4UserSpecialCuts process should ignore the particle range or minimum kin. energy cuts, if they are set to 0, and only use them, if they are set to a positive value. Otherwise the above problem occurs.

I tried to validate the above assumption by deriving a class from G4UserSpecialCuts, and registering this process for the particles, instead of G4UserSpecialCuts. I overwrote the PostStepGetPhysicalInteractionLength function of G4UserSpecialCuts, so I could cut out that piece of code, which suggests a steplength based on the energy or range of the particle. If I did this, the number of positron annihilations became the same as if I did not use any UserLimits.

However, I am a newbie to geant4, so I might be wrong. Does anybody have any other idea, why 'dummy' UserLimits change the number of positron annihilations?

Thanks

Daniel

-- some more comments:

I have got one more idea: the process ordering might play an important role here. The page http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/TrackingAndPhysics/thresholdVScut.html has an example: pmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1); which I also used. I thought now that this example might be wrong, and G4UserSpecialCuts should not be the first process (as here), but the last one, so I changed the last argument to ordLast. To my greatest surprise the number of eplus annihilations further decreased in this case.

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

1 Agree: Re: Bug? G4UserSpecialCuts kills stopping particles   (Lucas Clemente - 21 Mar, 2009)
 Add Message Add Message
to: "Bug? G4UserSpecialCuts kills stopping 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 ]