Message: generate primaries from ascii file Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None generate primaries from ascii file 

Forum: Particles
Date: 28 Sep, 2018
From: Paolo Russotto <Paolo Russotto>

Hi, first of all thanks in advance for any answer. I am quite new to Genat4 an I have no idea of how to do what I need. I am using geant4.9.6.p04 and I have dome my set-up starting from examples/basic/B1. Now I need to shoot particles with , event by event, variables energy, Z, A, charge state and angle. I need about 10000 of events Here is what I need to generate, from an ascii file N. of evt Z A Enegry (MeV) theta(deg) phi (deg)

0 40 86 0.374536 7.91168 -55.5098 1 40 85 0.0428785 2.66815 128.462 2 40 85 0.122001 4.52225 -54.8803 3 39 85 0.164376 5.14129 120.88 4 40 85 0.342597 7.26707 160.397 6 40 85 0.0470977 1.64008 -160.925 7 39 85 0.367254 7.84153 -104.748 9 38 82 0.706442 11.1633 -145.09 10 40 85 0.0852638 2.17223 178.024 11 38 84 0.501596 5.88557 149.87 12 38 82 0.999065 12.5949 15.7709 .................................

At the end I need the results of all those events summed out in a histo, I am yet able to do that...but I have no idea of how to modify the example/basic/src/B1PrimaryGeneratorAction.cc to get that. Thanks alot in advance.

 Add Message Add Message
to: "generate primaries from ascii file"

 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 ]