Geant4  10.01
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: G4UnstableFragmentBreakUp.cc 85443 2014-10-29 14:35:57Z gcosmo $
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"
46 #include "G4PhysicalConstants.hh"
47 #include "G4LorentzVector.hh"
48 #include "G4Fragment.hh"
49 #include "G4FragmentVector.hh"
50 #include "G4NucleiProperties.hh"
51 #include "G4NistManager.hh"
52 
54  :verbose(0)
55 {
57  const G4int z[6] = {0, 1, 1, 1, 2, 2};
58  const G4int a[6] = {1, 1, 2, 3, 3, 4};
59  for(G4int i=0; i<6; ++i) {
60  Zfr[i] = z[i];
61  Afr[i] = a[i];
63  }
64 }
65 
67 {}
68 
70 {
71  return 0;
72 }
73 
75 {
76  //G4cout << "G4UnstableFragmentBreakUp::BreakUpFragment" << G4endl;
77  G4FragmentVector * theResult = new G4FragmentVector();
78  BreakUpChain(theResult, nucleus);
79  return theResult;
80 }
81 
83  G4Fragment* nucleus)
84 {
85  //G4cout << "G4UnstableFragmentBreakUp::BreakUpChain" << G4endl;
86 
87  G4int Z = nucleus->GetZ_asInt();
88  G4int A = nucleus->GetA_asInt();
89  G4int Amax = A;
90  G4LorentzVector lv = nucleus->GetMomentum();
91  G4double time = nucleus->GetCreationTime();
92 
93  G4double deltaE, mass, mass1(0.0), mass2(0.0);
94  G4int i, index;
95 
96  // Starts loop over evaporated particles, loop is limited by number
97  // of nucleons
98  for(G4int ia=0; ia<Amax; ++ia) {
99 
100  mass = lv.mag();
101  deltaE = 0.0;
102  index = -1;
103  for(i=0; i<6; ++i) {
104  G4int Zres = Z - Zfr[i];
105  G4int Ares = A - Afr[i];
106  if(Zres >= 0 && Ares >= Zres && Ares > 0) {
108  G4double de = mass - m1 - masses[i];
109  if(de > deltaE) {
110  mass1 = m1;
111  mass2 = masses[i];
112  deltaE= de;
113  index = i;
114  }
115  }
116  }
117 
118  // no decay channels
119  if(index < 0) { break; }
120 
121  // compute energy of light fragment
122  G4double e2 = 0.5*((mass - mass1)*(mass + mass1) + mass2*mass2)/mass;
123  if(e2 < mass2) { break; }
124 
125  // sample decay
126  G4ThreeVector bst = lv.boostVector();
127 
128  G4double cosTheta = 1. - 2. * G4UniformRand();
129  G4double sinTheta = std::sqrt(1. - cosTheta * cosTheta);
130  G4double phi = twopi * G4UniformRand();
131  G4double mom = std::sqrt((e2 - mass2)*(e2 + mass2));
132  G4LorentzVector mom2(mom * sinTheta * std::cos(phi),
133  mom * sinTheta * std::sin(phi),
134  mom * cosTheta,
135  e2);
136  mom2.boost(bst);
137  G4Fragment* fr = new G4Fragment(Afr[index], Zfr[index], mom2);
138  fr->SetCreationTime(time);
139  theResult->push_back(fr);
140 
141  // residual
142  lv -= mom2;
143  Z -= Zfr[index];
144  A -= Afr[index];
145  }
146 
147  nucleus->SetZandA_asInt(Z, A);
148  nucleus->SetMomentum(lv);
149  theResult->push_back(nucleus);
150  return false;
151 }
152 
154 {
155  return 0;
156 }
157 
159 {
160  return 0.0;
161 }
static G4double GetNuclearMass(const G4double A, const G4double Z)
CLHEP::Hep3Vector G4ThreeVector
G4double z
Definition: TRTMaterials.hh:39
static const G4double e2
G4double a
Definition: TRTMaterials.hh:39
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
virtual G4FragmentVector * BreakUp(const G4Fragment &fragment)
virtual G4FragmentVector * BreakUpFragment(G4Fragment *fragment)
#define G4UniformRand()
Definition: Randomize.hh:95
G4int GetA_asInt() const
Definition: G4Fragment.hh:243
G4double GetCreationTime() const
Definition: G4Fragment.hh:413
bool G4bool
Definition: G4Types.hh:79
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:276
void SetMomentum(const G4LorentzVector &value)
Definition: G4Fragment.hh:281
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:65
static const G4double A[nN]
void SetCreationTime(G4double time)
Definition: G4Fragment.hh:418
void SetZandA_asInt(G4int Znew, G4int Anew)
Definition: G4Fragment.hh:253
G4int GetZ_asInt() const
Definition: G4Fragment.hh:248
virtual G4double GetEmissionProbability(G4Fragment *fragment)
virtual G4Fragment * EmittedFragment(G4Fragment *fragment)
double G4double
Definition: G4Types.hh:76
virtual G4bool BreakUpChain(G4FragmentVector *theResult, G4Fragment *theNucleus)
CLHEP::HepLorentzVector G4LorentzVector