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
G4InteractionContent.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4InteractionContent.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
#ifndef G4InteractionContent_h
30
#define G4InteractionContent_h 1
31
32
// ------------------------------------------------------------
33
// GEANT 4 class header file
34
//
35
// ---------------- G4InteractionContent----------------
36
// by Gunter Folger, June 1998.
37
// class for a storing colliding particles in PartonString Models
38
// ------------------------------------------------------------
39
40
#include "
globals.hh
"
41
#include "
G4VSplitableHadron.hh
"
42
#include "
G4Nucleon.hh
"
43
44
45
class
G4InteractionContent
46
{
47
public
:
48
G4InteractionContent
() {}
49
G4InteractionContent
(
G4VSplitableHadron
*aPrimaryParticipant);
50
51
~G4InteractionContent
();
52
53
G4bool
operator<
(
const
G4InteractionContent
&
right
)
const
;
54
55
G4VSplitableHadron
*
GetProjectile
()
const
;
56
G4VSplitableHadron
*
GetTarget
()
const
;
57
58
void
SetProjectileNucleon
(
G4Nucleon
* aNucleon);
59
G4Nucleon
*
GetProjectileNucleon
()
const
;
60
61
void
SetTargetNucleon
(
G4Nucleon
* aNucleon);
62
G4Nucleon
*
GetTargetNucleon
()
const
;
63
64
void
SetTarget
(
G4VSplitableHadron
*aTarget);
65
66
G4int
GetNumberOfSoftCollisions
();
67
G4int
GetNumberOfHardCollisions
();
68
void
SetNumberOfSoftCollisions
(
int
);
69
void
SetNumberOfHardCollisions
(
int
);
70
G4int
GetNumberOfDiffractiveCollisions
();
71
void
SetNumberOfDiffractiveCollisions
(
int
);
72
73
void
SplitHadrons
();
74
75
void
SetInteractionTime
(
G4double
aValue);
76
G4double
GetInteractionTime
()
const
;
77
void
SetStatus
(
G4int
aValue);
78
G4int
GetStatus
()
const
;
79
80
#ifdef G4DEBUG
81
void
Dump();
82
#endif
83
84
private
:
85
G4InteractionContent
&
operator=
(
const
G4InteractionContent
&
right
);
86
G4InteractionContent
(
const
G4InteractionContent
&
right
);
87
G4bool
operator==
(
const
G4InteractionContent
&
right
)
const
;
88
G4bool
operator!=
(
const
G4InteractionContent
&
right
)
const
;
89
90
protected
:
91
92
private
:
93
G4VSplitableHadron
*
theTarget
;
94
G4VSplitableHadron
*
theProjectile
;
95
96
G4Nucleon
*
theProjectileNucleon
;
97
G4Nucleon
*
theTargetNucleon
;
98
99
G4int
theNumberOfHard
;
100
G4int
theNumberOfSoft
;
101
G4int
theNumberOfDiffractive
;
102
103
G4double
theInteractionTime
;
104
G4int
curStatus
;
105
};
106
107
// Class G4InteractionContent
108
109
inline
G4VSplitableHadron
*
G4InteractionContent::GetProjectile
()
const
110
{
111
return
theProjectile
;
112
}
113
114
inline
G4VSplitableHadron
*
G4InteractionContent::GetTarget
()
const
115
{
116
return
theTarget
;
117
}
118
119
inline
void
G4InteractionContent::SetTarget
(
G4VSplitableHadron
*aTarget)
120
{
121
theTarget
= aTarget;
122
}
123
124
inline
void
G4InteractionContent::SetProjectileNucleon
(
G4Nucleon
* aNucleon)
125
{
126
theProjectileNucleon
= aNucleon;
127
}
128
129
inline
G4Nucleon
*
G4InteractionContent::GetProjectileNucleon
()
const
130
{
131
return
theProjectileNucleon
;
132
}
133
134
inline
void
G4InteractionContent::SetTargetNucleon
(
G4Nucleon
* aNucleon)
135
{
136
theTargetNucleon
= aNucleon;
137
}
138
139
inline
G4Nucleon
*
G4InteractionContent::GetTargetNucleon
()
const
140
{
141
return
theTargetNucleon
;
142
}
143
144
inline
G4int
G4InteractionContent::GetNumberOfSoftCollisions
()
145
{
146
return
theNumberOfSoft
;
147
}
148
149
inline
G4int
G4InteractionContent::GetNumberOfHardCollisions
()
150
{
151
return
theNumberOfHard
;
152
}
153
154
inline
void
G4InteractionContent::SetNumberOfSoftCollisions
(
int
nCol)
155
{
156
theNumberOfSoft
= nCol;
157
}
158
159
inline
void
G4InteractionContent::SetNumberOfHardCollisions
(
int
nCol)
160
{
161
theNumberOfHard
= nCol;
162
}
163
164
inline
G4int
G4InteractionContent::GetNumberOfDiffractiveCollisions
()
165
{
166
return
theNumberOfDiffractive
;
167
}
168
169
inline
void
G4InteractionContent::SetNumberOfDiffractiveCollisions
(
int
nCol)
170
{
171
theNumberOfDiffractive
= nCol;
172
}
173
174
inline
void
G4InteractionContent::SplitHadrons
()
175
{
176
//G4cout<<"InterContent Proj "<<theProjectile<<G4endl;
177
if
(
theProjectile
!= NULL ) {
theProjectile
->
SplitUp
();}
178
//G4cout<<"InterContent Targ "<<theTarget<<G4endl;
179
if
(
theTarget
!= NULL ) {
theTarget
->
SplitUp
();}
180
#ifdef G4DEBUG
181
//Dump();
182
#endif
183
}
184
185
#ifdef G4DEBUG
186
inline
void
G4InteractionContent::Dump()
187
{
188
G4LorentzVector
mom
(0.,0.,0.,0.);
189
G4cout
<<
" G4InteractionContent "
<<
this
<<
G4endl
190
<<
"Hard/Soft/Diff "
191
<<
theNumberOfHard
<<
" / "
192
<<
theNumberOfSoft
<<
" / "
193
<<
theNumberOfDiffractive
<<
G4endl
194
<<
"Projectile "
;
195
196
if
(
theProjectile
) {
197
G4cout
<<
theProjectile
->
GetDefinition
()->
GetPDGEncoding
()
198
<<
" "
<<
theProjectile
->
Get4Momentum
()<<
G4endl
;
199
mom
+=
theProjectile
->
Get4Momentum
();
200
}
else
{
201
G4cout
<<
" none "
<<
G4endl
;
202
}
203
204
if
(
theTarget
) {
205
G4cout
<<
"Target "
<<
theTarget
->
GetDefinition
()->
GetPDGEncoding
()
206
<<
" "
<<
theTarget
->
Get4Momentum
()<<
G4endl
;
207
mom
+=
theTarget
->
Get4Momentum
();
208
}
else
{
209
G4cout
<<
" none "
<<
G4endl
;
210
}
211
G4cout
<<
"total 4-mom of interaction content "
<<
mom
<<
G4endl
;
212
}
213
#endif
214
215
#endif
216
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
parton_string
management
include
G4InteractionContent.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:49
using
1.8.2 with
ECCE GitHub integration