Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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//
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
57
58#include "G4InuclParticle.hh"
59#include "G4LorentzVector.hh"
61
62class G4Fragment;
64class G4V3DNucleus;
65
66
68public:
70
72 : G4InuclParticle(dynPart, model) {}
73
75 : G4InuclParticle(makeDefinition(a,z), model) {
77 }
78
80 G4double exc=0., Model model=DefaultModel)
81 : G4InuclParticle(makeDefinition(a,z), mom, model) {
83 }
84
86 Model model=DefaultModel)
87 : G4InuclParticle(makeDefinition(a,z), ekin, model) {
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<>
99 : G4InuclParticle(right),
100 theExitonConfiguration(right.theExitonConfiguration) {}
101
103
104 // Equality (comparison) operator -- NOT SORTING
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
129
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
140 return getDefinition()->GetPDGMass()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini
141 }
142
144 return (getMass()-getNucleiMass())*CLHEP::GeV/CLHEP::MeV; // Always in MeV
145 }
146
147 G4double getExitationEnergyInGeV() const { return getExitationEnergy()/CLHEP::GeV; }
148
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
159 operator G4Fragment() const;
160
161protected:
162 // Convert nuclear configuration to standard GEANT4 pointer
165
166private:
167 G4ExitonConfiguration theExitonConfiguration;
168};
169
170#endif // G4INUCL_NUCLEI_HH
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4Fragment makeG4Fragment() const
virtual ~G4InuclNuclei()
G4InuclNuclei(const G4LorentzVector &mom, G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
static G4ParticleDefinition * makeNuclearFragment(G4int a, G4int z)
static G4ParticleDefinition * makeDefinition(G4int a, G4int z)
G4InuclNuclei(const G4DynamicParticle &dynPart, Model model=DefaultModel)
G4InuclNuclei(G4double ekin, G4int a, G4int z, G4double exc, Model model=DefaultModel)
const G4ExitonConfiguration & getExitonConfiguration() const
G4bool operator==(const G4InuclNuclei &right)
void setExitonConfiguration(const G4ExitonConfiguration &config)
void copy(const G4Fragment &aFragment, Model model=DefaultModel)
G4double getNucleiMass() const
void setExitationEnergy(G4double e)
G4InuclNuclei & operator=(const G4InuclNuclei &right)
G4int getZ() const
G4double getExitationEnergyInGeV() const
G4InuclNuclei(G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
G4double getExitationEnergy() const
G4InuclNuclei(const G4InuclNuclei &right)
void fill(G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
void clearExitonConfiguration()
G4int getA() const
virtual void print(std::ostream &os) const
const G4ParticleDefinition * getDefinition() const
G4double getMass() const
G4int GetAtomicNumber() const
G4int GetAtomicMass() const
struct config_s config