Problem 1936 - Error in rdecay02
Summary: Error in rdecay02
Status: RESOLVED FIXED
Alias: None
Product: Examples/Extended
Classification: Unclassified
Component: radioactivedecay/exrdm (show other problems)
Version: 10.3
Hardware: Other Linux
: P4 minor
Assignee: dennis.herbert.wright
URL:
Depends on:
Blocks:
 
Reported: 2017-02-02 07:34 CET by Ken
Modified: 2017-06-16 02:07 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Ken 2017-02-02 07:34:20 CET
I tried running the radioactivedecay example in the latest geant4 version. I could Run rdecay01 and manage to visualised rdecay01. But for some reason rdecay02 seem fail to work.

i tried change part of the code in the main() of decay02 where it define visualization and UI terminal,

from

{ 
#ifdef G4VIS_USE
      G4VisManager* visManager = new G4VisExecutive;
      visManager->Initialize();
#endif    
     
#ifdef G4UI_USE
      G4UIExecutive * ui = new G4UIExecutive(argc,argv);      
      ui->SessionStart();
      delete ui;
#endif
          
#ifdef G4VIS_USE
     delete visManager;
#endif     
    }

to 

{ 
#ifdef G4UI_USE
     G4UIExecutive * ui = new G4UIExecutive(argc,argv);      
#ifdef G4VIS_USE
     UI->ApplyCommand("/control/execute vis.mac");          
#endif
     ui->SessionStart();
     delete ui;
#endif
    }
Comment 1 Ken 2017-02-02 07:36:44 CET
I could run redcay02 after that, but I figure I should report it so the proper fix can be address to it as I am still new to geant4
Comment 2 Ken 2017-02-10 04:28:54 CET
Just add another problem i run into is that when I tried run the macro u238.mac I could get a spectrum for the decay emission but as for energy deposited in target\detector, there are zero energy/no spectrum in this case.
Comment 3 dennis.herbert.wright 2017-06-16 02:07:56 CEST
The code in the example is correct as it is.
Your first problem is due to running in batch mode instead of interactive.
To get the visualization, start the run by

./rdecay02

then at the prompt enter

/control/execute vis.mac

You will then see the geometry.  Next, run some events:

/run/beamOn 10

and tracks should appear.



Your problem with u238.mac is due to poor documentation on our part.  
All histograms but the decay emission spectrum are turned off initially 
to save space for our testing routines.   To turn them on, put the command

/analysis/h1/setActivationToAll true

or 

/analysis/h1/setActivation i true

in your copy of u238.mac, or issue it from the Idle> prompt.

i is the index of the histogram you want to turn off.