Message: Re: Error: local time goes back!! Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Error: local time goes back!! 

Forum: Event and Track Management
Re: Question Error: local time goes back!! (Soman)
Re: Feedback Re: Error: local time goes back!! (Gumplinger Peter)
Re: Feedback Re: Error: local time goes back!! (Soman)
Date: 17 Jun, 2016
From: Gumplinger Peter <Gumplinger Peter>

Hi Soman,

Your process isn't all that trivial ... you are changing the direction at the boundary between volumes! The G4Navigator 'thinks' that the track is going into the next volume but you may change the direction and so the track doesn't. This can be - and is - solved in Geant4 by optical photon tracking where we may have a reflection at the boundary. I suggest you follow what is done in G4OpBounaryProcess::PostStepDoIt.

A few hints (I don't know whether they will solve your issue):

Put:

       aParticleChange.Initialize(aTrack);
       aParticleChange.ProposeVelocity(aTrack.GetVelocity());

at the very start of the method - unconditionally!

and add:

       if (aTrack.GetStepLength()<=kCarTolerance/2)return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);

This prevents your process from being called again if the track reflects - in that case, there is a zero-length step the G4Navigator takes to relocate its internals.

> Geant4 calculates all other correlated parameters (such as the
> deposited energy and momentum conservation, momentum unit vector, etc)
> by itself according to the direction change?

No, Geant4 doesn't calculate anything. You tell it that if the process does nothing, the track should be unchanged. This is by calling: aParticleChange.Initialize(aTrack). We need to also call aParticleChange.ProposeVelocity(aTrack.GetVelocity()). This is because of:

http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1275

but I don't know if it affects you.

You must give a momentum change with a unit vector (which you do) - there is no energy deposit and nothing checks momentum conservation.

See what happens, Peter

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

1 Feedback: Re: Error: local time goes back!!   (Soman - 19 Jun, 2016)
(_ Feedback: Re: Error: local time goes back!!   (Gumplinger Peter - 20 Jun, 2016)
(_ Feedback: Re: Error: local time goes back!!   (Soman - 20 Jun, 2016)
 Add Message Add Message
to: "Re: Error: local time goes back!!"

 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 ]