ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4PrimaryVertex.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4PrimaryVertex.hh
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
//
27
//
28
//
29
// class description:
30
//
31
// This is the class which represents a primary vertex. The object of this
32
// class is set to G4Event object by G4VPrimaryGenerator concrete class.
33
// This class object has one or more G4PrimaryParticle objects as primary
34
// particles.
35
// --------------------------------------------------------------------
36
#ifndef G4PrimaryVertex_h
37
#define G4PrimaryVertex_h 1
38
39
#include "
globals.hh
"
40
#include "
pwdefs.hh
"
41
#include "
G4Allocator.hh
"
42
#include "
G4ThreeVector.hh
"
43
#include "
G4PrimaryParticle.hh
"
44
45
class
G4VUserPrimaryVertexInformation
;
46
47
class
G4PrimaryVertex
48
{
49
public
:
50
inline
void
*
operator
new
(size_t);
51
inline
void
operator
delete
(
void
*aStackedTrack);
52
53
public
:
// with description
54
G4PrimaryVertex
();
55
G4PrimaryVertex
(
G4double
x0,
G4double
y0,
G4double
z0
,
G4double
t0);
56
G4PrimaryVertex
(
G4ThreeVector
xyz0,
G4double
t0);
57
virtual
~G4PrimaryVertex
();
58
59
public
:
60
G4PrimaryVertex
(
const
G4PrimaryVertex
&
right
);
61
G4PrimaryVertex
&
operator=
(
const
G4PrimaryVertex
&right);
62
63
G4bool
operator==
(
const
G4PrimaryVertex
&right)
const
;
64
G4bool
operator!=
(
const
G4PrimaryVertex
&right)
const
;
65
66
public
:
// with description
67
G4ThreeVector
GetPosition
()
const
;
68
void
SetPosition
(
G4double
x0,
G4double
y0,
G4double
z0);
69
G4double
GetX0
()
const
;
70
G4double
GetY0
()
const
;
71
G4double
GetZ0
()
const
;
72
G4double
GetT0
()
const
;
73
void
SetT0
(
G4double
t0);
74
G4int
GetNumberOfParticle
()
const
;
75
void
SetPrimary
(
G4PrimaryParticle
*
pp
);
76
G4PrimaryParticle
*
GetPrimary
(
G4int
i=0)
const
;
77
void
SetNext
(
G4PrimaryVertex
* nv);
78
void
ClearNext
();
79
G4PrimaryVertex
*
GetNext
()
const
;
80
G4double
GetWeight
()
const
;
81
void
SetWeight
(
G4double
w
);
82
void
SetUserInformation
(
G4VUserPrimaryVertexInformation
* anInfo);
83
G4VUserPrimaryVertexInformation
*
GetUserInformation
()
const
;
84
85
void
Print
()
const
;
86
87
private
:
88
G4double
X0
;
89
G4double
Y0
;
90
G4double
Z0
;
91
G4double
T0
;
92
G4PrimaryParticle
*
theParticle
;
93
G4PrimaryParticle
*
theTail
;
94
G4PrimaryVertex
*
nextVertex
;
95
G4PrimaryVertex
*
tailVertex
;
96
G4int
numberOfParticle
;
97
G4double
Weight0
;
98
G4VUserPrimaryVertexInformation
*
userInfo
;
99
100
};
101
102
extern
G4PART_DLL
G4Allocator<G4PrimaryVertex>
*&
aPrimaryVertexAllocator
();
103
104
inline
void
* G4PrimaryVertex::operator
new
(size_t)
105
{
106
if
(!
aPrimaryVertexAllocator
())
107
{
108
aPrimaryVertexAllocator
() =
new
G4Allocator<G4PrimaryVertex>
;
109
}
110
return
(
void
*)
aPrimaryVertexAllocator
()->MallocSingle();
111
}
112
113
inline
void
G4PrimaryVertex::operator
delete
(
void
* aPrimaryVertex)
114
{
115
aPrimaryVertexAllocator
()->FreeSingle((
G4PrimaryVertex
*) aPrimaryVertex);
116
}
117
118
inline
G4ThreeVector
G4PrimaryVertex::GetPosition
()
const
119
{
return
G4ThreeVector
(
X0
,
Y0
,
Z0
); }
120
121
inline
void
G4PrimaryVertex::SetPosition
(
G4double
x0,
G4double
y0,
G4double
z0
)
122
{
X0
= x0;
Y0
= y0;
Z0
=
z0
; }
123
124
inline
G4double
G4PrimaryVertex::GetX0
()
const
125
{
return
X0
; }
126
127
inline
G4double
G4PrimaryVertex::GetY0
()
const
128
{
return
Y0
; }
129
130
inline
G4double
G4PrimaryVertex::GetZ0
()
const
131
{
return
Z0
; }
132
133
inline
G4double
G4PrimaryVertex::GetT0
()
const
134
{
return
T0
; }
135
136
inline
void
G4PrimaryVertex::SetT0
(
G4double
t0)
137
{
T0
= t0; }
138
139
inline
G4int
G4PrimaryVertex::GetNumberOfParticle
()
const
140
{
return
numberOfParticle
; }
141
142
inline
void
G4PrimaryVertex::SetPrimary
(
G4PrimaryParticle
*
pp
)
143
{
144
if
(
theParticle
== 0) {
theParticle
=
pp
; }
145
else
{
theTail
->
SetNext
(pp); }
146
theTail
=
pp
;
147
numberOfParticle
++;
148
}
149
150
inline
void
G4PrimaryVertex::SetNext
(
G4PrimaryVertex
* nv)
151
{
152
if
(
nextVertex
== 0) {
nextVertex
= nv; }
153
else
{
tailVertex
->
SetNext
(nv); }
154
tailVertex
= nv;
155
}
156
157
inline
void
G4PrimaryVertex::ClearNext
()
158
{
159
nextVertex
=
nullptr
;
160
tailVertex
=
nullptr
;
161
}
162
163
inline
G4PrimaryVertex
*
G4PrimaryVertex::GetNext
()
const
164
{
return
nextVertex
; }
165
166
inline
G4double
G4PrimaryVertex::GetWeight
()
const
167
{
return
Weight0
; }
168
169
inline
void
G4PrimaryVertex::SetWeight
(
G4double
w
)
170
{
Weight0
=
w
; }
171
172
inline
void
G4PrimaryVertex::SetUserInformation
(
G4VUserPrimaryVertexInformation
* anInfo)
173
{
userInfo
= anInfo; }
174
175
inline
G4VUserPrimaryVertexInformation
*
G4PrimaryVertex::GetUserInformation
()
const
176
{
return
userInfo
; }
177
178
#endif
179
geant4
tree
geant4-10.6-release
source
particles
management
include
G4PrimaryVertex.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:24
using
1.8.2 with
ECCE GitHub integration