Set a "reflecting surface"

Hi!
I have been trying to simulate neutron transportation using Geant4, and my model consists of several tubes, whose origins are located in the same point. My neutron source is a tube too. All these tubes share the same center. In order to get the relationship between the neutron flux and the radius of different side surfaces of those tubes, I want to set those upper and lower surfaces of tubes as reflecting surfaces (i.e., a particle track that hits a reflecting surface is reflected specularly, just like MCNP.), but I haven’t found out how to achieve this. Can anyone help me fix this? Thank you sincerely.

Jincai.

I’m not sure I understand the question but will attempt an answer. Your specific question seems to be how to get neutrons to reflect specularly. This is not easy and not supported. All I can suggest is to look for a hyper news posting from me 6-12 months ago outlining how to attempt this for gammas. You’d need to figure out how to apply it for neutrons.

More generally, you seem to have a problem with scoring. I suggest asking the scoring experts your actual question (that you are trying to solve by implementing reflection of neutrons).

Hi, dsawkey! Thank you for your reply.
You are right, i.e., I want to have all particles (not only neutrons) which shoot at a “reflecting surface” to reflect specularly. As I know, the last step’s poststeppoint (assuming step A) of a particle in one cell is on the boundry surface (if the particle is not killed). In that case, I can reset the momentumdirection of next step(step A+1). I have tried this method using the following function:
G4double momentumX = step->GetTrack()->GetMomentumDirection().x();
G4double momentumY = step->GetTrack()->GetMomentumDirection().y();
G4double momentumZ = step->GetTrack()->GetMomentumDirection().z();
G4double momentumZ2 = -momentumZ;
if ((p1z>0)&&(momentumZ>0))
{
theTrack->SetMomentumDirection(G4ThreeVector(momentumX,momentumY,momentumZ2));
}

  if ((p1z<0)&&(momentumZ<0))
  {
      theTrack->SetMomentumDirection(G4ThreeVector(momentumX,momentumY,momentumZ2));
  }

However, after comparing with MCNP, I found I was wrong and I cannot fingure out the right solution.

I have searched your posting on hyper news website, is it the following one ?
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/opticalphotons/648/1.html

In fact, I need the reflecting surface because I use this in MCNP. In order to compare GEANT4 and MCNP, I want my model and input paramers to be the same in two codes.

Best regards,
Jincai.

Hi,

I was referring to this post:
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/emprocess/1523/1/1/1/1.html

The post you found was from Mike Kelsey and is a different approach. I still don’t understand what you are trying to do so can’t comment on which might be better.

Also, tracks aren’t modifiable by the user (ie in UserSteppingAction), as far as I know. The code you have should give you an error.

Regards – Daren.

Thank you, dsawkey.
I didn’t find your post as I used wrong key words(i.e., reflecting surface). Thank you sincerely.

Maybe I have not expressed clearly. All I want is a function or process, which can “let” all particles reflect specularly when they move to a certain surface(If these particles do not move to this surface, they will not invoke this process). In MCNP, such surface is called reflecting surface.

Maybe you are right, because an expert told me several months ago that tracks cannot be modified in UserSteppingAction (I once asked the same question in slac forum.). However, I didn’t get errors when I use the codes above. I can see the tracks are changed at the relecting surface when I display tracking in qt creator visualisaion window.

Best regards,
Jincai.

My codes cannot achieve the functions I want.

Hi!
I also have this demand. Could you solve this problem?