source: trunk/source/processes/hadronic/models/cascade/cascade/src/G4EvaporationInuclCollider.cc @ 962

Last change on this file since 962 was 962, checked in by garnier, 15 years ago

update processes

File size: 7.0 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#include "G4EvaporationInuclCollider.hh"
27#include "G4InuclElementaryParticle.hh"
28#include "G4LorentzConvertor.hh"
29#include "G4ParticleLargerEkin.hh"
30#include <algorithm>
31
32typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
33typedef std::vector<G4InuclNuclei>::iterator nucleiIterator;
34         
35G4EvaporationInuclCollider::G4EvaporationInuclCollider()
36  : verboseLevel(0) {
37
38  if (verboseLevel > 3) {
39    G4cout << " >>> G4EvaporationInuclCollider::G4EvaporationInuclCollider" << G4endl;
40  }
41}
42
43G4CollisionOutput G4EvaporationInuclCollider::collide(G4InuclParticle* /*bullet*/, G4InuclParticle* target) {
44
45  verboseLevel = 0;
46  if (verboseLevel > 3) {
47    G4cout << " >>> G4EvaporationInuclCollider::evaporate" << G4endl;
48  }
49
50  G4CollisionOutput globalOutput;
51
52  G4LorentzConvertor convertToTargetRestFrame;
53  G4InuclNuclei* ntarget = dynamic_cast<G4InuclNuclei*>(target);
54  convertToTargetRestFrame.setTarget(ntarget->getMomentum(), ntarget->getMass());
55
56  G4double at = ntarget->getA();
57  G4double zt = ntarget->getZ();
58  G4double eEx = ntarget->getExitationEnergy();
59
60  G4CascadeMomentum bmom;
61  bmom[3] = convertToTargetRestFrame.getTRSMomentum();
62
63  G4InuclNuclei targ(at, zt);
64  G4CascadeMomentum tmom;
65  targ.setExitationEnergy(eEx);
66  targ.setMomentum(tmom);
67  targ.setEnergy();
68
69  targ.printParticle();
70
71  G4CollisionOutput output;
72  output = theEquilibriumEvaporator->collide(0, &targ);
73
74  G4CollisionOutput TRFoutput;     
75  TRFoutput.addOutgoingParticles(output.getOutgoingParticles()); 
76  TRFoutput.addTargetFragments(output.getNucleiFragments());         
77
78  if (verboseLevel > 3) {
79    G4cout << " After EquilibriumEvaporator " << G4endl;
80    output.printCollisionOutput();
81  };
82         
83
84  std::vector<G4InuclElementaryParticle> particles = TRFoutput.getOutgoingParticles();
85  std::vector<G4InuclNuclei> nucleus = TRFoutput.getNucleiFragments();
86
87  globalOutput.addOutgoingParticles(particles);
88  globalOutput.addTargetFragments(nucleus);
89
90  if (verboseLevel > 3) G4cout << "G4EvaporationInuclCollider::collide end" << G4endl;
91 
92       
93  return globalOutput;
94       
95}
96       
97             
98G4bool G4EvaporationInuclCollider::inelasticInteractionPossible(G4InuclParticle* bullet,
99                                                     G4InuclParticle* target, 
100                                                     G4double ekin) const {
101
102  if (verboseLevel > 3) {
103    G4cout << " >>> G4EvaporationInuclCollider::inelasticInteractionPossible" << G4endl;
104  }
105
106  const G4double coeff = 0.001 * 1.2;
107  const G4double one_third = 1.0 / 3.0;
108
109  G4bool possible = true;
110  G4double at;
111  G4double zt;
112  G4double ab;
113  G4double zb;
114
115  if (G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target)) {
116    at = nuclei_target->getA();
117    zt = nuclei_target->getZ(); 
118    if (G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet)) {
119      ab = nuclei_bullet->getA();
120      zb = nuclei_bullet->getZ();     
121    } else {
122      G4InuclElementaryParticle* particle =
123        dynamic_cast<G4InuclElementaryParticle*>(bullet);
124
125      ab = 1;
126      zb = particle->getCharge();
127    }; 
128  } else {
129    if(G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet)) {
130      ab = nuclei_bullet->getA();
131      zb = nuclei_bullet->getZ();     
132
133      G4InuclElementaryParticle* particle =
134        dynamic_cast<G4InuclElementaryParticle*>(target);
135
136      at = 1;
137      zt = particle->getCharge();   
138    } else {
139
140      return possible;
141    }; 
142  }; 
143
144  // VCOL used  for testing if elastic collision possible
145  G4double VCOL = coeff * zt * zb / (std::pow(at, one_third) + std::pow(ab, one_third)); 
146
147  // possible = VCOL < ekin; // NOTE: inelastic collision if not true
148  possible = true; // we force elastic
149
150  if (verboseLevel > 3) {
151    G4cout << " >>> G4EvaporationInuclCollider::inelasticInteractionPossible" << G4endl;
152    G4cout << " VCOL: " << VCOL << " ekin: " << ekin << " inelastic possible: " << possible << G4endl;
153  }
154
155  return possible;
156
157}
158       
159G4InteractionCase G4EvaporationInuclCollider::bulletTargetSetter(G4InuclParticle* bullet,
160                                                      G4InuclParticle* target) const {
161
162  if (verboseLevel > 3) {
163    G4cout << " >>> G4EvaporationInuclCollider::bulletTargetSetter" << G4endl;
164  }
165
166  G4InteractionCase interCase;
167
168  if (G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target)) {     
169    if (G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet)) { // A + A         
170      interCase.setInterCase(2);
171      if (nuclei_target->getA() >= nuclei_bullet->getA()) {
172        interCase.setBulletTarget(bullet, target);
173      } else {
174        interCase.setBulletTarget(target, bullet);
175      }; 
176    } else {
177      interCase.setInterCase(1);
178      interCase.setBulletTarget(bullet, target);
179    }; 
180  } else {
181    G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet);
182    if (nuclei_bullet) { 
183      G4InuclElementaryParticle* part =
184        dynamic_cast<G4InuclElementaryParticle*>(target);
185      if (part) {
186        interCase.setInterCase(1);
187        interCase.setBulletTarget(target, bullet);
188      };
189    }; 
190  };
191
192  return interCase;
193}       
194
195G4bool G4EvaporationInuclCollider::explosion(G4InuclNuclei* target) const {
196
197  if (verboseLevel > 3) {
198    G4cout << " >>> G4EvaporationInuclCollider::explosion" << G4endl;
199  }
200
201  const G4double a_cut = 20.0;
202  const G4double be_cut = 3.0;
203
204  G4double a = target->getA();
205  G4double z = target->getZ();
206  G4double eexs = target->getExitationEnergy();
207  G4bool explo = true;
208
209  if (a > a_cut) {
210    explo = false;
211  } else {
212    if (eexs < be_cut * bindingEnergy(a, z)) explo = false;
213  };   
214
215  return explo;
216}
217 
Note: See TracBrowser for help on using the repository browser.