Message: How to use and normalise an energy spectrum as input Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question How to use and normalise an energy spectrum as input 

Forum: Space Applications
Date: 27 Jul, 2016
From: Germán Ros <Germán Ros>


I am trying to use an energy spectrum as an input and I have seen the example called "radioprotection" in the G4 advanced examples where this is done using the configuration file "primary.mac". Unfortunately I have several problems and things I do not really understand and I have not found the answer in Geant4 forum or elsewhere.

I would be very grateful if someone could help me.

I have the differential and integral spectrum of galactic cosmic rays obtained from SPENVIS. I have found an excel file that is used by several people in this forum to create the G4 configuration file given an energy spectrum, exactly what I need.

Using it, I have created my configuration file that it is attached (GCRs_Carbon.mac). But I have several problems:

1) Following the .xls file, in the .mac file I have defined two histograms, one with the differential spectrum and a second one with the probabilities and weights for each energy. However in primary.mac only the first histo is defined, so ¿is the second one really needed?

2) Again, following the .xls file, I have calculated a normalization factor (at the end of GCRs_Carbon.mac). However, again in primary.mac a normalization factor is not used. I think it is needed since I have to simulate several nuclei and compare the different components, but ¿am I correct or this factor is not needed?

3) Why in the .xls file the normalization factor has /cm2/s as units but when translated to G4 code is set as cm2?

4) When trying to run geant4 with my GCRs_Carbon.mac the line /analysis/normalise 7.305E+08 give me a core dump with no other information. ¿Do you know what am I doing wrong?

5) A more general question. When you use a spectrum as input, how are particles simulated in time? I mean, all of them are thrown at the same time, uniformly in a time interval that should be defined (how?) or something else?

Thank you very much in advanced

Best Regards,

Germán Ros


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

1 None: Re: How to use and normalise an energy spectrum as input   (Sveta - 28 Jul, 2016)
2 None: Re: How to use and normalise an energy spectrum as input   (Germán Ros - 07 Sep, 2016)
 Add Message Add Message
to: "How to use and normalise an energy spectrum as input"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]