Forum: Physics List Not Logged In (login)
Show subscribers

This forum is meant for discussion and exchanges of information regards to the physics list. Not only the list itself, but also the simulation results and comparison with data are also expected and welcomed on this forum.

The email gateway for this forum is: phys-list-g4hn@slac.stanford.edu


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

Question QGSP_BERT_HP neutron cross sections  by <dpr@ansto.gov.au>,   Nov 03, 22:36
Hi Everyone, I have simulated the response of some semiconductor detectors to two high energy quasimononergetic beam energies at 46.5 MeV and 174.35 MeV. The response of the detector to these energies does not seem consistent with the high energy elastic cross sections for 1H and 28Si presented in the ENDF JENDL/HE-2007 library.

I noticed that the data library for 1H goes up to 100 MeV (and seems to contain 3 copies of the same data) while the 28Si data goes up to 20 MeV. I was wondering if there is any way of determining what the elastic cross section was used for my energies of interest. I realise that above 19 MeV the physics list uses the Bertini Cascade model but I would like to know how to know what the elastic cross section value was as a certain energy.

Is it possible to use the tables to their upper limits if more entires are added?

Regards, Dale.

Question Changes for heavy ions in GEmStandardPhysics.cc in G4.9.2.p02?  by Daniel Matthiä <Daniel Matthiä>,   Oct 27, 03:48
Hello all, I have a problem after switching from G4.9.1.p02 to G4.9.2.p02 in the transport calcultions of heavy ions. I recognized a dramatic change in the ranges of iron ions at high energies. Specifically I calculated the range for Fe56 at an energy of 500MeV/nuc (28GeV) using the G4EmStandardPhysics list. The CSDA range in water in this case is 97.4mm calculated with G4.9.1.p02 which is reasonable but 204.3mm calculated with G4.9.2.p02! What is the reason for this change? Do I have to use a different physics list? In the creation of my physics list I followed the example extended/field/field04. Regards, Daniel

1 None: Re: Changes for heavy ions in GEmStandardPhysics.cc in G4.9.2.p02?   (michel maire - Oct 28, 00:10)
(_ None: Re: Changes for heavy ions in GEmStandardPhysics.cc in G4.9.2.p02?   (Daniel Matthiä - Oct 28, 02:51)
(_ Agree: Re: Changes for heavy ions in GEmStandardPhysics.cc in G4.9.2.p02?   (Vladimir Ivanchenko - Oct 28, 12:48)
Note QGSP_BERT_HP + precompound -> Nucleus A, Z = 0 0 Projectile was a Aborted  by Cristian Bungau <Cristian Bungau>,   Sep 16, 01:46
Hi,

I tried to add the precompound model to the pre-defined physics list and I get this strange error message: Nucleus A, Z = 0 0 Projectile was a Aborted

Obviously there is no such element (A,Z = 0 0) in my geometry, and the last particle tracked when the code aborted was a deuteron.

Please let me know any suggestions or comments.

Thank you,

Cristian

1 Idea: Re: QGSP_BERT_HP + precompound -> Nucleus A, Z = 0 0 Projectile was a Aborted   (Vladimir Ivanchenko - Sep 20, 09:31)
(_ Note: Re: QGSP_BERT_HP + precompound -> Nucleus A, Z = 0 0 Projectile was a Aborted   (Cristian Bungau - Sep 20, 12:22)
(_ Idea: Re: QGSP_BERT_HP + precompound -> Nucleus A, Z = 0 0 Projectile was a Aborted   (Vladimir Ivanchenko - Sep 21, 11:09)
(_ Note: Re: QGSP_BERT_HP + precompound -> Nucleus A, Z = 0 0 Projectile was a Aborted   (Cristian Bungau - Sep 24, 01:32)
(_ Sad: Re: QGSP_BERT_HP + precompound -> Nucleus A, Z = 0 0 Projectile was a Aborted   (Cristian Bungau - Oct 09, 03:46)
(_ Feedback: Re: QGSP_BERT_HP + precompound -> Nucleus A, Z = 0 0 Projectile was a Aborted   (Gunter Folger - Oct 09, 06:31)
Question Problem with neutrons interacting with Lithium 6 generating extra gammas  by Calvin Giles <Calvin Giles>,   Aug 25, 03:38
I am trying to model the interaction of low energy neutrons with lithium 6 
which should create an alpha and a triton with a Q-value of 4.78 MeV. I am 
using the LHEP_PRECO_HP physics list (though I have tried several others too) 
and I get 3 additional alphas being created from the 4.78 MeV in the 
'inelastic' process. How do I correct this? I am generating neutrons with an 
energy of less than 1 eV, in this case 0.001 eV, but the situation is always 
the same once the neutrons are thermalised.

Idle> /run/beamOn 1   
EventAction: Event # 0 started

*********************************************************************************************************
* G4Track Information:   Particle = neutron,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     0        0        100      1e-09     0        0        0         LithiumPowder initStep

1     0.085    -0.0311  100      0         0        0.0918   0.0918    LithiumPowder NeutronInelastic


*********************************************************************************************************
* G4Track Information:   Particle = gamma,   Track ID = 6,   Parent ID = 1
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     0.085    -0.0311  100      1.03      0        0        0         LithiumPowder initStep

1     -1.7     7.99     144      0.214     0        44.6     44.6      LithiumPowder compt

2     -0.856   8.5      141      0.139     0        2.71     47.3      LithiumPowder compt

3     -12.1    9.09     141      0.116     0        11.3     58.6      LithiumPowder compt

4     -18      19.4     160      0.116     0        22       80.6      World       Transportation

5     -23.1    28.3     175      0.116     0        18.8     99.4      OutOfWorld  Transportation

*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 9,   Parent ID = 6
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     -12.1    9.09     141      0.023     0        0        0         LithiumPowder initStep

1     -12.1    9.09     141      0         0.023    0.00492  0.00492   LithiumPowder eIoni


*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 8,   Parent ID = 6
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     -0.856   8.5      141      0.0745    0        0        0         LithiumPowder initStep

1     -0.842   8.5      141      0         0.0745   0.0387   0.0387    LithiumPowder eIoni


*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 7,   Parent ID = 6
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     -1.7     7.99     144      0.812     0        0        0         LithiumPowder initStep

1     -1.65    8.79     145      0.231     0.581    1.37     1.37      LithiumPowder eIoni

2     -1.62    8.79     145      0         0.231    0.251    1.62      LithiumPowder eIoni


*********************************************************************************************************
* G4Track Information:   Particle = gamma,   Track ID = 5,   Parent ID = 1
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     0.085    -0.0311  100      1.03      0        0        0         LithiumPowder initStep

1     2.94     -12.9    30       1.03      0        71.2     71.2      Target      Transportation

2     4.97     -21.9    -19.6    0.265     0        50.5     122       Target      compt

3     6.05     -25.8    -16.7    0.265     0        4.96     127       World       Transportation

4     8.74     -35.4    -9.43    0.265     0        12.4     139       OutOfWorld  Transportation


*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 10,   Parent ID = 5
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     4.97     -21.9    -19.6    0.76      0        0        0         Target      initStep

1     4.36     -21.3    -21.2    0.387     0.373    1.95     1.95      Target      eIoni

2     3.59     -21.8    -21.5    0.0129    0.374    1.18     3.13      Target      eIoni

3     3.59     -21.8    -21.5    0         0.0129   0.00381  3.14      Target      eIoni


*********************************************************************************************************
* G4Track Information:   Particle = gamma,   Track ID = 4,   Parent ID = 1
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     0.085    -0.0311  100      0.00302   0        0        0         LithiumPowder initStep

1     0.0855   0.00261  100      0         0.000697 0.034    0.034     LithiumPowder phot


*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 11,   Parent ID = 4
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     0.0855   0.00261  100      0.00233   0        0        0         LithiumPowder initStep

1     0.0856   0.00258  100      0         0.00233  9.83e-05 9.83e-05  LithiumPowder eIoni


*********************************************************************************************************
* G4Track Information:   Particle = alpha,   Track ID = 3,   Parent ID = 1
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     0.085    -0.0311  100      1.17      0        0        0         LithiumPowder initStep

1     0.0845   -0.03    100      0         1.17     0.00294  0.00294   LithiumPowder ionIoni


*********************************************************************************************************
* G4Track Information:   Particle = triton,   Track ID = 2,   Parent ID = 1
*********************************************************************************************************

Step# X(mm)    Y(mm)    Z(mm)    KinE(MeV) dE(MeV)  StepLeng TrackLeng NextVolume  ProcName

0     0.085    -0.0311  100      1.56      0        0        0         LithiumPowder initStep

1     0.0876   -0.0367  100      0         1.56     0.0146   0.0146    LithiumPowder hIoni
1 Idea: Re: Problem with neutrons interacting with Lithium 6 generating extra gammas   (Vladimir Ivanchenko - Sep 03, 04:17)
2 None: Re: Problem with neutrons interacting with Lithium 6 generating extra gammas   (Yuri Shitov - Sep 20, 04:22)
3 None: Re: Problem with neutrons interacting with Lithium 6 generating extra gammas   (Koi, Tatsumi - Sep 21, 16:49)
1 None: Re: Problem with neutrons interacting with Lithium 6 generating extra gammas   (Calvin Giles - Sep 22, 02:28)
(_ None: Re: Problem with neutrons interacting with Lithium 6 generating extra gammas   (Koi, Tatsumi - Sep 23, 16:16)
(_ None: Re: Problem with neutrons interacting with Lithium 6 generating extra gammas   (Calvin Giles - Sep 24, 02:21)
Question cold neutron simulation  by Cassol Franca <Cassol Franca>,   Aug 25, 00:57
Hi,

I would like to simulate the interactions of a cold neutron beam (0.00005-0.02500 eV). Can I do it with Geant4? In the case, which is the physics list that I must use?

Thanks for any help

Cheers

Franca

1 Idea: Re: cold neutron simulation   (Vladimir Ivanchenko - Sep 03, 04:09)
Question Is the process/model catalog site complete?  by <melb>,   Aug 13, 10:18
Hi,

I am a little confused. I am trying to write a User Physics List that is as inclusive as possible, defining all particles and the processes and models that apply to them.

As my main reference I have been using the lists available at http://geant4.web.cern.ch/geant4/support/proc_mod_catalog/index.shtml. But, I have noticed particles defined in some examples that do not appear in the particle lists on that site. For example: K0, Anti-K0, Anti-K0Long, Anti-K0Short.

Is there a more complete reference that I should be using? Or are the particles not listed somehow automatically accounted for in Geant4?

Also, I was interested in creating a modular physics lists similar to the one in examples/extended/optical/LXe, but can find no documentation outside of what is written in the example. Is there documentation for modular physics lists elsewhere?

Thank you, Melanie

Question G4Cerenkov run-time warning  by <melb>,   Jul 14, 13:15
Hello,

I am in the process of developing a simulation of a liquid-scintillator detector, and am including the Cerenkov process in my PhysicsList. My code compiles with no errors, but when I run my program I get the following message:

    G4Cerenkov::G4Cerenkov constructor
    NOTE: this is now a G4VDiscreteProcess!
    Required change in UserPhysicsList: 
    change: pmanager->AddContinuousProcess(theCerenkovProcess);
    to:     pmanager->AddProcess(theCerenkovProcess);
            pmanager->SetProcessOrdering(theCerenkovProcess,idxPostStep);

The problem is, I am already using the format that this warning tells me to! An excerpt from my code is below.

 void Sci00PhysicsList::ConstructEM()
 {
   theParticleIterator->reset();
   while( (*theParticleIterator)() ){
     G4ParticleDefinition* particle = theParticleIterator->value();
     G4ProcessManager* pmanager = particle->GetProcessManager();
     G4String particleName = particle->GetParticleName(); 

     if (particleName == "opticalphoton") {

< more stuff here ...>

     } else if (particleName == "mu+" || 
  	        particleName == "mu-") {
       G4MultipleScattering* MultipleScattering = new G4MultipleScattering;
       pmanager->AddProcess(MultipleScattering,     -1, 1, 1);
       pmanager->AddProcess(new G4MuIonisation,     -1, 2, 2);
       pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
       pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);
       G4Cerenkov* theCerenkovProcess = new G4Cerenkov();
       pmanager->AddProcess(theCerenkovProcess);
       pmanager->SetProcessOrdering(theCerenkovProcess, idxPostStep); 
       G4Scintillation* Scintillation = new G4Scintillation();
       pmanager->AddProcess( Scintillation ); 
       pmanager->SetProcessOrderingToLast( Scintillation , idxAtRest);
       pmanager->SetProcessOrderingToLast( Scintillation , idxPostStep);

< ... >

Is this message anything to be concerned about? Or do I need to define the Cerenkov process another way?

Thank you, Melanie

1 Idea: Re: G4Cerenkov run-time warning   (Vladimir Ivanchenko - Jul 15, 11:47)
(_ Ok: Re: G4Cerenkov run-time warning   (melb - Aug 13, 10:04)
Feedback K0L in FTF_BIC  by David Ward <David Ward>,   Jul 02, 00:55
I've been looking at the new FTF_BIC physics list in Geant 4.9.2 There seems to be a problem with K0L - ~10% of them deposit no energy in our calorimeters. If I turn on verbose tracking, for a 10 GeV K0L, the K0L is tracked through the calorimeter. Eventually it undergoes a "KaonZeroLInelastic" interaction in a tungsten layer, but NO secondaries are produced. Is this a known problem? Has it perhaps been fixed already?

1 Ok: Re: K0L in FTF_BIC   (Vladimir Ivanchenko - Jul 15, 12:00)
None Is the attached spectrum correct?   by Pradip Datta <Pradip Datta>,   Jun 30, 06:18
Hi all,

My simulated Ge detector is exposed to a mono energetic gamma source of 661.57 keV (like 137Cs). I have recorded the energy deposited in the detector. I got a spectrum. Every things looks okey but still I am not convinced!! Should there be any X-rays in the spectra. I saw one simulation result using Geant4. They r getting a strong peak ~ 191 keV. It may have that they used some material which emits some secondary gamma ray upon hitting by the primary gamma ray. I am attaching the .ps file of that spectrum. If anyone can advise me on this issue, it will be great help.

With best regards,

Pradip

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2009/06/30/06.13-37276-0mm-661KeV-1million.41.ps

1 Idea: Re: Is the attached spectrum correct?   (Vladimir Ivanchenko - Jul 15, 11:57)
Question using parametrized models for isotopes missing from the G4NDL data library  by Cristian Bungau <Cristian Bungau>,   Jun 23, 10:28
Hi,

I've seen that if an isotope in my geometry is missing from G4NDL data than an alternative similar but different isotope from G4NDL is selected. If I set the variable G4NEUTRONHP_SKIP_MISSING_ISOTOPES, then the cross-section is set to 0 instead.

What I really need is the simulation to stick the correct isotope and use the parametrized model for it instead of the HP model. I would be very grateful if you could please let me know how I could achieve that.

Thank you,

Cristian

Question Low energy neutrons  by Matthieu Lebois <Matthieu Lebois>,   Jun 02, 14:11
Hi,

I have an issue which is very similar "GetHadronicInteraction: No Model found in this forum"... From this post I learned that the issue came from my physics list...

So I tried to use LHEP, QGSP, LHEP_BERT_HP, QGSP_BERT_HP physics lists... each of them give me the same error!

G4EnergyRangeManager:GetHadronicInteraction: counter=1, Ek=227.27363, Material = RHENIUM_Re, Element = rhenium
*0* low=0, high=20
In src/G4EnergyRangeManager.cc, line 123: 
===> GetHadronicInteraction: No Model found
In src/G4EnergyRangeManager.cc, line 123: 
===> GetHadronicInteraction: No Model found
Unrecoverable error for:
 - Particle energy[GeV] = 0.22727363
 - Material = RHENIUM_Re
 - Particle type = neutron

Here are the processes that I use for neutron

 Hadronic Processes for <neutron>
nCapture  Models:          
NeutronHPCapture: Emin(GeV)=     0  Emax(GeV)= 0.02
NeutronInelastic  Models:        
NeutronHPInelastic: Emin(GeV)=     0  Emax(GeV)= 0.02
HadronElastic  Models:          
NeutronHPElastic: Emin(GeV)=     0  Emax(GeV)= 0.02
nFission  Models:          
NeutronHPFission: Emin(GeV)=     0  Emax(GeV)= 0.02
hElastic  Models:          
NeutronHPElastic: Emin(GeV)=     0  Emax(GeV)= 0.02
G4HadronElastic: Emin(GeV)= 0.0195  Emax(GeV)= 100000
NeutronInelastic  Models:                     
QGSP: Emin(GeV)=    12  Emax(GeV)= 100000
G4LENeutronInelastic: Emin(GeV)=   9.5  Emax(GeV)= 25
Bertini Cascade: Emin(GeV)= 0.0199  Emax(GeV)= 9.9
NeutronHPInelastic: Emin(GeV)=     0  Emax(GeV)= 0.02
nCapture  Models:               
G4LCapture: Emin(GeV)= 0.0199  Emax(GeV)= 20000
NeutronHPCapture: Emin(GeV)=     0  Emax(GeV)= 0.02
nFission  Models:                
G4LFission: Emin(GeV)= 0.0199  Emax(GeV)= 20000
NeutronHPFission: Emin(GeV)=     0  Emax(GeV)= 0.02

If anyone have an idea?

NB: Rhenium doesn't exist in G4NDL3.13

1 Idea: Re: Low energy neutrons   (Vladimir Ivanchenko - Jun 03, 10:27)
(_ Question: Re: Low energy neutrons   (Matthieu Lebois - Jun 03, 13:14)
(_ None: Re: Low energy neutrons   (Matthieu Lebois - Jun 03, 13:35)
Question problem with energy deposition of deuteron  by <elder>,   Jun 02, 01:13
   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2009/06/02/00.52-21350-enloss.ps
     http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2009/06/02/00.52-29882-Break_upPhysicsList.cc

Hi,
 I am a PhD student and at this moment I simulate quite simple experiment - deuteron breakup and elastic scattering reaction. The experimental setup consists of 3 cylindrical detectors with thickess: 1.8 mm, 15 mm and 14.4 mm. I need to calculate energy loss of protons and deuterons in each ot these detectors. Everything looks fine for protons, but there is a problem for deuterons - I have got "discreet" distribution for e.g dependecy energy loss in first detector vs en.loss in the next detector (I included picture). I don't know why it is so.

Thank you for any suggestions,

1 More: problem with energy deposition of deuteron   (elder - Jun 02, 01:38)
2 Idea: Re: problem with energy deposition of deuteron   (Vladimir Ivanchenko - Jun 03, 10:21)
Question is INCL/ABLA physics model suitable for 20 - 150 MeV neutrons ?  by Cristian Bungau <Cristian Bungau>,   May 28, 04:32
Hi,

I am trying to use the INCLABLA physics to simulate an accelerator driven system. The energy range is 0 - 1 GeV, where 1 GeV is the energy of the initial proton interacting with a Pb target.

Below 20 MeV I am using the HP models. What I am concern of is the energy range 20 - 150 MeV (these will be the energies of the spallation neutrons), because I believe the INCLABLA model works well only above ~150 MeV ?

Shall I use Binary Cascade for the 20 - 150 MeV neutrons ?

Thank you,

Cristian

None QGSP_BERT_HP with thermal neutrons  by Mariusz <Mariusz>,   05 May, 2009
Hello, I'm trying to create a Physics List which will be in fact QGSP_BERT_HP with addition of thermal neutrons (G4NeutronHPThermalScattering) below 4 eV. First I'm trying to reproduce QGSP_BERT_HP model and I have a question. In the verbose of Hadronic Process (Summary), which I attach to this mail, the QGSP model exists as if it was not necessary to use TheoFSGenerator to create it, as it is described in: http://geant4.cern.ch/support/proc_mod_catalog/models/hadronic/QGSP.html

so is there another way to include QGSP, without copying all these code? In addition what is called QGSP for photons (here: http://geant4.cern.ch/support/proc_mod_catalog/physics_lists/hadronic/QGSP.html) seems to be defined differently then for hadrons. Is that true? Isn't it a bit misleading?

Cheers, Mariusz

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2009/05/05/03.39-63253-sSummary_QGSP_BERT_HP.txt

1 None: Re: QGSP_BERT_HP with thermal neutrons   (Mariusz - 05 May, 2009)
(_ None: Re: QGSP_BERT_HP with thermal neutrons   (Mariusz - 06 May, 2009)
None shooting CsI targets with electrons   by <csi505>,   27 Apr, 2009
Hi, 
   In my simulation I'm shooting CsI targets with electrons which can have energies between 29-120 keV.These electrons will emit a cascade of delta electrons producing clusters of eV secondary electrons because of the extraordinarily low work function (0.1-0.2 eV) of CsI.
   The thickness of CsI is about 100 nm.
   I think I will get many electrons leaving the CsI bulk,but I got a few.
So what's the problem?

  Here is part of my PhysicsList:

  defaultCutValue = 0.000001*mm;
  cutForGamma = defaultCutValue;
  cutForElectron = defaultCutValue;
  cutForProton    = 0.001*mm;
  SetVerboseLevel(1);
  G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100.*eV, 1*GeV);

   if (particleName == "gamma") {
      // gamma         
      pmanager->AddDiscreteProcess(new G4PenelopePhotoElectric);
      pmanager->AddDiscreteProcess(new G4PenelopeCompton);
      pmanager->AddDiscreteProcess(new G4PenelopeGammaConversion);
      pmanager->AddDiscreteProcess(new G4PenelopeRayleigh);     
    } else if (particleName == "e-") {
      //electron
      pmanager->AddProcess(new G4MultipleScattering,     -1, 1, 1);
      pmanager->AddProcess(new G4PenelopeIonisation,     -1, 2, 2);
      pmanager->AddProcess(new G4PenelopeBremsstrahlung, -1,-1, 3);	    
    } else if (particleName == "e+") {
      //positron
      pmanager->AddProcess(new G4MultipleScattering,     -1, 1, 1);
      pmanager->AddProcess(new G4PenelopeIonisation,     -1, 2, 2);
      pmanager->AddProcess(new G4PenelopeBremsstrahlung, -1,-1, 3);      
      pmanager->AddProcess(new G4PenelopeAnnihilation,    0,-1, 4);
    }

  It seems when the low energy electrons are created in the CsI bulk most of them will not leave CsI bulk because of a very short range in CsI.

  I also have used  LowEnergy  PhysicsList, but the result is still wrong.

  what's the problem?

1 Idea: Re: shooting CsI targets with electrons   (Vladimir Ivanchenko - 18 May, 2009)
None shooting CsI targets with electrons   by <csi505>,   27 Apr, 2009
Hi, 
   In my simulation I'm shooting CsI targets with electrons which can have energies between 29-120 keV.These electrons will emit a cascade of delta electrons producing clusters of eV secondary electrons because of the extraordinarily low work function (0.1-0.2 eV) of CsI.
   The thickness of CsI is about 100 nm.
   I think I will get many electrons leaving the CsI bulk,but I got a few.
So what's the problem?

  Here is part of my PhysicsList:

  defaultCutValue = 0.000001*mm;
  cutForGamma = defaultCutValue;
  cutForElectron = defaultCutValue;
  cutForProton    = 0.001*mm;
  SetVerboseLevel(1);
  G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100.*eV, 1*GeV);

   if (particleName == "gamma") {
      // gamma         
      pmanager->AddDiscreteProcess(new G4PenelopePhotoElectric);
      pmanager->AddDiscreteProcess(new G4PenelopeCompton);
      pmanager->AddDiscreteProcess(new G4PenelopeGammaConversion);
      pmanager->AddDiscreteProcess(new G4PenelopeRayleigh);     
    } else if (particleName == "e-") {
      //electron
      pmanager->AddProcess(new G4MultipleScattering,     -1, 1, 1);
      pmanager->AddProcess(new G4PenelopeIonisation,     -1, 2, 2);
      pmanager->AddProcess(new G4PenelopeBremsstrahlung, -1,-1, 3);	    
    } else if (particleName == "e+") {
      //positron
      pmanager->AddProcess(new G4MultipleScattering,     -1, 1, 1);
      pmanager->AddProcess(new G4PenelopeIonisation,     -1, 2, 2);
      pmanager->AddProcess(new G4PenelopeBremsstrahlung, -1,-1, 3);      
      pmanager->AddProcess(new G4PenelopeAnnihilation,    0,-1, 4);
    }

  It seems when the low energy electrons are created in the CsI bulk most of them will not leave CsI bulk because of a very short range in CsI.

  I also have used  LowEnergy  PhysicsList, but the result is still wrong.

  what's the problem?

1 Idea: Re: shooting CsI targets with electrons   (Vladimir Ivanchenko - 21 May, 2009)
None header of G4VUserPhysicsList  by Mariusz <Mariusz>,   23 Apr, 2009
There is a description in the run/include/G4VUserPhysicsList.hh file of Geant4.9.2.p01: // ------------------------------------------------------------ // GEANT 4 class header file // Class Description: // This class is an abstruct class for // constructing particles and processes. // User must implement following four virtual methods // in his own concrete class derived from this class. // G4VUserPhysicsList::ConstructParticle() // Construct particles // G4VUserPhysicsList::constructPhysics() // Construct procesess and register them to particles // G4VUserPhysicsList::SetCuts() // set cut values in range to all particles // (and rebuilding physics table will be invoked ) // // -------------------------------------------

And I have a question to this description. It says that "User must implement following four virtual methods" and mentioned afterwards are 3 methods. In addition if I understand well the second mentioned method should be ConstructProcess(), not constructPhysics(). Is, what I'm saying, true?

Mariusz

PS. there is also spelling error of in word "abstract".

Question what are three number in :pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);  by <viet.nga.thi.la@cern.ch>,   03 Apr, 2009
Hello,

Can you explain what are three numbers in the structures:

      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
      pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);

Is this documents explain them concretely?

Thaks verry much.

Nga

1 Idea: Re: what are three number in :pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);   (Vladimir Ivanchenko - 12 Apr, 2009)
Question Segmentation Fault  by <idjupp@dstl.gov.uk>,   03 Mar, 2009
Recently I've been increasing the number of particles simulated in my neutron activation model (now up to 50e6 neutrons at 14MeV). Depending on the target material being modelled, I've noticed that occasionally I get a 'Segmentation Fault' error and the simulation terminates. I get no other error messages at all, the simulation literally just stops writing out data. For a particular material this occurs at the same event number each time. Does this suggest that my Physics List is defficient i.e. a particle is being produced for which I have the incorrect, or no processes? Is there an obvious cause of this type of error? Thanks in advance if anyone can help...

1 Idea: Re: Segmentation Fault   (Vladimir Ivanchenko - 07 Apr, 2009)
Question Thermal neutron interactions  by Clarisse <Clarisse>,   25 Feb, 2009
I am writing a simulation program to simulate a He-3 tube: the tube gas is mainly He-3 with some CO2. I want to throw thermal neutrons at it (~0.025 eV). My concern at this time is to implement my physics list correctly. I have dealt with electrons, positrons and gammas before, so I know how to implement all the physics processes for those. I need to add thermal neutrons properly. I would apprciate help/advice on how to do that. If there is a code implementing the physics list for thermal neutron interactions (on He-3), it would be useful to have it. Thank you, Clarisse

1 None: Re: Thermal neutron interactions   (Mariusz - 29 Mar, 2009)
(_ None: Re: Thermal neutron interactions   (Koi, Tatsumi - 31 Mar, 2009)
Question pion potential in INCL/ABLA?  by Cristian Bungau <Cristian Bungau>,   24 Feb, 2009
Hi,

Could you please let me know if the pion potential is taken into consideration in the INCL/ABLA model included in the latest (4.9.2) release of Geant4?

Thank you,

Cristian

1 Ok: Re: pion potential in INCL/ABLA?   (Cristian Bungau - 24 Feb, 2009)
None Turning off Energy loss due to Straggling  by Kent Wong <Kent Wong>,   12 Feb, 2009
Hello,

 I am a physics graduate student from Northern Illinois University at the NICADD (Northern Illinois Center of Accelerator and Detector Development) and I am working on my thesis where I implement Geant4.9.1 via Cygwin to simulate 200 MeV protons through a air-bone-water phantom. My thesis is on proton Computed Tomography. My physics advisor addressed an issue to me weeks ago:

When people talk about energy loss, they think about the combined effect of two things: one is governed by the Bethe-Bloch equation (the average energy loss, which is a deterministic effect) and the other by equations derived by Bohr, Tschalar, etc. (the energy loss straggling, which is a stochastic effect that gives a distribution around the average loss). I want to turn off only the second effect (the stochastic part) and keep the first (the deterministic part).

   He wants to turn off only the energy loss due to straggling, but I don't know how to do it on the PhysicsList.
 I've attached my PhysicsList.cc. My guess is to comment out HadNuclearProcess class but I'm not sure.

Thanks for helping, Kent

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2009/02/12/20.41-71768-P_code_src_PhysicsList.cc

1 Idea: Re: Turning off Energy loss due to Straggling   (Vladimir Ivanchenko - 15 Feb, 2009)
Question Phase Space Calculation  by Matthieu Lebois <Matthieu Lebois>,   11 Feb, 2009
Hello,

I'd like to create a physics process to simulate the following reaction:

gamma + 238U (at rest) -> gamma* + n + 237U*

For this purpose I need to make a phase space calculation to evaluate the gamma* and n fourth-vector to get energy and momentum for these particle in final state.

I know that a class : G4PhaseSpaceDecayChannel allow that kind of calculation. But I've found no explanation or clues on how to use it.

If someone could help me.

Thanks

Question G4phys_lists error  by Taylan Yetkin <Taylan Yetkin>,   02 Feb, 2009
Hi,

I've installed G4 without any problem visible in the log file. When I tried to compile my application I got the following error. Could anybody comment on this?

Thanks

Using granular libraries ... Linking CMSHFSIM ... /usr/bin/ld: skipping incompatible /uscms/home/tyetkin/work/Geant4/geant4_9_2/lib/Linux-g++/libG4phys_lists.a when searching for -lG4phys_lists /usr/bin/ld: cannot find -lG4phys_lists collect2: ld returned 1 exit status gmake: *** [/uscmst1b_scratch/lpc1/lpcphys/tyetkin/TB_HF_g4.9.2/bin/Linux-g++/CMSHFSIM] Error 1

1 Idea: Re: G4phys_lists error   (Vladimir Ivanchenko - 07 Feb, 2009)
Sad QGSP_BIC_HP physics in geant4.9.2  by Cristian Bungau <Cristian Bungau>,   26 Dec, 2008
Hi,

I am trying to use the QGSP_BIC_HP physics in my example in the new G4 release, but I get this linking error:

-bash-3.00$ make

Using granular libraries ... Linking Th_BIC ...

/home/geant4/geant4.9.2/lib/Linux-g++/libG4phys_builders.a(G4EmStandardPhysics.o)(.text+0x1015): In function `G4EmStandardPhysics::ConstructProcess()': : undefined reference to `G4hBremsstrahlung::G4hBremsstrahlung(G4String const&)'

/home/geant4/geant4.9.2/lib/Linux-g++/libG4phys_builders.a(G4EmStandardPhysics.o)(.text+0x1068): In function `G4EmStandardPhysics::ConstructProcess()': : undefined reference to `G4hPairProduction::G4hPairProduction(G4String const&)'

collect2: ld returned 1 exit status

make: *** [/home/geant4/bin/Linux-g++/Th_BIC] Error 1 -bash-3.00$

I am implementing the physics list the same way I did it in the previous G4 release:

 runManager->SetUserInitialization(new QGSP_BIC_HP);

in my main program.

I would be very grateful for any suggestions on how to solve this.

Thank you,

Cristian

1 Ok: Re: QGSP_BIC_HP physics in geant4.9.2 -> PROBLEM SOLVED   (Cristian Bungau - 27 Dec, 2008)
Question how to test for a electronuclear/photonuclear process in SteppingAction?  by Emil Frlez <Emil Frlez>,   21 Dec, 2008
 Hi I have a simple question (that might have been answered before ;8-).

 I use a physics list with the ElectroNuclearPhysics():

....
void PhysicsList::ConstructProcess()
{
  AddTransportation();
  AddDecay();
  emPhysicsList->ConstructProcess();
  for(size_t i=0; i<hadronPhys.size(); i++) hadronPhys[i]->ConstructProcess();
  AddStepMax();
  ElectroNuclearPhysics();
}
...

 In my SteppingAction.cc I would like to flag the events
 with the PhotonInelastic, ElectronNuclear, PositronNuclear reactions.

 What would be the appropriate "if" statement? I use 

void SteppingAction::UserSteppingAction(const G4Step* aStep)
{
 const G4Track* track = aStep->GetTrack();
 ...

 So what is the condition?

 Flag=0;
 if ( aStep->GetTrack()-> ????? ) Flag=1;

                                         Regards, and TIA, Emil

Question Wrong alpha energies from B10 (n,alpha) Li7 reaction  by cihangir celik <cihangir celik>,   17 Dec, 2008
Code: Geant 4.9.2

Has any body figured out why the B (n,alpha) Li reaction has wrong alpha kinetic energies? I have tried to simulate this reaction and got the 1.45 MeV (94 %) and 1.75 MeV (%6) alpha particles from boron neutron interaction. It should be 1.47 Mev (94 %) and 1.777 Mev (6 %).

Question AlongStep DoIt ordering for G4eplusAnnihilation process  by Maria Gatu Johnson <Maria Gatu Johnson>,   17 Dec, 2008
When try to run a G4 application I get this error message:

------------------------ Construct General Over G4ProcessManager::CheckOrderingParameters You cannot set ordering parameter [4] for AlongStep DoIt to the process annihil

*** G4Exception : Invalid Ordering
      issued by : G4ProcessManager::CheckOrderingParameters 
Invalid ordering parameters are set for  annihil
*** Fatal Exception *** core dump ***

*** G4Exception: Aborting execution *** Aborted ------------------------

I see from the manual. section 5.2, example 5.1, that it is ok to set ordering [4] for the PostStep process for the process annihil (G4eplusAnnihilation()). I am trying to get an old GEANT4.5.1 application to run in GEANT4.9.1. The application was not written by me and I want the Physics to work the same, without having to understand the whole underlying thinking myself. In the old version, AlongStep DoIt was set to [4] for the annihil process in this way:

------------------------------
else if(particleName == "e+")
	{
	    //Construct processes for electron
	    eplusMultipleScattering = new G4MultipleScattering();
	    eplusIonisation = new G4eIonisation();
	    eplusBremsstrahlung = new G4eBremsstrahlung();
	    theAnnihilation = new G4eplusAnnihilation();
	    //Add processes for electron
	    pmanager -> AddProcess(eplusMultipleScattering);
	    pmanager -> AddProcess(eplusIonisation);
	    pmanager -> AddProcess(eplusBremsstrahlung);
	    pmanager -> AddProcess(theAnnihilation);
	    //Set ordering for AlongStepDoIt
	    pmanager -> SetProcessOrdering(eplusMultipleScattering, idxAlongStep, 1);
	    pmanager -> SetProcessOrdering(eplusIonisation, idxAlongStep, 2);
	    pmanager -> SetProcessOrdering(eplusBremsstrahlung, idxAlongStep, 3);
	    pmanager -> SetProcessOrdering(theAnnihilation, idxAlongStep, 4);

-----------------------------
 I am still running this code on an old computer and know that it works with the old GEANT4 version. How can I make it work, the same, now???

Thanks in advance!

Maria

1 Idea: Re: AlongStep DoIt ordering for G4eplusAnnihilation process   (Vladimir Ivanchenko - 17 Dec, 2008)
(_ Question: Re: AlongStep DoIt ordering for G4eplusAnnihilation process   (Maria Gatu Johnson - 19 Dec, 2008)
(_ Idea: Re: AlongStep DoIt ordering for G4eplusAnnihilation process   (Vladimir Ivanchenko - 19 Dec, 2008)
Question physics processes order  by <bgastro@pmo.ac.cn>,   12 Dec, 2008
Dear all,

I am new to geant4 physics. I have some questions about the order of physics processes:

1)What do the numbers in the function pManager->AddProcess(new G4eplusAnnihilation(), 0,-1, 4) mean? Do these numbers mean the order of invocation of DoIt() methods? The smaller the number is, the earlier the corresponding DoIt() method is invoked or inverse?

2)Why does the order of invocation of DoIt() methods have to be inverse of that of GetPhysicalInteractionLength()?

3)Why do the transportation and multiple scattering be the last two processes of AlongGetPhysicalInteractionLength(…) method? Is there any special physical meaning there?

Thanks in advance.

1 Idea: Re: physics processes order   (Vladimir Ivanchenko - 17 Dec, 2008)
(_ Question: Re: physics processes order   (bgastro@pmo.ac.cn - 22 Dec, 2008)
Question pion production physics  by Cristian Bungau <Cristian Bungau>,   30 Nov, 2008
Hi,

I am trying to simulate the pion production from 800 MeV protons interacting with a graphite target and I would be very grateful if you could please suggest a physics list I could use. At the moment I am using QGSP_BIC but in case there is another better validated option please let me know.

Thank you very much,

Cristian

1 Idea: Re: pion production physics   (Vladimir Ivanchenko - 17 Dec, 2008)
Question Process Manager error for He3  by <idjupp@dstl.gov.uk>,   28 Nov, 2008
I'm using the standard Physics Lists 'cobbled' together from some of the G4 installation examples (which includes defining the processes for He3), but for some reason whenever a He3 is created I get the following error message and the run aborts: G4SteppingManager::GetProcessNumber: ProcessManager=0 for particle = He3, PDG_code = 1000020030

I'm assuming its a basic error like wrong inlude files etc, but can't seem to find a solution. Any ideas?

1 Idea: Re: Process Manager error for He3   (Vladimir Ivanchenko - 28 Nov, 2008)
(_ Ok: Re: Process Manager error for He3   (idjupp@dstl.gov.uk - 28 Nov, 2008)
Question neutron production via (p,n) reaction: problem with *_BERT_HP physics list  by J <J>,   24 Oct, 2008
Hi, I want to calculate the neutron production with a (p,n) reaction. I'm quite new to geant4. When I use the HadronPhysicsLHEP_BERT_HP physics list I get no neutrons. I think this could be because of this output (range cut and energy thresholds look weird):

========= Table of registered couples ==============================

Index : 0     used in the geometry : Yes     recalculation needed : No 
 Material : Vacuum
 Range cuts        :  gamma 0 fm     e- 0 fm     e+ 0 fm 
 Energy thresholds :  gamma -1 MeV    e- -1 MeV    e+ -1 MeV
 Region(s) which use this couple : 
    DefaultRegionForTheWorld

Index : 1     used in the geometry : Yes     recalculation needed : No 
 Material : Lithium
 Range cuts        :  gamma 0 fm     e- 0 fm     e+ 0 fm 
 Energy thresholds :  gamma -1 MeV    e- -1 MeV    e+ -1 MeV
 Region(s) which use this couple : 
    DefaultRegionForTheWorld

====================================================================

When I simulate a couple of particles the StepLength goes to the double limit and the run has to be aborted. I've read a forum entry that this Bertini Cascade isn't made for reactions below 100MeV incident particles, but it should fit best. In addition I tried to make my own hadronic physic list. The range cuts and energy thresholds work well and neutrons are produced, but I do not know which physics are implemented in the G4LEProtonInelastic() and the G4LENeutronInelastic() method. I copied the content at the end of this post. Can someone tell me what is wrong with the HadronPhysicsLHEP_BERT_HP physic list? Also the theory behind my used inelastic scattering processes -> which formalism is used for the proton energy loss or wich processes are taken into account?

Thanks.

Kind regards, Jörg

_________________________________

#include "myHadronPhysics.hh"

myHadronPhysics::myHadronPhysics(const G4String& name)
                    :  G4VPhysicsConstructor(name)
{}

myHadronPhysics::~myHadronPhysics() {;}

#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
// Nuclei
#include "G4BaryonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4IonConstructor.hh"

void myHadronPhysics::ConstructParticle()
{
    // barions
  G4BaryonConstructor pBaryonConstructor;
  pBaryonConstructor.ConstructParticle();

    //  mesons
  G4MesonConstructor pMesonConstructor;
  pMesonConstructor.ConstructParticle();

    //  ions
  G4IonConstructor pIonConstructor;
  pIonConstructor.ConstructParticle();
}

#include "G4ProcessManager.hh"

void myHadronPhysics::ConstructProcess() {

// AddTransportation(); // file compiles only if this line is commented out... strange

  G4ProcessManager * pManager = 0;
  // Elastic Process
  theElasticModel = new G4LElastic();
  theElasticProcess.RegisterMe(theElasticModel);
  theElasticModel->SetMinEnergy(0.0*MeV);
  theElasticModel->SetMaxEnergy(100.*MeV);

  // Proton
  pManager = G4Proton::Proton()->GetProcessManager();
  // add process
  pManager->AddDiscreteProcess(&theElasticProcess);
  theLEProtonModel = new G4LEProtonInelastic();
  theProtonInelastic.RegisterMe(theLEProtonModel);
  theLEProtonModel->SetMinEnergy(0.0*MeV);
  theLEProtonModel->SetMaxEnergy(100.*MeV);
  pManager->AddDiscreteProcess(&theProtonInelastic);
  pManager->AddProcess(&theProtonIonisation, ordInActive,2, 2);
  pManager->AddProcess(&theProtonMult);
  pManager->SetProcessOrdering(&theProtonMult, idxAlongStep, 1);
  pManager->SetProcessOrdering(&theProtonMult, idxPostStep, 1);

  // Neutron
  pManager = G4Neutron::Neutron()->GetProcessManager();
  // add process
  pManager->AddDiscreteProcess(&theElasticProcess);
  theLENeutronModel = new G4LENeutronInelastic();
  theNeutronInelastic.RegisterMe(theLENeutronModel);
  theLENeutronModel->SetMinEnergy(0.0*MeV);
  theLENeutronModel->SetMaxEnergy(100.*MeV);
  pManager->AddDiscreteProcess(&theNeutronInelastic); 

  theNeutronFissionModel = new G4LFission();
  theNeutronFission.RegisterMe(theNeutronFissionModel);
  theNeutronFissionModel->SetMinEnergy(0.0*MeV);
  theNeutronFissionModel->SetMaxEnergy(100.*MeV);
  pManager->AddDiscreteProcess(&theNeutronFission);

  theNeutronCaptureModel = new G4LCapture();
  theNeutronCapture.RegisterMe(theNeutronCaptureModel);
  theNeutronCaptureModel->SetMinEnergy(0.0*MeV);
  theNeutronCaptureModel->SetMaxEnergy(100.*MeV);
  pManager->AddDiscreteProcess(&theNeutronCapture);
}

1 Note: Re: neutron production via (p,n) reaction: problem with *_BERT_HP physics list   (Jörg Schütrumpf - 24 Oct, 2008)
2 Idea: Re: neutron production via (p,n) reaction: problem with *_BERT_HP physics list   (Vladimir Ivanchenko - 24 Oct, 2008)
1 Feedback: Re: neutron production via (p,n) reaction: problem with *_BERT_HP physics list   (Jörg Schütrumpf - 28 Oct, 2008)
1 News: Re: neutron production via (p,n) reaction: problem with *_BERT_HP physics list   (Jörg Schütrumpf - 28 Oct, 2008)
2 More: Re: neutron production via (p,n) reaction: problem with *_BERT_HP physics list   (Jörg Schütrumpf - 28 Oct, 2008)
... 1 Message(s)
Feedback Testing thermal neutron creation  by Sean Turnbull <Sean Turnbull>,   16 Oct, 2008
Hello, I have tested a 3"x3" NaI detector and it's working. Now I am trying to simulate neutron capture in Na and I producing respective isotopes. I am using the HP models for capture. I am also firing thermal neutron energies at the NaI detector, around 0.025 ev from 10cm away from NaI target.

I am posting my PhysicsList in case I am missing something as I can't seem to produce any istopes or capture processes.

// // // PhysicsList.cc, NaI Project // #include "PhysicsList.hh"

#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4ios.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

PhysicsList::PhysicsList():  G4VUserPhysicsList()
{
  defaultCutValue = 1.0*mm;		// cut values
  cutForElectron  = 6.0*mm;
  cutForGamma     = 5.0*mm;
  cutForNeutron   = 1.0*mm;
  cutForMuon	  = defaultCutValue;
  SetVerboseLevel(1);
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

PhysicsList::~PhysicsList() { }

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void PhysicsList::ConstructParticle()
{
  // In this method, static member functions should be called
  // for all particles which you want to use.
  // This ensures that objects of these particle types will be
  // created in the program. 

  ConstructBosons();
  ConstructLeptons();
  ConstructHadrons();

//  ConstructMesons();
//  ConstructBaryons();
//  ConstructIons();
  ConstructShortLiveds();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void PhysicsList::ConstructBosons()
{
  // pseudo-particles
//  G4Geantino::GeantinoDefinition();
//  G4ChargedGeantino::ChargedGeantinoDefinition();

  // gamma
  G4Gamma::GammaDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void PhysicsList::ConstructLeptons()
{
  // leptons
  //  e+/-
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();
  // mu+/-
  G4MuonPlus::MuonPlusDefinition();
  G4MuonMinus::MuonMinusDefinition();
  // nu_e
  G4NeutrinoE::NeutrinoEDefinition();
  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
  // nu_mu
  G4NeutrinoMu::NeutrinoMuDefinition();
  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void PhysicsList::ConstructMesons()
{
  // mesons
  G4PionPlus::PionPlusDefinition();
  G4PionMinus::PionMinusDefinition();
  G4PionZero::PionZeroDefinition();
  G4KaonPlus::KaonPlusDefinition();
  G4KaonMinus::KaonMinusDefinition();
  G4Eta::EtaDefinition();
  G4EtaPrime::EtaPrimeDefinition();
  G4KaonZero::KaonZeroDefinition();
  G4AntiKaonZero::AntiKaonZeroDefinition();
  G4KaonZeroLong::KaonZeroLongDefinition();
  G4KaonZeroShort::KaonZeroShortDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void PhysicsList::ConstructBaryons()
{
  //  baryons
  G4Proton::ProtonDefinition();
  G4AntiProton::AntiProtonDefinition();

  G4Neutron::NeutronDefinition();
  G4AntiNeutron::AntiNeutronDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::ConstructIons()
{
  G4Deuteron::DeuteronDefinition();
  G4Alpha::AlphaDefinition();
  G4GenericIon::GenericIonDefinition();
}
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"

void PhysicsList::ConstructHadrons()
{
 //  mesons
  G4MesonConstructor mConstructor;
  mConstructor.ConstructParticle();

  //  baryons
  G4BaryonConstructor bConstructor;
  bConstructor.ConstructParticle();

  //  ions
  G4IonConstructor iConstructor;
  iConstructor.ConstructParticle();

}
void PhysicsList::ConstructShortLiveds()
{
  // ShortLiveds
  ;
}
// Construct Processes ///////////////////////////////////////////////////    	       
void PhysicsList::ConstructProcess()
{
  AddTransportation();
  ConstructEM();
  ConstructHad();
  ConstructGeneral();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... #include "G4MultipleScattering.hh"

//muon

#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4MuonMinusCaptureAtRest.hh"
//gamma
#include "G4PhotoElectricEffect.hh" 
#include "G4ComptonScattering.hh" 
#include "G4GammaConversion.hh" 
#include "G4GammaConversionToMuons.hh"
// low energy
#include "G4LowEnergyPhotoElectric.hh"
#include "G4LowEnergyCompton.hh"
#include "G4LowEnergyRayleigh.hh" 
#include "G4LowEnergyGammaConversion.hh"
// e-
#include "G4LowEnergyIonisation.hh"
#include "G4LowEnergyBremsstrahlung.hh"
// e+
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
//ion #include "G4ionIonisation.hh" // alpha and GenericIon and deuterons, triton, He3: #include "G4EnergyLossTables.hh" // this uses Ziegler 1988 and is the default - requires detailed testing // particularly with split between NuclearStopping and electron ionisation

#include "G4hIonisation.hh" // standard hadron ionisation

//Penelope Processes //#include "G4PenelopePhotoElectric.hh" //#include "G4PenelopeCompton.hh" //#include "G4PenelopeRayleigh.hh" //#include "G4PenelopeGammaConversion.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void PhysicsList::ConstructEM() // low energy EM processes
{
  theParticleIterator->reset();
  while( (*theParticleIterator)() )
    {
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();
      G4String particleName = particle->GetParticleName();
      G4String particleType = particle->GetParticleType();
//      G4double charge = particle->GetPDGCharge();
      //processes

      if (particleName == "gamma") 
        { 
	  //gamma
//	  lowePhot = new G4LowEnergyPhotoElectric("LowEnPhotElec");    
//	  lowePhot->ActivateAuger(true);
//	  pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh);
//	  pmanager->AddDiscreteProcess(lowePhot);
//	  pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
//	  pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion);

	  pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
	  pmanager->AddDiscreteProcess(new G4ComptonScattering);
	  pmanager->AddDiscreteProcess(new G4GammaConversion);
	  pmanager->AddDiscreteProcess(new G4GammaConversionToMuons);

// pmanager->AddDiscreteProcess(new G4PenelopePhotoElectric()); // pmanager->AddDiscreteProcess(new G4PenelopeCompton()); // pmanager->AddDiscreteProcess(new G4PenelopeRayleigh()); // pmanager->AddDiscreteProcess(new G4PenelopeGammaConversion());

        }
        else if (particleName == "e-") {
          //electron
//	  loweIon  = new G4LowEnergyIonisation("LowEnergyIoni");
//    	  loweBrem = new G4LowEnergyBremsstrahlung("LowEnBrem");
//    	  loweBrem->SetAngularGenerator("tsai");

// pmanager->AddProcess(new G4MultipleScattering, -1, 1,1); // pmanager->AddProcess(loweIon, -1, 2,2); // pmanager->AddProcess(loweBrem, -1,-1,3);

	  pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
          pmanager->AddProcess(new G4eIonisation,        -1, 2,2);
	  pmanager->AddProcess(new G4eBremsstrahlung,    -1, 3,3);

        }
        else if (particleName == "e+") {
          // positron
//          pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
//          pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
//          pmanager->AddProcess(new G4eBremsstrahlung,   -1,-1,3);// -1,3,3
//          pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);

	 G4MultipleScattering* aMultipleScattering = new G4MultipleScattering();
         pmanager->AddProcess(aMultipleScattering,      -1, 1,1);
         pmanager->AddProcess(new G4eIonisation,        -1, 2,2);
         pmanager->AddProcess(new G4eBremsstrahlung,    -1, 3,3);
         pmanager->AddProcess(new G4eplusAnnihilation,   0,-1,4);

	}
	else if( particleName == "mu+" || 
		 particleName == "mu-" ) 
	{
          //muon  
          G4MultipleScattering* aMultipleScattering = new G4MultipleScattering();
          pmanager->AddProcess(aMultipleScattering,             -1, 1, 1);
          pmanager->AddProcess(new G4MuIonisation,      	-1, 2, 2);
          pmanager->AddProcess(new G4MuBremsstrahlung,  	-1,-1, 3);
          pmanager->AddProcess(new G4MuPairProduction,  	-1,-1, 4);
	  if(particleName == "mu-")
            pmanager->AddProcess(new G4MuonMinusCaptureAtRest(), 0,-1,-1);
	}
	else if( particleName == "GenericIon" ) 
	{
          pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
          pmanager->AddProcess(new G4ionIonisation,     -1, 2,2);
        } 
        else if ((!particle->IsShortLived()) &&
               (particle->GetPDGCharge() != 0.0));
        {
          //all others charged particles except geantino
          pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
//	  pmanager->AddProcess(new G4hIonisation,       -1,2,2);
        } 
    }
}

// Hadronic processes ///////////////////////////////////////////////

// Elastic processes: #include "G4HadronElasticProcess.hh"

// Inelastic processes:

#include "G4PionPlusInelasticProcess.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4KaonPlusInelasticProcess.hh"
#include "G4KaonZeroSInelasticProcess.hh"
#include "G4KaonZeroLInelasticProcess.hh"
#include "G4KaonMinusInelasticProcess.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4NeutronInelasticProcess.hh"
#include "G4AntiNeutronInelasticProcess.hh"
#include "G4DeuteronInelasticProcess.hh"
#include "G4TritonInelasticProcess.hh"
#include "G4AlphaInelasticProcess.hh"

// Low-energy Models: < 20GeV

#include "G4LElastic.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4LEKaonPlusInelastic.hh"
#include "G4LEKaonZeroSInelastic.hh"
#include "G4LEKaonZeroLInelastic.hh"
#include "G4LEKaonMinusInelastic.hh"
#include "G4LEProtonInelastic.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4LENeutronInelastic.hh"
#include "G4LEAntiNeutronInelastic.hh"
#include "G4LEDeuteronInelastic.hh"
#include "G4LETritonInelastic.hh"
#include "G4LEAlphaInelastic.hh"

// High-energy Models: >20 GeV

#include "G4HEPionPlusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
#include "G4HEKaonPlusInelastic.hh"
#include "G4HEKaonZeroInelastic.hh"
#include "G4HEKaonZeroInelastic.hh"
#include "G4HEKaonMinusInelastic.hh"
#include "G4HEProtonInelastic.hh"
#include "G4HEAntiProtonInelastic.hh"
#include "G4HENeutronInelastic.hh"
#include "G4HEAntiNeutronInelastic.hh"

// Neutron high-precision models: <20 MeV

#include "G4NeutronHPElastic.hh"
#include "G4NeutronHPElasticData.hh"
#include "G4NeutronHPCapture.hh"
#include "G4NeutronHPCaptureData.hh"
#include "G4NeutronHPInelastic.hh"
#include "G4NeutronHPInelasticData.hh"
#include "G4LCapture.hh"

// Stopping processes

#include "G4PiMinusAbsorptionAtRest.hh"
#include "G4KaonMinusAbsorptionAtRest.hh"
#include "G4AntiProtonAnnihilationAtRest.hh"
#include "G4AntiNeutronAnnihilationAtRest.hh"

// Isotope production #include "G4NeutronIsotopeProduction.hh"

// ConstructHad() // Makes discrete physics processes for the hadrons, at present limited // to those particles with GHEISHA interactions (INTRC > 0). // The processes are: Elastic scattering and Inelastic scattering. // F.W.Jones 09-JUL-1998

void PhysicsList::ConstructHad()
{
  G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
  G4LElastic* theElasticModel = new G4LElastic;
  theElasticProcess->RegisterMe(theElasticModel);

  theParticleIterator->reset();
  while ((*theParticleIterator)())
    {
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();
      G4String particleName = particle->GetParticleName();

      if (particleName == "pi+")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4PionPlusInelasticProcess* theInelasticProcess =
            new G4PionPlusInelasticProcess("inelastic");
          G4LEPionPlusInelastic* theLEInelasticModel =
            new G4LEPionPlusInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          G4HEPionPlusInelastic* theHEInelasticModel =
            new G4HEPionPlusInelastic;
          theInelasticProcess->RegisterMe(theHEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
        }

      else if (particleName == "pi-")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4PionMinusInelasticProcess* theInelasticProcess =
            new G4PionMinusInelasticProcess("inelastic");
          G4LEPionMinusInelastic* theLEInelasticModel =
            new G4LEPionMinusInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          G4HEPionMinusInelastic* theHEInelasticModel =
            new G4HEPionMinusInelastic;
          theInelasticProcess->RegisterMe(theHEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
          G4String prcNam;
          pmanager->AddRestProcess(new G4PiMinusAbsorptionAtRest, ordDefault);
        }

      else if (particleName == "kaon+")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4KaonPlusInelasticProcess* theInelasticProcess =
            new G4KaonPlusInelasticProcess("inelastic");
          G4LEKaonPlusInelastic* theLEInelasticModel =
            new G4LEKaonPlusInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          G4HEKaonPlusInelastic* theHEInelasticModel =
            new G4HEKaonPlusInelastic;
          theInelasticProcess->RegisterMe(theHEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
        }

      else if (particleName == "kaon0S")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4KaonZeroSInelasticProcess* theInelasticProcess =
            new G4KaonZeroSInelasticProcess("inelastic");
          G4LEKaonZeroSInelastic* theLEInelasticModel =
            new G4LEKaonZeroSInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          G4HEKaonZeroInelastic* theHEInelasticModel =
            new G4HEKaonZeroInelastic;
           theInelasticProcess->RegisterMe(theHEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
        }

      else if (particleName == "kaon0L")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4KaonZeroLInelasticProcess* theInelasticProcess =
            new G4KaonZeroLInelasticProcess("inelastic");
          G4LEKaonZeroLInelastic* theLEInelasticModel =
            new G4LEKaonZeroLInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          G4HEKaonZeroInelastic* theHEInelasticModel =
            new G4HEKaonZeroInelastic;
          theInelasticProcess->RegisterMe(theHEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
        }

      else if (particleName == "kaon-")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4KaonMinusInelasticProcess* theInelasticProcess =
            new G4KaonMinusInelasticProcess("inelastic");
          G4LEKaonMinusInelastic* theLEInelasticModel =
            new G4LEKaonMinusInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          G4HEKaonMinusInelastic* theHEInelasticModel =
            new G4HEKaonMinusInelastic;
          theInelasticProcess->RegisterMe(theHEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
          pmanager->AddRestProcess(new G4KaonMinusAbsorptionAtRest, ordDefault);
        }

      else if (particleName == "proton")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4ProtonInelasticProcess* theInelasticProcess =
            new G4ProtonInelasticProcess("inelastic");
          G4LEProtonInelastic* theLEInelasticModel = new G4LEProtonInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          G4HEProtonInelastic* theHEInelasticModel = new G4HEProtonInelastic;
          theInelasticProcess->RegisterMe(theHEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
        }

      else if (particleName == "anti_proton")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4AntiProtonInelasticProcess* theInelasticProcess =
            new G4AntiProtonInelasticProcess("inelastic");
          G4LEAntiProtonInelastic* theLEInelasticModel =
            new G4LEAntiProtonInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          G4HEAntiProtonInelastic* theHEInelasticModel =
            new G4HEAntiProtonInelastic;
          theInelasticProcess->RegisterMe(theHEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
        }

      else if (particleName == "neutron") {
        // elastic scattering
        G4HadronElasticProcess* theNeutronElasticProcess =
          new G4HadronElasticProcess;
        G4LElastic* theElasticModel1 = new G4LElastic;
        G4NeutronHPElastic * theElasticNeutron = new G4NeutronHPElastic;
        theNeutronElasticProcess->RegisterMe(theElasticModel1);
        theElasticModel1->SetMinEnergy(0.00001*eV);
        theNeutronElasticProcess->RegisterMe(theElasticNeutron);
        G4NeutronHPElasticData * theNeutronData = new G4NeutronHPElasticData;
        theNeutronElasticProcess->AddDataSet(theNeutronData);
        pmanager->AddDiscreteProcess(theNeutronElasticProcess);
        // inelastic scattering
        G4NeutronInelasticProcess* theInelasticProcess =
          new G4NeutronInelasticProcess("inelastic");
        G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
        theInelasticModel->SetMinEnergy(0.00001*eV);
        theInelasticProcess->RegisterMe(theInelasticModel);
        G4NeutronHPInelastic * theLENeutronInelasticModel =
          new G4NeutronHPInelastic;
        theInelasticProcess->RegisterMe(theLENeutronInelasticModel);
        G4NeutronHPInelasticData * theNeutronData1 =
          new G4NeutronHPInelasticData;
        theInelasticProcess->AddDataSet(theNeutronData1);
        pmanager->AddDiscreteProcess(theInelasticProcess);
        // capture
        G4HadronCaptureProcess* theCaptureProcess =
          new G4HadronCaptureProcess;
        G4LCapture* theCaptureModel = new G4LCapture;
        theCaptureModel->SetMinEnergy(0.00001*eV);
        theCaptureProcess->RegisterMe(theCaptureModel);
        G4NeutronHPCapture * theLENeutronCaptureModel = new G4NeutronHPCapture;
        theCaptureProcess->RegisterMe(theLENeutronCaptureModel);
        G4NeutronHPCaptureData * theNeutronData3 = new G4NeutronHPCaptureData;
        theCaptureProcess->AddDataSet(theNeutronData3);
        pmanager->AddDiscreteProcess(theCaptureProcess);
        //  G4ProcessManager* pmanager = G4Neutron::Neutron->GetProcessManager(
      //  pmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1);

      // isotope production
        G4NeutronIsotopeProduction * aProductionModel = new
	G4NeutronIsotopeProduction;
	theCaptureProcess->RegisterIsotopeProductionModel(aProductionModel);
	//theInelasticProcess->RegisterIsotopeProductionModel(aProductionModel);
	G4HadronicProcess::EnableIsotopeProductionGlobally();
      }
      else if (particleName == "anti_neutron")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4AntiNeutronInelasticProcess* theInelasticProcess =
            new G4AntiNeutronInelasticProcess("inelastic");
          G4LEAntiNeutronInelastic* theLEInelasticModel =
            new G4LEAntiNeutronInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          G4HEAntiNeutronInelastic* theHEInelasticModel =
            new G4HEAntiNeutronInelastic;
          theInelasticProcess->RegisterMe(theHEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
        }

      else if (particleName == "deuteron")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4DeuteronInelasticProcess* theInelasticProcess =
            new G4DeuteronInelasticProcess("inelastic");
          G4LEDeuteronInelastic* theLEInelasticModel =
            new G4LEDeuteronInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
        }

      else if (particleName == "triton")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4TritonInelasticProcess* theInelasticProcess =
            new G4TritonInelasticProcess("inelastic");
          G4LETritonInelastic* theLEInelasticModel =
            new G4LETritonInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
        }

      else if (particleName == "alpha")
        {
          pmanager->AddDiscreteProcess(theElasticProcess);
          G4AlphaInelasticProcess* theInelasticProcess =
            new G4AlphaInelasticProcess("inelastic");
          G4LEAlphaInelastic* theLEInelasticModel =
            new G4LEAlphaInelastic;
          theInelasticProcess->RegisterMe(theLEInelasticModel);
          pmanager->AddDiscreteProcess(theInelasticProcess);
        }
    }
}

// Decays ///////////////////////////////////////////////////////////////////

#include "G4Decay.hh"
#include "G4RadioactiveDecay.hh"
#include "G4IonTable.hh"
#include "G4Ions.hh"

void PhysicsList::ConstructGeneral() {

  // Add Decay Process
  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() )
    {
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();

      if (theDecayProcess->IsApplicable(*particle) && !particle->IsShortLived())
        {
          pmanager ->AddProcess(theDecayProcess);
          // set ordering for PostStepDoIt and AtRestDoIt
          pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
          pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
        }
    }

  // Declare radioactive decay to the GenericIon in the IonTable.
  const G4IonTable *theIonTable =
    G4ParticleTable::GetParticleTable()->GetIonTable();
  G4RadioactiveDecay *theRadioactiveDecay = new G4RadioactiveDecay();

  for (G4int i=0; i<theIonTable->Entries(); i++)
    {
      G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
      G4String particleType = theIonTable->GetParticle(i)->GetParticleType();

      if (particleName == "GenericIon")
        {
          G4ProcessManager* pmanager =
            theIonTable->GetParticle(i)->GetProcessManager();
          pmanager->SetVerboseLevel(VerboseLevel);
          pmanager ->AddProcess(theRadioactiveDecay);
          pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep);
          pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest);
        }
    }
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void PhysicsList::SetCuts()

  //G4VUserPhysicsList::SetCutsWithDefault method sets 
  //the default cut value for all particle types 
  //
{
  if (verboseLevel >0){
    G4cout << "PhysicsList::SetCuts:";
    G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
    G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
  }

//special for low energy physics
 // G4double lowlimit=250*eV;
  G4double lowlimit=0.00150*eV;
  G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(lowlimit,100.*GeV);

  // set cut values for gamma at first and for e- second and next for e+,
  // because some processes for e+/e- need cut values for gamma 
  SetCutValue(cutForMuon, "mu-");
  SetCutValue(cutForGamma, "gamma");
  SetCutValue(cutForElectron, "e-");
  SetCutValue(cutForNeutron, "neutron");
  SetCutValue(cutForElectron, "e+");

  if (verboseLevel>0) DumpCutValuesTable();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

Thanks!!

1 More: Re: Testing thermal neutron creation   (Sean Turnbull - 21 Oct, 2008)
Question Optical Physics List and G4exception  by Florian ITARD <Florian ITARD>,   04 Sep, 2008
Dear all,

I have tried to generate some Cerenkov Photons in my geometry. I have succeeded this one on my personal computer, but when I have wanted turn my code in a farm, unhappy I discovered this error's message:

//////////////////////////////////////////////////////////////////////////////////

 ### Run 0 start.

--------- Ranecu engine status ---------
 Initial seed (index) = 4
 Current couple of seeds = 3443, 4334
----------------------------------------
  G4ParticleChange::CheckIt    : the global time goes back  !!
  Difference:  0.00333564[ns] 
  G4ParticleChange::CheckIt    : the proper time goes back  !!
  Difference:  2.84061e-07[ns] 
 G4ParticleChange::CheckIt 
      -----------------------------------------------
        G4ParticleChange Information  
      -----------------------------------------------
        # of 2ndaries       :                    0
      -----------------------------------------------
        Energy Deposit (MeV):                    0
        Non-ionizing Energy Deposit (MeV):                    0
        Track Status        :                Alive
        True Path Length (mm) :                   -1
        Stepping Control      :                    0
        Mass (GeV)   :                    0
        Charge (eplus)   :                    0
        MagneticMoment   :                    0
                :  =                    0*[e hbar]/[2 m]
        Position - x (mm)   :                    0
        Position - y (mm)   :                    0
        Position - z (mm)   :                 -201
        Time (ns)           :             -0.00334
        Proper Time (ns)    :            -2.84e-07
        Momentum Direct - x :                    0
        Momentum Direct - y :                    0
        Momentum Direct - z :                    1
        Kinetic Energy (MeV):                6e+03
        Polarization - x    :                    0
        Polarization - y    :                    0
        Polarization - z    :                    0
        Touchable (pointer) :                    0

*** G4Exception : 200
      issued by : G4ParticleChange::CheckIt
momentum, energy, and/or time was illegal
*** Event Must Be Aborted 

 *** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library "/lib64/tls/libthread_db.so.1".
Attaching to program: /proc/11101/exe, process 11101
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
[New Thread 183013209824 (LWP 11101)]

0x00000037a078f504 in waitpid () from /lib64/tls/libc.so.6
#1  0x00000037a0739a1f in do_system () from /lib64/tls/libc.so.6
#2  0x0000002a992f16e2 in TUnixSystem::StackTrace ()
   from /usr/local/root/pro/root/lib/libCore.so
#3  0x0000002a992ee418 in TUnixSystem::DispatchSignals ()
   from /usr/local/root/pro/root/lib/libCore.so
#4  <signal handler called>
#5  0x0000002a96a43f95 in G4SteppingManager::InvokePSDIP ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4tracking.so
#6  0x0000002a96a443ab in G4SteppingManager::InvokePostStepDoItProcs ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4tracking.so
#7  0x0000002a96a420f7 in G4SteppingManager::Stepping ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4tracking.so
#8  0x0000002a96a4988b in G4TrackingManager::ProcessOneTrack ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4tracking.so
#9  0x0000002a968e3e7b in G4EventManager::DoProcessing ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4event.so
#10 0x0000002a967afc1f in G4RunManager::DoEventLoop ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4run.so
#11 0x0000002a967aeb41 in G4RunManager::BeamOn ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4run.so
#12 0x0000000000408960 in main ()
WARNING - Attempt to delete the physical volume store while geometry closed !
WARNING - Attempt to delete the logical volume store while geometry closed !
WARNING - Attempt to delete the solid store while geometry closed !
WARNING - Attempt to delete the region store while geometry closed !

////////////////////////////////////////////////////////////////////////////////

I have tried to solve this problem but after few days, I am always at the same level! So, can you help me to find the origin of the error and how can I corrected this one? The error come from the method ConstructOp() in my PhysicsList, it's the part coding the Cerenkov, it was inspired by the GEANT4 examples for Cerenkov. I let you my PhysicsList:

////////////////////////////////////////////////////////////////////////////////

#include "elyseePhysicsList.hh"

#include <iomanip>
#include "globals.hh"

#include "G4BaryonConstructor.hh"
#include "G4ComptonScattering.hh"
#include "G4Decay.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eIonisation.hh"
#include "G4EmProcessOptions.hh"
#include "G4eplusAnnihilation.hh"
#include "G4FastSimulationManagerProcess.hh"
#include "G4GammaConversion.hh"
#include "G4hIonisation.hh"
#include "G4IonConstructor.hh"
#include "G4ios.hh"
#include "G4LeptonConstructor.hh"
#include "G4LossTableManager.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4MesonConstructor.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuIonisation.hh"
#include "G4MultipleScattering.hh"
#include "G4MuPairProduction.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleTypes.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4StepLimiter.hh"
#include "G4UnitsTable.hh"
#include "G4UserSpecialCuts.hh"

// Bosons

#include "G4ChargedGeantino.hh"
#include "G4Geantino.hh"
#include "G4Gamma.hh"
#include "G4OpticalPhoton.hh"

// leptons

#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4NeutrinoMu.hh"
#include "G4AntiNeutrinoMu.hh"

#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4NeutrinoE.hh"
#include "G4AntiNeutrinoE.hh"

// Mesons

#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4PionZero.hh"
#include "G4Eta.hh"
#include "G4EtaPrime.hh"

#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4KaonZero.hh"
#include "G4AntiKaonZero.hh"
#include "G4KaonZeroLong.hh"
#include "G4KaonZeroShort.hh"

// Baryons

#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4Neutron.hh"
#include "G4AntiNeutron.hh"

// Nuclei

#include "G4Alpha.hh"
#include "G4Deuteron.hh"
#include "G4Triton.hh"
#include "G4He3.hh"
#include "G4GenericIon.hh"

// Cherenkov

#include "G4Cerenkov.hh"
#include "G4Scintillation.hh"
#include "G4OpAbsorption.hh"
#include "G4OpRayleigh.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4OpWLS.hh"

elyseePhysicsList::elyseePhysicsList(): G4VUserPhysicsList() { G4LossTableManager::Instance(); defaultCutValue = 1.0*mm; cutForGamma = defaultCutValue; cutForElectron = defaultCutValue; cutForPositron = defaultCutValue;

theCerenkovProcess = 0; theScintillationProcess = 0; theAbsorptionProcess = 0; theRayleighScatteringProcess = 0; theBoundaryProcess = 0;

// SetVerboseLevel(1); }

elyseePhysicsList::~elyseePhysicsList() {}

void elyseePhysicsList::ConstructParticle() { ConstructBosons(); ConstructLeptons(); ConstructMesons(); ConstructBaryons(); ConstructIons(); }

void elyseePhysicsList::ConstructBosons() { G4Geantino::GeantinoDefinition(); G4ChargedGeantino::ChargedGeantinoDefinition(); G4Gamma::GammaDefinition(); G4OpticalPhoton::OpticalPhotonDefinition(); }

void elyseePhysicsList::ConstructLeptons() { G4Electron::ElectronDefinition(); G4Positron::PositronDefinition(); G4MuonPlus::MuonPlusDefinition(); G4MuonMinus::MuonMinusDefinition();

G4NeutrinoE::NeutrinoEDefinition(); G4AntiNeutrinoE::AntiNeutrinoEDefinition(); G4NeutrinoMu::NeutrinoMuDefinition(); G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); }

void elyseePhysicsList::ConstructMesons() { G4PionPlus::PionPlusDefinition(); G4PionMinus::PionMinusDefinition(); G4PionZero::PionZeroDefinition(); G4Eta::EtaDefinition(); G4EtaPrime::EtaPrimeDefinition(); G4KaonPlus::KaonPlusDefinition(); G4KaonMinus::KaonMinusDefinition(); G4KaonZero::KaonZeroDefinition(); G4AntiKaonZero::AntiKaonZeroDefinition(); G4KaonZeroLong::KaonZeroLongDefinition(); G4KaonZeroShort::KaonZeroShortDefinition(); }

void elyseePhysicsList::ConstructBaryons() { G4Proton::ProtonDefinition(); G4AntiProton::AntiProtonDefinition(); G4Neutron::NeutronDefinition(); G4AntiNeutron::AntiNeutronDefinition(); }

void elyseePhysicsList::ConstructIons() { G4Deuteron::DeuteronDefinition(); G4Triton::TritonDefinition(); G4He3::He3Definition(); G4Alpha::AlphaDefinition(); G4GenericIon::GenericIonDefinition(); }

void elyseePhysicsList::ConstructProcess() { AddTransportation(); //AddParameterisation(); ConstructEM(); ConstructGeneral(); ConstructOp(); }

void elyseePhysicsList::AddTransportation() { G4VUserPhysicsList::AddTransportation(); }

void elyseePhysicsList::ConstructEM()
{
theParticleIterator->reset();
while((*theParticleIterator)()){
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();
      G4String particleName = particle->GetParticleName();

    if (particleName == "gamma"){
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
      pmanager->AddDiscreteProcess(new G4ComptonScattering());
      pmanager->AddDiscreteProcess(new G4GammaConversion());}
    else if (particleName == "e-"){
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,-1,2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,-1, 3,3);}
    else if (particleName == "e+"){
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,-1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,-1, 3,3);
      pmanager->AddProcess(new G4eplusAnnihilation,0,-1,4);}
    else if( particleName == "mu+" || particleName == "mu-"){
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4MuIonisation,-1, 2,2);
      pmanager->AddProcess(new G4MuBremsstrahlung,-1, 3,3);
      pmanager->AddProcess(new G4MuPairProduction,-1, 4,4);}
    else if ((!particle->IsShortLived()) &&
             (particle->GetPDGCharge() != 0.0) && 
             (particle->GetParticleName() != "chargedgeantino")){
      pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
      pmanager->AddProcess(new G4hIonisation,-1, 2,2);}}}

void elyseePhysicsList::ConstructOp() {

G4cout<<"Now creating Optical processes"<<G4endl; //G4Cerenkov* theCerenkovProcess = new G4Cerenkov("Cerenkov"); //G4OpAbsorption* theAbsorptionProcess = new G4OpAbsorption(); G4cout<<"Now creating the Rayleigh scattering process "<<G4endl; //G4OpRayleigh* theRayleighScatteringProcess = new G4OpRayleigh(); G4cout<<"Now creating the boundary process "<<G4endl; //G4OpBoundaryProcess* theBoundaryProcess = new G4OpBoundaryProcess();

//theCerenkovProcess->SetVerboseLevel(2); //theAbsorptionProcess->SetVerboseLevel(0); //theRayleighScatteringProcess->SetVerboseLevel(0); //theBoundaryProcess->SetVerboseLevel(0);

G4int MaxNumPhotons = 300;

theCerenkovProcess->SetTrackSecondariesFirst(true); theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumPhotons);

G4OpticalSurfaceModel themodel = unified; theBoundaryProcess->SetModel(themodel);

theParticleIterator->reset();
while((*theParticleIterator)()){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

/// ///problem there, no message error when this part is commented ///

    if (theCerenkovProcess->IsApplicable(*particle)) {
      pmanager->AddProcess(theCerenkovProcess);
      pmanager->SetProcessOrdering(theCerenkovProcess,idxPostStep);}

/// /// ///

    if (particleName == "opticalphoton") {
      G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
      pmanager->AddDiscreteProcess(theAbsorptionProcess);
      pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
      pmanager->AddDiscreteProcess(theBoundaryProcess);}

  }

}

void elyseePhysicsList::AddParameterisation()
{
  // -- Fast simulation manager process for "mass geometry":
G4FastSimulationManagerProcess* fastSimProcess_massGeom     = new G4FastSimulationManagerProcess("G4FSMP_massGeom");
  // -- Fast simulation manager process for "parallel geometry":
G4FastSimulationManagerProcess* fastSimProcess_parallelGeom = new G4FastSimulationManagerProcess("G4FSMP_parallelGeom", "pionGhostWorld");
theParticleIterator->reset();
while((*theParticleIterator)()){
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();
      // -- For the mass geometry, G4FSMP is a PostStep process, ordering does not matter:
      if (particle->GetParticleName() == "e+"  || 
  	  particle->GetParticleName() == "e-"  ||
          particle->GetParticleName() == "gamma"){pmanager->AddDiscreteProcess(fastSimProcess_massGeom);}
      // -- For the parallel geometry, G4FSMP is an Along+PostStep process, and ordering matters:
      if (particle->GetParticleName() == "pi+" || 
          particle->GetParticleName() == "pi-"){
          pmanager->AddProcess(fastSimProcess_parallelGeom);
          pmanager->SetProcessOrdering(fastSimProcess_parallelGeom, idxAlongStep, 1);
          pmanager->SetProcessOrdering(fastSimProcess_parallelGeom, idxPostStep);}}}

void elyseePhysicsList::ConstructGeneral()
{
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while((*theParticleIterator)()){
  G4ParticleDefinition* particle = theParticleIterator->value();
  G4ProcessManager* pmanager = particle->GetProcessManager();
  if (theDecayProcess->IsApplicable(*particle)) { 
    pmanager ->AddProcess(theDecayProcess);
    pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
    pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);}}}

void elyseePhysicsList::SetNbOfPhotonsCerenkov(G4int MaxNumber) { theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumber); }

void elyseePhysicsList::SetCuts()
{
if (verboseLevel >0){
  G4cout << "elyseePhysicsList::SetCuts:";
  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;}

SetCutValue(defaultCutValue,"gamma"); SetCutValue(defaultCutValue,"e-"); SetCutValue(defaultCutValue,"e+");

if (verboseLevel>0) DumpCutValuesTable(); }

void elyseePhysicsList::SetCutForGamma(G4double cut) { cutForGamma = cut; SetParticleCuts(cutForGamma,G4Gamma::Gamma()); }

void elyseePhysicsList::SetCutForElectron(G4double cut) { cutForElectron = cut; SetParticleCuts(cutForElectron,G4Electron::Electron()); }

void elyseePhysicsList::SetCutForPositron(G4double cut) { cutForPositron = cut; SetParticleCuts(cutForPositron,G4Positron::Positron()); }

////////////////////////////////////////////////////////////////////////////////

Last question, I would have a PhysicsList enable to manage hadronic interactions, of course electromagnetic interactions and optical photon. Do it exist a GEANT 4 reference PhysicsList for that?

Thank you for your consideration.

Florian.

1 None: Re: Optical Physics List and G4exception   (Florian ITARD - 24 Sep, 2008)
(_ Question: Re: Optical Physics List and G4exception   (Michael Fernald - 26 Sep, 2008)
Question cut in range too big for material  by Giulia De Bonis <Giulia De Bonis>,   22 Aug, 2008
Dear all,
Here a short description of my application:
My primaries are 100 MeV proton beam, collimated passing through a hole in a lead screen and entering a water tank. The exerimental hall is a box filled with vacuum.

MyDetPhysicsList is exactly the same as ExN03PhysicsList, and the run-macro sets the same verbosity of example/novice/N03/run1.mac

Running my application I experience several of the following:

G4VRangeToEnergyConverter::ConvertCutToKineticEnergy for gamma
The cut in range [1 (mm)] is too big for material idx=5
The cut in energy is set1.79769e+305GeV


The strange fact is that problems appear to occur in material with index idx=5, but there is no such a material, since I defined three materials only, and the Material-Cuts Couples seem to well behave.

Do I have to worry about this?

In attachments, the complete output file.

I am looking forward for suggestions and advices

Giulia

Attachment: http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2008/08/22/11.05-40051-OUTPUT.txt
1 Idea: Re: cut in range too big for material   (Vladimir Ivanchenko - 25 Aug, 2008)
(_ More: Re: cut in range too big for material   (Giulia De Bonis - 25 Aug, 2008)
(_ Idea: Re: cut in range too big for material   (Vladimir Ivanchenko - 25 Aug, 2008)
(_ More: Re: cut in range too big for material   (Giulia De Bonis - 25 Aug, 2008)
None Low Energy EM Physics lists  by Sebastien INCERTI <Sebastien INCERTI>,   17 Aug, 2008
Dear users,

In order to guide you and for your convenience, we have setup a web page regularly updated where you may find Physics lists based on low energy EM processes.

This page is accessible from the official Low Energy EM working group page at the following address :

http://geant4loweworkinggroup.wikispaces.com/

in the Physics lists section, or directly from the Geant4 working group pages :

http://geant4.web.cern.ch/geant4/collaboration/working_groups/LEelectromagnetic/

Please, do not hesitate to contact us if you have any question.

Best regards, the Low Energy EM working group

None confused on the results about neutron yield and spectra produced from reaction (d,n)   by Phan Viet Cuong <Phan Viet Cuong>,   11 Aug, 2008
Hi all, I am trying to simulate the neutron production yield and neutron spectra from the reactions: 9Be(d,n)10B and 12C(d,n)13N. Here is physics processes that I applied for deuteron:

#include "IonPhysics.hh"

#include "globals.hh"
#include "G4ios.hh"
#include <iomanip>

// Elastic scattering, multiple scattering and ionisation

IonPhysics::IonPhysics(const G4String& name)
                 :  G4VPhysicsConstructor(name)
{
}

IonPhysics::~IonPhysics() { }

#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"

#include "G4ProcessManager.hh"

void IonPhysics::ConstructProcess()
{
   G4ProcessManager * pManager = 0;

      // Deuteron
   pManager = G4Deuteron::Deuteron()->GetProcessManager();

   // add process
   G4HadronElasticProcess* thedueElasticProcess
                         = new G4HadronElasticProcess();
   G4LElastic* thedueElasticModel = new G4LElastic();
   thedueElasticProcess->RegisterMe(thedueElasticModel);
   pManager->AddDiscreteProcess(thedueElasticProcess);

   G4VProcess* thedueMultipleScattering = new G4MultipleScattering();
   G4VProcess* thedueIonisation        = new G4hIonisation();
   //
   pManager->AddProcess(thedueIonisation);
   pManager->AddProcess(thedueMultipleScattering);
   //
   // set ordering for AlongStepDoIt
   pManager->SetProcessOrdering(thedueMultipleScattering, idxAlongStep,1);
   pManager->SetProcessOrdering(thedueIonisation,        idxAlongStep,2);
   //
   // set ordering for PostStepDoIt
   pManager->SetProcessOrdering(thedueMultipleScattering, idxPostStep,1);
   pManager->SetProcessOrdering(thedueIonisation,        idxPostStep,2);

} // inelastic processes

#include "PhysListIonBinaryCascade.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"

#include "G4Deuteron.hh"
#include "G4Triton.hh"
#include "G4Alpha.hh"
#include "G4GenericIon.hh"

#include "G4HadronInelasticProcess.hh"
#include "G4HadronElasticProcess.hh"
#include "G4BinaryLightIonReaction.hh"
#include "G4TripathiCrossSection.hh"
#include "G4TripathiLightCrossSection.hh"
#include "G4IonsShenCrossSection.hh"
#include "G4LEDeuteronInelastic.hh"
#include "G4DeuteronInelasticProcess.hh"
#include "G4LETritonInelastic.hh"
#include "G4LEAlphaInelastic.hh"
#include "G4LElastic.hh"

//EM process

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

PhysListIonBinaryCascade::PhysListIonBinaryCascade(const G4String& name)
   :  G4VPhysicsConstructor(name)
{}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

PhysListIonBinaryCascade::~PhysListIonBinaryCascade() {}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void PhysListIonBinaryCascade::ConstructProcess()
{ 
  // Binary Cascade
  G4ParticleDefinition* particle = 0;
  G4ProcessManager* pmanager = 0;

 // Cross section data sets

  // TRIPATHI CROSS SECTION
  // Implementation of formulas taken from NASA technical paper 3621 by 
  // Tripathi, et al. Cross-sections for ion ion scattering

  G4TripathiCrossSection * TripathiCrossSection= new G4TripathiCrossSection;

  // IONS SHEN CROSS SECTION
  // Implementation of formulas 
  // Shen et al. Nuc. Phys. A 491 130 (1989) 
  // Total Reaction Cross Section for Heavy-Ion Collisions

  G4IonsShenCrossSection * aShen = new G4IonsShenCrossSection;

  // Intra-nuclear transport: Binary Cascade Model
  // Binary Cascade for deuteron, triton, alpha particle

  G4BinaryLightIonReaction* theIonBC = new G4BinaryLightIonReaction();

  theIonBC->SetMinEnergy(80*MeV);
  theIonBC->SetMaxEnergy(10*GeV);

  // deuteron
  particle = G4Deuteron::Deuteron();
  pmanager = particle->GetProcessManager();

 // Final state production model for deuteron inelastic scattering below 100 MeV: Low Energy Parameterised model

  G4LEDeuteronInelastic* theDIModel = new G4LEDeuteronInelastic;

  // Set the maximum energy for LEP model

  theDIModel->SetMaxEnergy(100*MeV);

 // Activate the Tripathi and Shen Cross Section

  theIPdeuteron.AddDataSet(TripathiCrossSection);
  theIPdeuteron.AddDataSet(aShen);

 // Register the Parameterised Deuteron Inelastic Model and the Ion Binary Cascade Model

  theIPdeuteron.RegisterMe(theDIModel);
  //theIPdeuteron.RegisterMe(theTheoModel);
  theIPdeuteron.RegisterMe(theIonBC);

 // Activate inelastic scattering 

  pmanager->AddDiscreteProcess(&theIPdeuteron);

Here is physics processes for neutron:

#include "HadronPhysics.hh"

#include "globals.hh"
#include "G4ios.hh"
#include <iomanip>   

HadronPhysics::HadronPhysics(const G4String& name)
                   :  G4VPhysicsConstructor(name)
{
}

HadronPhysics::~HadronPhysics() { }

#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"

#include "G4ProcessManager.hh"
#include "G4NeutronInelasticCrossSection.hh"

void HadronPhysics::ConstructProcess()
{
   G4ProcessManager * pManager = 0;

   // neutron Physics
   pManager = G4Neutron::Neutron()->GetProcessManager();

   // add process
   G4HadronElasticProcess* thenElasticProcess 
                         = new G4HadronElasticProcess();
   G4LElastic* thenElasticModel = new G4LElastic();
   thenElasticProcess->RegisterMe(thenElasticModel);
   pManager->AddDiscreteProcess(thenElasticProcess);

   G4NeutronInelasticCrossSection* theNeutronCrossSection
						 = new G4NeutronInelasticCrossSection() ;

   G4NeutronInelasticProcess* theNeutronInelasticProcess 
                         = new G4NeutronInelasticProcess(); 

   G4LENeutronInelastic* theNeutronLEPModel = new G4LENeutronInelastic();
   G4HENeutronInelastic* theNeutronHEPModel = new G4HENeutronInelastic();
   //theNeutronHEPModel->SetMaxEnergy(20.*MeV);
   theNeutronInelasticProcess->AddDataSet(theNeutronCrossSection);

   theNeutronInelasticProcess->RegisterMe(theNeutronLEPModel);
   theNeutronInelasticProcess->RegisterMe(theNeutronHEPModel);
   pManager->AddDiscreteProcess(theNeutronInelasticProcess);

   //neutron + fission 
   G4HadronFissionProcess* thenFission
                         = new G4HadronFissionProcess();
   G4LFission* thenFissionModel = new G4LFission();
   thenFission->RegisterMe(thenFissionModel);
   pManager->AddDiscreteProcess(thenFission);

   //neutron + capture

   G4HadronCaptureProcess* thenCapture
                         = new G4HadronCaptureProcess();
   G4LCapture* thenCaptureModel = new G4LCapture();
   thenCapture->RegisterMe(thenCaptureModel);
   pManager->AddDiscreteProcess(thenCapture);

   // anti-neutron Physics
   pManager = G4AntiNeutron::AntiNeutron()->GetProcessManager();

   // add process
   G4HadronElasticProcess* theanElasticProcess 
                         = new G4HadronElasticProcess();
   G4LElastic* theanElasticModel = new G4LElastic();
   theanElasticProcess->RegisterMe(theanElasticModel);
   pManager->AddDiscreteProcess(theanElasticProcess);

   G4AntiNeutronInelasticProcess* theAntiNeutronInelasticProcess 
                         = new G4AntiNeutronInelasticProcess(); 

   G4LEAntiNeutronInelastic* theAntiNeutronLEPModel = new G4LEAntiNeutronInelastic();
   G4HEAntiNeutronInelastic* theAntiNeutronHEPModel = new G4HEAntiNeutronInelastic();
   theAntiNeutronInelasticProcess->RegisterMe(theAntiNeutronLEPModel);
   theAntiNeutronInelasticProcess->RegisterMe(theAntiNeutronHEPModel);
   pManager->AddDiscreteProcess(theAntiNeutronInelasticProcess);

   G4AntiNeutronAnnihilationAtRest* theAntiNeutronAnnihilation
                            =  new G4AntiNeutronAnnihilationAtRest();
   pManager->AddRestProcess(theAntiNeutronAnnihilation);

   }

However, at low energy ( deuteron which has energy lower than 100 MeV) my program can not reproduce the experimental data about neutron yields and spectra. Speccially, with 160 MeV deuteron i can not see any neutron.

It would be very grateful if you can let me know what is error in my program and suggest me some ideas to solve this problem.

Thank you very much in advance!

Phan Viet Cuong

1 Question: Re: confused on the results about neutron yield and spectra produced from reaction (d,n)   (Phan Viet Cuong - 12 Aug, 2008)
(_ Idea: Re: confused on the results about neutron yield and spectra produced from reaction (d,n)   (Vladimir Ivanchenko - 13 Aug, 2008)
(_ Feedback: Re: confused on the results about neutron yield and spectra produced from reaction (d,n)   (Phan Viet Cuong - 13 Aug, 2008)
Question GetHadronicInteraction: No Model found  by Ken Sutherland <Ken Sutherland>,   07 Aug, 2008
I have encountered a "No Model found" error message. I have taken the physics list from the Hadrontherapy sample and stuck it into the TestEm7 sample because I don't need to consider the beam line, just nuclear reactions in the target. I'm using the default physics in physicsAllOptions.mac, with 250 Mev protons.

As far as I can see, the G4LElastic model is applied to the process.

Thank you for any ideas.

<snip>

 /physics/addPhysics HadronicEl-HadronIon-LElastic
Adding PhysicsList component HadronicEl-HadronIon-LElastic
HadrontherapyPhysicsList::AddPhysicsList: HadronicEl-HadronIon-LElastic is registered
HADRONIC ELASTIC PROCESS(ES): G4HadronElasticProcess (all considered hadrons and ions)
APPLIED MODEL(S): G4LElastic

<snip>

G4EnergyRangeManager:GetHadronicInteraction: counter=1, Ek=2.2e+002, Material = Prostate, Element = Oxygen
*0* low=0, high=1e+002
In src/G4EnergyRangeManager.cc, line 123:
===> GetHadronicInteraction: No Model found
In src/G4EnergyRangeManager.cc, line 123:
===> GetHadronicInteraction: No Model found
Unrecoverable error for:
 - Particle energy[GeV] = 0.22
 - Material = Prostate
 - Particle type = proton

*** G4Exception : 007
      issued by : G4HadronicProcess
ChooseHadronicInteraction failed.
*** Fatal Exception *** core dump ***

*** G4Exception: Aborting execution ***

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

1 Idea: Re: GetHadronicInteraction: No Model found   (Vladimir Ivanchenko - 08 Aug, 2008)
2 Feedback: Re: GetHadronicInteraction: No Model found   (G.A.P.Cirrone - 08 Aug, 2008)
1 None: Re: GetHadronicInteraction: No Model found   (Ken Sutherland - 10 Aug, 2008)
2 Ok: Re: GetHadronicInteraction: No Model found   (Ken Sutherland - 10 Aug, 2008)
Question 181Ta(p,n) yield is way to low  by C. Jewett <C. Jewett>,   30 Jul, 2008
I am trying to simulate the production of neutrons by protons striking a Ta target. Unfortunately, the yield of neutrons produced by GEANT4 in the target is about two or more orders of magnitude too small according to mcnpx and CINDA cross section data for 181Ta(p,n)181W. I used the LHEP_BERT_HP physics list. I am dealing with protons of energies from 15 MeV to 50 MeV. Thanks for the help.

1 Idea: Re: 181Ta(p,n) yield is way to low   (Vladimir Ivanchenko - 31 Jul, 2008)
Question highly un reasonable positron penetration depth in Fe. (LowEnergy, Penelope and default)  by Or Chen <Or Chen>,   28 Jul, 2008
Hey,

I'm working on a PAS (Positron Annihilation Spectroscopy) simulation,

In the experimental system's most basic structure, positrons leave the source at about ~200*keV, loose about 10*keV ant the source's house and then loose energy in the Iron and annihilate at around thermal energy.

From what I understand, the Penelope model is best for my geometrical setup and energy ranges.

As a first and basic validation of my simulation I looked at the penetration depth of the positron in the Iron.

Using both Penelope, LowEnergy and the Default model I got about 20 micron, when I know that a reasonable result should be around the 100 micron.

(give or take 30 is still fine)

Obviously, this is a major problem...

Another related thing that I noticed is that in many of the examples, all particles are using the LowEenergy or Penelope model, and the positron is the only one who uses the default model, why is that?

Here is my physics list:

(I would appreciate it if you could take a look at it and tell me what I should change in order to get a reasonable result according to my energy ranges and setup)

void PhysicsList::ConstructProcess()
{	
	AddTransportation();

	theParticleIterator->reset();
	while( (*theParticleIterator)() ){
		G4ParticleDefinition* particle = theParticleIterator->value();
		G4ProcessManager* pmanager = particle->GetProcessManager();
		G4String particleName = particle->GetParticleName();

		if (particleName == "gamma") {
			// gamma         
			pmanager->AddDiscreteProcess(new G4PenelopePhotoElectric);
			pmanager->AddDiscreteProcess(new G4PenelopeCompton);
			pmanager->AddDiscreteProcess(new G4PenelopeGammaConversion);
			pmanager->AddDiscreteProcess(new G4PenelopeRayleigh);
		} else if (particleName == "e-") {
			//electron
			pmanager->AddProcess(new G4MultipleScattering,     -1, 1, 1);
			pmanager->AddProcess(new G4PenelopeIonisation,     -1, 2, 2);
			pmanager->AddProcess(new G4PenelopeBremsstrahlung, -1,-1, 3);
		} else if (particleName == "e+") {
			//positron
			pmanager->AddProcess(new G4MultipleScattering,     -1, 1, 2);
			pmanager->AddProcess(new G4PenelopeIonisation,     -1, 2, 3);
			pmanager->AddProcess(new G4PenelopeBremsstrahlung, -1,-1, 4);  
			G4VProcess* penelopeAnnihilation = new G4PenelopeAnnihilation;
			pmanager->AddProcess(penelopeAnnihilation);
			pmanager ->SetProcessOrderingToFirst(penelopeAnnihilation, idxAtRest);
			pmanager ->SetProcessOrderingToFirst(penelopeAnnihilation, idxPostStep);
		} else if ((!particle->IsShortLived()) &&
			(particle->GetPDGCharge() != 0.0) && 
			(particle->GetParticleName() != "chargedgeantino")) {
			//all others charged particles except geantino
			pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1);
			pmanager->AddProcess(new G4hIonisation,        -1, 2, 2);
		}
	}

	G4Decay* theDecayProcess = new G4Decay();
	theParticleIterator->reset();
	while( (*theParticleIterator)() )
	{
		G4ParticleDefinition* particle = theParticleIterator->value();
		G4ProcessManager* pmanager = particle->GetProcessManager();
		if (theDecayProcess->IsApplicable(*particle)) 
		{ 
			pmanager ->AddProcess(theDecayProcess);
			// set ordering for PostStepDoIt and AtRestDoIt
			pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
			pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
		}
	}
}

Thanks' Or Chen.

1 None: Re: highly un reasonable positron penetration depth in Fe. (LowEnergy, Penelope and default)   (michel maire - 29 Jul, 2008)
(_ Disagree: Re: highly un reasonable positron penetration depth in Fe. (LowEnergy, Penelope and default)   (Or Chen - 29 Jul, 2008)
1 None: Re: highly un reasonable positron penetration depth in Fe. (LowEnergy, Penelope and default)   (Or Chen - 29 Jul, 2008)
2 None: Re: highly un reasonable positron penetration depth in Fe. (LowEnergy, Penelope and default)   (michel maire - 30 Jul, 2008)
Question Creation of Neutrons for a 1.94MeV Proton beam  by Alan Shippen <Alan Shippen>,   21 Jul, 2008
Hello,

I am running a simulation of a Lithium Fluorine target being hit by a 1.94MeV proton beam. In the simulation the created neutrons are recorded then killed through the user stepping functions.

From this interaction i am expecting to see at most a 144keV neutron every 3 million protons or so.

However if I run the QGSP_BERT(_HP) physics list I seem to get spurious results whereby a continuous spectrum of neutron energies is created upto around 1.2MeV, which, given energy conservation etc..., is impossible is it not?!?!

I then tried to use the QGSP_BIC(_HP) physics list which says it has implemented within it a better model for the production of secondaries. When this is run no secondaries are created at all. This physics list is run 'as standard' with no modifications is there something I am doing wrong with this physics list?

Are these models usable at energies close to the reaction threshold? if not does Geant4 provide a means with which to draw in ENDF cross sections?

Regards

Alan

1 None: Re: Creation of Neutrons for a 1.94MeV Proton beam   (Alan Shippen - 28 Jul, 2008)
(_ None: Re: Creation of Neutrons for a 1.94MeV Proton beam   (Koi, Tatsumi - 13 Aug, 2008)
(_ None: Re: Creation of Neutrons for a 1.94MeV Proton beam   (Alan Shippen - 13 Aug, 2008)
(_ Feedback: Re: Creation of Neutrons for a 1.94MeV Proton beam   (Gunter Folger - 14 Aug, 2008)
Question Can the Standard and Low Energy Physics list used together?  by valentina <valentina>,   16 Jul, 2008
Hi all!

I'm working with the G4 simulation of an X-ray telescope, based on the X ray telescope example. Since I work with photons from about 0.5 keV to 100 MeV (and higher), I have extended the Physics list used by Gamma particles to the Low Energy.

I have tested the physics by shooting a monochromatic beam of 20 keV photons on a layer of Silicon in order to calculate the absorption efficiency.

My problem is that the GEANT4 resulting efficiency (60%) is almost 2 times the absorption efficiency analytically calculated with the NIST X-ray mass attenuation coefficient (37%, the right efficiency).

If I comment the Low Energy Physics code lines, then the resulting efficiency is right. This happens even if I comment the Standard Physics.

I think that there is something wrong in my code, because GEANT4 seems to use at the same time the Standard and the Low Energy physics and the probability of a photoelectric absorption is doubled.

Here my code (used with flag enableLowEnergyPhysic = true):

if (particleName == "gamma") {
 G4cout << "@@@@@ gamma" << G4endl;
 //gamma
 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
 pmanager->AddDiscreteProcess(new G4ComptonScattering());
 pmanager->AddDiscreteProcess(new G4GammaConversion());
 //low energy
 if(gm.enableLowEnergyPhysic == true) {
 pmanager->AddDiscreteProcess(new G4LowEnergyCompton());
 pmanager->AddDiscreteProcess(new G4LowEnergyPolarizedCompton());
 pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh());
 pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion());
 G4LowEnergyPhotoElectric* lepeprocess = new G4LowEnergyPhotoElectric();
 lepeprocess->ActivateAuger(true);
 pmanager->AddDiscreteProcess(lepeprocess);

}

Thank all for any comment!

Valentina

1 Idea: Re: Can the Standard and Low Energy Physics list used together?   (Vladimir Ivanchenko - 21 Jul, 2008)
(_ Agree: Re: Can the Standard and Low Energy Physics list used together?   (valentina - 21 Jul, 2008)
(_ Idea: Re: Can the Standard and Low Energy Physics list used together?   (Vladimir Ivanchenko - 21 Jul, 2008)
Question what particles should I use for X ray with energy from 10kev to 70kev.  by Colin Huang <Colin Huang>,   09 Jul, 2008
I am new to Geant4 so the question may be stupid. I read Chapter 5 in user's guide and I am still confused about what particles and process should be added for X-ray interacting with Tungsten.

For particles I know electron should be included. But what kind of particle should I use for represent X-ray? There is no such kind of photon. Should I use Gamma or opticalphoton instead? For process I think photoelectric and Compton scattering should be included. Is there any other process should be included?

Any comments are appreciated.
1 Idea: Re: what particles should I use for X ray with energy from 10kev to 70kev.   (Vladimir Ivanchenko - 14 Jul, 2008)
Question Warning message using QGSP_BIC_HP physics list  by Stephen Dowdell <Stephen Dowdell>,   06 Jul, 2008
Hi,

I'm using version 4.9.1.p01 to simulate a proton beam on a water phantom. It was suggested to me to use the QGSP_BIC_HP physics list for my simulations.

During a simulation, I get the following warning message: G4HadronElastic WARNING ekin= -1.1368684e-13 after scattering of proton p(GeV/c)= 398.56811 on proton

The final number in the warning changes each time the warning is present. Sometimes the ekin value is doubled.

It appears that after scattering the kinetic energy is for some reason negative. I'm curious if this warning could have an effect on the results of the simulation. The magnitude is quite small so I'm not sure how significant the effect will be. Is there a way I can ensure that these warnings no longer happen?

Many thanks, Stephen

1 Idea: Re: Warning message using QGSP_BIC_HP physics list   (Vladimir Ivanchenko - 07 Jul, 2008)
Question Confused on the results! Please help!  by Yuri Burmistenko <Yuri Burmistenko>,   23 Jun, 2008
Hello everyone! I am being confused because in my calculation I get particles with energy higher then source energy. For example if i emit gammas in a germanim volume i get such a spectra:





Also the 0.511 MeV peak looks strange here.

I am using physics list based on low energy libraries and i have no idea what is going on.

Please help.

1 Idea: Re: Confused on the results! Please help!   (Vladimir Ivanchenko - 23 Jun, 2008)
1 Question: Re: Confused on the results! Please help!   (Yuri Burmistenko - 24 Jun, 2008)
2 None: Re: Confused on the results! Please help!   (LOKI - 03 Jul, 2008)
Question Confused on the results! Please help!  by Yuri Burmistenko <Yuri Burmistenko>,   23 Jun, 2008
Hello everyone! I am being confused because in my calculation I get particles with energy higher then source energy. For example if i emit gammas in a germanim volume i get such a spectra:





Also the 0.511 MeV peak looks strange here.

I am using physics list based on low energy libraries and i have no idea what is going on.

Please help.

1 Idea: Re: Confused on the results! Please help!   (Vladimir Ivanchenko - 14 Jul, 2008)
Question Neutrons Physics List not working!  Keywords: Segmentation fault
by M. Jamil <M. Jamil>,   05 Jun, 2008

Hi!

I am running GEANT4.9.1 patches, and working on my detector for neutron simulation. In the beinning I have problem in compilation, after I made the code error free, it does runs , and gives message as done!

But after compilation if I try to run it, to see my
 detctor response for neutrons, it gives the following messages!

[test@cmssw1 fourgap-neutron]$ ~/g4work/bin/Linux-g++/exampleN0994

*************************************************************
 Geant4 version Name: geant4-09-01-patch-02    (9-May-2008)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

Visualization Manager instantiating... Visualization Manager initialising... Registering graphics systems...

You have successfully chosen to use the following graphics systems.
Current available graphics systems are:
  ASCIITree (ATree)
  DAWNFILE (DAWNFILE)
  RayTracer (RayTracer)
  VRML1FILE (VRML1FILE)
  VRML2FILE (VRML2FILE)
  OpenGLImmediateX (OGLIX)
  OpenGLStoredX (OGLSX)

You have successfully registered the following graphics systems.
Current available graphics systems are:
  ASCIITree (ATree)
  DAWNFILE (DAWNFILE)
  RayTracer (RayTracer)
  VRML1FILE (VRML1FILE)
  VRML2FILE (VRML2FILE)
  OpenGLImmediateX (OGLIX)
  OpenGLStoredX (OGLSX)

Registering model factories...

G4VisManager: No model factories registered with G4VisManager.
G4VisManager::RegisterModelFactories() should be overridden in derived class. See G4VisExecutive for an example.

You have successfully registered the following model factories.
Registered model factories:
  None

Registered filter factories:
  None

NeutronHP: /Elastic/ file for Z = 6, A = 13 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Elastic///CrossSection/6_nat_Carbon
NeutronHP: /Elastic/ file for Z = 8, A = 18 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Elastic///CrossSection/8_17_Oxygen
NeutronHP: /Inelastic file for Z = 1, A = 1 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Inelastic//CrossSection/1_2_Hydrogen
NeutronHP: /Capture file for Z = 6, A = 13 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Capture//CrossSection/6_nat_Carbon
NeutronHP: /Elastic file for Z = 6, A = 13 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Elastic//CrossSection/6_nat_Carbon
NeutronHP: /Inelastic file for Z = 6, A = 13 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Inelastic//CrossSection/6_nat_Carbon
NeutronHP: /Capture file for Z = 8, A = 18 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Capture//CrossSection/8_17_Oxygen
NeutronHP: /Elastic file for Z = 8, A = 18 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Elastic//CrossSection/8_17_Oxygen
NeutronHP: /Inelastic file for Z = 8, A = 18 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Inelastic//CrossSection/8_17_Oxygen
/opt/cms/geant4.9.1/data/G4NDL3.12
NeutronHP: /Capture/ file for Z = 6, A = 13 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Capture///CrossSection/6_nat_Carbon
NeutronHP: /Capture/ file for Z = 8, A = 18 is not found and NeutronHP will use /opt/cms/geant4.9.1/data/G4NDL3.12/Capture///CrossSection/8_17_Oxygen
Segmentation fault [test@cmssw1 fourgap-neutron]$

None Proton Physics  by Sean Kirkwood <Sean Kirkwood>,   27 May, 2008
Hi,

We are simulating proton absorption in silicon detectors and noticed that
as the proton energies reach about 50 - 100 MeV that the deposition curve
looks "broken up".  Rather than a smooth curve as expected from a Bethe
equation, it appears as though the deposition is taken from a look-up
table.  The curve would go straight for a few MeV and then drop to the 
next level, as though it found a new table entry.

My questions are:
1. Is GEANT4 using a look-up table for proton absorption?
2. Are there other physics models I should incorporate?
3. Where can I get a good sandwich?

Thanks for your time,
Sean

**************************************
Here is my PhysicsList.cc if it helps
**************************************
// Default include types
#include "HEPT_Physics.hh"
#include "G4ParticleTypes.hh"
#include "G4ProcessManager.hh"

// From Novice Example N02
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4StepLimiter.hh"
#include "G4UserSpecialCuts.hh"
#include "G4Decay.hh"

// Low Energy EM
#include "G4LowEnergyPhotoElectric.hh"
#include "G4LowEnergyCompton.hh"  
#include "G4LowEnergyGammaConversion.hh"
#include "G4LowEnergyRayleigh.hh" 
#include "G4LowEnergyIonisation.hh" 
#include "G4LowEnergyBremsstrahlung.hh" 

HEPT_Physics::HEPT_Physics()    {;}

HEPT_Physics::~HEPT_Physics()   {;}

void HEPT_Physics::ConstructParticle() {
  G4Gamma::GammaDefinition();
  G4Proton::ProtonDefinition();
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();
  G4NeutrinoE::NeutrinoEDefinition();
  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
  G4MuonPlus::MuonPlusDefinition();
  G4MuonMinus::MuonMinusDefinition();
}

void HEPT_Physics::ConstructProcess() {
  AddTransportation();
  ConstructEM();
  ConstructGeneral();
}

void HEPT_Physics::ConstructEM() {
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

    if (particleName == "gamma") {
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
      pmanager->AddDiscreteProcess(new G4ComptonScattering);
      pmanager->AddDiscreteProcess(new G4GammaConversion);

      // Low E stuff added by REPT to N02
      pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh);
      pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric);
      pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
      pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion);
    } 

    else if (particleName == "e-") {
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
    }

    else if (particleName == "e+") {
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
      pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);
    }

    else if( particleName == "mu+" ||  particleName == "mu-") {
      pmanager->AddProcess(new G4MuIonisation);
      pmanager->AddProcess(new G4MultipleScattering);
      pmanager->AddProcess(new G4MuBremsstrahlung);
      pmanager->AddProcess(new G4MuPairProduction);
    }

    else if ((!particle->IsShortLived()) && (particle->GetPDGCharge() != 0.0) && 
	       (particle->GetParticleName() != "chargedgeantino")) {
      //all others charged particles except geantino
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4hIonisation,       -1, 2,2);
      //step limit
      pmanager->AddProcess(new G4StepLimiter,       -1,-1,3);
      //pmanager->AddProcess(new G4UserSpecialCuts,   -1,-1,4);
    }
  }
}

void HEPT_Physics::ConstructGeneral() {
  // Add Decay Process
  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) { 
      pmanager ->AddProcess(theDecayProcess);
      // set ordering for PostStepDoIt and AtRestDoIt
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }
}

void HEPT_Physics::SetCuts() {
  //  G4VUserPhysicsList::SetCutsWithDefault method sets the default cut value for all
  //  particle types 
  SetCutsWithDefault();
  if (verboseLevel>0) DumpCutValuesTable();
}
1 None: Re: Proton Physics   (Vladimir IVANTCHENKO - 27 May, 2008)
(_ None: Re: Proton Physics   (Sean Kirkwood - 28 May, 2008)
Question secondary neutrons from proton beam  Keywords: physics list, neutron, proton
by Stephen Dowdell <Stephen Dowdell>,   08 May, 2008

Hi,

I'm trying to simulate neutrons generated from a beam of protons. The energy of the incident beam ranges from 60 MeV to 250 MeV.

I'm having trouble finding exactly which physics processes I need to include.

Could you suggest an appropriate physics list?

Regards, Stephen

1 Feedback: Re: secondary neutrons from proton beam   (Gunter Folger - 09 May, 2008)
2 None: Re: secondary neutrons from proton beam   (Vladimir IVANTCHENKO - 09 May, 2008)
Question Question about Am241 decay   Keywords: Americuim 241, decay process
by Soo Ryu <sryu81@gmail.com>,   07 May, 2008

Hello, Geant4 experts. I have a question about Am241 decay process. According to NNDC data, Am241 gives off 13.95 keV characteristic X-rays with 33% intensity. Using geant4 simulation, I found the X-rays but its intensity was much less than that of NNDC data. I wonder which one is correct. Thanks.

Soo Ryu

1 None: Re: Question about Am241 decay   (Luciano - 08 May, 2008)
(_ None: Re: Question about Am241 decay   (Soo Ryu - 11 May, 2008)
None activation of DNA processes  Keywords: DNA policy upper limit
by Marion Bug <mb355@uow.edu.au>,   30 Apr, 2008

I would like to use the DNA-processes for very low energy. How do I activate them in version 4.9.1? Would you have an example which shows how to handle the policy-structure?

What is the upper limit for electons?

Thank you for your help!

1 None: Re: activation of DNA processes   (S. Incerti - 01 May, 2008)
Question StepLimiter with predefined physicslist?  Keywords: StepLimiter with predefined physicslist
by Robert Slaughter <slaug634@erau.edu>,   29 Apr, 2008
I am running a simulation off the predefined QBBC physics list.  
Is there a way to perform a steplimiter as in example N02 for a 
physics list that is not user defined? If so, how? Thank you for 
the time it is very appreciated!   
1 None: Re: StepLimiter with predefined physicslist?   (Vladimir IVANTCHENKO - 29 Apr, 2008)
Question neutron capture cross section data  Keywords: G4HPNeutronCaptureData
by Steve Farrell <sf72@phy.duke.edu>,   24 Apr, 2008
I am looking at neutron capture in various materials, and came across
something I did not understand.  I'm currently firing 10MeV neutrons
into water.  I noticed a considerable difference in neutron track 
lengths whether or not I used the G4HPNeutronCaptureData. My usual 
neutron physics is:

...
else if (particleName == "neutron")
{
  // elastic scattering
  G4HadronElasticProcess* theNeutronElasticProcess =
    new G4HadronElasticProcess;
  G4LElastic* theElasticModel1 = new G4LElastic;
  theElasticModel1->SetMinEnergy(20.*MeV);
  theNeutronElasticProcess->RegisterMe(theElasticModel1);
  theNeutronElasticProcess->RegisterMe(new G4NeutronHPElastic());
  theNeutronElasticProcess->AddDataSet(new G4NeutronHPElasticData());
  pmanager->AddDiscreteProcess(theNeutronElasticProcess);

  // inelastic scattering
  G4NeutronInelasticProcess* theInelasticProcess =
    new G4NeutronInelasticProcess();
  G4BinaryCascade* theBinaryModel = new G4BinaryCascade();
  theBinaryModel->SetMinEnergy(20*MeV);
  theInelasticProcess->RegisterMe(theBinaryModel);
  theInelasticProcess->RegisterMe(new G4HENeutronInelastic());
  theInelasticProcess->RegisterMe(new G4NeutronHPInelastic());

  theInelasticProcess->AddDataSet(new G4NeutronHPInelasticData());
  pmanager->AddDiscreteProcess(theInelasticProcess);

  // capture
  G4HadronCaptureProcess* theCaptureProcess =
    new G4HadronCaptureProcess;
  G4LCapture* theCaptureModel = new G4LCapture;
  theCaptureModel->SetMinEnergy(20*MeV);
  theCaptureProcess->RegisterMe(theCaptureModel);
  theCaptureProcess->RegisterMe(new G4NeutronHPCapture());
  theCaptureProcess->AddDataSet(new G4NeutronHPCaptureData());

  pmanager->AddDiscreteProcess(theCaptureProcess);
}
...

Now, when I use this as written, I see a peak in track lengths around
0.55m.  However, when I comment out the line that adds the 
G4NeutronHPCaptureData dataset, the track length peak shifts to the left
to about .25m.  So the track length of the peak decreases by about 30cm.
Now, I expect the cross section to be less precise without the extra
data, but certainly not inaccurate.  By the way I am using hydrogen
from the NIST database and G4NDL3.10.
I've posted the track length histogram here:
http://phy.duke.edu/~sf72/TrkLNeutrons_Dataset.gif

Can anybody explain this, or point me in a proper direction to figure 
out where the discrepancy comes from?  Thanks

Steve Farrell
1 None: Re: neutron capture cross section data   (Koi, Tatsumi - 24 Apr, 2008)
None Ions above 10 AGeV  Keywords: ions above 10 AGeV
by Marina Golubeva <marina@inr.ru>,   13 Apr, 2008

Hello,

Please is there any possibility to transport ions with energies more than 10 AGeV? If so which physics lists could be used? Any recomendations please?

Thanks a lot,
Best regards,
          Marina Golubeva

Warning RadioactiveDecay and *** G4Exception: Aborting execution ***  by sdreda <sdreda@hotmail.com>,   03 Apr, 2008

 
  Hello, I am simulating radioactive Decay products from the interaction of 280 Mev/U carbone with PMMA target.

  After I build my Elastic and Inelastic process for generic Ion, I add Radioactive Decay model to it (I looked the exRDM example )

  In my PhysicsList I have :

  #include "G4RadioactiveDecay.hh"
  #include "G4Decay.hh"

  G4ProcessManager* pManager = particle->GetProcessManager();
  G4String particleName = particle->GetParticleName();

  else if (particleName=="GenericIon"){
  .... (Elastic and Inelastic process)

   // Add RadioactiveDecay Process
   G4RadioactiveDecay*  theRadioactiveDecay = new G4RadioactiveDecay();
   pManager->AddProcess(theRadioactiveDecay, 0, -1, 3);   
   pManager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep);
   pManager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest);

} And I have also built Decay of unstable particle with "G4Decay" in ::ConstructGeneral();

in my macro file I have :

/control/verbose 0 /run/verbose 0 /event/verbose 0 /tracking/verbose 0

I have not error in compile, but in simulation after 1000 event it stoped and make me these lines:

G4AugerData - data file: /usr/local/geant4.8.2/data/G4EMLOW4.1/auger/au-tr-pr-6.dat not found

*** G4Exception: Aborting execution *** Abandon

Does anybody have any suggestions? I will appreciate if someone will write his/her ideas about this. Maybe I am doing something wrong in the PhysicsList...

 Thank you,

 Reda.

1 None: Re: RadioactiveDecay and *** G4Exception: Aborting execution ***   (Vladimir IVANTCHENKO - 03 Apr, 2008)
(_ None: Re: RadioactiveDecay and *** G4Exception: Aborting execution ***   (sdreda - 04 Apr, 2008)
(_ None: Re: RadioactiveDecay and *** G4Exception: Aborting execution ***   (Vladimir IVANTCHENKO - 04 Apr, 2008)
(_ None: Re: RadioactiveDecay and *** G4Exception: Aborting execution ***   (sdreda - 10 Apr, 2008)
None Range cut is only for gamma, e-, e+?  by CHEN YONG <CHEN YONG>,   26 Mar, 2008

when I use DumpCutValueTable(), only the cuts for these three particles are shown. However, I want to put range cut for proton in a region to stop generate secondary particles for a particular energy. I was using same code:

cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("gamma")); cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("e-")); cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("e+")); cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("proton"));

no error for compile and run but I do not think the cut for proton was there. refer to Post 307, I was confused whether can I put the cut for proton? Is there any way to set energy cut/range cut for other particles? Thanks!

1 None: Re: Range cut is only for gamma, e-, e+?   (Vladimir IVANTCHENKO - 27 Mar, 2008)
None possible bug?  by Bari Osmanov <Bari Osmanov>,   21 Mar, 2008

 Hello, I am simulating production of neutrinos from the interaction of 1 Gev protons with mercury target.
 I am using precompiled list "QGSP_BIC". One of the processes is the production of negative pions which decay to negative muons.
 This negative muons can undergo capture or decay processes. If it is a capture, the mu- should produce muon neutrino; when it decays - 
it produces muon neutrino and electron anti-neutrino. In my SteppingAction, I have written the code which, upon finding electron anti-neutrino, 
 allows to pick out the process that created it. Here is the piece of the code:

  G4Track* track = aStep->GetTrack();
  const G4VProcess *creator_process = track->GetCreatorProcess();
  G4String creator_process_name = creator_process->GetProcessName();  

 Then, I print this info out. And here is what I got for one found electron antineutrino:

anti_nu_e (trackID=438, status='Alive'): step proc='Transportation' in Volume='physical_UpBePlug' at position=(34.967185, 31.234776, -1.5152518) cm Name of creator process:muMinusCaptureAtRest

 I.e. it looks like electron antineutrinos are produced in mu- capture.

 I will appreciate if someone will write his/her ideas about this. Maybe I am doing something wrong in the SteppingAction...

 Thank you,

 Bari.
 

1 None: Re: possible bug?   (Vladimir IVANTCHENKO - 21 Mar, 2008)
(_ None: Re: possible bug?   (barry_osm@yahoo.com - 21 Mar, 2008)
Question Recoiled silicon atom?  Keywords: scattering displacement lattice position
by Cristina Consolandi <Cristina Consolandi>,   12 Mar, 2008

Hello, I have to reproduce this simulation:

incoming particles : protons 100MeV, electrons 100MeV, Carbon ion 1GeV/nucleon.

target material: silicon bulk.

I want to simulate the scattering process of these particles with the crystal atoms of my target.

Is there a way to know energy, momentum and direction of the recoiled silicon atom when it is displaced from it's lattice position?

May I have some indications of the physics list that I have to introduce, or some examples in Geant4.9.0 that have a similar problem?

Thank you in advance.

Cri

1 None: Re: Recoiled silicon atom?   (Vladimir IVANTCHENKO - 12 Mar, 2008)
None Radioactive decay  Keywords: Radioactive decay
by Suhaili Zakaria <Suhaili Zakaria>,   02 Mar, 2008

Hi.

I want to construct a radioactive source of Y90. My PhysicsList is as follows:

#include "exrdmPhysicsList.hh"
#include "globals.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleDefinition.hh"

#include "G4MesonConstructor.hh"

exrdmPhysicsList::exrdmPhysicsList():  G4VUserPhysicsList()
{
  defaultCutValue = 0.05*um;
  SetVerboseLevel(1);
}

exrdmPhysicsList::~exrdmPhysicsList() {;}

void exrdmPhysicsList::ConstructParticle()
{
  ConstructBosons();
  ConstructLeptons();
  ConstructBaryons();
  ConstructIons();

  G4MesonConstructor mConstructor;
  mConstructor.ConstructParticle();
}

void exrdmPhysicsList::ConstructBosons()
{
  G4Geantino::GeantinoDefinition();
  G4ChargedGeantino::ChargedGeantinoDefinition();
  G4Gamma::GammaDefinition();
}

void exrdmPhysicsList::ConstructLeptons()
{
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();
  G4MuonPlus::MuonPlusDefinition();
  G4MuonMinus::MuonMinusDefinition();
  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
  G4NeutrinoE::NeutrinoEDefinition();
  G4NeutrinoMu::NeutrinoMuDefinition();
  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}

void exrdmPhysicsList::ConstructBaryons()
{
  G4Proton::ProtonDefinition();
  G4AntiProton::AntiProtonDefinition();
  G4Neutron::NeutronDefinition();
  G4AntiNeutron::AntiNeutronDefinition();
}

void exrdmPhysicsList::ConstructIons()
{
  G4GenericIon::GenericIonDefinition();
}

void exrdmPhysicsList::ConstructProcess()
{
  AddTransportation();
  ConstructEM();
  ConstructGeneral();
}

#include "G4Decay.hh"
#include "G4RadioactiveDecay.hh"

#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"

#include "G4MultipleScattering.hh"

#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"

//low energy

#include "G4LowEnergyCompton.hh"
#include "G4LowEnergyGammaConversion.hh"
#include "G4LowEnergyPhotoElectric.hh"
#include "G4LowEnergyRayleigh.hh"

#include "G4LowEnergyIonisation.hh"
#include "G4LowEnergyBremsstrahlung.hh"

void exrdmPhysicsList::ConstructEM()
{
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

 if (particleName == "gamma") {
      pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric);
      pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
      pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh());
      pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion());

 } else if (particleName == "e-") {
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4LowEnergyIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4LowEnergyBremsstrahlung,   -1, -1,3);

 } else if (particleName == "e+") {
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
      pmanager->AddProcess(new G4eplusAnnihilation,   -1, -1,4);

 }  else if (particleName == "GenericIon"){
     pmanager->AddProcess(new G4MultipleScattering, -1,1,1);
     pmanager->AddProcess(new G4hIonisation, -1, 2,2);
     pmanager->AddProcess(new G4RadioactiveDecay, -1, 3, 3);
     pmanager->AddProcess(new G4Decay, -1, 4, 4);

 } else if (particleName == "mu+"|| particleName == "mu-"){
   pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1);
   pmanager->AddProcess(new G4MuIonisation, -1, 2, 2);
   pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
   pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);

 } else if ((!particle->IsShortLived()) &&
            (particle->GetPDGCharge() != 0.0) &&
	    (particle->GetParticleName() != "chargedgeantino")) {
      //all others charged particles except geantino
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4hIonisation,       -1, 2,2);
      }
}
}

#include "G4Decay.hh"
#include "G4RadioactiveDecay.hh"

void exrdmPhysicsList::ConstructGeneral()
{
 G4Decay* theDecayProcess = new G4Decay();
   theParticleIterator->reset();
   while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();

      if (theDecayProcess->IsApplicable(*particle)) {
      pmanager ->AddProcess(theDecayProcess);
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  } 

const G4IonTable* theIonTable = G4ParticleTable::GetParticleTable()->GetIonTable();
G4GenericIon* ion = G4GenericIon::GenericIon();
  G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay();
  ion->GetProcessManager()->AddProcess(theRadioactiveDecay, 0, -1, 3);

   for (G4int i=0; i<theIonTable->Entries(); i++)
    {
      G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
      if (particleName == "GenericIon")
	{
	G4ProcessManager* pmanager = theIonTable ->GetParticle(i)->GetProcessManager();
	//pmanager->SetVerbose(0);
	pmanager->AddProcess(theRadioactiveDecay);
	pmanager->SetProcessOrdering (theRadioactiveDecay, idxPostStep);
	pmanager->SetProcessOrdering (theRadioactiveDecay, idxAtRest);
	}
}
}

void exrdmPhysicsList::SetCuts()
{
  SetCutsWithDefault();
  if (verboseLevel>0) DumpCutValuesTable();
}

This compiles fine,and I run it, and try the following gps command, (after initialization) /gps/particle ion /gps/ion 39 90 0 0 /gps/energy 0 keV /run/beamOn 1

But, I get this segmentation fault.

*** G4Exception : 200
      issued by : G4ParticleChange::CheckIt
momentum, energy, and/or time was illegal
*** Event Must Be Aborted
Segmentation fault

What is wrong with my code? Your comment and help is highly appreciated

Many thanks, S

1 None: Re: Radioactive decay   (Luciano - 18 Apr, 2008)
Question memory leak using G4GammaNuclearReaction in G4.9.1  Keywords: memory leak
by Alfred Tang <Alfred Tang>,   28 Feb, 2008
I am trying simulate muon-induced produciton of neutrons in a liquid scintillator
detector.  As a start, I have the following lines in my PhysicsList:

    G4String particleName = particle->GetParticleName();
    if (particleName == "gamma") {
      //low energy part
      G4GammaNuclearReaction* lowEGammaModel = new G4GammaNuclearReaction();
      lowEGammaModel->SetMaxEnergy(3.5*GeV);
      //photonuclear process
      G4PhotoNuclearProcess* photoProc = new G4PhotoNuclearProcess();
      photoProc->RegisterMe(lowEGammaModel);
      pmanager->AddDiscreteProcess(photoProc);
    }

But when I run this code using Geant4.9.1 or Geant4.9.1.p01, it seems to have
a memory leak because I can see that RAM memory is quickly used up and then the
swap disk is also soon filled up before the program crashes.  I did not have
this problem before when I was running Geant4.9.0.  As far as I know, I only
see this problem in Geant4.9.1 and Geant4.9.p01.  Can anyone tell me what is wrong?
How do I fix the problem?  Thanks.
1 None: Re: memory leak using G4GammaNuclearReaction in G4.9.1   (Vladimir IVANTCHENKO - 01 Mar, 2008)
None Near thermal Neutron simulation problem  Keywords: (thermal?) Neutron siumulation problem
by Alan Shippen <Alan Shippen>,   28 Feb, 2008

I have been trying to simulate the creation of neutrons from an Al+H2O target hit by a 100MeV proton beam line. The goal of the simulations is to obtain a value for neutron flux at the end of a path which is offset from the target by about 20cm. The target is surrounded by a water bath 40cm in radius and 80cm in depth with the pipe measuring neutrons coming directly off this pipe. The measurement of neutron flux occurs exactly 1m down this beam line. Other that the aforementioned structures the rest of the setup is either shielding concrete or steal. During the simulation neutrons are produced as you should expect however when the simulation completes I get results for flux for energies above 2keV however any bin below 2keV is 0. This is in stark contrast to other simulation toolboxes I use (MCNPX and FLUKA) which populate the below 2keV bins. I’m wondering if I’m doing something wrong with the physics list, making the below 2keV neutrons not be simulated. With this in mind I have included the physics list I use. Otherwise I have played with the tracking cuts on many different simulations but to no success, though I could do doing something wrong there too. Does anybody have any suggestions?

TriumfPhysicsList::TriumfPhysicsList() : G4VUserPhysicsList()
{
  SetVerboseLevel(1);
}

TriumfPhysicsList::~TriumfPhysicsList() {}

void TriumfPhysicsList::ConstructParticle()
{
  // In this method, static member functions should be called
  // for all particles which you want to use.
  // This ensures that objects of these particle types will be
  // created in the program. 

  ConstructAllBosons();
  ConstructAllLeptons();
  ConstructAllMesons();
  ConstructAllBaryons();
  ConstructAllIons();
  ConstructAllShortLiveds();
}

void TriumfPhysicsList::ConstructAllBosons()
{
  // Construct all bosons
  G4BosonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void TriumfPhysicsList::ConstructAllLeptons()
{
  // Construct all leptons
  G4LeptonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void TriumfPhysicsList::ConstructAllMesons()
{
  //  Construct all mesons
  G4MesonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void TriumfPhysicsList::ConstructAllBaryons()
{
  //  Construct all barions
  G4BaryonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void TriumfPhysicsList::ConstructAllIons()
{
  //  Construct light ions
  G4IonConstructor pConstructor;
  pConstructor.ConstructParticle();  
}

void TriumfPhysicsList::ConstructAllShortLiveds()
{
  //  Construct  resonaces and quarks
  G4ShortLivedConstructor pConstructor;
  pConstructor.ConstructParticle();  
}

void TriumfPhysicsList::ConstructProcess()
{
  AddTransportation();
  ConstructEM();
  ConstructLeptHad();
  ConstructHad();
  ConstructGeneral();
}

#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"

#include "G4MultipleScattering.hh"

#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"

#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"

void TriumfPhysicsList::ConstructEM()
{
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

    if (particleName == "gamma") {
    // gamma
      // Construct processes for gamma
      pmanager->AddDiscreteProcess(new G4GammaConversion());
      pmanager->AddDiscreteProcess(new G4ComptonScattering());      
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());

    } else if (particleName == "e-") {
    //electron
      // Construct processes for electron
      pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
      pmanager->AddProcess(new G4eIonisation(),-1,2,2);
      pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);

    } else if (particleName == "e+") {
    //positron
      // Construct processes for positron
     pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);

     pmanager->AddProcess(new G4eIonisation(),-1,2,2);
     pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);      
     pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4);

    } else if( particleName == "mu+" || 
               particleName == "mu-"    ) {
    //muon  
     // Construct processes for muon+
     pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
     pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
     pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
     pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);       

    } else if( particleName == "GenericIon" ) {
      pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
      pmanager->AddProcess(new G4ionIonisation(),-1,2,2); 
    } else { 
      if ((particle->GetPDGCharge() != 0.0) && 
          (particle->GetParticleName() != "chargedgeantino")&&
          (!particle->IsShortLived()) ) {
     // all others charged particles except geantino
       pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
       pmanager->AddProcess(new G4hIonisation(),-1,2,2);       
     }
    }
  }
}

// Hadron Processes

#include "G4HadronElasticProcess.hh"
#include "G4HadronFissionProcess.hh"
#include "G4HadronCaptureProcess.hh"

#include "G4PionPlusInelasticProcess.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4KaonPlusInelasticProcess.hh"
#include "G4KaonZeroSInelasticProcess.hh"
#include "G4KaonZeroLInelasticProcess.hh"
#include "G4KaonMinusInelasticProcess.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4NeutronInelasticProcess.hh"
#include "G4AntiNeutronInelasticProcess.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4DeuteronInelasticProcess.hh"
#include "G4TritonInelasticProcess.hh"
#include "G4AlphaInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"

// Low-energy Models

#include "G4LElastic.hh"
#include "G4LFission.hh"
#include "G4LCapture.hh"

#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4LEKaonPlusInelastic.hh"
#include "G4LEKaonZeroSInelastic.hh"
#include "G4LEKaonZeroLInelastic.hh"
#include "G4LEKaonMinusInelastic.hh"
#include "G4LEProtonInelastic.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4LENeutronInelastic.hh"
#include "G4LEAntiNeutronInelastic.hh"
#include "G4LELambdaInelastic.hh"
#include "G4LEAntiLambdaInelastic.hh"
#include "G4LESigmaPlusInelastic.hh"
#include "G4LESigmaMinusInelastic.hh"
#include "G4LEAntiSigmaPlusInelastic.hh"
#include "G4LEAntiSigmaMinusInelastic.hh"
#include "G4LEXiZeroInelastic.hh"
#include "G4LEXiMinusInelastic.hh"
#include "G4LEAntiXiZeroInelastic.hh"
#include "G4LEAntiXiMinusInelastic.hh"
#include "G4LEDeuteronInelastic.hh"
#include "G4LETritonInelastic.hh"
#include "G4LEAlphaInelastic.hh"
#include "G4LEOmegaMinusInelastic.hh"
#include "G4LEAntiOmegaMinusInelastic.hh"

// -- generator models

#include "G4TheoFSGenerator.hh"
#include "G4ExcitationHandler.hh"
#include "G4Evaporation.hh"
#include "G4CompetitiveFission.hh"
#include "G4FermiBreakUp.hh"
#include "G4StatMF.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4Fancy3DNucleus.hh"
#include "G4LEProtonInelastic.hh"
#include "G4StringModel.hh"
#include "G4PreCompoundModel.hh"
#include "G4FTFModel.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"

// // ConstructHad() // // Makes discrete physics processes for the hadrons, at present limited // to those particles with GHEISHA interactions (INTRC > 0). // The processes are: Elastic scattering, Inelastic scattering, // Fission (for neutron only), and Capture (neutron). // // F.W.Jones 06-JUL-1998 //

void TriumfPhysicsList::ConstructHad()
{
    // this will be the model class for high energies
    G4TheoFSGenerator * theTheoModel = new G4TheoFSGenerator;

    // all models for treatment of thermal nucleus 
    G4Evaporation * theEvaporation = new G4Evaporation;
    G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
    G4StatMF * theMF = new G4StatMF;

    // Evaporation logic
    G4ExcitationHandler * theHandler = new G4ExcitationHandler;
        theHandler->SetEvaporation(theEvaporation);
        theHandler->SetFermiModel(theFermiBreakUp);
        theHandler->SetMultiFragmentation(theMF);
        theHandler->SetMaxAandZForFermiBreakUp(12, 6);
        theHandler->SetMinEForMultiFrag(3*MeV);

    // Pre equilibrium stage 
    G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);

    // a no-cascade generator-precompound interaface
    G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface;
            theCascade->SetDeExcitation(thePreEquilib);  

    // here come the high energy parts
    // the string model; still not quite according to design - Explicite use of the forseen interfaces 
    // will be tested and documented in this program by beta-02 at latest.
    G4VPartonStringModel * theStringModel;
    theStringModel = new G4FTFModel;
    theTheoModel->SetTransport(theCascade);
    theTheoModel->SetHighEnergyGenerator(theStringModel);
    theTheoModel->SetMinEnergy(19*GeV);
    theTheoModel->SetMaxEnergy(100*TeV);

      G4VLongitudinalStringDecay * theFragmentation = new G4QGSMFragmentation;
      G4ExcitedStringDecay * theStringDecay = new G4ExcitedStringDecay(theFragmentation);
      theStringModel->SetFragmentationModel(theStringDecay);

// done with the generator model (most of the above is also available as default)
   G4HadronElasticProcess* theElasticProcess = 
                                    new G4HadronElasticProcess;
   G4LElastic* theElasticModel = new G4LElastic;
   theElasticProcess->RegisterMe(theElasticModel);
   G4HadronElasticProcess* theElasticProcess1 = 
                                    new G4HadronElasticProcess;
   theParticleIterator->reset();
   while ((*theParticleIterator)()) {
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();
      G4String particleName = particle->GetParticleName();

      if (particleName == "pi+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4PionPlusInelasticProcess* theInelasticProcess = 
                                new G4PionPlusInelasticProcess("inelastic");
         G4LEPionPlusInelastic* theInelasticModel = 
                                new G4LEPionPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "pi-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4PionMinusInelasticProcess* theInelasticProcess = 
                                new G4PionMinusInelasticProcess("inelastic");
         G4LEPionMinusInelastic* theInelasticModel = 
                                new G4LEPionMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonPlusInelasticProcess* theInelasticProcess = 
                                  new G4KaonPlusInelasticProcess("inelastic");
         G4LEKaonPlusInelastic* theInelasticModel = new G4LEKaonPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon0S") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonZeroSInelasticProcess* theInelasticProcess = 
                             new G4KaonZeroSInelasticProcess("inelastic");
         G4LEKaonZeroSInelastic* theInelasticModel = 
                             new G4LEKaonZeroSInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon0L") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonZeroLInelasticProcess* theInelasticProcess = 
                             new G4KaonZeroLInelasticProcess("inelastic");
         G4LEKaonZeroLInelastic* theInelasticModel = 
                             new G4LEKaonZeroLInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonMinusInelasticProcess* theInelasticProcess = 
                                 new G4KaonMinusInelasticProcess("inelastic");
         G4LEKaonMinusInelastic* theInelasticModel = 
                                 new G4LEKaonMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "proton") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4ProtonInelasticProcess* theInelasticProcess = 
                                    new G4ProtonInelasticProcess("inelastic");
         G4LEProtonInelastic* theInelasticModel = new G4LEProtonInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_proton") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiProtonInelasticProcess* theInelasticProcess = 
                                new G4AntiProtonInelasticProcess("inelastic");
         G4LEAntiProtonInelastic* theInelasticModel = 
                                new G4LEAntiProtonInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "neutron") {

          // elastic scattering
         G4LElastic* theElasticModel1 = new G4LElastic;
         theElasticProcess1->RegisterMe(theElasticModel1);
         pmanager->AddDiscreteProcess(theElasticProcess1);
          // inelastic scattering
         G4NeutronInelasticProcess* theInelasticProcess = 
                                    new G4NeutronInelasticProcess("inelastic");
         G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
          // fission
         G4HadronFissionProcess* theFissionProcess =
                                    new G4HadronFissionProcess;
         G4LFission* theFissionModel = new G4LFission;
         theFissionProcess->RegisterMe(theFissionModel);
         pmanager->AddDiscreteProcess(theFissionProcess);
         // capture
         G4HadronCaptureProcess* theCaptureProcess =
                                    new G4HadronCaptureProcess;
         G4LCapture* theCaptureModel = new G4LCapture;
         theCaptureProcess->RegisterMe(theCaptureModel);
         pmanager->AddDiscreteProcess(theCaptureProcess);
		 G4cout << "Neutron Created" << G4endl;
      }  
      else if (particleName == "anti_neutron") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiNeutronInelasticProcess* theInelasticProcess = 
                               new G4AntiNeutronInelasticProcess("inelastic");
         G4LEAntiNeutronInelastic* theInelasticModel = 
                               new G4LEAntiNeutronInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
	 theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "lambda") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4LambdaInelasticProcess* theInelasticProcess = 
                                    new G4LambdaInelasticProcess("inelastic");
         G4LELambdaInelastic* theInelasticModel = new G4LELambdaInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_lambda") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiLambdaInelasticProcess* theInelasticProcess = 
                                new G4AntiLambdaInelasticProcess("inelastic");
         G4LEAntiLambdaInelastic* theInelasticModel = 
                                new G4LEAntiLambdaInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "sigma+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4SigmaPlusInelasticProcess* theInelasticProcess = 
                                 new G4SigmaPlusInelasticProcess("inelastic");
         G4LESigmaPlusInelastic* theInelasticModel = 
                                 new G4LESigmaPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "sigma-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4SigmaMinusInelasticProcess* theInelasticProcess = 
                                 new G4SigmaMinusInelasticProcess("inelastic");
         G4LESigmaMinusInelastic* theInelasticModel = 
                                 new G4LESigmaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_sigma+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiSigmaPlusInelasticProcess* theInelasticProcess = 
                             new G4AntiSigmaPlusInelasticProcess("inelastic");
         G4LEAntiSigmaPlusInelastic* theInelasticModel = 
                                 new G4LEAntiSigmaPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_sigma-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiSigmaMinusInelasticProcess* theInelasticProcess = 
                            new G4AntiSigmaMinusInelasticProcess("inelastic");
         G4LEAntiSigmaMinusInelastic* theInelasticModel = 
                                 new G4LEAntiSigmaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "xi0") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4XiZeroInelasticProcess* theInelasticProcess = 
                            new G4XiZeroInelasticProcess("inelastic");
         G4LEXiZeroInelastic* theInelasticModel = 
                                 new G4LEXiZeroInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "xi-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4XiMinusInelasticProcess* theInelasticProcess = 
                            new G4XiMinusInelasticProcess("inelastic");
         G4LEXiMinusInelastic* theInelasticModel = 
                                 new G4LEXiMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_xi0") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiXiZeroInelasticProcess* theInelasticProcess = 
                            new G4AntiXiZeroInelasticProcess("inelastic");
         G4LEAntiXiZeroInelastic* theInelasticModel = 
                                 new G4LEAntiXiZeroInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_xi-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiXiMinusInelasticProcess* theInelasticProcess = 
                            new G4AntiXiMinusInelasticProcess("inelastic");
         G4LEAntiXiMinusInelastic* theInelasticModel = 
                                 new G4LEAntiXiMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "deuteron") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4DeuteronInelasticProcess* theInelasticProcess = 
                            new G4DeuteronInelasticProcess("inelastic");
         G4LEDeuteronInelastic* theInelasticModel = 
                                 new G4LEDeuteronInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "triton") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4TritonInelasticProcess* theInelasticProcess = 
                            new G4TritonInelasticProcess("inelastic");
         G4LETritonInelastic* theInelasticModel = 
                                 new G4LETritonInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "alpha") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AlphaInelasticProcess* theInelasticProcess = 
                            new G4AlphaInelasticProcess("inelastic");
         G4LEAlphaInelastic* theInelasticModel = 
                                 new G4LEAlphaInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "omega-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4OmegaMinusInelasticProcess* theInelasticProcess = 
                            new G4OmegaMinusInelasticProcess("inelastic");
         G4LEOmegaMinusInelastic* theInelasticModel = 
                                 new G4LEOmegaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_omega-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiOmegaMinusInelasticProcess* theInelasticProcess = 
                            new G4AntiOmegaMinusInelasticProcess("inelastic");
         G4LEAntiOmegaMinusInelastic* theInelasticModel = 
                                 new G4LEAntiOmegaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
   }
}

void TriumfPhysicsList::ConstructLeptHad() {;}

#include "G4Decay.hh"
void TriumfPhysicsList::ConstructGeneral()
{
  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) { 
      pmanager ->AddProcess(theDecayProcess);
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }
}

void TriumfPhysicsList::SetCuts()
{
  if (verboseLevel >0)
  {
    G4cout << "TriumfPhysicsList::SetCuts:";
    G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
  }  
  //   "G4VUserPhysicsList::SetCutsWithDefault" method sets 
  //   the default cut value for all particle types 
  SetCutValue(1*mm,"gamma");  
  SetCutValue(1*mm,"e+");
  SetCutValue(1*mm,"e-");
  SetCutValue(1*mm,"proton");
  SetCutValue(0.1*eV,"neutron");
}

1 Feedback: Re: Near thermal Neutron simulation problem   (Gunter Folger - 29 Feb, 2008)
3 None: Re: Near thermal Neutron simulation problem   (Vladimir IVANTCHENKO - 01 Mar, 2008)
None Neutrons from deuteron on a gas target  by gin chen <gin chen>,   21 Feb, 2008

This is related to the previous discussion on
deuteron on Deuterium gas. #454
To create neutron from  20 MeV  deuteron on Deuterium gas, I
have placed the PhysicsList.cc file (attached)
and ran a simple program (modified the
 geant4.9.1/examples/extended/hadronic/Hadr01)

(DetectorConstruction.cc is attached). Using
StackingAction.cc print out the secondaries
for the reaction
 deuteron + Deuterium -> n + He3

and I get follwing output showing only He3, no neutron.(for 20 MeV deuteron)./vis/scene/notifyHandlers (for few beamOn events)

### Run 2 start
Start Run processing.
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Run terminated.
Run Summary
  Number of events processed : 100000
  User=23.11s Real=30.88s Sys=0.75s
RunAction: End of run actions are started
/vis/viewer/update
WARNING: G4VisManager::EndOfRun: Event keeping was suspended.
  The number of events in the run exceeded the maximum to be kept, 100.
  The number of events to be kept can be changed with
  "/vis/scene/endOfEventAction accumulate <N>", where N is the
  maximum number you wish to allow.  N < 0 means "unlimited".
100 events have been kept for refreshing and/or reviewing.

========================================================

When I replced material of targetD2 to air, I can see low energy neutrons coming out into the output.

### Run 2 start
/vis/scene/notifyHandlers
Start Run processing.
Track #2 of alpha E(MeV)= 6.840125 ID= 1
Track #3 of proton E(MeV)= 2.2081953 ID= 1
Track #4 of C13[0.0] E(MeV)= 4.509528 ID= 1
Track #5 of gamma E(MeV)= 1.9802774 ID= 1
Track #2 of proton E(MeV)= 11.569889 ID= 1
Track #3 of neutron E(MeV)= 0.54794485 ID= 1
Track #4 of gamma E(MeV)= 2.0934609 ID= 1
Track #5 of gamma E(MeV)= 2.312695 ID= 1
Track #6 of N14[0.0] E(MeV)= 1.2757792 ID= 1
Track #7 of gamma E(MeV)= 0.000205 ID= 1
Track #8 of e- E(MeV)= 0.0001634 ID= 7
 neutron
Run terminated.
Run Summary
  Number of events processed : 10000
  User=2.39s Real=3.2s Sys=0.06s
RunAction: End of run actions are started
/vis/viewer/update
WARNING: G4VisManager::EndOfRun: Event keeping was suspended.
  The number of events in the run exceeded the maximum to be kept, 1000.
  The number of events to be kept can be changed with
  "/vis/scene/endOfEventAction accumulate <N>", where N is the
  maximum number you wish to allow.  N < 0 means "unlimited".
1000 events have been kept for refreshing and/or
================================================================
Also,
If I changed the target material as tantalum, I get printout as:

Track #2 of proton E(MeV)= 18.020909 ID= 1
Track #3 of gamma E(MeV)= 1.8875873 ID= 1
Track #4 of gamma E(MeV)= 1.6023882 ID= 1
Track #5 of gamma E(MeV)= 0.96302274 ID= 1
Track #6 of gamma E(MeV)= 0.2208 ID= 1
Track #7 of gamma E(MeV)= 0.9428 ID= 1
Track #8 of gamma E(MeV)= 0.0589247 ID= 1
Track #9 of gamma E(MeV)= 0.1143153 ID= 1
Track #10 of Ta182[0.0] E(MeV)= 0.027499118 ID= 1
Track #11 of e- E(MeV)= 0.0468993 ID= 9
Track #12 of e- E(MeV)= 0.0020106157 ID= 8
Track #13 of e- E(MeV)= 0.045232084 ID= 8
Track #14 of e- E(MeV)= 0.153384 ID= 6
Track #2 of neutron E(MeV)= 2.2500426 ID= 1
Track #3 of neutron E(MeV)= 0.27396435 ID= 1
Track #4 of neutron E(MeV)= 1.7350955 ID= 1
Track #5 of gamma E(MeV)= 1.6578496 ID= 1
Track #6 of gamma E(MeV)= 0.6045 ID= 1
Track #7 of gamma E(MeV)= 0.5897 ID= 1
Track #8 of gamma E(MeV)= 0.5875 ID= 1
Track #9 of gamma E(MeV)= 0.57102 ID= 1
Track #10 of gamma E(MeV)= 0.52572 ID= 1
Track #11 of gamma E(MeV)= 0.450016 ID= 1
Track #12 of gamma E(MeV)= 0.3509 ID= 1
Track #13 of gamma E(MeV)= 0.233987 ID= 1
Track #14 of gamma E(MeV)= 0.103557 ID= 1
Track #15 of W180[0.0] E(MeV)= 0.17473482 ID= 1
Track #16 of e- E(MeV)= 0.036141 ID= 14
Track #17 of e- E(MeV)= 0.166571 ID= 13
Track #18 of e- E(MeV)= 0.16491728 ID= 12
Track #19 of e- E(MeV)= 0.11856672 ID= 12
Track #20 of e- E(MeV)= 0.38000078 ID= 9
Track #21 of e- E(MeV)= 0.079642993 ID= 9
Track #22 of e- E(MeV)= 0.043960225 ID= 9
Track #23 of e- E(MeV)= 0.37931561 ID= 7
Track #24 of e- E(MeV)= 0.14296839 ID= 7
Track #2 of neutron E(MeV)= 2.3282838 ID= 1
Track #3 of neutron E(MeV)= 0.58066997 ID= 1
Track #4 of neutron E(MeV)= 1.7183982 ID= 1
Track #5 of gamma E(MeV)= 1.821527 ID= 1
Track #6 of gamma E(MeV)= 0.5897 ID= 1
Track #7 of gamma E(MeV)= 0.5875 ID= 1
Track #8 of gamma E(MeV)= 0.57102 ID= 1
Track #9 of gamma E(MeV)= 0.52572 ID= 1
Track #10 of gamma E(MeV)= 0.450016 ID= 1
Track #11 of gamma E(MeV)= 0.3509 ID= 1
Track #12 of gamma E(MeV)= 0.233987 ID= 1
Track #13 of gamma E(MeV)= 0.103557 ID= 1
Track #14 of W180[0.0] E(MeV)= 0.24925396 ID= 1
Track #15 of e- E(MeV)= 0.036141 ID= 13
 neutron
Run terminated.
Run Summary
  Number of events processed : 10000
  User=23.55s Real=47.54s Sys=0.69s
RunAction: End of run actions are started
/vis/viewer/update
WARNING: G4VisManager::EndOfRun: Event keeping was suspended.
  The number of events in the run exceeded the maximum to be kept, 1000.
  The number of events to be kept can be changed with
  "/vis/scene/endOfEventAction accumulate <N>", where N is the
  maximum number you wish to allow.  N < 0 means "unlimited".
1000 events have been kept for refreshing and/or reviewing.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

My question is:
 Why don't I see neutron from 20 MeV deuteron on Deuterium gas.

Thank you,

Gin.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PhysicsList.cc XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX // // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // // $Id: B01PhysicsList.cc,v 1.8 2007/06/05 18:20:09 ahoward Exp $ // GEANT4 tag $Name: geant4-09-01 $ //

#include "globals.hh"
#include <iomanip>

#include "PhysicsList.hh"

#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4BosonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"

PhysicsList::PhysicsList():  G4VUserPhysicsList()
{
  SetVerboseLevel(1);
}

PhysicsList::~PhysicsList()
{
}
void PhysicsList::ConstructParticle()
{
  // In this method, static member functions should be called
  // for all particles which you want to use.
  // This ensures that objects of these particle types will be
  // created in the program.

  ConstructAllBosons();
  ConstructAllLeptons();
  ConstructAllMesons();
  ConstructAllBaryons();
  ConstructAllIons();
  ConstructAllShortLiveds();
}
 void PhysicsList::ConstructAllBosons()
{
  // Construct all bosons
  G4BosonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructAllLeptons()
{
  // Construct all leptons
  G4LeptonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructAllMesons()
{
  //  Construct all mesons
  G4MesonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructAllBaryons()
{
  //  Construct all barions
  G4BaryonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructAllIons()
{
  //  Construct light ions
  G4IonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructAllShortLiveds()
{
  //  Construct  resonaces and quarks
  G4ShortLivedConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructProcess()
{
  AddTransportation();
//  AddScoringProcess();
  ConstructEM();
  ConstructLeptHad();
  ConstructHad();
  ConstructGeneral();
}

void PhysicsList::AddTransportation()
{
  G4VUserPhysicsList::AddTransportation();
}
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"

#include "G4MultipleScattering.hh"

#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"

#include "G4hIonisation.hh"

#include "G4LowEnergyPhotoElectric.hh"
#include "G4LowEnergyCompton.hh"
#include "G4LowEnergyGammaConversion.hh"
#include "G4LowEnergyRayleigh.hh"

#include "G4LowEnergyIonisation.hh"
#include "G4LowEnergyBremsstrahlung.hh"

#include "G4hLowEnergyIonisation.hh"

  void PhysicsList::ConstructEM()
{
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

    if (particleName == "gamma") {
    // gamma
      // Construct processes for gamma
/*
      pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh);
      pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric);
      pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
      pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion);
*/
      pmanager->AddDiscreteProcess(new G4GammaConversion());
      pmanager->AddDiscreteProcess(new G4ComptonScattering());
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());

    } else if (particleName == "e-") {
    //electron
      // Construct processes for electron
      pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
      pmanager->AddProcess(new G4eIonisation(),-1,2,2);
      pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
    } else if (particleName == "e+") {
    //positron
      // Construct processes for positron
     pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);

     pmanager->AddProcess(new G4eIonisation(),-1,2,2);
     pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
     pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4);

    } else if( particleName == "mu+" ||
               particleName == "mu-"    ) {
    //muon
     // Construct processes for muon+
     pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
     pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
     pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
     pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);

    }

// else if ( particleName == "GenericIon" ) {
//      pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
//      pmanager->AddProcess(new G4hIonisation(),-1,2,2);
//   }
// {
//      if ((particle->GetPDGCharge() != 0.0) &&
//          (particle->GetParticleName() != "deuteron")&&
//          (!particle->IsShortLived()) ) {
//     // all others charged particles except geantino
//       pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
//      pmanager->AddProcess(new G4hIonisation(),-1,2,2);
//     }
//    }
  }
}

// Hadron Processes

#include "G4HadronElasticProcess.hh"
#include "G4HadronFissionProcess.hh"
#include "G4HadronCaptureProcess.hh"

#include "G4PionPlusInelasticProcess.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4KaonPlusInelasticProcess.hh"
#include "G4KaonZeroSInelasticProcess.hh"
#include "G4KaonZeroLInelasticProcess.hh"
#include "G4KaonMinusInelasticProcess.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4NeutronInelasticProcess.hh"
#include "G4AntiNeutronInelasticProcess.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4DeuteronInelasticProcess.hh"
#include "G4TritonInelasticProcess.hh"
#include "G4AlphaInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh

// Low-energy Models

#include "G4LElastic.hh"
#include "G4LFission.hh"
#include "G4LCapture.hh"

#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4LEKaonPlusInelastic.hh"
#include "G4LEKaonZeroSInelastic.hh"
#include "G4LEKaonZeroLInelastic.hh"
#include "G4LEKaonMinusInelastic.hh"
#include "G4LEProtonInelastic.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4LENeutronInelastic.hh"
#include "G4LEAntiNeutronInelastic.hh"
#include "G4LELambdaInelastic.hh"
#include "G4LEAntiLambdaInelastic.hh"
#include "G4LESigmaPlusInelastic.hh"
#include "G4LESigmaMinusInelastic.hh"
#include "G4LEAntiSigmaPlusInelastic.hh"
#include "G4LEAntiSigmaMinusInelastic.hh"
#include "G4LEXiZeroInelastic.hh"
#include "G4LEXiMinusInelastic.hh"
#include "G4LEAntiXiZeroInelastic.hh"
#include "G4LEAntiXiMinusInelastic.hh"
#include "G4LEDeuteronInelastic.hh"
#include "G4LETritonInelastic.hh"
#include "G4LEAlphaInelastic.hh"
#include "G4LEOmegaMinusInelastic.hh"
#include "G4LEAntiOmegaMinusInelastic.hh"

// -- generator models

#include "G4TheoFSGenerator.hh"
#include "G4ExcitationHandler.hh"
#include "G4Evaporation.hh"
#include "G4CompetitiveFission.hh"
#include "G4FermiBreakUp.hh"
#include "G4StatMF.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4Fancy3DNucleus.hh"
#include "G4LEProtonInelastic.hh"
#include "G4StringModel.hh"
#include "G4PreCompoundModel.hh"
#include "G4FTFModel.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"

#include "G4CascadeInterface.hh"

#include "G4BinaryCascade.hh"
#include "G4BinaryLightIonReaction.hh"

//HPNeutron

#include "G4NeutronHPElastic.hh"
#include "G4NeutronHPElasticData.hh"
#include "G4NeutronHPCapture.hh"
#include "G4NeutronHPCaptureData.hh"
#include "G4NeutronHPInelastic.hh"
#include "G4NeutronHPInelasticData.hh"
//c-s
#include "G4TripathiCrossSection.hh"
#include "G4IonsShenCrossSection.hh"
#include "G4TripathiLightCrossSection.hh"
#include "G4ProtonInelasticCrossSection.hh"
#include "G4NeutronInelasticCrossSection.hh"

// RadioactiveDecay

#include "G4RadioactiveDecay.hh"
#include "G4GenericIon.hh"

// // ConstructHad() // // Makes discrete physics processes for the hadrons, at present limited // to those particles with GHEISHA interactions (INTRC > 0). // The processes are: Elastic scattering, Inelastic scattering, // Fission (for neutron only), and Capture (neutron). // // F.W.Jones 06-JUL-1998 //

void PhysicsList::ConstructHad() {

//     G4ProcessManager * pManager = 0;
    // this will be the model class for high energies
    G4TheoFSGenerator * theTheoModel = new G4TheoFSGenerator;

    // all models for treatment of thermal nucleus
    G4Evaporation * theEvaporation = new G4Evaporation;
    G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
    G4StatMF * theMF = new G4StatMF;

    // Evaporation logic
    G4ExcitationHandler * theHandler = new G4ExcitationHandler;
        theHandler->SetEvaporation(theEvaporation);
        theHandler->SetFermiModel(theFermiBreakUp);
        theHandler->SetMultiFragmentation(theMF);
        theHandler->SetMaxAandZForFermiBreakUp(2, 1);
        theHandler->SetMinEForMultiFrag(3*MeV);

    // Pre equilibrium stage
    G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);

    // a no-cascade generator-precompound interaface
    G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface;
            theCascade->SetDeExcitation(thePreEquilib);

    // here come the high energy parts
    // the string model; still not quite according to design - Explicite use of
the forseen interfaces
    // will be tested and documented in this program by beta-02 at latest.
    G4VPartonStringModel * theStringModel;
    theStringModel = new G4FTFModel;
    theTheoModel->SetTransport(theCascade);
    theTheoModel->SetHighEnergyGenerator(theStringModel);
    theTheoModel->SetMinEnergy(10*GeV);
    theTheoModel->SetMaxEnergy(100*TeV);

      G4VLongitudinalStringDecay * theFragmentation = new G4QGSMFragmentation;
      G4ExcitedStringDecay * theStringDecay = new G4ExcitedStringDecay(theFragmentation);
      theStringModel->SetFragmentationModel(theStringDecay);

theElasticProcess.RegisterMe(new G4LElastic()); // done with the generator model (most of the above is also available as default)

/*   G4HadronElasticProcess* theElasticProcess =
                                    new G4HadronElasticProcess;
   G4LElastic* theElasticModel = new G4LElastic;
   theElasticProcess->RegisterMe(theElasticModel);
   G4HadronElasticProcess* theElasticProcess1 =

                                    new G4HadronElasticProcess;
*/
   theParticleIterator->reset();
   while ((*theParticleIterator)()) {
      G4ParticleDefinition* particle = theParticleIterator->value();
//      G4ProcessManager* pmanager = particle->GetProcessManager();
      G4String particleName = particle->GetParticleName();

   if (particleName != "neutron") {
      G4ProcessManager* pmanager = particle->GetProcessManager();
      if (particle->GetPDGMass() > 110.*MeV && theElasticProcess.IsApplicable(*particle)
          && !particle->IsShortLived()) {
        pmanager->AddDiscreteProcess(&theElasticProcess);
        //
        //      G4cout << "### Elastic model are registered for "
        //       << particle->GetParticleName()
        //       << G4endl;
      }
    }
}
  // Proton
  G4ProcessManager* pmanager = G4Proton::Proton()->GetProcessManager();
    // add inelastic process
  // Binary Cascade
  G4BinaryCascade * theBC = new G4BinaryCascade;
  theBC->SetMaxEnergy(10.5*GeV);
  theProtonInelastic.RegisterMe(theBC);
  // Higher energy
  theProtonInelastic.RegisterMe(theTheoModel);
  // now the cross-sections.
  G4ProtonInelasticCrossSection * theProtonData = new G4ProtonInelasticCrossSection;
  theProtonInelastic.AddDataSet(theProtonData);
  pmanager->AddDiscreteProcess(&theProtonInelastic);
  //
  //
  // Neutron
   pmanager = G4Neutron::Neutron()->GetProcessManager();
  // add process
  // elastic scattering
  theNeutronElasticProcess =
    new G4HadronElasticProcess();
  G4LElastic* theElasticModel1 = new G4LElastic;
  G4NeutronHPElastic * theElasticNeutron = new G4NeutronHPElastic;
  theNeutronElasticProcess->RegisterMe(theElasticModel1);
  theElasticModel1->SetMinEnergy(19.*MeV);
  theNeutronElasticProcess->RegisterMe(theElasticNeutron);
  theElasticNeutron->SetMaxEnergy(20.*MeV);

  G4NeutronHPElasticData * theNeutronData = new G4NeutronHPElasticData;
  theNeutronElasticProcess->AddDataSet(theNeutronData);
  pmanager->AddDiscreteProcess(theNeutronElasticProcess);
  // inelastic
  G4NeutronHPInelastic * theHPNeutronInelasticModel =
    new G4NeutronHPInelastic;
  theHPNeutronInelasticModel->SetMaxEnergy(20.*MeV);
  theNeutronInelastic.RegisterMe(theHPNeutronInelasticModel);
  G4NeutronHPInelasticData * theNeutronData1 = new G4NeutronHPInelasticData;
  theNeutronInelastic.AddDataSet(theNeutronData1);

  // binary
  G4BinaryCascade * neutronBC = new G4BinaryCascade;
  neutronBC->SetMinEnergy(19.*MeV);
  neutronBC->SetMaxEnergy(10.5*GeV);
  theNeutronInelastic.RegisterMe(neutronBC);
  // higher energy
  theNeutronInelastic.RegisterMe(theTheoModel);
  // now the cross-sections.
  G4NeutronInelasticCrossSection * theNeutronData2 = new G4NeutronInelasticCrossSection;
  theNeutronInelastic.AddDataSet(theNeutronData2);
  pmanager->AddDiscreteProcess(&theNeutronInelastic);
  // fission
  theFissionProcess =
    new G4HadronFissionProcess;
  G4LFission* theFissionModel = new G4LFission;
  theFissionProcess->RegisterMe(theFissionModel);
  pmanager->AddDiscreteProcess(theFissionProcess);
  //capture
  theCaptureProcess =
    new G4HadronCaptureProcess;
  G4LCapture* theCaptureModel = new G4LCapture;
  theCaptureProcess->RegisterMe(theCaptureModel);
  theCaptureModel->SetMinEnergy(19.*MeV);
  G4NeutronHPCapture * theHPNeutronCaptureModel = new G4NeutronHPCapture;
  theCaptureProcess->RegisterMe(theHPNeutronCaptureModel);
  G4NeutronHPCaptureData * theNeutronData3 = new G4NeutronHPCaptureData;
  theCaptureProcess->AddDataSet(theNeutronData3);
  pmanager->AddDiscreteProcess(theCaptureProcess);

  // now light ions
  // light Ion BC
  G4BinaryLightIonReaction * theIonBC= new G4BinaryLightIonReaction;
  theIonBC->SetMinEnergy(1*MeV);
  theIonBC->SetMaxEnergy(30*GeV);
//  G4TripathiCrossSection * TripathiCrossSection= new G4TripathiCrossSection;
  G4TripathiLightCrossSection * TripathiLightCrossSection
                       = new G4TripathiLightCrossSection;
  G4IonsShenCrossSection * aShen = new G4IonsShenCrossSection;

  // deuteron
  pmanager = G4Deuteron::Deuteron()->GetProcessManager();
  theDeuteronInelasticProcess =
    new G4DeuteronInelasticProcess("inelastic");
  //  G4LEDeuteronInelastic* theDeuteronInelasticModel =
  //   new G4LEDeuteronInelastic;
  // theDeuteronInelasticModel->SetMaxEnergy(100*MeV);
  theDeuteronInelasticProcess->AddDataSet(TripathiLightCrossSection);
//  theDeuteronInelasticProcess->AddDataSet(aShen);
  //  theDeuteronInelasticProcess->RegisterMe(theDeuteronInelasticModel);
  theDeuteronInelasticProcess->RegisterMe(theIonBC);
  theDeuteronInelasticProcess->RegisterMe(theTheoModel);
  pmanager->AddDiscreteProcess(theDeuteronInelasticProcess);
  // triton
  pmanager = G4Triton::Triton()->GetProcessManager();
  theTritonInelasticProcess =
    new G4TritonInelasticProcess("inelastic");
  //  G4LETritonInelastic* theTritonInelasticModel =
  //  new G4LETritonInelastic;
  //theTritonInelasticModel->SetMaxEnergy(100*MeV);
  theTritonInelasticProcess->AddDataSet(TripathiLightCrossSection);
  theTritonInelasticProcess->AddDataSet(aShen);
  //  theTritonInelasticProcess->RegisterMe(theTritonInelasticModel);
  theTritonInelasticProcess->RegisterMe(theIonBC);
  theTritonInelasticProcess->RegisterMe(theTheoModel);
  pmanager->AddDiscreteProcess(theTritonInelasticProcess);
  // alpha
  pmanager = G4Alpha::Alpha()->GetProcessManager();
  theAlphaInelasticProcess =
    new G4AlphaInelasticProcess("inelastic");
  // G4LEAlphaInelastic* theAlphaInelasticModel =
  //  new G4LEAlphaInelastic;
  //theAlphaInelasticModel->SetMaxEnergy(100*MeV);
//  theAlphaInelasticProcess->AddDataSet(TripathiCrossSection);
  theAlphaInelasticProcess->AddDataSet(TripathiLightCrossSection);
  theAlphaInelasticProcess->AddDataSet(aShen);
  //  theAlphaInelasticProcess->RegisterMe(theAlphaInelasticModel);
  theAlphaInelasticProcess->RegisterMe(theIonBC);
  theAlphaInelasticProcess->RegisterMe(theTheoModel);
  pmanager->AddDiscreteProcess(theAlphaInelasticProcess);
  // GenericIon
  pmanager = G4GenericIon::GenericIon()->GetProcessManager();
  // need to add the elastic explicitly
  pmanager->AddDiscreteProcess(&theElasticProcess);
  theIonInelasticProcess =
    new G4IonInelasticProcess();
  theIonInelasticProcess->AddDataSet(TripathiLightCrossSection);
  theIonInelasticProcess->AddDataSet(aShen);
  //  G4BinaryLightIonReaction * theGenIonBC= new G4BinaryLightIonReaction;
  // theGenIonBC->SetMinEnergy(0*MeV);
  //theGenIonBC->SetMaxEnergy(20*GeV);
  theIonInelasticProcess->RegisterMe(theIonBC);
  theIonInelasticProcess->RegisterMe(theTheoModel);
  pmanager->AddDiscreteProcess(theIonInelasticProcess);

// Add RadioactiveDecay Process // G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay(); // G4GenericIon* ion = G4GenericIon::GenericIon(); // pmanager->AddProcess(theRadioactiveDecay, 0, -1, 3); }

/*      if (particleName == "pi+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4PionPlusInelasticProcess* theInelasticProcess =
                                new G4PionPlusInelasticProcess("inelastic");
         G4LEPionPlusInelastic* theInelasticModel =
                                new G4LEPionPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "pi-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4PionMinusInelasticProcess* theInelasticProcess =
                                new G4PionMinusInelasticProcess("inelastic");
         G4LEPionMinusInelastic* theInelasticModel =
                                new G4LEPionMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonPlusInelasticProcess* theInelasticProcess =
                                  new G4KaonPlusInelasticProcess("inelastic");
         G4LEKaonPlusInelastic* theInelasticModel = new G4LEKaonPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon0S") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonZeroSInelasticProcess* theInelasticProcess =
                             new G4KaonZeroSInelasticProcess("inelastic");
         G4LEKaonZeroSInelastic* theInelasticModel =
                             new G4LEKaonZeroSInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon0L") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonZeroLInelasticProcess* theInelasticProcess =
                             new G4KaonZeroLInelasticProcess("inelastic");
         G4LEKaonZeroLInelastic* theInelasticModel =
                             new G4LEKaonZeroLInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonMinusInelasticProcess* theInelasticProcess =
                                 new G4KaonMinusInelasticProcess("inelastic");
         G4LEKaonMinusInelastic* theInelasticModel =
                                 new G4LEKaonMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "proton") {
        pmanager->AddDiscreteProcess(theElasticProcess);
         G4ProtonInelasticProcess* theInelasticProcess =
                                    new G4ProtonInelasticProcess("inelastic");
         G4LEProtonInelastic* theInelasticModel = new G4LEProtonInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_proton") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiProtonInelasticProcess* theInelasticProcess =
                                new G4AntiProtonInelasticProcess("inelastic");
         G4LEAntiProtonInelastic* theInelasticModel =
                                new G4LEAntiProtonInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "neutron") {
          // elastic scattering
         G4LElastic* theElasticModel1 = new G4LElastic;
         theElasticProcess1->RegisterMe(theElasticModel1);
         pmanager->AddDiscreteProcess(theElasticProcess1);
          // inelastic scattering
         G4NeutronInelasticProcess* theInelasticProcess =
                                    new G4NeutronInelasticProcess("inelastic");
         G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
          // fission
         G4HadronFissionProcess* theFissionProcess =
                                    new G4HadronFissionProcess;
         G4LFission* theFissionModel = new G4LFission;
         theFissionProcess->RegisterMe(theFissionModel);
         pmanager->AddDiscreteProcess(theFissionProcess);
         // capture
         G4HadronCaptureProcess* theCaptureProcess =
                                    new G4HadronCaptureProcess;
         G4LCapture* theCaptureModel = new G4LCapture;
         theCaptureProcess->RegisterMe(theCaptureModel);
         pmanager->AddDiscreteProcess(theCaptureProcess);
      }
      else if (particleName == "anti_neutron") {
        pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiNeutronInelasticProcess* theInelasticProcess =
                               new G4AntiNeutronInelasticProcess("inelastic");
         G4LEAntiNeutronInelastic* theInelasticModel =
                               new G4LEAntiNeutronInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "lambda") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4LambdaInelasticProcess* theInelasticProcess =
                                    new G4LambdaInelasticProcess("inelastic");
         G4LELambdaInelastic* theInelasticModel = new G4LELambdaInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_lambda") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiLambdaInelasticProcess* theInelasticProcess =
                                new G4AntiLambdaInelasticProcess("inelastic");
         G4LEAntiLambdaInelastic* theInelasticModel =
                                new G4LEAntiLambdaInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "sigma+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4SigmaPlusInelasticProcess* theInelasticProcess =
                                 new G4SigmaPlusInelasticProcess("inelastic");
         G4LESigmaPlusInelastic* theInelasticModel =
                                 new G4LESigmaPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "sigma-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4SigmaMinusInelasticProcess* theInelasticProcess =
                                 new G4SigmaMinusInelasticProcess("inelastic");
         G4LESigmaMinusInelastic* theInelasticModel =
                                 new G4LESigmaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_sigma+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiSigmaPlusInelasticProcess* theInelasticProcess =
                             new G4AntiSigmaPlusInelasticProcess("inelastic");
         G4LEAntiSigmaPlusInelastic* theInelasticModel =
                                 new G4LEAntiSigmaPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_sigma-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiSigmaMinusInelasticProcess* theInelasticProcess =
                            new G4AntiSigmaMinusInelasticProcess("inelastic");
         G4LEAntiSigmaMinusInelastic* theInelasticModel =
                                 new G4LEAntiSigmaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "xi0") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4XiZeroInelasticProcess* theInelasticProcess =
                            new G4XiZeroInelasticProcess("inelastic");
         G4LEXiZeroInelastic* theInelasticModel =
                                 new G4LEXiZeroInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "xi-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4XiMinusInelasticProcess* theInelasticProcess =
                            new G4XiMinusInelasticProcess("inelastic");
         G4LEXiMinusInelastic* theInelasticModel =
                                 new G4LEXiMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_xi0") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiXiZeroInelasticProcess* theInelasticProcess =
                            new G4AntiXiZeroInelasticProcess("inelastic");
         G4LEAntiXiZeroInelastic* theInelasticModel =
                                 new G4LEAntiXiZeroInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_xi-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiXiMinusInelasticProcess* theInelasticProcess =
                            new G4AntiXiMinusInelasticProcess("inelastic");
         G4LEAntiXiMinusInelastic* theInelasticModel =
                                 new G4LEAntiXiMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "deuteron") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4DeuteronInelasticProcess* theInelasticProcess =
                            new G4DeuteronInelasticProcess("inelastic");
         G4LEDeuteronInelastic* theInelasticModel =
                                 new G4LEDeuteronInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "triton") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4TritonInelasticProcess* theInelasticProcess =
                            new G4TritonInelasticProcess("inelastic");
         G4LETritonInelastic* theInelasticModel =
                                 new G4LETritonInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "alpha") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AlphaInelasticProcess* theInelasticProcess =
                            new G4AlphaInelasticProcess("inelastic");
         G4LEAlphaInelastic* theInelasticModel =
                                 new G4LEAlphaInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "omega-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4OmegaMinusInelasticProcess* theInelasticProcess =
                            new G4OmegaMinusInelasticProcess("inelastic");
         G4LEOmegaMinusInelastic* theInelasticModel =
                                 new G4LEOmegaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_omega-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiOmegaMinusInelasticProcess* theInelasticProcess =
                            new G4AntiOmegaMinusInelasticProcess("inelastic");
         G4LEAntiOmegaMinusInelastic* theInelasticModel =
                                 new G4LEAntiOmegaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
   }
}
*/

void PhysicsList::ConstructLeptHad() {;}

#include "G4Decay.hh"
void PhysicsList::ConstructGeneral()
{
  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) {
      pmanager ->AddProcess(theDecayProcess);
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }
}

void PhysicsList::SetCuts()
{
  if (verboseLevel >0)
  {
    G4cout << "PhysicsList::SetCuts:";
    G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
  }
  //   "G4VUserPhysicsList::SetCutsWithDefault" method sets
  //   the default cut value for all particle types
  SetCutsWithDefault();
}

/*#include "G4ParallelWorldScoringProcess.hh" void PhysicsList::AddScoringProcess(){

  G4int npw = paraWorldName.size();
  for ( G4int i = 0; i < npw; i++){
    G4ParallelWorldScoringProcess* theParallelWorldScoringProcess
      = new G4ParallelWorldScoringProcess("ParaWorldScoringProc");
    theParallelWorldScoringProcess->SetParallelWorld(paraWorldName[i]);

    theParticleIterator->reset();
    while( (*theParticleIterator)() ){
      G4ParticleDefinition* particle = theParticleIterator->value();
      if ( !particle->IsShortLived() ){
        G4ProcessManager* pmanager = particle->GetProcessManager();
        pmanager->AddProcess(theParallelWorldScoringProcess);
        pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxAtRest);
        pmanager->SetProcessOrdering(theParallelWorldScoringProcess,idxAlongStep,1);
        pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxPostStep);
      }
    }
  }

} */

XXXXXXXXXXXXXXXXXXXXX DETECTORcoNSTRUCTION.CC XXXXXXXXXXX

// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // $Id: DetectorConstruction.cc,v 1.6 2006/10/04 09:56:03 vnivanch Exp $ // GEANT4 tag $Name: geant4-09-01 $ // ///////////////////////////////////////////////////////////////////////// // // DetectorConstruction // // Created: 31.01.2003 V.Ivanchenko // // Modified: // 04.06.2006 Adoptation of hadr01 (V.Ivanchenko) // //////////////////////////////////////////////////////////////////////// //

#include "DetectorConstruction.hh"

#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"

#include "G4RunManager.hh"

#include "G4GeometryManager.hh"
#include "G4PhysicalVolumeStore.hh"
#include "G4LogicalVolumeStore.hh"
#include "G4SolidStore.hh"

#include "G4VisAttributes.hh"
#include "G4Colour.hh"

#include "G4UnitsTable.hh"
#include "G4ios.hh"

#include "CheckVolumeSD.hh"
#include "TargetD2SD.hh"
#include "G4SDManager.hh"
#include "G4NistManager.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
DetectorConstruction::DetectorConstruction()
{
  logicTargetD2 = 0;
  logicCheck  = 0;
  logicWorld  = 0;

  targetMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_Ta");
  worldMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic"); 
  // Prepare sensitive detectors
  checkSD = new CheckVolumeSD("checkSD");
  (G4SDManager::GetSDMpointer())->AddNewDetector( checkSD );

  targetD2SD = new TargetD2SD("targetD2SD");
  (G4SDManager::GetSDMpointer())->AddNewDetector( targetD2SD );

}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... DetectorConstruction::~DetectorConstruction() { }

  G4VPhysicalVolume* DetectorConstruction::Construct()
{
//
  ConstructMaterials();

// World

//  G4Box* solidW = new G4Box("World",1.2*m,1.2*m,1.2*m);
  G4Box* solidW = new G4Box("World",10.*cm,10.*cm,10.*cm);
  logicWorld = new G4LogicalVolume( solidW,worldMaterial,"World_L");
  G4VPhysicalVolume* world = new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,0.*cm),
                                       logicWorld,"World_P",0,false,0);
// Check volume

  G4Box* solidC = new G4Box("Check",7.0*cm,7.0*cm,7.0*cm);
  logicCheck = new G4LogicalVolume( solidC,Vacuum,"Check_L");
   new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,0.*cm),logicCheck,"Check_P",logicWorld,false,0);
  logicCheck->SetSensitiveDetector(checkSD);

// Deuterium Gas volume
   G4Tubs* solidD2 = new G4Tubs("TargetD2",0.*cm,0.1603*cm,
                                              1.5*cm,0.,360.*deg);
  logicTargetD2 = new G4LogicalVolume(solidD2, //its Solid
//                                  DeuteriumGas, //its material
//                                   air,
                                   tantalum,
                                  "TargetD2",// its name
                                  0,0,0);
    new G4PVPlacement(0,G4ThreeVector(0.0*cm,0.0*cm,0.0*cm),
                logicTargetD2,"TargetD2",logicCheck,false,0);

  //

  logicTargetD2->SetSensitiveDetector(targetD2SD);

  // colors
  logicWorld->SetVisAttributes(G4VisAttributes::Invisible);

  G4VisAttributes* regWcolor = new G4VisAttributes(G4Colour(0.3, 0.3, 0.3));
  regWcolor->SetForceWireframe(true);
  logicCheck->SetVisAttributes(regWcolor);

  G4VisAttributes* regD2color = new G4VisAttributes(G4Colour(1.0, 0.0, 0.0));
  regD2color->SetForceWireframe(true);
  logicTargetD2->SetVisAttributes(regD2color);

return world; }

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
void DetectorConstruction::SetTargetMaterial(const G4String& mat)
{
  // search the material by its name
  G4Material* material = G4NistManager::Instance()->FindOrBuildMaterial(mat);

  if (material && material != targetMaterial) {
    targetMaterial = material;
    G4RunManager::GetRunManager()->PhysicsHasBeenModified();
  }
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
void DetectorConstruction::SetWorldMaterial(const G4String& mat)
{
  // search the material by its name
  G4Material* material = G4NistManager::Instance()->FindOrBuildMaterial(mat);

  if (material && material != worldMaterial) {
    worldMaterial = material;
    if(logicWorld) logicWorld->SetMaterial(worldMaterial);
    G4RunManager::GetRunManager()->PhysicsHasBeenModified();
  }
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......                                                                                
void DetectorConstruction::UpdateGeometry()
{
  G4RunManager::GetRunManager()->DefineWorldVolume(Construct());
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
void DetectorConstruction::ConstructMaterials()
{
  G4double a;
  G4double z;
  G4double density,pressure;
  G4double weightRatio,temperature;
  G4String name;
  G4String symbol;
  G4int nElem;

  // Deuterium Gas ( with pressure 7.0 atm and room temp 293.15K)

  DeuteriumGas = new G4Material("DeuteriumGas", z=1, a=2.014*g/mole,
            density= 1.24e-3*g/cm3,kStateGas, 293.15*kelvin, 7.0*atmosphere);

   // elements for mixtures and compounds
  a = 1.01*g/mole;
  G4Element* elH = new G4Element(name="Hydrogen", symbol="H", z=1., a);
  a = 12.01*g/mole;
  G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
  a = 14.01*g/mole;
  G4Element* elN = new G4Element(name="Nitrogen", symbol="N", z=7., a);
  a = 16.00*g/mole;
  G4Element* elO = new G4Element(name="Oxigen", symbol="O", z=8., a);
  a = 183.84*g/mole;
  G4Element* elW = new G4Element(name="Tungsten", symbol="W", z=74., a);
  a = 55.845*g/mole;
  G4Element* elFe = new G4Element(name="Iron", symbol="Fe", z=26., a);
  a = 58.9332*g/mole;
  G4Element* elCo = new G4Element(name="Cobalt", symbol="Co", z=27., a);
  a = 58.6934*g/mole;
  G4Element* elNi = new G4Element(name="Nickel", symbol="Ni", z=28., a);
  a = 54.9381*g/mole;
  G4Element* elMn = new G4Element(name="Manganese", symbol="Mn", z=25., a);
  a = 59.9961*g/mole;
  G4Element* elCr = new G4Element(name="Chromium", symbol="Cr", z=24., a);
  a = 95.94*g/mole;
  G4Element* elMo = new G4Element(name="Molybdenum", symbol="Mo", z=42., a);

// Vaccum
  density     = universe_mean_density;
  pressure    = 3.e-18*pascal;
  temperature = 2.73*kelvin;
  Vacuum = new G4Material(name="Galactic", z=1., a=1.01*g/mole,
                                  density,kStateGas,temperature,pressure);
  // Air
  density = 1.29*mg/cm3;
  air = new G4Material(name="Air", density, nElem=2);
  air->AddElement(elN, weightRatio=.7);
  air->AddElement(elO, weightRatio=.3);

  // Scintillator
  density = 1.032*g/cm3;
  scintillator = new G4Material(name="Scintillator", density, nElem=2);
  scintillator->AddElement(elC, 9);
  scintillator->AddElement(elH, 10);

 // Mouse material
   density = 1.00*g/cm3;
   MouseMat = new G4Material(name="MouseMat", density, nElem=2);
   MouseMat->AddElement(elH, 2);
   MouseMat->AddElement(elO, 1);

 // HavarFoil
  density = 8.30*g/cm3;
  HavarFoil = new G4Material(name="HavarFoil",density, nElem=8);
  HavarFoil->AddElement(elC, weightRatio=.002);
  HavarFoil->AddElement(elCo, weightRatio=.420);
  HavarFoil->AddElement(elNi, weightRatio=.127);
  HavarFoil->AddElement(elMn, weightRatio=.016);
  HavarFoil->AddElement(elCr, weightRatio=.195);
  HavarFoil->AddElement(elFe, weightRatio=.191);
  HavarFoil->AddElement(elW, weightRatio=.027);
  HavarFoil->AddElement(elMo, weightRatio=.022);
 // Tantalum
  a = 180.9479*g/mole;
  density = 16.4*g/cm3;
  tantalum = new G4Material(name="Tantalum", z=73., a, density);

// Stainless Steel
  a = 55.845*g/mole;
  density = 7.875*g/cm3;
  StainlessSteel = new G4Material(name="Iron", z=26., a, density);

  G4cout << G4endl << "The materials defined are : " << G4endl << G4endl;
  G4cout << *(G4Material::GetMaterialTable()) << G4endl;
}
void DetectorConstruction::DestroyMaterials()
{
  // Destroy all allocated elements and materials
  size_t i;
  G4MaterialTable* matTable = (G4MaterialTable*)G4Material::GetMaterialTable();
  for(i=0;i<matTable->size();i++)
  { delete (*(matTable))[i]; }
  matTable->clear();
  G4ElementTable* elemTable = (G4ElementTable*)G4Element::GetElementTable();
  for(i=0;i<elemTable->size();i++)
  { delete (*(elemTable))[i]; }
  elemTable->clear();
}

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // $Id: StackingAction.cc,v 1.5 2006/10/04 09:56:03 vnivanch Exp $ // GEANT4 tag $Name: geant4-09-01 $ // ///////////////////////////////////////////////////////////////////////// // // StackingAction // // Created: 31.04.2006 V.Ivanchenko // // Modified: // 04.06.2006 Adoptation of hadr01 (V.Ivanchenko) // //////////////////////////////////////////////////////////////////////// //

#include "StackingAction.hh"

#include "StackingMessenger.hh"

#include "G4Track.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
StackingAction::StackingAction()
{
  stackMessenger = new StackingMessenger(this);
  killSecondary  = false;
  pname          = "";
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
StackingAction::~StackingAction()
{
  delete stackMessenger;
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
G4ClassificationOfNewTrack
StackingAction::ClassifyNewTrack(const G4Track* aTrack)
{
  G4ClassificationOfNewTrack status = fUrgent;

  const G4String name = aTrack->GetDefinition()->GetParticleName();
      if(aTrack->GetTrackID() >1){
  G4cout << "Track #" << aTrack->GetTrackID() << " of " << name
          << " E(MeV)= " << aTrack->GetKineticEnergy()/MeV
           << " ID= " << aTrack->GetParentID()
            << G4endl;
          }
  if(aTrack->GetTrackID() == 1) return status;

  //stack or delete secondaries
  if (killSecondary)      status = fKill;
  else if(pname == name)  status = fKill;

return status; }

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....

1 Feedback: Re: Neutrons from deuteron on a gas target   (Gunter Folger - 29 Feb, 2008)
(_ None: Re: Neutrons from deuteron on a gas target   (gin chen - 29 Feb, 2008)
(_ Feedback: Re: Neutrons from deuteron on a gas target   (Gunter Folger - 29 Feb, 2008)
(_ None: Re: Neutrons from deuteron on a gas target   (gin chen - 29 Feb, 2008)
(_ None: Re: Neutrons from deuteron on a gas target   (gin chen - 02 Mar, 2008)
None Neutrons from deuteron on a gas target  by gin chen <gin chen>,   14 Feb, 2008

Hi,

I am trying to use genat4.9.1 to create low energy neutrons ( up to 20 MeV) from deuteron beam ( energy ~ 20 MeV) on a gas ( Deuterium). For this I use the same PhysicsList from

examples/extended/radioactivedecay/exrdm/exrdmPhysListHadron.cc

The reason, after the generation of neutrons, I need to study the deposit of energy on a different material due to neutrons.

When I try it, I don't see any neutrons coming out from deuteron on gas. Can I use this for my purpose? Is there any other example fro this purpose?

Thank you,

Gin

// //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

#include "exrdmPhysListHadron.hh"

#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"

#include "G4TheoFSGenerator.hh"

#include "G4ExcitationHandler.hh"
#include "G4Evaporation.hh"
#include "G4FermiBreakUp.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4PreCompoundModel.hh"
#include "G4QGSModel.hh"
#include "G4QGSParticipants.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"

#include "G4LElastic.hh"
#include "G4LFission.hh"
#include "G4LCapture.hh"

#include "G4CascadeInterface.hh"

#include "G4BinaryCascade.hh"
#include "G4BinaryLightIonReaction.hh"

//HPNeutron

#include "G4NeutronHPElastic.hh"
#include "G4NeutronHPElasticData.hh"
#include "G4NeutronHPCapture.hh"
#include "G4NeutronHPCaptureData.hh"
#include "G4NeutronHPInelastic.hh"
#include "G4NeutronHPInelasticData.hh"
//c-s
#include "G4TripathiCrossSection.hh"
#include "G4IonsShenCrossSection.hh"
#include "G4ProtonInelasticCrossSection.hh"
#include "G4NeutronInelasticCrossSection.hh"

// RadioactiveDecay

#include "G4RadioactiveDecay.hh"
#include "G4GenericIon.hh"

exrdmPhysListHadron::exrdmPhysListHadron(const G4String& name)
  :  G4VPhysicsConstructor(name)
{}

exrdmPhysListHadron::~exrdmPhysListHadron() {}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void exrdmPhysListHadron::ConstructProcess() {

  G4ProcessManager * pManager = 0;  // this will be the model class for high energies
  G4TheoFSGenerator * theTheoModel = new G4TheoFSGenerator;
  // all models for treatment of thermal nucleus 
  G4Evaporation * theEvaporation = new G4Evaporation;
  G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
  G4StatMF * theMF = new G4StatMF;
  // Evaporation logic
  G4ExcitationHandler * theHandler = new G4ExcitationHandler;
  theHandler->SetEvaporation(theEvaporation);
  theHandler->SetFermiModel(theFermiBreakUp);
  theHandler->SetMultiFragmentation(theMF);
  theHandler->SetMaxAandZForFermiBreakUp(12, 6);
  theHandler->SetMinEForMultiFrag(5*MeV);  
  // Pre equilibrium stage 
  G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);

  // a no-cascade generator-precompound interaface
  G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInter
face;
  theCascade->SetDeExcitation(thePreEquilib);  

  // here come the high energy parts
  // the string model; still not quite according to design - Explicite use of th
e forseen interfaces     
  G4VPartonStringModel * theStringModel;
  theStringModel = new G4QGSModel<G4QGSParticipants>;
  theTheoModel->SetTransport(theCascade);
  theTheoModel->SetHighEnergyGenerator(theStringModel);
  theTheoModel->SetMinEnergy(10*GeV);  // 15 GeV may be the right limit
  theTheoModel->SetMaxEnergy(100*TeV);

  G4VLongitudinalStringDecay * theFragmentation = new G4QGSMFragmentation;
  G4ExcitedStringDecay * theStringDecay = new G4ExcitedStringDecay(theFragmentat
ion);
  theStringModel->SetFragmentationModel(theStringDecay);

  // Elastic Process

  theElasticProcess.RegisterMe(new G4LElastic());

  // ---------------------------------------------------------------------------
  // Hadron elastic process
  // for all particles except neutrons

  theParticleIterator->reset();
  while( (*theParticleIterator)() ) {
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4String particleName = particle->GetParticleName();
    if (particleName != "neutron") {  
      G4ProcessManager* pManager = particle->GetProcessManager();
      if (particle->GetPDGMass() > 110.*MeV && theElasticProcess.IsApplicable(*p
article)
          && !particle->IsShortLived()) { 
        pManager->AddDiscreteProcess(&theElasticProcess);
        //
        //      G4cout << "### Elastic model are registered for " 
        //       << particle->GetParticleName()
        //       << G4endl;
      }
    }
  }
  // Proton
  pManager = G4Proton::Proton()->GetProcessManager();
    // add inelastic process
  // Binary Cascade
  G4BinaryCascade * theBC = new G4BinaryCascade;
  theBC->SetMaxEnergy(10.5*GeV);
  theProtonInelastic.RegisterMe(theBC);
  // Higher energy
  theProtonInelastic.RegisterMe(theTheoModel);
  // now the cross-sections.
  G4ProtonInelasticCrossSection * theProtonData = new G4ProtonInelasticCrossSect
ion;
  theProtonInelastic.AddDataSet(theProtonData);
  pManager->AddDiscreteProcess(&theProtonInelastic);

 // Neutron
  pManager = G4Neutron::Neutron()->GetProcessManager();
  // add process
  // elastic scattering
  theNeutronElasticProcess = 
    new G4HadronElasticProcess();
  G4LElastic* theElasticModel1 = new G4LElastic;
  G4NeutronHPElastic * theElasticNeutron = new G4NeutronHPElastic;
  theNeutronElasticProcess->RegisterMe(theElasticModel1);
  theElasticModel1->SetMinEnergy(19.*MeV);
  theNeutronElasticProcess->RegisterMe(theElasticNeutron);
  theElasticNeutron->SetMaxEnergy(20.*MeV);
  G4NeutronHPElasticData * theNeutronData = new G4NeutronHPElasticData;
  theNeutronElasticProcess->AddDataSet(theNeutronData);
  pManager->AddDiscreteProcess(theNeutronElasticProcess);
  // inelastic 
  G4NeutronHPInelastic * theHPNeutronInelasticModel =
    new G4NeutronHPInelastic;
  theHPNeutronInelasticModel->SetMaxEnergy(20.*MeV);
  theNeutronInelastic.RegisterMe(theHPNeutronInelasticModel);
  G4NeutronHPInelasticData * theNeutronData1 = new G4NeutronHPInelasticData;
  theNeutronInelastic.AddDataSet(theNeutronData1);
  // binary
  G4BinaryCascade * neutronBC = new G4BinaryCascade;
  neutronBC->SetMinEnergy(19.*MeV);
  neutronBC->SetMaxEnergy(10.5*GeV);
  theNeutronInelastic.RegisterMe(neutronBC);
  // higher energy
  theNeutronInelastic.RegisterMe(theTheoModel);  
  // now the cross-sections.
  G4NeutronInelasticCrossSection * theNeutronData2 = new G4NeutronInelasticCross
Section;
  theNeutronInelastic.AddDataSet(theNeutronData2);
  pManager->AddDiscreteProcess(&theNeutronInelastic);
  // fission
  theFissionProcess =
    new G4HadronFissionProcess;
  G4LFission* theFissionModel = new G4LFission;
  theFissionProcess->RegisterMe(theFissionModel);
  pManager->AddDiscreteProcess(theFissionProcess);
  //capture  
  theCaptureProcess =
    new G4HadronCaptureProcess;
  G4LCapture* theCaptureModel = new G4LCapture;
  theCaptureProcess->RegisterMe(theCaptureModel);
  theCaptureModel->SetMinEnergy(19.*MeV);
  G4NeutronHPCapture * theHPNeutronCaptureModel = new G4NeutronHPCapture;
  theCaptureProcess->RegisterMe(theHPNeutronCaptureModel);
  G4NeutronHPCaptureData * theNeutronData3 = new G4NeutronHPCaptureData;
  theCaptureProcess->AddDataSet(theNeutronData3);
  pManager->AddDiscreteProcess(theCaptureProcess);
  // now light ions
  // light Ion BC
  G4BinaryLightIonReaction * theIonBC= new G4BinaryLightIonReaction;
  theIonBC->SetMinEnergy(1*MeV);
  theIonBC->SetMaxEnergy(20*GeV);
  G4TripathiCrossSection * TripathiCrossSection= new G4TripathiCrossSection;
  G4IonsShenCrossSection * aShen = new G4IonsShenCrossSection;

  // deuteron
  pManager = G4Deuteron::Deuteron()->GetProcessManager();
  theDeuteronInelasticProcess = 
    new G4DeuteronInelasticProcess("inelastic");
  //  G4LEDeuteronInelastic* theDeuteronInelasticModel = 
  //   new G4LEDeuteronInelastic;
  // theDeuteronInelasticModel->SetMaxEnergy(100*MeV);
  theDeuteronInelasticProcess->AddDataSet(TripathiCrossSection);
  theDeuteronInelasticProcess->AddDataSet(aShen);
  //  theDeuteronInelasticProcess->RegisterMe(theDeuteronInelasticModel);
  theDeuteronInelasticProcess->RegisterMe(theIonBC);
  theDeuteronInelasticProcess->RegisterMe(theTheoModel);
  pManager->AddDiscreteProcess(theDeuteronInelasticProcess);
  // triton
  pManager = G4Triton::Triton()->GetProcessManager();
  theTritonInelasticProcess = 
    new G4TritonInelasticProcess("inelastic");
  //  G4LETritonInelastic* theTritonInelasticModel = 
  //  new G4LETritonInelastic;
  //theTritonInelasticModel->SetMaxEnergy(100*MeV);
  theTritonInelasticProcess->AddDataSet(TripathiCrossSection);
  theTritonInelasticProcess->AddDataSet(aShen);
  //  theTritonInelasticProcess->RegisterMe(theTritonInelasticModel);
  theTritonInelasticProcess->RegisterMe(theIonBC);
  theTritonInelasticProcess->RegisterMe(theTheoModel);
  pManager->AddDiscreteProcess(theTritonInelasticProcess);
  // alpha
  pManager = G4Alpha::Alpha()->GetProcessManager();
  theAlphaInelasticProcess = 
    new G4AlphaInelasticProcess("inelastic");
  // G4LEAlphaInelastic* theAlphaInelasticModel = 
  //  new G4LEAlphaInelastic;
  //theAlphaInelasticModel->SetMaxEnergy(100*MeV);
  theAlphaInelasticProcess->AddDataSet(TripathiCrossSection);
  theAlphaInelasticProcess->AddDataSet(aShen);
  //  theAlphaInelasticProcess->RegisterMe(theAlphaInelasticModel);
  theAlphaInelasticProcess->RegisterMe(theIonBC);
  theAlphaInelasticProcess->RegisterMe(theTheoModel);
  pManager->AddDiscreteProcess(theAlphaInelasticProcess);
  // GenericIon
  pManager = G4GenericIon::GenericIon()->GetProcessManager();
  // need to add the elastic explicitly
  pManager->AddDiscreteProcess(&theElasticProcess);
  theIonInelasticProcess = 
    new G4IonInelasticProcess();
  theIonInelasticProcess->AddDataSet(TripathiCrossSection);
  theIonInelasticProcess->AddDataSet(aShen);
  //  G4BinaryLightIonReaction * theGenIonBC= new G4BinaryLightIonReaction;
  // theGenIonBC->SetMinEnergy(0*MeV);
  //theGenIonBC->SetMaxEnergy(20*GeV);
  theIonInelasticProcess->RegisterMe(theIonBC);
  theIonInelasticProcess->RegisterMe(theTheoModel);
  pManager->AddDiscreteProcess(theIonInelasticProcess);
  // Add RadioactiveDecay Process

  G4RadioactiveDecay*  theRadioactiveDecay = new G4RadioactiveDecay();
  G4GenericIon* ion = G4GenericIon::GenericIon();
  pManager->AddProcess(theRadioactiveDecay, 0, -1, 3);

}

1 Feedback: Re: Neutrons from deuteron on a gas target   (Gunter Folger - 15 Feb, 2008)
3 None: Re: Neutrons from deuteron on a gas target   (Dennis H. Wright - 07 Apr, 2008)
Question Print out of the energy cuts implemented in the PhysicsLists   Keywords: PhysicsList printout
by Angela Lucaci-Timoce <Angela Lucaci-Timoce>,   17 Jan, 2008

Hello,

I'm new to GEANT4, and I have a general question. Is there a way of printing out the energy cuts which are implemented in the physics list?

For example, in HadronPhysicsQGSP_BERT.cc, there is:

  theLEPNeutron->SetMinInelasticEnergy(9.5*GeV);
  theLEPNeutron->SetMaxInelasticEnergy(25*GeV);  

and so on. I'm interested in printing out these energy limits.

I tried with G4VUserPhysicsList::DumpList() and DumpCutValuesTable(), but these do not print out the numbers I'm interested in.

Thank you very much for the help, Angela

1 Feedback: Re: Print out of the energy cuts implemented in the PhysicsLists   (Gunter Folger - 15 Feb, 2008)
None neutron energy gain with Hadronelastic process  Keywords: neutron, energy, physicslist
by glinec <glinec>,   10 Jan, 2008
Dear all,

Thank you for this very useful application. I've been using it for different purpose during the past years.
Now I try to use neutrons, but I'm facing a problem when tracking particles.

In this simulation, an initial 2 MeV neutron looses progressively energy in a water volume (target).
For energies < 1 eV, the neutron energy often increases.

*********************************************************************************************************
* G4Track Information:   Particle = neutron,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
   15     13.6     14.1    1e+03  1.49e-08        0        0  1.05e+03      Target initStep
   16     25.4     6.76 1.01e+03  2.12e-08        0     14.9  1.07e+03      Target HadronElastic
    :----- List of 2ndaries - #SpawnInStep=  1(Rest= 0,Along= 0,Post= 1), #SpawnTotal=  1 ---------------
    :      25.4      6.76  1.01e+03  5.56e-08             proton
    :----------------------------------------------------------------- EndOf2ndaries Info ---------------
Track (trackID 1, parentID 0) is processed with stopping code 4
### pop requested out of 2 stacked tracks.

And the energy of each neutron goes up and down until it reaches the end of the world.

What do I do wrong ? Bad physics list ? Incorrect distribution functions ?
I'm basically using the physics list from advanced/underground_physics without the scintillation part. (HPelastic, HPinelastic and HPcapture).
Therefore, I've added UserCuts in energy to stop the energy oscillations. This forces a decay and gamma+anti-neutrino.

Is there a correct way to simulate this neutron propagation ?

Best regards
Yannick
References : geant4.9.1 G4NDL3.12

2 None: Re: neutron energy gain with Hadronelastic process   (Koi, Tatsumi - 10 Jan, 2008)
(_ None: Re: neutron energy gain with Hadronelastic process   (glinec - 10 Jan, 2008)
None The problem of CrossSection?  Keywords: CrossSection
by yuchun zhang <zhangyc@ihep.ac.cn>,   20 Dec, 2007

Hello,I am a novice at geant 4.,I simulate Gamma(2GEV) 
interaction with a target(C) in order to get pion using
 G4.9.0.and the very important things that I also want 
to get is the CrossSection information of this process!
 Of course It may be use the GetCrossSection() function 
and #include “G4CrossSectionDataStore.hh”  
,G4double GetCrossSection(const G4DynamicParticle *,const G4Material *)
 ..etc but how to use them ? I think it may be a very easy question. 
Could someone give me some instructions or examples? 
I would appreciate any help.... 
Best regards!! 

None Yet another radioactive decay question.  Keywords: co 57 decay source radioactive
by Burcin Donmez <burcind@umich.edu>,   16 Dec, 2007

I know this has been asked a lot and there are answers in the forum. But I tried the suggestions and I still can not do simple radioactive decay of Co 57.

I looked the exRDM example and add the following to my PhysicsList file

-------------
#include "G4RadioactiveDecay.hh"
#include "G4GenericIon.hh"
void PhysicsList::ConstructGeneral()
{
  // Add Decay Process
  G4Decay* fDecayProcess = new G4Decay();
  G4RadioactiveDecay*  theRadioactiveDecay = new G4RadioactiveDecay();
  G4GenericIon* ion = G4GenericIon::GenericIon();

  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();

    if (particle == ion) {
      pmanager->AddProcess(theRadioactiveDecay, 0, -1, 3);

    } else if (fDecayProcess->IsApplicable(*particle)) { 

      pmanager ->AddProcess(fDecayProcess);

      // set ordering for PostStepDoIt and AtRestDoIt
      pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);

    }
  } 
}
--------------
and tried the following macro (only part of it is shown)

-------------------- ## GPS

/gps/particle ion /gps/ion 27 57 0 0

#/gps/ene/type Mono
#/gps/energy 122.0 keV
/gps/energy 0 keV /gps/source/intensity 1.
# second isotope Cs137 with strength of 1.
#/gps/ion 55 137 0 662
#/gps/direction 0 0 1

#/gps/pos/type Plane
#/gps/pos/shape Square
#/gps/pos/centre 10.0 10.0 -1. mm
#/gps/pos/halfx 0.01 cm
#/gps/pos/halfy 0.01 cm

/gps/source/list

/run/beamOn 10000

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

and i'm getting Bus error when i tried to run after successful compile.

What am I doing wrong?

Thanks a lot.

Burçin

1 None: Re: Yet another radioactive decay question.   (Vladimir IVANTCHENKO - 17 Dec, 2007)
1 None: Re: Yet another radioactive decay question.   (Burcin Donmez - 17 Dec, 2007)
2 None: Re: Yet another radioactive decay question.   (Kevin Xie - 04 Jan, 2008)
None Very high X-ray fraction in germanium detector  Keywords: germanium high xray fraction photoelectric
by David Oxley <David Oxley>,   13 Dec, 2007

Hey ,

I am running a simulation using a 511keV point
 source 6.5 cm away from a 20cm thick germanium detector.

I run for 100,000 events and get what seems to be far too many events in the germanium x-ray peak.

I have approx 1300 events at 11keV and only 90 at 500 keV.

It seems that every x-ray is being treated as an energy deposit in its own right, although a real detector would not be able to separate it from the main charge deposited.

does anybody have an idea how to stop it doing that ?

Thanks for any help and apologies if this is really stupid.

Dave

1 None: Re: Very high X-ray fraction in germanium detector   (Luciano - 24 Jan, 2008)
Question spontaneous fission  Keywords: fission
by Alain Ferragut <Alain Ferragut>,   03 Dec, 2007

Hi, Does G4 make the spontaneous fission of a non excited nucleus ?

Thanks !

1 None: Re: spontaneous fission   (Luciano - 06 Dec, 2007)
(_ None: Re: spontaneous fission   (Alain Ferragut - 07 Dec, 2007)
Question data file not found error  by Sang-jun, Lee <3sisters@korea.com>,   28 Nov, 2007

Hello

I have a problem in execution of an alpha decay simulation.

It has no problem in compiling but it shows error message and stops as below.

G4VUserPhysicsList::BuildPhysicsTable does not retrieve Cut Table but calculate G4VCrossSectionHandler - data file: /scratch3/ssmyung/geant4.7.0.p01/data/G4EMLOW2.3/phot/pe-cs-79.dat not found

But the file is in its right place where the message refers.

Any help will be highly appreciated. Thanks.

Question Questions about scintillation phenomenon?  Keywords: scintillation mechanism
by Shahrokh <Shahrokh>,   25 Nov, 2007
Hi,
I have some questions regarding scintillation
phenomenon. 

I want to simulate NaI(Tl) scintillation detector. For
this purpose, I refer to an example of the
scintillation effect given in /novice/N06 example in
Geant4 toolkit. At this application, I notice that the
scintillation material is water. The optical and
scintillation properties of water, that include
refractive index, absorption length, light photon
emission spectrum, decay time and fast and slow
scintillation components, are stored in a
G4MaterialPropertiesTable pointer. About these
empirical properties, I have some questions as
following:

1. Spectral distribution:
- What does photonEnery[32] matrix consisted of? 
- In other words, do the elements of photonEnery[32]
matrix include light photons energy emitted by water?
- Can I conclude that the water emits 32 light photons
with the energies given in this matrix?
- If it is true, I need to have the details of NaI(Tl)
emission spectrum light produced by gamma interaction
in NaI(Tl). Although I find this spectrum curve of
NaI(Tl) in the textbooks related to radiation
detection titled  “Radiation detection and
measurement” by Glenn F. Knoll, but this curve does
not include the details of each NaI(Tl) line spectrum
such as the wavelengths of light emission and its
intensities as are needed. 
Additionally, I have come the following sentence in a
across book titled “The Theory and Practice of
Scintillation Counting” by J. B. Birks, 1964:
“The scintillation emission spectrum is mainly
characteristics of the luminescence centre, i.e. Tl+
ion in the case of the thallium-activated crystal.”
Based on the above phrase, I would like to raise the
following questions:
- Is it correct to use scintillation emission spectrum
of Tl+ ion for photonEnergy matrix? 
- I get the 65 lines of Tl I from NIST atomic spectra
database site. Although I know that the wavelength of
maximum emission NaI(Tl) is 415 nm as it is mentioned
in the radiation detection textbooks, so I expect to
see this wavelength through 65 lines of Tl I, but I do
not find this wavelength mentioned anywhere through 65
lines of Tl I. Can anyone explain it to me?
In addition, I think that the intensity of the
spectral lines emitted by a crystal (e.g. NaI(Tl)) is
related to the energy of gamma ray excitation. If it
is true, then I need to have the emission spectrum as
a function of gamma ray energy. Do you agree with me?

2. Refractive index:
I need to have the refractive index of NaI(Tl)
crystal. For this purpose, refractive index data of
pure NaI crystal are available in the following
article: “Refractive Index of Alkali Halides and Its
Wavelength and Temperature Derivatives” published J.
Phys. Chem. Ref. Data, vol. 5, No. 2, 1976
p329-429.Since this data are related to pure NaI
crystal, can I use it for Thallium-activated NaI
crystal? 

3. Absorption length: 
For the implementation of optical photon bulk
absorption, I need to have the absorption length data
for the spectral lines emitted by NaI(Tl) crystal.
Where can I get this data?

4. Fast and slow scintillation components:
In the N06 example, I notice that the scintillation
water must consist of two components: a fast component
with decay time of 1.0 ns and a slow component with
10.0 ns as it is shown in the following lines:
myMPT->AddProperty(“FASTTIMECONSTANT”,1.*ns);
myMPT->AddProperty(“SLOWIMECONSTANT”,10.*ns);
…
Water->SetMaterialPropertiesTable(myMPT);

- Although I see two matrixes including 32 elements
with the name of ScintilFast [32] and ScintilSlow
[32], but I do not exactly know what these matrixes
consist of. Please explain to me. 
- Are the emission spectrum lines of slow
scintillation component similar to that of the fast
component? 
- If it is the case, are the relative intensities of
the fast and slow emission spectra different from each
other?
- Again if that is case, can I conclude that
photonEnery[32] matrix consists of the emission
spectrum lines of slow and fast scintillation
components and additionally ScintilFast [32] and
ScintilSlow [32] matrixes include the relative
intensities of the emission spectrum lines of slow and
fast scintillation components? 
- Is it correctly defined?

About NaI(Tl) crystal, I notice that this crystal
exhibits a fast component with the decay time of 250
ns and a slow component of 620 ns. Are these
parameters constant in NaI(Tl) crystal produced in the
world? Also I do not have the information about the
emission spectrum lines of slow and fast scintillation
components from NaI(Tl) and also their relative
intensities. Please guide me.  

5. Resolution scale: 
Is the resolution a function of radiation source? In
other words, is the resolution of NaI(Tl) crystal for
Co-60 gamma radiation similar to that of Cs-137? I
think that the NaI(Tl) crystal resolution is a
function of gamma ray energy. Therefore, I need to set
this parameter (RESOLUTIONSCALE) for each gamma ray
source. Is it true?

6. Reflection mechanisms: 
In the NaI(Tl)that I have used, the material of
crystal housing is Aluminum . I do not know the
constant values of the following parameters:
SPECULARLOBECONSTANT, SPECULARSPIKECONSTANT,
BACKSCATTERCONSTANT, DIFFUSELOBECONSTANT, REFLECTIVITY
and EFFICIEINCY. 
In addition, I do not find any explanations about the
meaning of the reflectivity and efficiency parameters.
. Where can I get this data?

Please help me for understanding these subjects.
Your sincerely
Shahrokh

None physics list of single pion photoproduction??---geant4   by yuchun zhang <zhangyc@ihep.ac.cn>,   25 Nov, 2007

Hello! I am a novice at geant4.recently,I have simulated the behavior of 1-2 GeV gammas hiting a thin carbon-targets in order to get pion (that is single pion photoproduction ƒÁ+n/p¨ƒÎ(-/+)+p/n ) (using geant4.9.0) however I could't find any similar example ,I modified N02 and used physiclistsfEM as follows:

void ExN02PhysicsList::ConstructEM() 
{ 
 theParticleIterator->reset(); 
 while( (*theParticleIterator)() ){ 
   G4ParticleDefinition* particle = theParticleIterator->value(); 
   G4ProcessManager* pmanager = particle->GetProcessManager(); 
   G4String particleName = particle->GetParticleName(); 

   if (particleName == "gamma") { 
     // gamma         
     pmanager->AddDiscreteProcess(new G4PhotoElectricEffect); 
     pmanager->AddDiscreteProcess(new G4ComptonScattering); 
     pmanager->AddDiscreteProcess(new G4GammaConversion); 

   } else if (particleName == "e-") { 
     //electron 
     pmanager->AddProcess(new G4MultipleScattering,-1, 1,1); 
     pmanager->AddProcess(new G4eIonisation,       -1, 2,2); 
     pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);       

   } else if (particleName == "e+") { 
     //positron 
     pmanager->AddProcess(new G4MultipleScattering,-1, 1,1); 
     pmanager->AddProcess(new G4eIonisation,       -1, 2,2); 
     pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3); 
     pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4); 

   } else if( particleName == "mu+" || 
              particleName == "mu-"    ) { 
     //muon   
     pmanager->AddProcess(new G4MultipleScattering,-1, 1,1); 
     pmanager->AddProcess(new G4MuIonisation,      -1, 2,2); 
     pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 3,3); 
     pmanager->AddProcess(new G4MuPairProduction,  -1, 4,4);       

   } else if ((!particle->IsShortLived()) && 
           (particle->GetPDGCharge() != 0.0) && 
           (particle->GetParticleName() != "chargedgeantino")) { 
     //all others charged particles except geantino 
     pmanager->AddProcess(new G4MultipleScattering,-1, 1,1); 
     pmanager->AddProcess(new G4hIonisation,       -1, 2,2); 
     //step limit 
     pmanager->AddProcess(new G4StepLimiter,       -1,-1,3);         
     ///pmanager->AddProcess(new G4UserSpecialCuts,   -1,-1,4);   
   } 
 } 
} 

but I canft get any information about pionminus or pionplus Could I use hadronphysic or Bertini cascade models? but I don't kown how to write the that physicslist. has someone give some instructions or give me some examples in this aspects(single pion photoproduction)?

Thanks and best regards, yuchun zhang beijing ihep

None Which physics list to use  by Bari Osmanov <Bari Osmanov>,   20 Nov, 2007

 My greetings, dear colleagues. I am trying to simulate the following experiment:
 1 GeV proton beam is incident on high-Z target (mercury) producing pions which, in turn, lead to muons and then to neutrinos and antineutrinos. 
I would like to ask which physics list I should use for this simulation. Is it possible to include neutrino interactions?

 Thank you in advance.

Question muon-induced neutrons  Keywords: muon neutron
by Martin <martin.bissok@rwth-aachen.de>,   08 Nov, 2007

Hi all,

I have to simulate the muon-induced neutron BG and I don't know, how to set up my PhysicsList. I have been looking at examples, but I just don't know, what I need and how I have to set it up( beeing a G4 novice doesn't help...)

The PhysicsList, we use, is based on the "underground"-example. Could anybody help me on this?

None why are there energy loss in transportation and step limit?  by <gj7f@virginia.edu>,   04 Nov, 2007

Just wanna ask a basic question: why are there energy loss in transportation and step limit? When setting tracking verbose 1, I am able to see the physics process along the track, and there are energy loss due to tramsportation and step limit, as well as ionization. What do these two process really mean? Thanks!

1 None: Re: why are there energy loss in transportation and step limit?   (michel maire - 05 Nov, 2007)
None Adding new cross-section  Keywords: cross section, gamma
by Ilan <ilanmor@yahoo.com>,   02 Nov, 2007
Hi,
I'm new to Geant4.
I need to enter a new cross-section (which appears in the form of a
 function formula).
The cross section is for the reaction 14N(g,p)13C for 9.17 MeV gammas.

How can it be done?

I would appreciate any help.

Ilan
Question low energy deuteron propagation  Keywords: low energy deuteron propagation
by Abigail Bickley <bickley@nscl.msu.edu>,   30 Oct, 2007
Dear Experts,

I am trying to simulate the propagation of a 300keV deuteron in a gas
filled volume.  Simple range calculations tell me that the track length
should be approximately 10cm.  However I find that in Geant the tracks
are only ~2cm long.  Is geant capable of reproducing the interactions 
of a deuteron of this energy in a gas?  I've included some specific 
details below.  Suggestions would be appreciated.


Thank you for your advice,

Abby



Physics Processes in PhysicsList:
pmanager->AddProcess(new G4MultipleScattering,-1, 1, 1);
pmanager->AddProcess(new G4hIonisation,     -1, 2, 2);
G4double demax = 0.05;  
G4double stmin = 1.e-9 * m;
G4hLowEnergyIonisation* lowEIonisation = new G4hLowEnergyIonisation();
pmanager->AddProcess( lowEIonisation, -1,3,3);
lowEIonisation->SetStepFunction( demax, stmin );
*Is there a threshold cut being applied that is inappropriate?


Definition of gas in DetectorConstruction:
//TPCgas_D2 is 100% D2
G4Element* D = new G4Element("Deuterium","D", z= 2., a= 2.0141*g/mole);  
G4Material* TPCgas_D2 = new G4Material("TPC_gas_D2",0.036*mg/cm3,1);  //0.2atm density
TPCgas_D2->AddElement(D,2);
*changing gas density has expected effect on particle path length;
*since the particle is created in the gas volume it never interacts
with any other material


Definition of deuteron in PrimaryEventGenerator:
G4ParticleDefinition* particle = particleTable->FindParticle("deuteron");
particleGun->SetParticleDefinition(particle);  
energy = 0.3*MeV;
p_z= G4UniformRand()*energy;
p_x = G4UniformRand()*(energy-p_z);
p_y = sqrt(energy*energy-p_x*p_x-p_z*p_z);
particleGun->SetParticleEnergy(energy);
particleGun->SetParticleMomentumDirection(G4ThreeVector(p_x,p_y,p_z));
particleGun->GeneratePrimaryVertex(anEvent);
*perhaps energy is per nucleon? (but doubling it doesn't solve the problem)
*perhaps this is total energy not kinetic energy?
1 None: Re: low energy deuteron propagation   (Vladimir IVANTCHENKO - 30 Oct, 2007)
None How to add gamma ray cross section?  Keywords: add cross section
by Ilan <ilanmor@yahoo.com>,   26 Oct, 2007
Hi,
I'm new to Geant4.
I need to enter a cross-section (which appears in the form of a function formula).
The cross section is for the reaction 14N(g,p)13C for 9.17 MeV gammas.

How can it be done?

I would appreciate your help.

Ilan
None activate Secondary effects in testem7  Keywords: fluorescence auger low energy atomic deexcitation
by Casten Rohde <carsten.rohde@trash-mail.de>,   25 Oct, 2007
Hello,

I want to activate Fluorescence and Auger for example testem7. 
There the processes are registered like.

} else if (particleName == "e-") {
      //electron
      pmanager->AddProcess(new G4MultipleScattering,      -1, 1, 1);
      pmanager->AddProcess(new G4LowEnergyIonisation,     -1, 2, 2);
      pmanager->AddProcess(new G4LowEnergyBremsstrahlung, -1,-1, 3);
...

from the manual page I got for the activation:

G4LowEnergyIonization* eIonisationProcess->ActivateFluorescence(true);

But following the advice in other posts I don't want to change the 
physics list and in testem7 I can't find the name for the  
instance ("eIonisationProcess") which I have to use.

How can I activate fluorescence and Auger in this case?

Thank you for helping

Carsten
None source isotropic  by Ibrahim <Ibrahim>,   23 Oct, 2007

Hi;

i'd like to send gammas into my detector in 4Pi(angle solid= 4pi), how can i do it?

Best Regards

Question /usr/bin/ld: cannot find -lLHEP   by asmita <asmita>,   23 Oct, 2007

Hello, I have installed Geant4.7.1 (CLHEP1.9.2.1) on SL3.0.4. I could compile the examples given with source code

Now when I run 'make'  on our code i am getting following error: 
 /usr/bin/ld: cannot find -lLHEP
collect2: ld returned 1 exit status
gmake: *** [/scratch/asmita/Simulation4.7.1/g4work/bin/Linux-g++/inoical0] Error  1

In hadronic_lists.gmk I have enabled EXTRALIBS += -lLHEP and EXTRALIBS += -lPackaging

Thank you.

Sad Change in G4EmStandardPhysics interface  by Emanuele Leonardi <Emanuele Leonardi>,   17 Oct, 2007

I just noticed that the initialization method for class G4EmStandardPhysics changed between version 8.3 and 9.0:

v.8.3:

 G4EmStandardPhysics(const G4String& name = "G4standard", G4int ver = 0);

v.9.0:

 G4EmStandardPhysics(G4int ver = 0, const G4String& name = "G4EmStandard");

This is different from other physics_lists classes (e.g. G4HadronElasticPhysics) and creates a problem when writing applications that may be used under both v.8.3 and v.9.0. Also, I could not find any note about this change in the Release Notes nor in physics_lists/History or G4EmStandardPhysics.hh

What is the reason for this change?

How can I write code that uses G4EmStandardPhysics and can be compiled both on 8.3 and 9.0?

Thanks

                  Emanuele Leonardi

1 None: Re: Change in G4EmStandardPhysics interface   (Vladimir IVANTCHENKO - 17 Oct, 2007)
None changing production cuts of Physics lists without recompilation of those  by Victor_Makarov <Victor_Makarov>,   09 Oct, 2007

I would like to change production cut values for, for example, for LHEP_BERT_HP without changing its source and its recompilation. i.e. from main.cc. I've tried this:

(a part of main.cc)

 G4double defCutValue = 100.0*mm;
  LHEP_BERT_HP *  theBERT = new LHEP_BERT_HP;
  theBERT->SetCutValue(defCutValue, "gamma");
  theBERT->SetCutValue(defCutValue, "e-");
  theBERT->SetCutValue(defCutValue, "e+");
 runManager->SetUserInitialization(theBERT);

Though compilation of my program is ok, production cuts are still the same as in source of LHEP_BERT_HP. Any help? Thanks.

Question Scintillation photons and hadronic physics list  by Sergey Abrahamyan <aserg1983@gmail.com>,   01 Oct, 2007

Hello, in my simulation I need both hadronic physics list included and scintillation process turned on. The problem is when I'am adding hadronic process physics list to example N06 (optical photon generation example), it stops generate scintillation photons. Anyone can tell how can I solve that problem.

Thanks in advance, Abrahamyan Sergey.

1 None: Re: Scintillation photons and hadronic physics list   (Vladimir IVANTCHENKO - 07 Oct, 2007)
None Are production models included in LHEP_PRECO_HP?  by Victor_Makarov <Victor_Makarov>,   01 Oct, 2007

Sorry for that question, but I'm not 100% sure in answer. I'm interested in NeutronIsotopeProduction and ProtonIsotopeProduction models. Are they included in LHEP_PRECO_HP? I seem to get C12, C13, C14 from interaction of neutrons with air. But I still can't see any isotopes from interaction of protons with air. That's the reason of my question. Thanks a lot.

1 Feedback: Re: Are production models included in LHEP_PRECO_HP?   (Gunter Folger - 02 Oct, 2007)
(_ None: Re: Are production models included in LHEP_PRECO_HP?   (Victor_Makarov - 02 Oct, 2007)
(_ None: Re: Are production models included in LHEP_PRECO_HP?   (Vladimir IVANTCHENKO - 06 Oct, 2007)
(_ None: Re: Are production models included in LHEP_PRECO_HP?   (Victor_Makarov - 07 Oct, 2007)
(_ None: Re: Are production models included in LHEP_PRECO_HP?   (Vladimir IVANTCHENKO - 08 Oct, 2007)
Question G4HEInelastic::GenerateNBodyEvent Error  Keywords: Error in G4HEInelastic
by Diego Roa <Diego Roa>,   23 Sep, 2007

Hi G4 experts

While my simulation is running, there appears a message like 
 Error in G4HEInelastic::GenerateNBodyEvent
    total mass (2.12894) >= total energy (2.04248)
but the process is still running. There are any problem?
I have to stop the simulation?

Thanks a lot

Diego Roa

Note Alpha particles physics list  Keywords: alpha physics
by max <cinimassimo@gmail.com>,   17 Sep, 2007
Hi everyone!
My purpose is to simulate alpha particles and, as a first step,
I want to obtain the correct physics list.
What I have done is quite simple: I have modified the program
called novice/N01 by using alpha particles instead of geantino.
That's the physics list I've got:

-----------------------------------------------------------------
#include "PhysicsList.hh"
#include "G4LeptonConstructor.hh"
#include "G4BosonConstructor.hh"
#include "G4Alpha.hh"
#include "G4IonConstructor.hh"
#include "G4Transportation.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4PenelopePhotoElectric.hh"
#include "G4PenelopeCompton.hh"
#include "G4PenelopeGammaConversion.hh"
#include "G4PenelopeRayleigh.hh"
#include "G4MultipleScattering.hh"
#include "G4PenelopeIonisation.hh"
#include "G4PenelopeBremsstrahlung.hh"
#include "G4PenelopeAnnihilation.hh"
#include "G4ionIonisation.hh"

PhysicsList::PhysicsList()
{;}

PhysicsList::~PhysicsList()
{;}

void PhysicsList::ConstructParticle()
{
 G4LeptonConstructor lept;
 lept.ConstructParticle();

 G4BosonConstructor boson;
 boson.ConstructParticle();

 G4Alpha::AlphaDefinition();

 G4IonConstructor iConstructor;
 iConstructor.ConstructParticle();
}

void PhysicsList::ConstructProcess()
{
 AddTransportation();
 ConstructEM();
}

void PhysicsList::ConstructEM(){
 theParticleIterator->reset();
 while( (*theParticleIterator)() ){
  G4ParticleDefinition* particle = theParticleIterator->value();
  G4ProcessManager* pmanager = particle->GetProcessManager();
  G4String particleName = particle->GetParticleName();

  if (particleName == "gamma") {
   pmanager->AddDiscreteProcess(new G4PenelopePhotoElectric);
   pmanager->AddDiscreteProcess(new G4PenelopeCompton);
   pmanager->AddDiscreteProcess(new G4PenelopeGammaConversion);
   pmanager->AddDiscreteProcess(new G4PenelopeRayleigh);
  } else if (particleName == "e-") {
   pmanager->AddProcess(new G4MultipleScattering,     -1, 1, 1);
   pmanager->AddProcess(new G4PenelopeIonisation,     -1, 2, 2);
   pmanager->AddProcess(new G4PenelopeBremsstrahlung, -1,-1, 3);
  } else if (particleName == "e+") {
   pmanager->AddProcess(new G4MultipleScattering,     -1, 1, 1);
   pmanager->AddProcess(new G4PenelopeIonisation,     -1, 2, 2);
   pmanager->AddProcess(new G4PenelopeBremsstrahlung, -1,-1, 3);
   pmanager->AddProcess(new G4PenelopeAnnihilation,    0,-1, 4);
  } else if( particleName == "alpha"  ) {
   pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
   pmanager->AddProcess(new G4ionIonisation,      -1, 2,2);
  }
 }
}

void PhysicsList::SetCuts(){
 SetCutsWithDefault();
 if (verboseLevel>0) DumpCutValuesTable();
}
-----------------------------------------------------------------



When I compile everything works well but when I try to execute
the program I get a "segmentation fault":

-----------------------------------------------------------------
...
Start Run processing.
=====================================
  G4EventManager::ProcessOneEvent()
=====================================
1 vertices passed from G4Event.
G4PrimaryTransformer::PrimaryVertex (-2000(mm),0(mm),0(mm),0(nsec))
Primary particle (alpha) --- Transfered with momentum (202.379,0,0)
A new track 0xa201b0 (trackID 1, parentID 0) is passed to G4StackManager.
1 primaries are passed from G4EventTransformer.
!!!!!!! Now start processing an event !!!!!!!
### pop requested out of 1 stacked tracks.
Selected G4StackedTrack : 0xa205b0 with G4Track 0xa201b0 (trackID 1, parentID 0)
Track 0xa201b0 (trackID 1, parentID 0) is passed to G4TrackingManager.

*******************************************************************************************
* G4Track Information:   Particle = alpha,   Track ID = 1,   Parent ID = 0
*******************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0   -2e+03        0        0      5.49        0        0         0     expHall initStep
Segmentation fault
-----------------------------------------------------------------

Would you please give me some advice ?
It would be very much appreciated!
Thanks,
Massimo
1 None: Re: Alpha particles physics list   (Maria Grazia Pia - 17 Sep, 2007)
(_ None: Re: Alpha particles physics list   (max - 20 Sep, 2007)
Question XRF with secondary electrons   Keywords: XRF physics list
by John May <john.may@go4more.de>,   28 Aug, 2007
Hello,

I'm trying to simulate a simple XRF setup. At the moment I have two 
problems: 
 
the fluorescence energies are not like expected but always a little 
below the literature values. 

And it seems that activating   

G4LowEnergyIonisation * LeIoprocess = new G4LowEnergyIonisation("IONI");

LeIoprocess->ActivateAuger(true);

LeIoprocess->ActivateFluorescence(true); 

have no influence at all.

Anyone can help me with a correct physics list which gives the right 
fluorescence energies and includes the fluorescence from the 
secondary electrons? Or someone can gives a hint? 

Thanks a lot

John

My configuration script gives:

On this machine the G4SYSTEM=Linux-g++
On this machine the G4INSTALL=/home/john/geant/geant4.8.3
On this machine the G4LIB=/home/john/geant/geant4.8.3/lib
On this machine the G4LEVELGAMMADATA=/home/john/geant/geant4.8.3/data/PhotonEvaporation2.0
On this machine the G4RADIOACTIVEDATA=/home/john/geant/geant4.8.3/data/RadioactiveDecay3.1
On this machine the G4LEDATA=/home/john/geant/geant4.8.3/data/G4EMLOW4.2
On this machine the NeutronHPCrossSections=/home/john/geant/geant4.8.3/data/G4NDL3.10
On this machine the CLHEP_BASE_DIR=/home/john/CLHEP
On this machine the CLHEP_INCLUDE_DIR=/home/john/CLHEP/include
On this machine the CLHEP_LIB_DIR=/home/john/CLHEP/lib
On this machine the CLHEP_LIB=CLHEP
On this machine the G4ANALYSIS_USE=1
On this machine the G4VIS_BUILD_OPENGLX_DRIVER=1
On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=1
On this machine the G4VIS_USE_OPENGLX=1
On this machine the G4VIS_USE_RAYTRACERX=1
On this machine the XMFLAGS=
On this machine the XMLIBS=
On this machine the XMFLAGS=
On this machine the XMLIBS=
On this machine the XAWFLAGS=
On this machine the XAWLIBS=
On this machine the G4LIB_BUILD_STATIC=1
On this machine the G4LIB_USE_GRANULAR=1
On this machine the G4UI_USE_TCSH=1
G4WORKDIR will be set to HOME/geant4=/home/john/geant4

None Can I turn off some physics processes in a volume?  by long <long>,   16 Aug, 2007

Dear Geant4 experts,
   1)  The case is a gamma pulsed beam impacting a Ti target. A BGO crystal detector is placed 
behind the target. The dose produced by induced radiation from the target is what I want. 
But It is found the induced dose recorded in BGO is much higher than expected. I guess much
part of the dose may come from the activation of detecor itself . So I want to turn off the 
photonuclear process in the BGO volume to avoid the dose from detector itself. Can I do it?
    If there is another way to solve my problem, I would like to hear. 
  2) another question. If I kill the radionulides produced in detector volume in
UserSteppingAction as soon as these particles produced, will the induced ray still come out
from these unstable nuclides and contribute to the total dose?
     Thanks in advance!

long

    I

1 None: Re: Can I turn off some physics processes in a volume?   (Vladimir IVANTCHENKO - 16 Aug, 2007)
Question A question on modifying Physics Lists  by Victor_Makarov <Victor_Makarov>,   16 Aug, 2007

Hi! I would like to modify LHEP_PRECO_HP to use G4ParaFissionModel to get fission fragments. When modifying it, I edit some header files, for example, G4NeutronHPBuilder.hh. When I try to include G4ParaFissionModel.hh by typing #include "G4ParaFissionModel.hh", the compiler can't find it. The problem's solved when typing the full path to G4ParaFissionModel. Why #include "G4ParaFission" doesn't work when, for example, #include "G4NeutronHPFission" is ok? Thanks

1 Feedback: Re: A question on modifying Physics Lists   (Gunter Folger - 16 Aug, 2007)
None turned off or not  by Kin Yip <kinyip@bnl.gov>,   14 Aug, 2007

Hi,

/process/list shows ONLY the activated physics lists, right ?

In a GEANT4 macro file of mine, I've done :

/process/inactivate muIoni /process/inactivate muBrems /process/inactivate muPairProd /process/inactivate muNuclear /process/list

While running GEANT4, I see in my log file :

/process/inactivate muIoni /run/physicsModified /process/inactivate muBrems /run/physicsModified /process/inactivate muPairProd /run/physicsModified /process/inactivate muNuclear /run/physicsModified /process/list

      Transportation,G4FastSimulationManagerProcess,              Decay,   RadioactiveDecay
                 msc,          hLowEIoni,              eIoni,              eBrem
             annihil,      LowEnergyIoni,          LowEnBrem,      LowEnRayleigh
      LowEnPhotoElec,       LowEnCompton,    LowEnConversion,             muIoni
             muBrems,         muPairProd,muMinusCaptureAtRest,    PhotonInelastic
      ElectroNuclear,    PositronNuclear,          muNuclear,           LElastic
...............
..............

If I assume that /process/list shows ONLY the activated lists, does this mean that my attempt to turn off muBrems, muPairProd and muNuclear has failed ?

Are there any other switches that I would need to turn off physics processes ? If so, what are they ? Could you please help ?

Kin

1 None: Re: turned off or not   (Vladimir IVANTCHENKO - 15 Aug, 2007)
None G4GeneralParticleSource problem  by Jérôme Souin <Jérôme Souin>,   20 Jul, 2007

Hi,

I'm a begginer in Geant4 (8.3) and I want to construct a radioactive source of 60Co using G4GeneralParticleSource. I'm following the examples

: novice N02 and extended exrdm.

Every thing is ok during the compilation but my nucleus don't decay... and the process "Decay" doesn't appear in the list of process??

Idle> process/list
     Transportation,                msc,              hIoni,        StepLimiter
              eIoni,              eBrem,            annihil,               phot
              compt,               conv,             muIoni,            muBrems
         muPairProd

I get only that as result :

*********************************************************************************************************
* G4Track Information:   Particle = Co60[0.0],   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume     Process
    0      0 fm      0 fm      0 fm      0 eV      0 eV      0 fm      0 fm   physicopper    initStep

#Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume     Process
    1      0 fm      0 fm      0 fm      0 eV      0 eV      0 fm      0 fm   physicopper   UserLimit
Track (trackID 1, parentID 0) is processed with stopping code 2

In my PhysicList I have :

#include "globals.hh"
#include "ExPerso2PhysicsList.hh"

#include "G4ProcessManager.hh"
#include "G4ParticleTypes.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

ExPerso2PhysicsList::ExPerso2PhysicsList():  G4VUserPhysicsList()
{
  defaultCutValue = 1.0*cm;
   SetVerboseLevel(1);
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

ExPerso2PhysicsList::~ExPerso2PhysicsList() {}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::ConstructParticle()
{
  // In this method, static member functions should be called
  // for all particles which you want to use.
  // This ensures that objects of these particle types will be
  // created in the program. 

  ConstructBosons();
  ConstructLeptons();
  ConstructBaryons();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::ConstructBosons()
{
  // pseudo-particles
  G4Geantino::GeantinoDefinition();
  G4ChargedGeantino::ChargedGeantinoDefinition();

  // gamma
  G4Gamma::GammaDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::ConstructLeptons()
{
  // leptons
  //  e+/-
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();
  // mu+/-
  G4MuonPlus::MuonPlusDefinition();
  G4MuonMinus::MuonMinusDefinition();
  // nu_e
  G4NeutrinoE::NeutrinoEDefinition();
  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
  // nu_mu
  G4NeutrinoMu::NeutrinoMuDefinition();
  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::ConstructBaryons()
{
  //  barions
  G4Proton::ProtonDefinition();
  G4AntiProton::AntiProtonDefinition();

  G4Neutron::NeutronDefinition();
  G4AntiNeutron::AntiNeutronDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::ConstructProcess()
{
  AddTransportation();
  ConstructEM();
  ConstructGeneral();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"

#include "G4MultipleScattering.hh"

#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"

#include "G4hIonisation.hh"

#include "G4StepLimiter.hh"
#include "G4UserSpecialCuts.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::ConstructEM()
{
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

    if (particleName == "gamma") {
      // gamma         
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
      pmanager->AddDiscreteProcess(new G4ComptonScattering);
      pmanager->AddDiscreteProcess(new G4GammaConversion);

    } else if (particleName == "e-") {
      //electron
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);      

    } else if (particleName == "e+") {
      //positron
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
      pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);

    } else if( particleName == "mu+" || 
               particleName == "mu-"    ) {
      //muon  
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4MuIonisation,      -1, 2,2);
      pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 3,3);
      pmanager->AddProcess(new G4MuPairProduction,  -1, 4,4);       

    } else if ((!particle->IsShortLived()) &&
               (particle->GetPDGCharge() != 0.0) && 
               (particle->GetParticleName() != "chargedgeantino")) {
      //all others charged particles except geantino
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4hIonisation,       -1, 2,2);
      //step limit
      pmanager->AddProcess(new G4StepLimiter,       -1,-1,3);         
      ///pmanager->AddProcess(new G4UserSpecialCuts,   -1,-1,4);  
    }
  }       

}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

#include "G4GenericIon.hh"
#include "G4RadioactiveDecay.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"

void ExPerso2PhysicsList::ConstructGeneral() {

     const G4IonTable     *theIonTable =  G4ParticleTable::GetParticleTable()->GetIonTable();
     G4RadioactiveDecay*   theRadioactiveDecay  = new G4RadioactiveDecay();

    for (G4int i=0; i<theIonTable->Entries(); i++) 
    {   
      G4ParticleDefinition* ionparticle = theIonTable->GetParticle(i);
      G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
      if (particleName == "GenericIon") 
      {
         G4ProcessManager* ionpmanager = ionparticle->GetProcessManager();
         ionpmanager->SetVerboseLevel(3);
         ionpmanager->AddProcess(theRadioactiveDecay);
         ionpmanager->SetProcessOrdering(theRadioactiveDecay, idxPostStep, 1);
         ionpmanager->SetProcessOrdering(theRadioactiveDecay, idxAtRest, 1);
     } 
    }
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::SetCuts()
{
  //G4VUserPhysicsList::SetCutsWithDefault method sets 
  //the default cut value for all particle types 
  //
  SetCutsWithDefault();

if (verboseLevel>0) DumpCutValuesTable(); }

Thank you for your help,

J.

1 None: Re: G4GeneralParticleSource problem   (Vladimir IVANTCHENKO - 20 Jul, 2007)
1 None: G4GeneralParticleSource problem   (Jérôme Souin - 20 Jul, 2007)
(_ None: Re: G4GeneralParticleSource problem   (Vladimir IVANTCHENKO - 20 Jul, 2007)
(_ None: Re: G4GeneralParticleSource problem   (Jérôme Souin - 26 Jul, 2007)
(_ None: Re: G4GeneralParticleSource problem   (Vladimir IVANTCHENKO - 26 Jul, 2007)
2 Ok: G4GeneralParticleSource problem   (Jérôme Souin - 20 Aug, 2007)
None Enabling scintillation  by Adam <ax_blais@laurentian.ca>,   17 Jul, 2007

I need to enable scintillation in my simulation. I checked out example N06 and used that PhysicsList for my code. Even though this is added, I still do not see any scintillation events. My code is the following:

// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // // $Id: ExN02PhysicsList.cc,v 1.22 2006/06/29 17:48:11 gunter Exp $ // GEANT4 tag $Name: geant4-08-02 $ // //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

#include "globals.hh"
#include "ExN02PhysicsList.hh"

#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleTypes.hh"

#include "G4Cerenkov.hh"
#include "G4Scintillation.hh"
#include "G4OpAbsorption.hh"
#include "G4OpRayleigh.hh"
#include "G4OpBoundaryProcess.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

ExN02PhysicsList::ExN02PhysicsList():  G4VUserPhysicsList()
{
  theCerenkovProcess           = 0;
  theScintillationProcess      = 0;
  theAbsorptionProcess         = 0;
  theRayleighScatteringProcess = 0;
  theBoundaryProcess           = 0;

  defaultCutValue = 1.0*cm;
   SetVerboseLevel(1);
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

ExN02PhysicsList::~ExN02PhysicsList() {}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExN02PhysicsList::ConstructParticle()
{
  // In this method, static member functions should be called
  // for all particles which you want to use.
  // This ensures that objects of these particle types will be
  // created in the program. 

  ConstructBosons();
  ConstructLeptons();
  ConstructMesons();
  ConstructBaryons();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExN02PhysicsList::ConstructBosons()
{
  // pseudo-particles
  G4Geantino::GeantinoDefinition();
  G4ChargedGeantino::ChargedGeantinoDefinition();

  // gamma
  G4Gamma::GammaDefinition();

  // optical photon
  G4OpticalPhoton::OpticalPhotonDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExN02PhysicsList::ConstructLeptons()
{
  // leptons
  //  e+/-
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();
  // mu+/-
  G4MuonPlus::MuonPlusDefinition();
  G4MuonMinus::MuonMinusDefinition();
  // nu_e
  G4NeutrinoE::NeutrinoEDefinition();
  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
  // nu_mu
  G4NeutrinoMu::NeutrinoMuDefinition();
  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExN02PhysicsList::ConstructMesons()
{
  //  mesons
  //    light mesons
  G4PionPlus::PionPlusDefinition();
  G4PionMinus::PionMinusDefinition();
  G4PionZero::PionZeroDefinition();
  G4Eta::EtaDefinition();
  G4EtaPrime::EtaPrimeDefinition();
  G4KaonPlus::KaonPlusDefinition();
  G4KaonMinus::KaonMinusDefinition();
  G4KaonZero::KaonZeroDefinition();
  G4AntiKaonZero::AntiKaonZeroDefinition();
  G4KaonZeroLong::KaonZeroLongDefinition();
  G4KaonZeroShort::KaonZeroShortDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExN02PhysicsList::ConstructBaryons()
{
  //  barions
  G4Proton::ProtonDefinition();
  G4AntiProton::AntiProtonDefinition();

  G4Neutron::NeutronDefinition();
  G4AntiNeutron::AntiNeutronDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExN02PhysicsList::ConstructProcess()
{
  AddTransportation();
  ConstructEM();
  ConstructGeneral();
  ConstructOp();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"

#include "G4MultipleScattering.hh"

#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"

#include "G4hIonisation.hh"

#include "G4StepLimiter.hh"
#include "G4UserSpecialCuts.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExN02PhysicsList::ConstructEM()
{
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

    if (particleName == "gamma") {
      // gamma         
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
      pmanager->AddDiscreteProcess(new G4ComptonScattering);
      pmanager->AddDiscreteProcess(new G4GammaConversion);

    } else if (particleName == "e-") {
      //electron
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);      
      pmanager->AddProcess(new G4UserSpecialCuts,   -1,-1,4);

    } else if (particleName == "e+") {
      //positron
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
      pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);
      pmanager->AddProcess(new G4UserSpecialCuts,   -1,-1,4);

    } else if( particleName == "mu+" || 
               particleName == "mu-"    ) {
      //muon  
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4MuIonisation,      -1, 2,2);
      pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 3,3);
      pmanager->AddProcess(new G4MuPairProduction,  -1, 4,4);       

    } else if ((!particle->IsShortLived()) &&
	       (particle->GetPDGCharge() != 0.0) && 
	       (particle->GetParticleName() != "chargedgeantino")) {
      //all others charged particles except geantino
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4hIonisation,       -1, 2,2);
      //step limit
      pmanager->AddProcess(new G4StepLimiter,       -1,-1,3);         
      //pmanager->AddProcess(new G4UserSpecialCuts,   -1,-1,4);  
    }
  }
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

#include "G4Decay.hh"
void ExN02PhysicsList::ConstructGeneral()
{
  // Add Decay Process
  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) { 
      pmanager ->AddProcess(theDecayProcess);
      // set ordering for PostStepDoIt and AtRestDoIt
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExN02PhysicsList::ConstructOp()
{
  G4cout << "ConstructOp has been called " << G4endl;
  theCerenkovProcess           = new G4Cerenkov("Cerenkov");
  theScintillationProcess = new G4Scintillation("Scintillation");
  theAbsorptionProcess     = new G4OpAbsorption();
  theRayleighScatteringProcess = new G4OpRayleigh();
  theBoundaryProcess  = new G4OpBoundaryProcess();

// theCerenkovProcess->DumpPhysicsTable(); // theScintillationProcess->DumpPhysicsTable(); // theAbsorptionProcess->DumpPhysicsTable(); // theRayleighScatteringProcess->DumpPhysicsTable();

  theCerenkovProcess->SetMaxNumPhotonsPerStep(300);
  theCerenkovProcess->SetTrackSecondariesFirst(true);

  theScintillationProcess->SetScintillationYieldFactor(1.);
  theScintillationProcess->SetTrackSecondariesFirst(true);

  G4OpticalSurfaceModel themodel = unified;
  theBoundaryProcess->SetModel(themodel);

  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();
    if (theCerenkovProcess->IsApplicable(*particle)) {
      pmanager->AddContinuousProcess(theCerenkovProcess);
    }
    if (theScintillationProcess->IsApplicable(*particle)) {
      pmanager->AddProcess(theScintillationProcess);
      pmanager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest);
      pmanager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep);
    }
    if (particleName == "opticalphoton") {
      G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
      pmanager->AddDiscreteProcess(theAbsorptionProcess);
      pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
      pmanager->AddDiscreteProcess(theBoundaryProcess);
    }
  }
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExN02PhysicsList::SetCuts()
{
  //G4VUserPhysicsList::SetCutsWithDefault method sets 
  //the default cut value for all particle types 
  //
  SetCutsWithDefault();

if (verboseLevel>0) DumpCutValuesTable(); }

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

Is scintillation set up correctly? I added the optical photon definition, but still no scintillation events.

1 None: Re: Enabling scintillation   (Adam - 17 Jul, 2007)
None proton inelastic models  by <me@marychin.org>,   11 Jul, 2007

Hi.

I started 10 to 30 MeV protons in 14N and 18O using different proton inelastic scattering models: LEP, Bertini, Binary Cascade, Precompound, PrecompoundGEM, PrecompoundFermi and PrecompoundGEMFermi.

I looked at the secondaries found at every call to UserSteppingAction. I also looked at the energy of gammas and neutrons found this way.

Of the 7 models (listed above) I experimented with, 4 produced results which were distinctly different from each other. How should I judge which is corrent and which aren't?

Advice will be greatly appreciated, as I'm a newbie.

mary

None Event-by-event simulation  by <me@marychin.org>,   01 Jul, 2007

Hi.

From my understanding LHEP models do not conserve energy and momentum event-by-event. Is there any alternative that does conserve energy and momentum event-by-event at energies < 20 MeV please?

Many thanks, mary

1 None: Re: Event-by-event simulation   (Vladimir IVANTCHENKO - 02 Jul, 2007)
Question help for simulating low energy neutron interactions with matter needed!!!  by Victor_Makarov <Victor_Makarov>,   29 May, 2007

Hi to everybody! I'm a novice user of G4. I need to simulate low energy neutron interactions with matter. But there are so many models and processes that I simply get lost. I haven't got enough experience to wright physicslist.cc by myself. Can somebody provide me with a working example (a whole set of source files)? Or maybe there's a page where the topic is observed? Thanks in advance.

1 None: Re: help for simulating low energy neutron interactions with matter needed!!!   (Vladimir IVANTCHENKO - 29 May, 2007)
None Questions on Radioactive Decay of Tritium  Keywords: G4RadioactiveDecay G4GenericIon segmentation fault
by Theo <Theo>,   22 May, 2007

Dear all,

I have a simulation of a tube filled with a gas mixture that has tritium and i want to study its decay.

I have 2 questions:

1)First of all I construct the process like so:

//------------------------------------------------
void ExN01PhysicsList::ConstructProcess()
{
  // Define transportation process

  AddTransportation();
  ConstructEM();
  ConstructGeneral();

// Add Decay Process
  G4RadioactiveDecay*  theRadioactiveDecay = new G4RadioactiveDecay();
  G4GenericIon* ion = G4GenericIon::GenericIon();

  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();

    if (particle == ion){
      pmanager->AddProcess(theRadioactiveDecay, 0, -1, 3);
      pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep);
      pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest);

    }
    if (theDecayProcess->IsApplicable(*particle)) { 
      pmanager ->AddProcess(theDecayProcess);
      // set ordering for PostStepDoIt and AtRestDoIt
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }

//------------------------------------------------

it compiles fine but when i run it i get a segmentation fault. If i comment the line: //G4GenericIon* ion = G4GenericIon::GenericIon(); and the corresponding if afterwards it runs fine.What is the case?

2)My 2nd question has to do with the setup of my to-be simulation.
  I want the simulation to start without any primary particles to hit
  the tube and i want a run to last as long as i define it, for ex.2sec
  of data taking etc and i haven't found the way to do both.Is there a
  simple example i could look into?

Sorry for my questions but im just learning geant. Thanks in advance theo

None FISSION CHAMBER physic list  Keywords: fission chamber PHYSIC list
by mehdi <mehdi>,   19 May, 2007

Hi all.

for simulating a fission chamber(neutron detector) the physic list proccess must be only electromagnetic process or hadronic proccess should be added too?

any one have a fission chamber simulated file?

help me

Regards

Question Is it possible to change physics process type just for a given volume/region?  by Kamil Sedlak <kamil.sedlak@cern.ch>,   15 May, 2007

Dear All,
  I am using the G4MultipleScattering process in my detector setup.
There is an alternative process G4CoulombScattering, which is believed
to be better suited for the thin materials.  However, switching from
G4MultipleScattering to G4CoulombScattering everywhere increses 
the execution time of my jobs by factor of ~10.
  Therefore I would like to use G4CoulombScattering only in a few very thin 
volumes, while employ G4MultipleScattering elsewhere.  Is this possible?
I did not find such an example, even though the "User's Guide: 
For Application Developers" (geant 4.8.3, chapter 5.2.1.1) indicates
this might be possible:

   * The processes described above use physics model classes, 
   which may be combined according to particle energy. 
   It is possible to change the energy range over which 
   different models are valid, and to apply other models 
   specific to particle type, energy range, and G4Region.

(I found a similar posting at http://geant4-hn.slac.stanford.edu:5090/HyperNews/public/get/emprocess/504.html , where an unofficial way of solving a similar problem is provided).

1 None: Re: Is it possible to change physics process type just for a given volume/region?   (Vladimir IVANTCHENKO - 15 May, 2007)
None Bulk Absorption Length for Optical Photons  by Sean Jones <Sean Jones>,   03 May, 2007

I am having trouble finding the definition of the term 'Bulk Absorption Length', a property used for materials in which we will simulate optical processes. Furthermore, I am having even more difficulty determining values for materials I am simulating light transport through.

I realize this is an experimentally determined value, but I could not find any reference with values I am looking for. Specifically I am looking for the values for BC-400, Quartz, CaF2(Eu), and NaI(Tl). I imagine there is slight dependence upon the manufaturer; however, general numbers would do just fine.

Thank you for your help.

Question link to the lists of physics lists?  Keywords: all physics lists; link to physics lists
by Elena <Elena>,   30 Apr, 2007
Where can we find the list of all available (tested) physics lists, 
preferably with some descriptions?  I remember there was such a 
thing several years ago, but I can't find it now.  

Thanks,
-- Elena Novikova.
None Problem with neutron elastic process?  Keywords: neutron, elastic
by <ashoaf@purdue.edu>,   18 Apr, 2007

Below is a copy of the code I am using in my physics list. The program works just fine as is, but when I uncomment the elastic process block, I recieve a segmentation fault almost immediatly after the simulation begins. Any assistance is appreciated.

#include "ExN01PhysicsList.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleTypes.hh"
#include "G4NeutronHPFission.hh"
#include "G4NeutronHPCapture.hh"
#include "G4NeutronHPElastic.hh"
#include "G4NeutronHPInelastic.hh"
#include "G4NeutronHPFissionData.hh"
#include "G4NeutronHPCaptureData.hh"
#include "G4NeutronHPElasticData.hh"
#include "G4NeutronHPInelasticData.hh"
#include "G4IonConstructor.hh"

ExN01PhysicsList::ExN01PhysicsList() {;}

ExN01PhysicsList::~ExN01PhysicsList() {;}

void ExN01PhysicsList::ConstructParticle()
{
 //Construct particles

  G4Geantino::GeantinoDefinition();
  G4Neutron::NeutronDefinition();
  G4Proton::ProtonDefinition();
  G4Gamma::GammaDefinition();
  G4IonConstructor pConstructor;
  pConstructor.ConstructParticle();

}

void ExN01PhysicsList::ConstructProcess()
{
  // Define transportation processes and neutron interactions

  AddTransportation();
  ConstructNeutronProcess();

}

void ExN01PhysicsList::ConstructNeutronProcess() {

G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();

  // Neutron elastic process, models and cross sections
/*
  G4HadronElasticProcess* elasticProcess = new G4HadronElasticProcess();
  G4NeutronHPElastic* theHPElasticModel = new G4NeutronHPElastic();
  G4NeutronHPElasticData* theHPElasticData = new G4NeutronHPElasticData();
  elasticProcess->RegisterMe(theHPElasticModel);
  elasticProcess->AddDataSet(theHPElasticData);
  pmanager->AddDiscreteProcess(elasticProcess);
*/
  // Neutron inelastic process, models and cross sections

  G4NeutronInelasticProcess* ninelProc = new G4NeutronInelasticProcess();
  G4NeutronHPInelastic* theHPInelasticModel = new G4NeutronHPInelastic();
  G4NeutronHPInelasticData* theHPInelasticData = new G4NeutronHPInelasticData();
  ninelProc->RegisterMe(theHPInelasticModel);
  ninelProc->AddDataSet(theHPInelasticData);
  pmanager->AddDiscreteProcess(ninelProc);

  // Neutron-induced fission process, models and cross sections

  G4HadronFissionProcess* neutronFission = new G4HadronFissionProcess();
  G4NeutronHPFission* theHPFissionModel = new G4NeutronHPFission();
  G4NeutronHPFissionData* theHPFissionData=new G4NeutronHPFissionData();
  neutronFission->RegisterMe(theHPFissionModel);
  neutronFission->AddDataSet(theHPFissionData);
  pmanager->AddDiscreteProcess(neutronFission);

  // Neutron capture process, models and cross sections

  G4HadronCaptureProcess* neutronCapture = new G4HadronCaptureProcess();
  G4NeutronHPCapture* theHPCaptureModel = new G4NeutronHPCapture();
  G4NeutronHPCaptureData* theHPCaptureData = new G4NeutronHPCaptureData();
  neutronCapture->RegisterMe(theHPCaptureModel);
  neutronCapture->AddDataSet(theHPCaptureData);
  pmanager->AddDiscreteProcess(neutronCapture);

}

Simulation output:

*************************************************************
 Geant4 version Name: geant4-08-02    (15-December-2006)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

/home/andy/Geant4/geant4.8.2/data/G4NDL3.10 Segmentation fault

None Mulassis / geant4.8.2 / physics lists  by shri kanekal <shri kanekal>,   10 Apr, 2007

Hi
          I am trying to use a space physics package called Mulassis which runs GEANT4. When I try a "make" on my mac it compiles
fine but does not find physics list links and gives me the error -
warning: this program uses gets(), which is unsafe.
Using granular libraries ...
Linking mulassis ...
/usr/bin/ld: warning -L: directory name (/Applications/geant4.8.2/lib/plists/Darwin-g++) does not exist
/usr/bin/ld: can't locate file for: -lLHEP
collect2: ld returned 1 exit status
make: *** [/Users/shrikanekal/geant4/bin/Darwin-g++/mulassis] Error 1

the make file contains the following lines

CPPFLAGS += \
            -I$(G4INSTALL)/physics_lists/hadronic/Packaging/include \
            -I$(G4INSTALL)/physics_lists/hadronic/LHEP/include \
            -I$(G4INSTALL)/physics_lists/hadronic/LHEP_BERT/include \
            -I$(G4INSTALL)/physics_lists/hadronic/LHEP_BIC/include \
            -I$(G4INSTALL)/physics_lists/hadronic/LHEP_BIC_HP/include \
            -I$(G4INSTALL)/physics_lists/hadronic/LHEP_BIC_HP/include \
            -I$(G4INSTALL)/physics_lists/hadronic/LHEP_BERT_HP/include \
            -I$(G4INSTALL)/physics_lists/hadronic/QGSC/include \
            -I$(G4INSTALL)/physics_lists/hadronic/QGSP_BERT/include \
            -I$(G4INSTALL)/physics_lists/hadronic/QGSP_BERT_HP/include \
            -I$(G4INSTALL)/physics_lists/hadronic/QGSP_BIC/include \
#            -I$(GRASBASE)/source/physics/include \

As i recall in 4.8.2 physics list are elsewhere. What do I replace the above lines with ?

thanks Shri

1 Feedback: Re: Mulassis / geant4.8.2 / physics lists   (Gunter Folger - 11 Apr, 2007)
3 None: Re: Mulassis / geant4.8.2 / physics lists   (Vladimir IVANTCHENKO - 11 Apr, 2007)
1 None: Re: Mulassis / geant4.8.2 / physics lists   (shri.kanekal@lasp.colorado.edu - 11 Apr, 2007)
Question doubt about the Bertini Model in Geant4  Keywords: Bertini model , PreCompound model
by Katherin Shtejer Díaz <kshtejer@if.usp.br>,   23 Mar, 2007

Hello everyone,

Please, I am needing to clarify the following question about Bertini Model. Can somebody assist me?:

When reading the Physics Reference Manual it is not clear for me, if the Bertini Model implementation in Geant4 includes the pre-equilibrium model (PE together with the INC) to support the energies below 200 MeV, or if I need to register some additional precompound model together with Bertini.

My doubt comes from the statement: "the model includes a Bertini intra-nuclear cascade with excitons". This suggests me that the p-h state after the INC stage could be explicitly defined to perform an acceptable interface with the pre-equilibrium phase. But which pre-equilibrium phase, some implemented inside the Model "Bertini-Geant4" or the precompound model registered by myself in the physics list?

I am simulating proton beams in the energy range 0 - 400 MeV and I would like to carry out some tests with the Bertini model from the Geant4 implementation.

Thanks in advance,

Katherin

1 None: Re: doubt about the Bertini Model in Geant4   (Vladimir IVANTCHENKO - 23 Mar, 2007)
(_ None: Re: doubt about the Bertini Model in Geant4   (Katherin Shtejer Díaz - 23 Mar, 2007)
None Secondary generated electrons magnetic deviation  by alex <caraboy@gmail.com>,   21 Mar, 2007

Hello,

I am trying to simulate the passage of protons throught a magnetic dipole, and I activated the following physics processes:

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

// ExN01PhysicsList.cc

// generated by Geant4 Physics Editor at Thu Mar 01 23:17:47 EET 2007

#include "ExN01PhysicsList.hh"

#include "globals.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"

#include "G4ios.hh"

ExN01PhysicsList::ExN01PhysicsList(): G4VUserPhysicsList() { // Here used the default cut value you have typed in

  defaultCutValue = 1.0*cm;
  SetVerboseLevel(1);
}

ExN01PhysicsList::~ExN01PhysicsList() {}

void ExN01PhysicsList::ConstructParticle() { // Here are constructed all particles you have chosen

  ConstructBosons();
  ConstructLeptons();
  ConstructMesons();
  ConstructBaryons();
  ConstructAllShortLiveds();
}

// In this method, static member functions should be called for ALL particles to be used.

void ExN01PhysicsList::ConstructBosons()
{
  //pseudo particles
  G4Geantino::GeantinoDefinition();
  G4ChargedGeantino::ChargedGeantinoDefinition();

  // gamma
  G4Gamma::GammaDefinition();
}
void ExN01PhysicsList::ConstructLeptons()
{

  // leptons
  //  e+/-
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();
  // mu+/-
  G4MuonPlus::MuonPlusDefinition();
  G4MuonMinus::MuonMinusDefinition();
  // nu_e
  G4NeutrinoE::NeutrinoEDefinition();
  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
  // nu_mu
  G4NeutrinoMu::NeutrinoMuDefinition();
  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); 

} void ExN01PhysicsList::ConstructMesons() {

 //  mesons
  //    light mesons
  G4PionPlus::PionPlusDefinition();
  G4PionMinus::PionMinusDefinition();
  G4PionZero::PionZeroDefinition();
  G4Eta::EtaDefinition();
  G4EtaPrime::EtaPrimeDefinition();
  G4KaonPlus::KaonPlusDefinition();
  G4KaonMinus::KaonMinusDefinition();
  G4KaonZero::KaonZeroDefinition();
  G4AntiKaonZero::AntiKaonZeroDefinition();
  G4KaonZeroLong::KaonZeroLongDefinition();
  G4KaonZeroShort::KaonZeroShortDefinition();

}
void ExN01PhysicsList::ConstructBaryons()
{
  //  barions
  G4Proton::ProtonDefinition();
  G4AntiProton::AntiProtonDefinition();

  G4Neutron::NeutronDefinition();
  G4AntiNeutron::AntiNeutronDefinition();
}
void ExN01PhysicsList::ConstructAllShortLiveds()
{
// Here are contructed all short liveds

} void ExN01PhysicsList::ConstructProcess() { // Transportation, electromagnetic and general processes

  AddTransportation();
  ConstructEM();
  ConstructGeneral();
}

#include "G4SynchrotronRadiation.hh"

#include "G4hIonisation.hh"
#include "G4MultipleScattering.hh"

#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"

#include "G4MultipleScattering.hh"

#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"

#include "G4hIonisation.hh"

#include "G4StepLimiter.hh"
#include "G4UserSpecialCuts.hh"

void ExN01PhysicsList::ConstructEM()
{
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

    if (particleName == "gamma") {
      // gamma         
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
      pmanager->AddDiscreteProcess(new G4ComptonScattering);
      pmanager->AddDiscreteProcess(new G4GammaConversion);

    } else if (particleName == "e-") {
      //electron
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);      

    } else if (particleName == "e+") {
      //positron
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
      pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);

    } else if( particleName == "mu+" || 
               particleName == "mu-"    ) {
      //muon  
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4MuIonisation,      -1, 2,2);
      pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 3,3);
      pmanager->AddProcess(new G4MuPairProduction,  -1, 4,4);       

    } else if ((!particle->IsShortLived()) &&
	       (particle->GetPDGCharge() != 0.0) && 
	       (particle->GetParticleName() != "chargedgeantino")) {
      //all others charged particles except geantino
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4hIonisation,       -1, 2,2);
      //step limit
      pmanager->AddProcess(new G4StepLimiter,       -1,-1,3);         
      ///pmanager->AddProcess(new G4UserSpecialCuts,   -1,-1,4);  
    }
  }
}

#include "G4Decay.hh"

void ExN01PhysicsList::ConstructGeneral()
{
   // Add Decay Process
  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) { 
      pmanager ->AddProcess(theDecayProcess);
      // set ordering for PostStepDoIt and AtRestDoIt
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }
}

void ExN01PhysicsList::SetCuts() { // defaultCutValue you have typed in is used

  if (verboseLevel >1){
    G4cout << "ExN01PhysicsList::SetCuts:";
  }
  SetCutsWithDefault();
}
--------------------------------------------------

I obtained the following results: http://img233.imageshack.us/img233/2623/wiredoutputcr1.jpg

http://img144.imageshack.us/img144/5893/wiredoutput1uk1.jpg

The question is: why the secondary electrons (the red trajectories) observed into the magnetic field (into the box) are not deviated by it. Shouldn`t they create a spiral trajectory? I have to activate aditional interaction between the secondary e- and the magnetic field?

The incident protons have 1 GeV energy.

Thank you.

1 None: Re: Secondary generated electrons magnetic deviation   (Vladimir IVANTCHENKO - 21 Mar, 2007)
(_ None: Re: Secondary generated electrons magnetic deviation   (alex - 23 Mar, 2007)
(_ None: Re: Secondary generated electrons magnetic deviation   (Vladimir IVANTCHENKO - 26 Mar, 2007)
None What physics list to use?  by Bari <bari_osmanov@yahoo.com>,   14 Mar, 2007
 Hello, I am a new Geant4 user. I am trying to simulate the interaction 
of neutrons (energy up to 10 MeV) with U-233 and Am-243 targets. I will
 need to take into account 4 processes: elastic and inelastic scattering,
capture and fission. The latter is the most important process for me.
 I will appreciate if somebody can advise me what is the best physics list
to use for this simulation. Or will I have to make up my own physics list?

 Also if it is possible, can someone give me a link to the description of 
available physics lists. I could not find it on Geant4 website.

 Thank You in advance.

Bari.
1 More: Re: What physics list to use?   (bari_osmanov@yahoo.com - 21 Mar, 2007)
(_ None: Re: What physics list to use?   (wangphysics - 01 Aug, 2007)
None Physics List Descriptions wanted  by Tom Roberts <Tom Roberts>,   07 Mar, 2007

I am supporting a general program based on Geant4 used by numerous other users. I make all of the physics lists available to my users, and want to provide descriptions to assist them in selecting the appropriate list for their application. A year or two ago I grabbed a snapshot of the descriptions of all of the physics lists, but it's been a while since I updated my program's list of physics lists. Recently (Geant4 8.2) I added all lists I did not have before, but I could find no descriptions of the new ones.

Why aren't the physics lists documented in the Physics Reference Manual? What would it take to get them in there? Where are they documented? (google helped me find a 2-year-old reference to a website for which I have no access permission) Why aren't they in the Software Reference Manual? (but being in the physics manual would take precedence IMHO)

I have 1-paragraph descriptions of the older physics lists (aka "use cases"), but what are these: FTFC, LHEP_BERT_HP, LHEP_BIC_HP, LHEP_EMV, QBBC, QGSC_EFLOW, QGSC_EMV, QGSP_BERT_HP, QGSP_BIC_HP, QGSP_EMV, QGSP_EMX, QGSP_QEL? (I could make guesses, but would prefer someone who really understands them to provide descriptions.)