source: trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4UnstableFragmentBreakUp.cc @ 1347

Last change on this file since 1347 was 1347, checked in by garnier, 13 years ago

geant4 tag 9.4

File size: 5.1 KB
Line 
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,v 1.8 2010/06/25 09:46:09 gunter Exp $
27// GEANT4 tag $Name: geant4-09-04-ref-00 $
28//
29// -------------------------------------------------------------------
30//      GEANT 4 class file
31//
32//      CERN, Geneva, Switzerland
33//
34//      File name:     G4UnstableFragmentBreakUp
35//
36//      Author:        V.Ivanchenko
37//
38//      Creation date: 11 May 2010
39//
40//Modifications:
41//     
42// -------------------------------------------------------------------
43//
44
45#include "G4UnstableFragmentBreakUp.hh"
46#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
57G4UnstableFragmentBreakUp::G4UnstableFragmentBreakUp()
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
72G4UnstableFragmentBreakUp::~G4UnstableFragmentBreakUp()
73{}
74
75void G4UnstableFragmentBreakUp::Initialize(const G4Fragment&)
76{}
77
78G4Fragment* G4UnstableFragmentBreakUp::EmittedFragment(G4Fragment*)
79{
80  return 0;
81}
82
83G4FragmentVector* G4UnstableFragmentBreakUp::BreakUpFragment(G4Fragment* nucleus)
84{
85  //G4cout << "G4UnstableFragmentBreakUp::BreakUpFragment" << G4endl;
86  G4FragmentVector * theResult = new G4FragmentVector();
87
88  G4int Z = nucleus->GetZ_asInt();
89  G4int A = nucleus->GetA_asInt();
90  G4int Amax = A;
91  G4LorentzVector lv = nucleus->GetMomentum();
92  G4double time = nucleus->GetCreationTime();
93
94  G4double deltaE, mass, mass1(0.0), mass2(0.0);
95  G4int i, index;
96
97  // Starts loop over evaporated particles, loop is limited by number
98  // of nucleons
99  for(G4int ia=0; ia<Amax; ++ia) {
100 
101    mass = lv.mag();
102    deltaE = 0.0;
103    index  = -1;
104    for(i=0; i<6; ++i) {
105      G4int Zres = Z - Zfr[i];
106      G4int Ares = A - Afr[i];
107      if(Zres >= 0 && Ares >= Zres && Ares > 0) {
108        G4double m1 = G4NucleiProperties::GetNuclearMass(Ares, Zres);
109        G4double de = mass - m1 - masses[i];
110        if(de > deltaE) {
111          mass1 = m1;
112          mass2 = masses[i];
113          deltaE= de;
114          index = i;
115        }
116      }
117    }
118
119    // no decay channels
120    if(index < 0) { break; }
121
122    // compute energy of light fragment
123    G4double e2 = 0.5*((mass - mass1)*(mass + mass1) + mass2*mass2)/mass;
124    if(e2 < mass2) { break; }
125
126    // sample decay
127    G4ThreeVector bst  = lv.boostVector();
128
129    G4double cosTheta = 1. - 2. * G4UniformRand(); 
130    G4double sinTheta = std::sqrt(1. - cosTheta * cosTheta);
131    G4double phi = twopi * G4UniformRand();
132    G4double mom = std::sqrt((e2 - mass2)*(e2 + mass2));
133    G4LorentzVector mom2(mom * sinTheta * std::cos(phi),
134                         mom * sinTheta * std::sin(phi),
135                         mom * cosTheta,
136                         e2);
137    mom2.boost(bst); 
138    G4Fragment* fr = new G4Fragment(Afr[index], Zfr[index], mom2);
139    fr->SetCreationTime(time);
140    theResult->push_back(fr);
141
142    // residual
143    lv -= mom2;
144    Z  -= Zfr[index];
145    A  -= Afr[index];
146  }
147
148  // updated fragment
149  if( theResult->size() > 0) {
150    nucleus->SetZandA_asInt(Z, A);
151    nucleus->SetMomentum(lv);
152  }
153
154  return theResult;
155}
156
157G4FragmentVector* G4UnstableFragmentBreakUp::BreakUp(const G4Fragment&)
158{
159  return 0;
160}
161
162G4double G4UnstableFragmentBreakUp::GetEmissionProbability() const
163{
164  return 0.0;
165}
Note: See TracBrowser for help on using the repository browser.