Problem 1336

Summary: Data file input problem in G4RadioactiveDecay.cc line 671
Product: Geant4 Reporter: Daisuke Motoki <d.motoki>
Component: processes/hadronic/models/radioactive_decayAssignee: dennis.herbert.wright
Status: RESOLVED FIXED    
Severity: minor    
Priority: P5    
Version: 9.5   
Hardware: PC   
OS: Linux   
Attachments: Beta spectrum of G4 output

Description Daisuke Motoki 2012-07-12 08:41:55 CEST

    
Comment 1 Daisuke Motoki 2012-07-12 09:09:23 CEST
Created attachment 176 [details]
Beta spectrum of G4 output
Comment 2 Daisuke Motoki 2012-07-12 09:09:49 CEST
For new corrections of beta decay (Fermi's correction and Shape factor), "betaType" should be applied from data files.
But line 671 changes "betaType" to default value "allowed" even if the data file has correct values (such as "uniqueThirdForbidden").

I changed the line as follows.
if (inputLine.length() < 80) betaType = allowed;
=>if(betaType==notImplemented) betaType = allowed;

Beta spectrum seems better than previous.
I attached the example spectrum of K40.

I'm not sure this is really bug or not.
Any information you can provide us will be very helpful and appreciated.

Best regards,
Comment 3 Daisuke Motoki 2012-07-12 09:12:49 CEST
Geant version is 4.9.5.p01 with RadioactiveDecay3.4.
Comment 4 dennis.herbert.wright 2012-07-17 02:37:54 CEST
In the unmodified code, betaType defaults to "allowed" and only becomes otherwise if the length of the line is > 80 characters. In the RadioactiveDecay3.4 files the only lines with more than 80 characters are those which have some kind of "forbidden" entry, and so the code should be getting the correct shape without code modification.  Your plot indeed looks like it shows the difference between allowed and unique forbidden, so I'm puzzled why you didn't see the correct shape in the first place.  The code should be reading in 100 character lines.
Comment 5 Daisuke Motoki 2012-07-17 16:32:32 CEST
Thank you for your comments.

In my system, "inputLine.length()" always returns lower values than 80, even if the decay mode was forbidden. For example, file "z19.a40" includes unique third forbidden entry, but the line length is 77. Actually, when I output the value of betaType by G4cout, its value was changed from 6(forbidden) to 0(allowed) before and after the line 671. Is this not happened in your system?

My system is
Linux with gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)

Sincerely yours,
D.Motoki
Comment 6 dennis.herbert.wright 2012-07-17 18:18:56 CEST
Apparently there was a mix-up in putting the corrected version of RadioactiveDecay3.4 into the Geant4 download area.  I have asked the new version to be put there, and it should be available soon.  Until that is done, you may modify your copy of the files so that data values in the line

  BetaMinus       0.0000   8.9140e+01    1311.0900    uniqueThirdForbidden

line up with the other columns.   Then the various forbidden fields will extend well beyond 80 characters and the code should work.
Comment 7 Daisuke Motoki 2012-07-18 03:06:59 CEST
OK. I'll wait the corrected version. Until that, I carry on my simulation with my modification tentatively.

I appreciate for your support.

Sincerely,
D.Motoki
Comment 8 dennis.herbert.wright 2012-10-05 01:03:44 CEST
Fix will appear in Geant4 9.6 in December.