Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4UnstableFragmentBreakUp.cc
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// -------------------------------------------------------------------
29// GEANT 4 class file
30//
31// CERN, Geneva, Switzerland
32//
33// File name: G4UnstableFragmentBreakUp
34//
35// Author: V.Ivanchenko
36//
37// Creation date: 11 May 2010
38//
39//Modifications:
40//
41// -------------------------------------------------------------------
42//
43
45#include "Randomize.hh"
47#include "G4LorentzVector.hh"
48#include "G4Fragment.hh"
49#include "G4FragmentVector.hh"
50#include "G4NucleiProperties.hh"
51#include "G4NistManager.hh"
52
53G4int G4UnstableFragmentBreakUp::Zfr[6] = {0};
54G4int G4UnstableFragmentBreakUp::Afr[6] = {0};
55G4double G4UnstableFragmentBreakUp::masses[6] = {0.0};
56
58 :verbose(0)
59{
60 fNistManager = G4NistManager::Instance();
61 if(0 == Afr[0]) {
62 G4int z[6] = {0, 1, 1, 1, 2, 2};
63 G4int a[6] = {1, 1, 2, 3, 3, 4};
64 for(G4int i=0; i<6; ++i) {
65 Zfr[i] = z[i];
66 Afr[i] = a[i];
67 masses[i] = G4NucleiProperties::GetNuclearMass(a[i], z[i]);
68 }
69 }
70}
71
73{}
74
76{
77 return 0;
78}
79
81{
82 //G4cout << "G4UnstableFragmentBreakUp::BreakUpFragment" << G4endl;
83 G4FragmentVector * theResult = new G4FragmentVector();
84
85 G4int Z = nucleus->GetZ_asInt();
86 G4int A = nucleus->GetA_asInt();
87 G4int Amax = A;
88 G4LorentzVector lv = nucleus->GetMomentum();
89 G4double time = nucleus->GetCreationTime();
90
91 G4double deltaE, mass, mass1(0.0), mass2(0.0);
92 G4int i, index;
93
94 // Starts loop over evaporated particles, loop is limited by number
95 // of nucleons
96 for(G4int ia=0; ia<Amax; ++ia) {
97
98 mass = lv.mag();
99 deltaE = 0.0;
100 index = -1;
101 for(i=0; i<6; ++i) {
102 G4int Zres = Z - Zfr[i];
103 G4int Ares = A - Afr[i];
104 if(Zres >= 0 && Ares >= Zres && Ares > 0) {
106 G4double de = mass - m1 - masses[i];
107 if(de > deltaE) {
108 mass1 = m1;
109 mass2 = masses[i];
110 deltaE= de;
111 index = i;
112 }
113 }
114 }
115
116 // no decay channels
117 if(index < 0) { break; }
118
119 // compute energy of light fragment
120 G4double e2 = 0.5*((mass - mass1)*(mass + mass1) + mass2*mass2)/mass;
121 if(e2 < mass2) { break; }
122
123 // sample decay
124 G4ThreeVector bst = lv.boostVector();
125
126 G4double cosTheta = 1. - 2. * G4UniformRand();
127 G4double sinTheta = std::sqrt(1. - cosTheta * cosTheta);
128 G4double phi = twopi * G4UniformRand();
129 G4double mom = std::sqrt((e2 - mass2)*(e2 + mass2));
130 G4LorentzVector mom2(mom * sinTheta * std::cos(phi),
131 mom * sinTheta * std::sin(phi),
132 mom * cosTheta,
133 e2);
134 mom2.boost(bst);
135 G4Fragment* fr = new G4Fragment(Afr[index], Zfr[index], mom2);
136 fr->SetCreationTime(time);
137 theResult->push_back(fr);
138
139 // residual
140 lv -= mom2;
141 Z -= Zfr[index];
142 A -= Afr[index];
143 }
144
145 // updated fragment
146 if( theResult->size() > 0) {
147 nucleus->SetZandA_asInt(Z, A);
148 nucleus->SetMomentum(lv);
149 }
150
151 return theResult;
152}
153
155{
156 return 0;
157}
158
160{
161 return 0.0;
162}
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:65
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4UniformRand()
Definition: Randomize.hh:53
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:251
G4double GetCreationTime() const
Definition: G4Fragment.hh:378
G4int GetZ_asInt() const
Definition: G4Fragment.hh:223
void SetCreationTime(G4double time)
Definition: G4Fragment.hh:383
void SetMomentum(const G4LorentzVector &value)
Definition: G4Fragment.hh:256
void SetZandA_asInt(G4int Znew, G4int Anew)
Definition: G4Fragment.hh:228
G4int GetA_asInt() const
Definition: G4Fragment.hh:218
static G4NistManager * Instance()
static G4double GetNuclearMass(const G4double A, const G4double Z)
virtual G4Fragment * EmittedFragment(G4Fragment *fragment)
virtual G4double GetEmissionProbability(G4Fragment *fragment)
virtual G4FragmentVector * BreakUp(const G4Fragment &fragment)
virtual G4FragmentVector * BreakUpFragment(G4Fragment *fragment)