Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 67983 2013-03-13 10:42:03Z 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 {
56  fNistManager = G4NistManager::Instance();
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];
62  masses[i] = G4NucleiProperties::GetNuclearMass(a[i], z[i]);
63  }
64 }
65 
67 {}
68 
70 {
71  return 0;
72 }
73 
75 {
76  //G4cout << "G4UnstableFragmentBreakUp::BreakUpFragment" << G4endl;
77  G4FragmentVector * theResult = new G4FragmentVector();
78 
79  G4int Z = nucleus->GetZ_asInt();
80  G4int A = nucleus->GetA_asInt();
81  G4int Amax = A;
82  G4LorentzVector lv = nucleus->GetMomentum();
83  G4double time = nucleus->GetCreationTime();
84 
85  G4double deltaE, mass, mass1(0.0), mass2(0.0);
86  G4int i, index;
87 
88  // Starts loop over evaporated particles, loop is limited by number
89  // of nucleons
90  for(G4int ia=0; ia<Amax; ++ia) {
91 
92  mass = lv.mag();
93  deltaE = 0.0;
94  index = -1;
95  for(i=0; i<6; ++i) {
96  G4int Zres = Z - Zfr[i];
97  G4int Ares = A - Afr[i];
98  if(Zres >= 0 && Ares >= Zres && Ares > 0) {
100  G4double de = mass - m1 - masses[i];
101  if(de > deltaE) {
102  mass1 = m1;
103  mass2 = masses[i];
104  deltaE= de;
105  index = i;
106  }
107  }
108  }
109 
110  // no decay channels
111  if(index < 0) { break; }
112 
113  // compute energy of light fragment
114  G4double e2 = 0.5*((mass - mass1)*(mass + mass1) + mass2*mass2)/mass;
115  if(e2 < mass2) { break; }
116 
117  // sample decay
118  G4ThreeVector bst = lv.boostVector();
119 
120  G4double cosTheta = 1. - 2. * G4UniformRand();
121  G4double sinTheta = std::sqrt(1. - cosTheta * cosTheta);
122  G4double phi = twopi * G4UniformRand();
123  G4double mom = std::sqrt((e2 - mass2)*(e2 + mass2));
124  G4LorentzVector mom2(mom * sinTheta * std::cos(phi),
125  mom * sinTheta * std::sin(phi),
126  mom * cosTheta,
127  e2);
128  mom2.boost(bst);
129  G4Fragment* fr = new G4Fragment(Afr[index], Zfr[index], mom2);
130  fr->SetCreationTime(time);
131  theResult->push_back(fr);
132 
133  // residual
134  lv -= mom2;
135  Z -= Zfr[index];
136  A -= Afr[index];
137  }
138 
139  // updated fragment
140  if( theResult->size() > 0) {
141  nucleus->SetZandA_asInt(Z, A);
142  nucleus->SetMomentum(lv);
143  }
144 
145  return theResult;
146 }
147 
149 {
150  return 0;
151 }
152 
154 {
155  return 0.0;
156 }
Hep3Vector boostVector() const
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double z
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:87
G4int GetA_asInt() const
Definition: G4Fragment.hh:238
G4double GetCreationTime() const
Definition: G4Fragment.hh:398
double mag() const
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:271
HepLorentzVector & boost(double, double, double)
void SetMomentum(const G4LorentzVector &value)
Definition: G4Fragment.hh:276
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:65
void SetCreationTime(G4double time)
Definition: G4Fragment.hh:403
void SetZandA_asInt(G4int Znew, G4int Anew)
Definition: G4Fragment.hh:248
G4int GetZ_asInt() const
Definition: G4Fragment.hh:243
virtual G4double GetEmissionProbability(G4Fragment *fragment)
virtual G4Fragment * EmittedFragment(G4Fragment *fragment)
double G4double
Definition: G4Types.hh:76