source: trunk/source/processes/hadronic/models/cascade/cascade/src/G4VCascadeCollider.cc @ 1337

Last change on this file since 1337 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 4.5 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: G4VCascadeCollider.cc,v 1.1.2.1 2010/06/25 09:45:08 gunter Exp $
27// Geant4 tag: $Name: geant4-09-04-beta-01 $
28
29#include "G4VCascadeCollider.hh"
30#include "G4HadTmpUtil.hh"
31#include "G4InteractionCase.hh"
32#include "G4InuclElementaryParticle.hh"
33#include "G4InuclNuclei.hh"
34#include "G4InuclSpecialFunctions.hh"
35#include "G4NucleiProperties.hh"
36#include "G4ios.hh"
37
38using namespace G4InuclSpecialFunctions;
39
40
41// Constructor handles verbose announcement
42
43G4VCascadeCollider::G4VCascadeCollider(const char* name, G4int verbose)
44  : theName(name), verboseLevel(verbose) {
45  if (verbose > 3) G4cout << " >>> " << theName << " ctor " << G4endl;
46}
47
48
49// Both bullet and target must be hadrons or leptons for this to work
50
51G4bool G4VCascadeCollider::useEPCollider(G4InuclParticle* bullet, 
52                                         G4InuclParticle* target) const {
53  return (dynamic_cast<G4InuclElementaryParticle*>(bullet) &&
54          dynamic_cast<G4InuclElementaryParticle*>(target));
55}
56
57
58// Decide wether nuclear fragment is candidate for G4BigBanger
59
60G4bool G4VCascadeCollider::explosion(G4InuclNuclei* target) const {
61  if (verboseLevel > 3) {
62    G4cout << " >>> " << theName << "::explosion" << G4endl;
63  }
64
65  const G4double a_cut = 20.0;
66  const G4double be_cut = 3.0;
67
68  G4double a = target->getA();
69  G4double z = target->getZ();
70  G4double eexs = target->getExitationEnergy();
71
72  // Only small fragments with high excitations can explode
73  G4bool explo = ((a <= a_cut) && 
74                  (eexs >= be_cut * G4NucleiProperties::GetBindingEnergy(G4lrint(a), G4lrint(z)))
75                  );
76
77  return explo;
78}
79
80
81// Decide whether bullet-target interaction is candidate for cascade
82
83G4bool
84G4VCascadeCollider::inelasticInteractionPossible(G4InuclParticle* bullet,
85                                                 G4InuclParticle* target, 
86                                                 G4double ekin) const {
87  if (verboseLevel > 3) {
88    G4cout << " >>> " << theName << "::inelasticInteractionPossible" << G4endl;
89  }
90
91  // If hadron-hadron collision, defer to ElementaryParticleCollider
92  if (useEPCollider(bullet, target)) return true;
93
94  // See which one of the two (or both) is a nucleus, get properties
95  // FIXME:  Should set a = baryon() for both, but that's not in base
96  G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet);
97  G4double ab = nuclei_bullet ? nuclei_bullet->getA() : 1;      // FIXME
98  G4double zb = nuclei_bullet ? nuclei_bullet->getZ() : bullet->getCharge();
99 
100  G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target);
101  G4double at = nuclei_target ? nuclei_target->getA() : 1;      // FIXME
102  G4double zt = nuclei_target ? nuclei_target->getZ() : target->getCharge();
103 
104  // VCOL (Coulomb barrier) used for testing if elastic collision necessary
105  const G4double coeff = 0.001 * 1.2;
106
107  G4double VCOL = coeff * zt * zb / (G4cbrt(at) + G4cbrt(ab)); 
108 
109  G4bool possible = true;       // Force inelastic; should be (ekin >= VCOL)
110
111  if (verboseLevel > 3) {
112    G4cout << " VCOL: " << VCOL << " ekin: " << ekin << " inelastic possible: "
113           << possible << G4endl;
114  }
115
116  return possible;
117}
Note: See TracBrowser for help on using the repository browser.