source: trunk/source/processes/hadronic/models/cascade/cascade/include/G4BertiniNucleiModel.hh @ 819

Last change on this file since 819 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 6.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#ifndef G4BERTININUCLEI_MODEL_HH
27#define G4BERTININUCLEI_MODEL_HH
28
29#ifndef G4INUCL_ELEMENTARY_PARTICLE_HH
30#include "G4InuclElementaryParticle.hh"
31#endif
32
33#include "G4CascadParticle.hh"
34#include "G4InuclSpecialFunctions.hh"
35#include "G4CascadSpecialFunctions.hh"
36#include "G4ElementaryParticleCollider.hh"
37
38#include <vector>
39
40class G4InuclNuclei;
41
42using namespace G4InuclSpecialFunctions;
43using namespace G4CascadSpecialFunctions;
44
45typedef std::pair<G4InuclElementaryParticle, G4double> partner;
46typedef std::vector<partner> partners;
47
48class G4BertiniNucleiModel {
49
50  /*! \class G4BertiniNucleiModel
51   *  \brief Implements HETC nuclei model in Geant4
52   *  \author Aatos Heikkinen and
53   *  \author Original HETC authors
54   *  \version 0.0
55   *  \date 25.11.2002
56   *  \bug
57   *  \warning Wery preliminary
58   */
59
60public:
61
62  G4BertiniNucleiModel(); 
63     
64  G4BertiniNucleiModel(G4InuclNuclei* nuclei) {
65    generateModel(nuclei->getA(), nuclei->getZ());
66  };
67
68  void generateModel(G4double a, 
69                     G4double z);   /// create nuclei model
70
71  /// @param a is atom mumber (number of protons and neutron in nuclei)
72  /// @param z in number of protons in nuclei
73  /// @see
74  /// @return void
75
76  void reset() {
77    neutronNumberCurrent = neutronNumber;
78    protonNumberCurrent = protonNumber;
79  };
80
81  void printModel() const; 
82
83  G4double getDensity(G4int ip, 
84                      G4int izone) const {
85
86    return nucleon_densities[ip - 1][izone];
87  };
88
89  G4double getFermiMomentum(G4int ip, 
90                            G4int izone) const {
91
92    return fermi_momenta[ip - 1][izone];
93  };
94
95  G4double getFermiKinetic(G4int ip, 
96                           G4int izone) const {
97    G4double ekin = 0.0;
98
99    if (ip < 3 && izone < number_of_zones) {
100      G4double pf = fermi_momenta[ip - 1][izone]; 
101      G4double mass = ip == 1 ? 0.93827 : 0.93957;
102      ekin = std::sqrt(pf * pf + mass * mass) - mass;
103    }; 
104
105    return ekin;
106  };
107
108  G4double getPotential(G4int ip, 
109                        G4int izone) const {
110    G4int ip0 = ip < 3 ? ip - 1 : 2;
111
112    return izone < number_of_zones ? zone_potentials[ip0][izone] : 0.0;
113  };
114
115  std::vector<G4CascadParticle> 
116  generateParticleFate(G4CascadParticle& cparticle,
117                       G4ElementaryParticleCollider* theElementaryParticleCollider); 
118
119  G4double getNumberOfNeutrons() const { 
120
121    return neutronNumberCurrent; 
122  };
123
124  G4double getNumberOfProtons() const { 
125
126    return protonNumberCurrent; 
127  };
128
129  G4bool empty() const { /*!< See if there is no nucleon. */
130  /// @return TRUE if no current nucleons.
131
132    return neutronNumberCurrent < 1.0 && protonNumberCurrent < 1.0; 
133  };
134
135  G4bool stillInside(const G4CascadParticle& cparticle) { /*!< Check if the cascade particle is still inside the nuclei. */
136  /// @return TRUE if no current nucleons.
137    return cparticle.getCurrentZone() < number_of_zones;
138  };
139
140  G4CascadParticle initializeCascad(G4InuclElementaryParticle* particle);
141
142  std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> > initializeCascad(G4InuclNuclei* bullet, G4InuclNuclei* target);
143
144  std::pair<G4int, G4int> getTypesOfNucleonsInvolved() const {
145
146    return std::pair<G4int, G4int>(current_nucl1, current_nucl2);
147  };
148
149  G4bool worthToPropagate(const G4CascadParticle& cparticle) const; /*!< Check if cascade particle will continue. */
150   
151private: 
152  G4int verboseLevel;  /*!< Each cascade class has a verbosity level of its own. */
153  G4bool passFermi(const std::vector<G4InuclElementaryParticle>& particles, 
154                   G4int zone);
155
156  void boundaryTransition(G4CascadParticle& cparticle);
157
158  G4InuclElementaryParticle generateNucleon(G4int type, 
159                                            G4int zone) const;
160
161  G4InuclElementaryParticle generateQuasiDeutron(G4int type1, 
162                                                 G4int type2,
163                                                 G4int zone) const;
164
165  partners generateInteractionPartners(G4CascadParticle& cparticle) const;
166
167  G4double volNumInt(G4double r1, 
168                     G4double r2, 
169                     G4double cu, 
170                     G4double d1) const; /// :::
171
172  G4double volNumInt1(G4double r1, 
173                      G4double r2, 
174                      G4double cu2) const;  /// :::
175
176  G4double getRatio(G4int ip) const;
177
178  std::vector<std::vector<G4double> > nucleon_densities;
179  std::vector<std::vector<G4double> > zone_potentials;
180  std::vector<std::vector<G4double> > fermi_momenta;
181  std::vector<G4double> zone_radii;
182  std::vector<G4double> binding_energies;
183  G4double nuclei_radius;
184  G4int number_of_zones; /*!< Usually = 3, but number of zones is free parameter. */
185  G4double A; 
186  G4double Z;
187  G4double neutronNumber;
188  G4double protonNumber;
189  G4double neutronNumberCurrent;
190  G4double protonNumberCurrent;
191  G4int current_nucl1;
192  G4int current_nucl2;
193};       
194
195#endif
Note: See TracBrowser for help on using the repository browser.