Import Geant4 11.1.0.beta source tree
This commit is contained in:
@@ -55,7 +55,7 @@ PhysicsList.cc defines only geantino and transportation process.
|
||||
Energy is sampled from a tabulated function defined in InitFunction().
|
||||
The function is assumed positive, linear per segment, continuous.
|
||||
Two sampling methods are illustrated : RejectAccept() and InverseCumul()
|
||||
(see Particle Data book, Monte Carlo techniques).
|
||||
(see Particle Data Group: pdg.lbl.gov --> Monte Carlo techniques)
|
||||
|
||||
Histogram 1 shows generated energy spectrum.
|
||||
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
-----------------------------------------------------
|
||||
# Example particleGun History
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
ParticleGun History file
|
||||
------------------------
|
||||
This file should be used by the G4 example coordinator to briefly
|
||||
summarize all major modifications introduced in the code and keep
|
||||
track of all tags.
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
## 2022-21-01 mma (particleGunExample-V11-00-01)
|
||||
- Update reference in PrimaryGeneratorAction2.cc
|
||||
|
||||
## 2021-12-10 Ben Morgan (particleGunExample-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
---
|
||||
|
||||
# History entries prior to 11.0
|
||||
|
||||
06-10-21 I. Hrivnacova (particleGunExample-V10-07-02)
|
||||
- Migration to new G4AnalysisManager.hh header;
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
Energy is sampled from a tabulated function defined in InitFunction().
|
||||
The function is assumed positive, linear per segment, continuous.
|
||||
Two sampling methods are illustrated : RejectAccept() and InverseCumul()
|
||||
(see Particle Data book, Monte Carlo techniques).
|
||||
(see Particle Data Group: pdg.lbl.gov --> Monte Carlo techniques)
|
||||
Histogram 1 shows generated energy spectrum.
|
||||
|
||||
3.3- Divergent beam in an arbitrary direction with rotation matrix
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-00-patch-02 (25-May-2022)
|
||||
Geant4 version Name: geant4-11-01-beta-01 (30-June-2022)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -67,7 +67,7 @@ Step# X Y Z KineE dEStep StepLeng T
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.000396s Sys=0.000000s
|
||||
User=0.000000s Real=0.000378s Sys=0.000000s
|
||||
#
|
||||
/tracking/verbose 0
|
||||
/run/beamOn 5
|
||||
@@ -87,7 +87,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 5
|
||||
User=0.000000s Real=0.000049s Sys=0.000000s
|
||||
User=0.000000s Real=0.000041s Sys=0.000000s
|
||||
G4 kernel has come to Quit state.
|
||||
================== Deleting memory pools ===================
|
||||
Number of memory pools allocated: 9 of which, static: 0
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-00-patch-02 (25-May-2022)
|
||||
Geant4 version Name: geant4-11-01-beta-01 (30-June-2022)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -50,7 +50,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100000
|
||||
User=0.200000s Real=0.198842s Sys=0.000000s
|
||||
User=0.160000s Real=0.162199s Sys=0.000000s
|
||||
... write file : run2.root - done
|
||||
... close file : run2.root - done
|
||||
G4 kernel has come to Quit state.
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-00-patch-02 (25-May-2022)
|
||||
Geant4 version Name: geant4-11-01-beta-01 (30-June-2022)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -51,7 +51,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100000
|
||||
User=0.200000s Real=0.210217s Sys=0.010000s
|
||||
User=0.180000s Real=0.183169s Sys=0.010000s
|
||||
... write file : run3.root - done
|
||||
... close file : run3.root - done
|
||||
G4 kernel has come to Quit state.
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-00-patch-02 (25-May-2022)
|
||||
Geant4 version Name: geant4-11-01-beta-01 (30-June-2022)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -66,7 +66,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1000000
|
||||
User=2.630000s Real=2.670394s Sys=0.000000s
|
||||
User=2.650000s Real=2.687306s Sys=0.000000s
|
||||
... write file : run4.root - done
|
||||
... close file : run4.root - done
|
||||
G4 kernel has come to Quit state.
|
||||
|
||||
@@ -61,10 +61,10 @@ PrimaryGeneratorAction2::~PrimaryGeneratorAction2()
|
||||
|
||||
void PrimaryGeneratorAction2::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
//cosAlpha uniform in [cos(0), cos(pi)]
|
||||
G4double cosAlpha = 1. - 2*G4UniformRand();
|
||||
// uniform solid angle
|
||||
G4double cosAlpha = 1. - 2*G4UniformRand(); //cosAlpha uniform in [-1,+1]
|
||||
G4double sinAlpha = std::sqrt(1. - cosAlpha*cosAlpha);
|
||||
G4double psi = twopi*G4UniformRand(); //psi uniform in [0, 2*pi]
|
||||
G4double psi = twopi*G4UniformRand(); //psi uniform in [0, 2*pi]
|
||||
G4ThreeVector dir(sinAlpha*std::cos(psi),sinAlpha*std::sin(psi),cosAlpha);
|
||||
|
||||
fParticleGun->SetParticleMomentumDirection(dir);
|
||||
@@ -126,7 +126,8 @@ G4double PrimaryGeneratorAction2::RejectAccept()
|
||||
{
|
||||
// tabulated function
|
||||
// Y is assumed positive, linear per segment, continuous
|
||||
//
|
||||
// (see Particle Data Group: pdg.lbl.gov --> Monte Carlo techniques)
|
||||
//
|
||||
G4double Xrndm = 0., Yrndm = 0., Yinter = -1.;
|
||||
|
||||
while (Yrndm > Yinter) {
|
||||
@@ -149,6 +150,7 @@ G4double PrimaryGeneratorAction2::InverseCumul()
|
||||
// tabulated function
|
||||
// Y is assumed positive, linear per segment, continuous
|
||||
// --> cumulative function is second order polynomial
|
||||
// (see Particle Data Group: pdg.lbl.gov --> Monte Carlo techniques)
|
||||
|
||||
//choose y randomly
|
||||
G4double Yrndm = G4UniformRand()*fYC[fNPoints-1];
|
||||
|
||||
Reference in New Issue
Block a user