Geant4
11.2.2
Toolkit for the simulation of the passage of particles through matter
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
m
n
o
p
q
r
s
t
u
w
z
Variables
c
d
e
g
h
i
k
l
m
n
o
p
q
s
t
v
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
w
Enumerations
a
b
c
d
e
f
g
l
m
p
r
s
t
v
y
z
Enumerator
a
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
g
k
l
m
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Symbols
:
a
b
c
d
g
h
i
o
q
r
s
t
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Enumerations
b
c
d
e
f
g
i
j
l
m
n
p
s
t
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
▼
Geant4
Deprecated List
Todo List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
geant4-v11.2.2
▼
source
►
analysis
►
digits_hits
►
error_propagation
▼
event
▼
include
►
evtdefs.hh
►
G4AdjointPosOnPhysVolGenerator.hh
►
G4AdjointPrimaryGenerator.hh
►
G4AdjointStackingAction.hh
►
G4ClassificationOfNewTrack.hh
►
G4Event.hh
►
G4EventManager.hh
►
G4EvManMessenger.hh
►
G4GeneralParticleSource.hh
►
G4GeneralParticleSourceData.hh
►
G4GeneralParticleSourceMessenger.hh
►
G4HEPEvtInterface.hh
►
G4HEPEvtParticle.hh
►
G4MultiEventAction.hh
►
G4ParticleGun.hh
►
G4ParticleGunMessenger.hh
►
G4PrimaryTransformer.hh
►
G4RayShooter.hh
►
G4SingleParticleSource.hh
►
G4SmartTrackStack.hh
►
G4SPSAngDistribution.hh
►
G4SPSEneDistribution.hh
►
G4SPSPosDistribution.hh
►
G4SPSRandomGenerator.hh
►
G4StackChecker.hh
►
G4StackedTrack.hh
►
G4StackingMessenger.hh
►
G4StackManager.hh
►
G4SubEvent.hh
►
G4SubEventTrackStack.hh
►
G4TrackStack.hh
►
G4TrajectoryContainer.hh
►
G4UserEventAction.hh
►
G4UserStackingAction.hh
►
G4VPrimaryGenerator.hh
►
G4VUserEventInformation.hh
►
src
►
externals
►
g3tog4
►
geometry
►
global
►
graphics_reps
►
intercoms
►
interfaces
►
materials
►
parameterisations
►
particles
►
persistency
►
physics_lists
►
processes
►
readout
►
run
►
track
►
tracking
►
visualization
►
File Members
►
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
G4HEPEvtInterface.hh
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
// G4HEPEvtInterface
27
//
28
// Class description:
29
//
30
// This is a concrete class of G4VPrimaryGenerator.
31
// It reads an ASCII file which contains particles generated by a
32
// physics generator which supports a /HEPEVT/ common block.
33
//
34
// The format of ASCII file must be equivalent to the following sample
35
// Fortran code:
36
//
37
//***********************************************************
38
// SUBROUTINE HEP2G4
39
//*
40
//* Output /HEPEVT/ event structure to G4HEPEvtInterface
41
//*
42
//***********************************************************
43
// PARAMETER (NMXHEP=2000)
44
// COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
45
// >JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
46
// DOUBLE PRECISION PHEP,VHEP
47
//*
48
// WRITE(6,*) NHEP
49
// DO IHEP=1,NHEP
50
// WRITE(6,10)
51
// > ISTHEP(IHEP),IDHEP(IHEP),JDAHEP(1,IHEP),JDAHEP(2,IHEP),
52
// > PHEP(1,IHEP),PHEP(2,IHEP),PHEP(3,IHEP),PHEP(5,IHEP)
53
//10 FORMAT(I4,I10,I5,I5,4(1X,D15.8))
54
// ENDDO
55
//*
56
// RETURN
57
// END
58
//
59
// The position and time of the primary interaction must be set by the
60
// corresponding set methods of G4VPrimaryGenerator base class, otherwise
61
// zero will be set.
62
63
// Author: Makoto Asai, 1997
64
// --------------------------------------------------------------------
65
#ifndef G4HEPEvtInterface_hh
66
#define G4HEPEvtInterface_hh 1
67
68
#include <fstream>
69
#include <vector>
70
71
#include "
globals.hh
"
72
#include "
G4VPrimaryGenerator.hh
"
73
#include "
G4HEPEvtParticle.hh
"
74
75
class
G4PrimaryVertex
;
76
class
G4Event
;
77
78
class
G4HEPEvtInterface
:
public
G4VPrimaryGenerator
79
{
80
public
:
81
82
explicit
G4HEPEvtInterface
(
const
char
* evfile,
G4int
vl=0);
83
// Constructor, "evfile" is the file name (with directory path).
84
85
~G4HEPEvtInterface
()
override
=
default
;
86
// Destructor
87
88
void
GeneratePrimaryVertex
(
G4Event
* evt)
override
;
89
90
private
:
91
92
G4int
vLevel = 0;
93
G4String
fileName;
94
std::ifstream inputFile;
95
std::vector<G4HEPEvtParticle*> HPlist;
96
};
78
class
G4HEPEvtInterface
:
public
G4VPrimaryGenerator
{
…
};
97
98
#endif
G4HEPEvtParticle.hh
G4int
int G4int
Definition
G4Types.hh:85
G4VPrimaryGenerator.hh
G4Event
Definition
G4Event.hh:60
G4HEPEvtInterface
Definition
G4HEPEvtInterface.hh:79
G4HEPEvtInterface::~G4HEPEvtInterface
~G4HEPEvtInterface() override=default
G4HEPEvtInterface::G4HEPEvtInterface
G4HEPEvtInterface(const char *evfile, G4int vl=0)
Definition
G4HEPEvtInterface.cc:42
G4HEPEvtInterface::GeneratePrimaryVertex
void GeneratePrimaryVertex(G4Event *evt) override
Definition
G4HEPEvtInterface.cc:62
G4PrimaryVertex
Definition
G4PrimaryVertex.hh:51
G4String
Definition
G4String.hh:62
G4VPrimaryGenerator
Definition
G4VPrimaryGenerator.hh:45
globals.hh
geant4-v11.2.2
source
event
include
G4HEPEvtInterface.hh
Generated by
1.12.0