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
G4InuclNuclei.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4InuclNuclei.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
// 20100112 Michael Kelsey -- Replace G4CascadeMomentum with G4LorentzVector
28
// 20100301 M. Kelsey -- Add function to create unphysical nuclei for use
29
// as temporary final-state fragments.
30
// 20100319 M. Kelsey -- Remove "using" directory and unnecessary #includes.
31
// 20100409 M. Kelsey -- Drop unused string argument from ctors.
32
// 20100630 M. Kelsey -- Add excitation energy as optional public ctor arg,
33
// remove excitation energy data member (part of G4Ions). Add
34
// excitation energy to "getNucleiMass()" function, move print to .cc
35
// 20100711 M. Kelsey -- Add optional model ID to constructors
36
// 20100714 M. Kelsey -- Use G4DynamicParticle::theDynamicalMass to deal with
37
// excitation energy without instantianting "infinite" G4PartDefns.
38
// 20100719 M. Kelsey -- Move setExitationEnergy implementation to .cc file.
39
// 20100906 M. Kelsey -- Add fill() functions to rewrite contents
40
// 20100909 M. Kelsey -- Add function to discard exciton configuration
41
// 20100914 M. Kelsey -- Use integers for A and Z
42
// 20100915 M. Kelsey -- Add constructor to copy G4DynamicParticle input
43
// 20100924 M. Kelsey -- Add constructor to copy G4Fragment input, and output
44
// functions to create G4Fragment.
45
// 20110214 M. Kelsey -- Replace integer "model" with enum
46
// 20110225 M. Kelsey -- Add equality operator (NOT sorting!)
47
// 20110721 M. Kelsey -- Follow base-class ctor change to pass model directly
48
// 20110722 M. Kelsey -- BUG FIX: Deleted excitation energy in one ctor
49
// 20110829 M. Kelsey -- Add constructor to copy G4V3DNucleus input
50
// 20110919 M. Kelsey -- Add clear() to restore completely empty state
51
// 20110922 M. Kelsey -- Add stream argument to printParticle() => print()
52
53
#ifndef G4INUCL_NUCLEI_HH
54
#define G4INUCL_NUCLEI_HH
55
56
#include <
CLHEP/Units/SystemOfUnits.h
>
57
58
#include "
G4InuclParticle.hh
"
59
#include "
G4LorentzVector.hh
"
60
#include "
G4ExitonConfiguration.hh
"
61
62
class
G4Fragment
;
63
class
G4ParticleDefinition
;
64
class
G4V3DNucleus
;
65
66
67
class
G4InuclNuclei
:
public
G4InuclParticle
{
68
public
:
69
G4InuclNuclei
() :
G4InuclParticle
() {}
70
71
G4InuclNuclei
(
const
G4DynamicParticle
& dynPart,
Model
model
=
DefaultModel
)
72
:
G4InuclParticle
(dynPart,
model
) {}
73
74
G4InuclNuclei
(
G4int
a
,
G4int
z
,
G4double
exc=0.,
Model
model
=
DefaultModel
)
75
:
G4InuclParticle
(
makeDefinition
(a,z),
model
) {
76
setExitationEnergy
(exc);
77
}
78
79
G4InuclNuclei
(
const
G4LorentzVector
&
mom
,
G4int
a
,
G4int
z
,
80
G4double
exc=0.,
Model
model
=
DefaultModel
)
81
:
G4InuclParticle
(
makeDefinition
(a,z), mom,
model
) {
82
setExitationEnergy
(exc);
83
}
84
85
G4InuclNuclei
(
G4double
ekin,
G4int
a
,
G4int
z
,
G4double
exc,
86
Model
model
=
DefaultModel
)
87
:
G4InuclParticle
(
makeDefinition
(a,z), ekin,
model
) {
88
setExitationEnergy
(exc);
89
}
90
91
G4InuclNuclei
(
const
G4Fragment
& aFragment,
Model
model
=
DefaultModel
);
92
93
G4InuclNuclei
(
G4V3DNucleus
* a3DNucleus,
Model
model
=
DefaultModel
);
94
95
virtual
~G4InuclNuclei
() {}
96
97
// Copy and assignment constructors for use with std::vector<>
98
G4InuclNuclei
(
const
G4InuclNuclei
&
right
)
99
:
G4InuclParticle
(right),
100
theExitonConfiguration
(right.
theExitonConfiguration
) {}
101
102
G4InuclNuclei
&
operator=
(
const
G4InuclNuclei
&
right
);
103
104
// Equality (comparison) operator -- NOT SORTING
105
G4bool
operator==
(
const
G4InuclNuclei
&
right
) {
106
return
( G4InuclParticle::operator==(right) &&
107
theExitonConfiguration
== right.
theExitonConfiguration
);
108
}
109
110
// Overwrite data structure (avoids creating/copying temporaries)
111
void
fill
(
G4int
a
,
G4int
z
,
G4double
exc=0.,
Model
model
=
DefaultModel
) {
112
fill
(0., a, z, exc,
model
);
113
}
114
115
void
fill
(
const
G4LorentzVector
&
mom
,
G4int
a
,
G4int
z
,
116
G4double
exc=0.,
Model
model
=
DefaultModel
);
117
118
void
fill
(
G4double
ekin,
G4int
a
,
G4int
z
,
G4double
exc,
119
Model
model
=
DefaultModel
);
120
121
void
copy
(
const
G4Fragment
& aFragment,
Model
model
=
DefaultModel
);
122
123
void
copy
(
G4V3DNucleus
* a3DNucleus,
Model
model
=
DefaultModel
);
124
125
void
clear
();
// Discard all information (including A,Z)
126
127
// Excitation energy is stored as dynamical mass of particle
128
void
setExitationEnergy
(
G4double
e
);
129
130
void
setExitonConfiguration
(
const
G4ExitonConfiguration
&
config
) {
131
theExitonConfiguration
=
config
;
132
}
133
134
void
clearExitonConfiguration
() {
theExitonConfiguration
.
clear
(); }
135
136
G4int
getA
()
const
{
return
getDefinition
()->
GetAtomicMass
(); }
137
G4int
getZ
()
const
{
return
getDefinition
()->
GetAtomicNumber
(); }
138
139
G4double
getNucleiMass
()
const
{
140
return
getDefinition
()->
GetPDGMass
()*
CLHEP::MeV
/
CLHEP::GeV
;
// From G4 to Bertini
141
}
142
143
G4double
getExitationEnergy
()
const
{
144
return
(
getMass
()-
getNucleiMass
())*
CLHEP::GeV
/
CLHEP::MeV
;
// Always in MeV
145
}
146
147
G4double
getExitationEnergyInGeV
()
const
{
return
getExitationEnergy
()/
CLHEP::GeV
; }
148
149
const
G4ExitonConfiguration
&
getExitonConfiguration
()
const
{
150
return
theExitonConfiguration
;
151
}
152
153
static
G4double
getNucleiMass
(
G4int
a
,
G4int
z
,
G4double
exc=0.);
154
155
virtual
void
print
(std::ostream& os)
const
;
156
157
// Convert contents to G4Fragment for use outside package
158
G4Fragment
makeG4Fragment
()
const
;
159
operator
G4Fragment
()
const
;
160
161
protected
:
162
// Convert nuclear configuration to standard GEANT4 pointer
163
static
G4ParticleDefinition
*
makeDefinition
(
G4int
a
,
G4int
z
);
164
static
G4ParticleDefinition
*
makeNuclearFragment
(
G4int
a
,
G4int
z
);
165
166
private
:
167
G4ExitonConfiguration
theExitonConfiguration
;
168
};
169
170
#endif // G4INUCL_NUCLEI_HH
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
cascade
cascade
include
G4InuclNuclei.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:39
using
1.8.2 with
ECCE GitHub integration