Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No products in LiF target by thermal neutrons #117

Open
tsiledak opened this issue Sep 12, 2023 · 3 comments
Open

No products in LiF target by thermal neutrons #117

tsiledak opened this issue Sep 12, 2023 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@tsiledak
Copy link

tsiledak commented Sep 12, 2023

Dear experts,

I am trying with restRoot to study thermal neutrons that hit a target of LiF (0.35 microns in thickness) and produce alphas and tritons of ~ 2 MeV in a gas mixture. With geant4 as a standalone code it works! But no events are saved to output file (on the other hand with alphas etc it works!) using rest.

$ export REST_FOIL=0.35
$ export REST_ENERGY=0.000000025

and

$ restG4 neutrons.rml

with:

neutrons.rml:

and

geometry.gdml

<physvol name="gas">
    <volumeref ref="gasVolume"/>
    <position name="gasPos" unit="mm" x="0" y="0" z="0"/>
</physvol>

<physvol name="cathode">
    <volumeref ref="cathodeVolume"/>
    <position name="cathodePos" unit="mm" x="0" y="0" z="-5-foilThickness"/>
</physvol>

and

setup.gdml

		<!-- ##VERSION REST Example 08.Alphas Foil thickness : ${REST_FOIL} um Version 1.0## -->
    <!ENTITY materials SYSTEM "https://rest-for-physics.github.io/materials/rest.xml">
    ]>

<!-- All values should be in mm -->

<define>
    <constant name="world_size" value="20000"/>
	<constant name="foilThickness" value="0.001*${REST_FOIL}"/>

	<!-- Aproximate density values for 1-atm -->
	<variable name="targetGasDensity" value="1.664"/> <!-- g/cm3 -->
    <variable name="quencherDensity" value="2.51"/>
    <variable name="quencherFraction" value="0.01"/>
    <variable name="gasTemperature" value="300"/>
    <variable name="gasPressure" value="1"/>
</define>

&materials;

&geometry;


<setup name="Default" version="1.0">
    <world ref="World"/>
</setup>

I wonder whether you could have a look and let me know where is the mistake...

Thanks a lot in advance

Best regards

Georgios

@lobis
Copy link
Member

lobis commented Sep 12, 2023

Hello,

I remember I stumbled upon a similar problem a few months ago. In my case the problem was due to the tritium not decaying due to the configuration of the decay physics list.

I submitted a fix on #68.

In order to correcly simulate the tritium decay you will need to set the following option in the decay physics list:

<physicsList name="G4RadioactiveDecay">
    <option name="TritiumDecay" value="true"/>
</physicsList>

I'm not quite sure why this needs to be explicitly enabled. It probably has to do with the validation pipeline since enabling this new decay would probably affect in a very minor way the results of the validation simulations and this would require to update all reference files. Perhaps we can discuss this @jgalan at some point.

Please @tsiledak let us know if this solves your issue.

Regards,
Luis

@lobis lobis self-assigned this Sep 12, 2023
@lobis lobis added the question Further information is requested label Sep 12, 2023
@tsiledak
Copy link
Author

neutrons.rml.txt
geometry.gdml.txt
setup.gdml.txt

I have tried but in vein...
No events are recorded...

============================= Run Summary =============================
0 events stored out of 100000 simulated events

                         [==                       DataBase Entry Added! Run Number: 1, File ID: 0                        ==]                             
                         [==                                TRestRun: Output File Updated.                                ==]                             
                         [==    - Path : /local/home/gt226504/rest-framework/install/examples/restG4/08.Alphas_n/data     ==]                             
                         [==                         - Filename : Run_0.000000025MeV_0.35um.root                          ==]                             
                         ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                             
                         ||                                  TRestGeant4Metadata content                                   ||                             
                         ||                                   Config file : neutrons.rml                                   ||                             
                         ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                             
                         ||                                        Name : neutrons                                         ||                             
                         ||                                        Title : Neutrons                                        ||                             
                         ||                                      REST Version : 2.4.0                                      ||                             
                         ||                                   REST Official release: Yes                                   ||                             
                         ||                                        Clean state: Yes                                        ||                             
                         ||                                     REST Commit : 075f65d7                                     ||                             
                         ||                                   REST Library version : 2.1                                   ||                             
                         ----------------------------------------------------------------------------------------------------                             
                         ||                                     Geant4 version: 11.0.3                                     ||                             
                         ||                                     Random seed: 17021981                                      ||                             
                         ||          GDML geometry:  REST Example 08.Alphas Foil thickness : 0.35 um Version 1.0           ||                             
                         ||                         GDML materials reference:  REST materials 1.5                          ||                             
                         ||                                  Sub-event time delay: 100 us                                  ||                             
                         ||                                  Magnetic field: (0, 0, 0) T                                   ||                             
                         ||                             Register empty tracks was NOT enabled                              ||                             
                         ||                                                                                                ||                             
                         ||                                ++++++++++ Generator +++++++++++                                ||                             
                         ||                               Number of generated events: 100000                               ||                             
                         ||                                     Generator type: Point                                      ||                             
                         ||                                Generator center : (0,0,-500) mm                                ||                             
                         ||                            Generator rotation : (0,0,1), angle: 0º                            ||                             
                         ||                                                                                                ||                             
                         ||                                 Particle Source Name: neutron                                  ||                             
                         ||                                Angular distribution type: Flux                                 ||                             
                         ||                            Angular distribution direction: (0,0,1)                             ||                             
                         ||                                 Energy distribution type: Mono                                 ||                             
                         ||                            Energy distribution energy: 2.5e-05 keV                             ||                             
                         ||                                                                                                ||                             
                         ||                                ++++++++++ Detector +++++++++++                                 ||                             
                         ||                                 Energy range (keV): (0, 3000)                                  ||                             
                         ||                                 Number of sensitive volumes: 1                                 ||                             
                         ||                                     Sensitive volume: gas                                      ||                             
                         ||                                  Number of active volumes: 3                                   ||                             
                         ||                          Name: gas, ID: 0, maxStep: 0.5mm , chance: 1                          ||                             
                         ||                        Name: World_PV, ID: 1, maxStep: 0mm , chance: 1                         ||                             
                         ||                         Name: cathode, ID: 2, maxStep: 0mm , chance: 1                         ||                             
                         ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                             
                         ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                             
                         ||                                        TRestRun content                                        ||                             
                         ||                                   Config file : neutrons.rml                                   ||                             
                         ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                             
                         ||                                      Name : Run metadata                                       ||                             
                         ||                           Title : REST Metadata run info (template)                            ||                             
                         ||                                      REST Version : 2.4.0                                      ||                             
                         ||                                   REST Official release: Yes                                   ||                             
                         ||                                        Clean state: Yes                                        ||                             
                         ||                                     REST Commit : 075f65d7                                     ||                             
                         ||                                    REST Library version : 0                                    ||                             
                         ----------------------------------------------------------------------------------------------------                             
                         ||                                        Version : 2.4.0                                         ||                             
                         ||                                     Parent run number : 0                                      ||                             
                         ||                                         Run number : 1                                         ||                             
                         ||                                 Experiment/project : Neutrons                                  ||                             
                         ||                                       Run type : restG4                                        ||                             
                         ||                                Run tag : 0.000000025MeV_0.35um                                 ||                             
                         ||                                      Run user : gt226504                                       ||                             
                         ||                                       Run description :                                        ||                             
                         ||                      Start Date/Time : 2023/09/12 17:45:26 (1.69453e+09)                       ||                             
                         ||                       End Date/Time : 2023/09/12 17:46:10 (1.69453e+09)                        ||                             
                         ||                                         Input file :                                           ||                             
                         ||                          Output file : Run_0.000000025MeV_0.35um.root                          ||                             
                         ||                                      Number of events : 0                                      ||                             
                         ----------------------------------------------------------------------------------------------------         

@jgalan
Copy link
Member

jgalan commented Sep 13, 2023

Hi @tsiledak and @lobis I modified the RML to enable saveAllEvents and to add the cathode as a sensitive volume.

        <parameter name="saveAllEvents" value="true"/>

and

        <detector>
            <parameter name="energyRange" value="(0,3)" units="MeV"/>
            <volume name="gas" sensitive="true" maxStepSize="0.5mm"/>
            <volume name="cathode" sensitive="true" maxStepSize="0.5mm"/>
        </detector>

Then, I get the following inside the event, when I open using restRoot Run_0.000000025MeV_0.35um.root

root [1] ev
(TRestGeant4Event *) 0x55acc89028a0
root [2] ev->PrintEvent()

EventID: 0 - SubEventID: 0
- Timestamp: Wed, 13 Sep 2023 13:19:44 +0000 (GMT) +        0 nsec
- Total deposited energy: 0
- Sensitive detectors total energy: 0
- Primary source position: (0.000, 0.000, -500.000) mm
   - Source primary particle: neutron
     Direction: (0.000, 0.000, 1.000)
     Energy: 25.00 meV

Total number of tracks: 1
 * TrackID: 1 - Particle: neutron - ParentID: 0 - Created by 'PrimaryGenerator' with initial KE of 25.00 meV
   Initial position (0.000, 0.000, -500.000) mm at time 0 - Time length of 226.34 us and spatial length of 495.00 mm
      - Hit 0 - Energy: 0 - Process: Init - Volume: World_PV - Position: (0.000, 0.000, -500.000) mm - Time: 0 - KE: 25.00 meV
      - Hit 1 - Energy: 0 - Process: Transportation - Volume: World_PV - Position: (0.000, 0.000, -5.001) mm - Time: 226.34 us - KE: 25.00 meV
      - Hit 2 - Energy: 0 - Process: nKiller - Volume: cathode - Position: (0.000, 0.000, -5.001) mm - Time: 226.34 us - KE: 25.00 meV
root [3] 

Perhaps the nKiller process might give a hint of what is going on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants