Problem 168 - neutron-simulation doesn't work
Summary: neutron-simulation doesn't work
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic (show other problems)
Version: 1.1
Hardware: All Linux
: P2 major
Assignee: Hans-Peter.Wellisch
URL:
Depends on:
Blocks:
 
Reported: 2000-10-20 10:13 CEST by Alexander.Dietz
Modified: 2000-10-31 09:16 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Alexander.Dietz 2000-10-20 10:13:38 CEST
Hello,

I have a problem with simulating neutrons (in the MeV-range). I use a slightly
varied version of exampleN03 (materials and geometry changed) and want to start
neutrons:

/gun/particle neutron
/run/beamOn 1

This is working. But I am interested on a shielding effect on a material, so I
am printing out the position and enery of the particle in the class
'ExN03SteppingAction.cc'. This also worked, but the stepping length is obviously
much too long (the dimensions in the geometry are about ~1meter):

Position=(-4500,0,0)
energy=300MeV
Position=(-3500,0,0)
energy=300MeV
Position=(-500,0,0)
energy=300MeV
Position=(500,0,0)
energy=300MeV
Position=(6000,0,0)
energy=300MeV


Then I looked where the physical interactions are defined:
'ExN03PhysicsList.cc'. Here I think it ist very, very complicated for the user
of Geant4 to define every single tiny process he needs by hand! (by the way: I
don't interest for the processes, I just want to simulate what happends when a
neutron is going through a piece of matter!)
And so, ater searching a several time in the bad documentation I find some
processes which can be the correct (I don't know...):
G4HadronInelasticProcess and G4HadronElasticProcess

So I included them and I add to the code in ExN03PhysicsList::ConstructEM():

...
    } else if (particleName=="neutron") {
    // neutron
    pmanager->AddProcess(new G4HadronInelasticProcess(),-1,1,1);
    pmanager->AddProcess(new G4HadronElasticProcess()  ,-1,2,2);
...

as it is done over it. But it didn't work, so I searched the include-files in
the source-code, tried to understand it and changed my adding into:

...
  } else if (particleName=="neutron") {
      // neutron
     pmanager->AddProcess(new G4HadronInelasticProcess("hip",particle),-1,1,1);
     pmanager->AddProcess(new G4HadronElasticProcess("hip2")  ,-1,2,2);
...

Now when compiling the program no error but a warning occured and when starting
a neutron the program crashes and I do not know why.

-------------------

So my questions are

1. what is wrong in the changes I have done

2. how to simulate neutrons

3. is it every time insomuch to include a new process

4. is there any documentation existing with a description which I understand?

For any help I will be very happy!
Comment 1 Hans-Peter.Wellisch 2000-10-31 09:15:59 CET
Starting from an example that actually uses the hadronic physics will help.
Example N04 is a good candidate to start from. you may also wany to consider the
use of the G4PrecompoundModel the G4NeutronInelasticCrossSection classes.

Let me also note that trying to study shielding without interest in the physics
behind will likely lead to wrong results, and writing vitriolic reports will not
be able to improve this.