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