Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/hadronic/models/abrasion/src/G4WilsonAbrasionModel.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/abrasion/src/G4WilsonAbrasionModel.cc (Version 11.3.0) and /processes/hadronic/models/abrasion/src/G4WilsonAbrasionModel.cc (Version 8.2.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // *                                               20 // *                                                                  *
 21 // * Parts of this code which have been  devel     21 // * Parts of this code which have been  developed by QinetiQ Ltd     *
 22 // * under contract to the European Space Agen     22 // * under contract to the European Space Agency (ESA) are the        *
 23 // * intellectual property of ESA. Rights to u     23 // * intellectual property of ESA. Rights to use, copy, modify and    *
 24 // * redistribute this software for general pu     24 // * redistribute this software for general public use are granted    *
 25 // * in compliance with any licensing, distrib     25 // * in compliance with any licensing, distribution and development   *
 26 // * policy adopted by the Geant4 Collaboratio     26 // * policy adopted by the Geant4 Collaboration. This code has been   *
 27 // * written by QinetiQ Ltd for the European S     27 // * written by QinetiQ Ltd for the European Space Agency, under ESA  *
 28 // * contract 17191/03/NL/LvH (Aurora Programm     28 // * contract 17191/03/NL/LvH (Aurora Programme).                     *
 29 // *                                               29 // *                                                                  *
 30 // * By using,  copying,  modifying or  distri     30 // * By using,  copying,  modifying or  distributing the software (or *
 31 // * any work based  on the software)  you  ag     31 // * any work based  on the software)  you  agree  to acknowledge its *
 32 // * use  in  resulting  scientific  publicati     32 // * use  in  resulting  scientific  publications,  and indicate your *
 33 // * acceptance of all terms of the Geant4 Sof     33 // * acceptance of all terms of the Geant4 Software license.          *
 34 // *******************************************     34 // ********************************************************************
 35 //                                                 35 //
 36 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <<  36 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 37 //                                                 37 //
 38 // MODULE:              G4WilsonAbrasionModel.     38 // MODULE:              G4WilsonAbrasionModel.cc
 39 //                                                 39 //
 40 // Version:   1.0                              <<  40 // Version:   B.2
 41 // Date:    08/12/2009                         <<  41 // Date:    18/01/05
 42 // Author:    P R Truscott                         42 // Author:    P R Truscott
 43 // Organisation:  QinetiQ Ltd, UK                  43 // Organisation:  QinetiQ Ltd, UK
 44 // Customer:    ESA/ESTEC, NOORDWIJK               44 // Customer:    ESA/ESTEC, NOORDWIJK
 45 // Contract:    17191/03/NL/LvH                    45 // Contract:    17191/03/NL/LvH
 46 //                                                 46 //
 47 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <<  47 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 48 //                                                 48 //
 49 // CHANGE HISTORY                                  49 // CHANGE HISTORY
 50 // --------------                                  50 // --------------
 51 //                                                 51 //
 52 // 6 October 2003, P R Truscott, QinetiQ Ltd,      52 // 6 October 2003, P R Truscott, QinetiQ Ltd, UK
 53 // Created.                                        53 // Created.
 54 //                                                 54 //
 55 // 15 March 2004, P R Truscott, QinetiQ Ltd, U     55 // 15 March 2004, P R Truscott, QinetiQ Ltd, UK
 56 // Beta release                                    56 // Beta release
 57 //                                                 57 //
 58 // 18 January 2005, M H Mendenhall, Vanderbilt     58 // 18 January 2005, M H Mendenhall, Vanderbilt University, US
 59 // Pointers to theAbrasionGeometry and product     59 // Pointers to theAbrasionGeometry and products generated by the deexcitation 
 60 // handler deleted to prevent memory leaks.  A     60 // handler deleted to prevent memory leaks.  Also particle change of projectile
 61 // fragment previously not properly defined.       61 // fragment previously not properly defined.
 62 //                                                 62 //
 63 // 08 December 2009, P R Truscott, QinetiQ Ltd <<  63 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 64 // ver 1.0                                     <<  64 ////////////////////////////////////////////////////////////////////////////////
 65 // There was originally a possibility of the m << 
 66 // considering Couloumb repulsion, rm, being t << 
 67 //     rm >= fradius * (rP + rT)               << 
 68 // where fradius is currently 0.99, then it is << 
 69 // unchanged.  Additional conditions to escape << 
 70 // parameter: if the loop counter evtcnt reach << 
 71 // continued.                                  << 
 72 // Additional clauses have been included in    << 
 73 //    G4WilsonAbrasionModel::GetNucleonInduced << 
 74 // Previously it was possible to get sqrt of n << 
 75 // algorithm not properly defined if either:   << 
 76 //    rT > rP && rsq < rTsq - rPsq) or (rP > r << 
 77 //                                             << 
 78 // 12 June 2012, A. Ribon, CERN, Switzerland   << 
 79 // Fixing trivial warning errors of shadowed v << 
 80 //                                             << 
 81 // 4 August 2015, A. Ribon, CERN, Switzerland  << 
 82 // Replacing std::exp and std::pow with the fa << 
 83 //                                             << 
 84 // 7 August 2015, A. Ribon, CERN, Switzerland  << 
 85 // Checking of 'while' loops.                  << 
 86 //                                                 65 //
 87 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% << 
 88 ////////////////////////////////////////////// << 
 89                                                << 
 90 #include "G4WilsonAbrasionModel.hh"                66 #include "G4WilsonAbrasionModel.hh"
 91 #include "G4WilsonRadius.hh"                       67 #include "G4WilsonRadius.hh"
 92 #include "G4NuclearAbrasionGeometry.hh"            68 #include "G4NuclearAbrasionGeometry.hh"
 93 #include "G4WilsonAblationModel.hh"                69 #include "G4WilsonAblationModel.hh"
 94                                                    70 
 95 #include "G4PhysicalConstants.hh"              << 
 96 #include "G4SystemOfUnits.hh"                  << 
 97 #include "G4ExcitationHandler.hh"                  71 #include "G4ExcitationHandler.hh"
 98 #include "G4Evaporation.hh"                        72 #include "G4Evaporation.hh"
                                                   >>  73 #include "G4FermiBreakUp.hh"
                                                   >>  74 #include "G4StatMF.hh"
 99 #include "G4ParticleDefinition.hh"                 75 #include "G4ParticleDefinition.hh"
100 #include "G4DynamicParticle.hh"                    76 #include "G4DynamicParticle.hh"
101 #include "Randomize.hh"                            77 #include "Randomize.hh"
102 #include "G4Fragment.hh"                           78 #include "G4Fragment.hh"
                                                   >>  79 #include "G4VNuclearDensity.hh"
                                                   >>  80 #include "G4NuclearShellModelDensity.hh"
                                                   >>  81 #include "G4NuclearFermiDensity.hh"
                                                   >>  82 #include "G4FermiMomentum.hh"
103 #include "G4ReactionProductVector.hh"              83 #include "G4ReactionProductVector.hh"
104 #include "G4LorentzVector.hh"                      84 #include "G4LorentzVector.hh"
105 #include "G4ParticleMomentum.hh"                   85 #include "G4ParticleMomentum.hh"
106 #include "G4Poisson.hh"                            86 #include "G4Poisson.hh"
107 #include "G4ParticleTable.hh"                      87 #include "G4ParticleTable.hh"
108 #include "G4IonTable.hh"                           88 #include "G4IonTable.hh"
109 #include "globals.hh"                              89 #include "globals.hh"
110                                                <<  90 ////////////////////////////////////////////////////////////////////////////////
111 #include "G4Exp.hh"                            <<  91 //
112 #include "G4Pow.hh"                            <<  92 G4WilsonAbrasionModel::G4WilsonAbrasionModel (G4bool useAblation1)
113                                                << 
114 #include "G4PhysicsModelCatalog.hh"            << 
115                                                << 
116                                                << 
117 G4WilsonAbrasionModel::G4WilsonAbrasionModel(G << 
118   : G4HadronicInteraction("G4WilsonAbrasion"), << 
119 {                                                  93 {
120   // Send message to stdout to advise that the <<  94 //
                                                   >>  95 //
                                                   >>  96 // Send message to stdout to advise that the G4Abrasion model is being used.
                                                   >>  97 //
121   PrintWelcomeMessage();                           98   PrintWelcomeMessage();
122                                                <<  99 //
123   // Set the default verbose level to 0 - no o << 100 //
                                                   >> 101 // Set the default verbose level to 0 - no output.
                                                   >> 102 //
124   verboseLevel = 0;                               103   verboseLevel = 0;
125   useAblation  = useAblation1;                    104   useAblation  = useAblation1;
126   theAblation  = nullptr;                      << 105 //
127                                                << 106 //
128   // No de-excitation handler has been supplie << 107 // No de-excitation handler has been supplied - define the default handler.
129                                                << 108 //
130   theExcitationHandler = new G4ExcitationHandl << 109   theExcitationHandler  = new G4ExcitationHandler;
                                                   >> 110   theExcitationHandlerx = new G4ExcitationHandler;
131   if (useAblation)                                111   if (useAblation)
132   {                                               112   {
133     theAblation = new G4WilsonAblationModel;      113     theAblation = new G4WilsonAblationModel;
134     theAblation->SetVerboseLevel(verboseLevel)    114     theAblation->SetVerboseLevel(verboseLevel);
135     theExcitationHandler->SetEvaporation(theAb << 115     theExcitationHandler->SetEvaporation(theAblation);
                                                   >> 116     theExcitationHandlerx->SetEvaporation(theAblation);
136   }                                               117   }
137                                                << 118   else
138   // Set the minimum and maximum range for the << 119   {
139   // this is in energy per nucleon number).    << 120     theAblation                      = NULL;
140                                                << 121     G4Evaporation * theEvaporation   = new G4Evaporation;
                                                   >> 122     G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
                                                   >> 123     G4StatMF * theMF                 = new G4StatMF;
                                                   >> 124     theExcitationHandler->SetEvaporation(theEvaporation);
                                                   >> 125     theExcitationHandler->SetFermiModel(theFermiBreakUp);
                                                   >> 126     theExcitationHandler->SetMultiFragmentation(theMF);
                                                   >> 127     theExcitationHandler->SetMaxAandZForFermiBreakUp(12, 6);
                                                   >> 128     theExcitationHandler->SetMinEForMultiFrag(5.0*MeV);
                                                   >> 129 
                                                   >> 130     theEvaporation  = new G4Evaporation;
                                                   >> 131     theFermiBreakUp = new G4FermiBreakUp;
                                                   >> 132     theExcitationHandlerx->SetEvaporation(theEvaporation);
                                                   >> 133     theExcitationHandlerx->SetFermiModel(theFermiBreakUp);
                                                   >> 134     theExcitationHandlerx->SetMaxAandZForFermiBreakUp(12, 6);
                                                   >> 135   }
                                                   >> 136 //
                                                   >> 137 //
                                                   >> 138 // Set the minimum and maximum range for the model (despite nomanclature, this
                                                   >> 139 // is in energy per nucleon number).  
                                                   >> 140 //
141   SetMinEnergy(70.0*MeV);                         141   SetMinEnergy(70.0*MeV);
142   SetMaxEnergy(10.1*GeV);                         142   SetMaxEnergy(10.1*GeV);
143   isBlocked = false;                              143   isBlocked = false;
144                                                << 144 //
145   // npK, when mutiplied by the nuclear Fermi  << 145 //
146   // momentum over which the secondary nucleon << 146 // npK, when mutiplied by the nuclear Fermi momentum, determines the range of
147                                                << 147 // momentum over which the secondary nucleon momentum is sampled.
148   r0sq = 0.0;                                  << 148 //
149   npK = 5.0;                                   << 149   npK              = 5.0;
150   B = 10.0 * MeV;                              << 150   B                = 10.0 * MeV;
151   third = 1.0 / 3.0;                           << 151   third            = 1.0 / 3.0;
152   fradius = 0.99;                              << 152   conserveEnergy   = false;
153   conserveEnergy = false;                      << 
154   conserveMomentum = true;                        153   conserveMomentum = true;
155                                                << 
156   // Creator model ID for the secondaries crea << 
157   secID = G4PhysicsModelCatalog::GetModelID( " << 
158 }                                              << 
159                                                << 
160 void G4WilsonAbrasionModel::ModelDescription(s << 
161 {                                              << 
162   outFile << "G4WilsonAbrasionModel is a macro << 
163           << "nucleus-nucleus collisions using << 
164           << "The smaller projectile nucleus g << 
165           << "target nucleus, leaving a residu << 
166           << "region where the projectile and  << 
167           << "is then treated as a highly exci << 
168           << "model is based on the NUCFRG2 mo << 
169           << "projectile energies between 70 M << 
170 }                                                 154 }
171                                                << 155 ////////////////////////////////////////////////////////////////////////////////
172 G4WilsonAbrasionModel::G4WilsonAbrasionModel(G << 156 //
173  G4HadronicInteraction("G4WilsonAbrasion"), se << 157 G4WilsonAbrasionModel::G4WilsonAbrasionModel (G4ExcitationHandler *aExcitationHandler)
174 {                                                 158 {
                                                   >> 159 //
                                                   >> 160 //
175 // Send message to stdout to advise that the G    161 // Send message to stdout to advise that the G4Abrasion model is being used.
176                                                << 162 //
177   PrintWelcomeMessage();                          163   PrintWelcomeMessage();
178                                                << 164 //
                                                   >> 165 //
179 // Set the default verbose level to 0 - no out    166 // Set the default verbose level to 0 - no output.
180                                                << 167 //
181   verboseLevel = 0;                               168   verboseLevel = 0;
182                                                << 169 //                      
183   theAblation = nullptr;   //A.R. 26-Jul-2012  << 
184   useAblation = false;     //A.R. 14-Aug-2012  << 
185                                                << 
186 //                                                170 //
187 // The user is able to provide the excitation     171 // The user is able to provide the excitation handler as well as an argument
188 // which is provided in this instantiation is     172 // which is provided in this instantiation is used to determine
189 // whether the spectators of the interaction a    173 // whether the spectators of the interaction are free following the abrasion.
190 //                                                174 //
191   theExcitationHandler = aExcitationHandler;   << 175   theExcitationHandler             = aExcitationHandler;
                                                   >> 176   theExcitationHandlerx            = new G4ExcitationHandler;
                                                   >> 177   G4Evaporation * theEvaporation   = new G4Evaporation;
                                                   >> 178   G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
                                                   >> 179   theExcitationHandlerx->SetEvaporation(theEvaporation);
                                                   >> 180   theExcitationHandlerx->SetFermiModel(theFermiBreakUp);
                                                   >> 181   theExcitationHandlerx->SetMaxAandZForFermiBreakUp(12, 6);
192 //                                                182 //
193 //                                                183 //
194 // Set the minimum and maximum range for the m    184 // Set the minimum and maximum range for the model (despite nomanclature, this
195 // is in energy per nucleon number).              185 // is in energy per nucleon number).  
196 //                                                186 //
197   SetMinEnergy(70.0*MeV);                         187   SetMinEnergy(70.0*MeV);
198   SetMaxEnergy(10.1*GeV);                         188   SetMaxEnergy(10.1*GeV);
199   isBlocked = false;                              189   isBlocked = false;
200 //                                                190 //
201 //                                                191 //
202 // npK, when mutiplied by the nuclear Fermi mo    192 // npK, when mutiplied by the nuclear Fermi momentum, determines the range of
203 // momentum over which the secondary nucleon m    193 // momentum over which the secondary nucleon momentum is sampled.
204 //                                                194 //
205   r0sq             = 0.0;                      << 
206   npK              = 5.0;                         195   npK              = 5.0;
207   B                = 10.0 * MeV;                  196   B                = 10.0 * MeV;
208   third            = 1.0 / 3.0;                   197   third            = 1.0 / 3.0;
209   fradius          = 0.99;                     << 
210   conserveEnergy   = false;                       198   conserveEnergy   = false;
211   conserveMomentum = true;                        199   conserveMomentum = true;
212                                                << 
213   // Creator model ID for the secondaries crea << 
214   secID = G4PhysicsModelCatalog::GetModelID( " << 
215 }                                                 200 }
216 //////////////////////////////////////////////    201 ////////////////////////////////////////////////////////////////////////////////
217 //                                                202 //
218 G4WilsonAbrasionModel::~G4WilsonAbrasionModel( << 203 G4WilsonAbrasionModel::~G4WilsonAbrasionModel ()
219 {                                                 204 {
                                                   >> 205 //
                                                   >> 206 //
                                                   >> 207 // The destructor doesn't have to do a great deal!
                                                   >> 208 //
220   delete theExcitationHandler;                    209   delete theExcitationHandler;
                                                   >> 210   delete theExcitationHandlerx;
221 }                                                 211 }
222 //////////////////////////////////////////////    212 ////////////////////////////////////////////////////////////////////////////////
223 //                                                213 //
224 G4HadFinalState *G4WilsonAbrasionModel::ApplyY    214 G4HadFinalState *G4WilsonAbrasionModel::ApplyYourself (
225   const G4HadProjectile &theTrack, G4Nucleus &    215   const G4HadProjectile &theTrack, G4Nucleus &theTarget)
226 {                                                 216 {
227 //                                                217 //
228 //                                                218 //
229 // The secondaries will be returned in G4HadFi    219 // The secondaries will be returned in G4HadFinalState &theParticleChange -
230 // initialise this.  The original track will a    220 // initialise this.  The original track will always be discontinued and
231 // secondaries followed.                          221 // secondaries followed.
232 //                                                222 //
233   theParticleChange.Clear();                      223   theParticleChange.Clear();
234   theParticleChange.SetStatusChange(stopAndKil    224   theParticleChange.SetStatusChange(stopAndKill);
235 //                                                225 //
236 //                                                226 //
237 // Get relevant information about the projecti    227 // Get relevant information about the projectile and target (A, Z, energy/nuc,
238 // momentum, etc).                                228 // momentum, etc).
239 //                                                229 //
240   const G4ParticleDefinition *definitionP = th    230   const G4ParticleDefinition *definitionP = theTrack.GetDefinition();
241   const G4double AP  = definitionP->GetBaryonN << 231   const G4double AP   = definitionP->GetBaryonNumber();
242   const G4double ZP  = definitionP->GetPDGChar << 232   const G4double ZP   = definitionP->GetPDGCharge();
243   G4LorentzVector pP = theTrack.Get4Momentum() << 233   G4LorentzVector pP  = theTrack.Get4Momentum();
244   G4double E         = theTrack.GetKineticEner << 234   G4double E          = theTrack.GetKineticEnergy()/AP;
245   G4double AT        = theTarget.GetA_asInt(); << 235   G4double AT         = theTarget.GetN();
246   G4double ZT        = theTarget.GetZ_asInt(); << 236   G4double ZT         = theTarget.GetZ();
247   G4double TotalEPre = theTrack.GetTotalEnergy << 237   G4double TotalEPre  = theTrack.GetTotalEnergy() +
248     theTarget.AtomicMass(AT, ZT) + theTarget.G    238     theTarget.AtomicMass(AT, ZT) + theTarget.GetEnergyDeposit();
249   G4double TotalEPost = 0.0;                      239   G4double TotalEPost = 0.0;
250 //                                                240 //
251 //                                                241 //
252 // Determine the radii of the projectile and t    242 // Determine the radii of the projectile and target nuclei.
253 //                                                243 //
254   G4WilsonRadius aR;                              244   G4WilsonRadius aR;
255   G4double rP   = aR.GetWilsonRadius(AP);         245   G4double rP   = aR.GetWilsonRadius(AP);
256   G4double rT   = aR.GetWilsonRadius(AT);         246   G4double rT   = aR.GetWilsonRadius(AT);
257   G4double rPsq = rP * rP;                        247   G4double rPsq = rP * rP;
258   G4double rTsq = rT * rT;                        248   G4double rTsq = rT * rT;
259   if (verboseLevel >= 2)                          249   if (verboseLevel >= 2)
260   {                                               250   {
261     G4cout <<"################################    251     G4cout <<"########################################"
262            <<"################################    252            <<"########################################"
263            <<G4endl;                              253            <<G4endl;
264     G4cout.precision(6);                          254     G4cout.precision(6);
265     G4cout <<"IN G4WilsonAbrasionModel" <<G4en    255     G4cout <<"IN G4WilsonAbrasionModel" <<G4endl;
266     G4cout <<"Initial projectile A=" <<AP         256     G4cout <<"Initial projectile A=" <<AP 
267            <<", Z=" <<ZP                          257            <<", Z=" <<ZP
268            <<", radius = " <<rP/fermi <<" fm"     258            <<", radius = " <<rP/fermi <<" fm"
269            <<G4endl;                              259            <<G4endl; 
270     G4cout <<"Initial target     A=" <<AT         260     G4cout <<"Initial target     A=" <<AT
271            <<", Z=" <<ZT                          261            <<", Z=" <<ZT
272            <<", radius = " <<rT/fermi <<" fm"     262            <<", radius = " <<rT/fermi <<" fm"
273            <<G4endl;                              263            <<G4endl;
274     G4cout <<"Projectile momentum and Energy/n    264     G4cout <<"Projectile momentum and Energy/nuc = " <<pP <<" ," <<E <<G4endl;
275   }                                               265   }
276 //                                                266 //
277 //                                                267 //
278 // The following variables are used to determi    268 // The following variables are used to determine the impact parameter in the
279 // near-field (i.e. taking into consideration     269 // near-field (i.e. taking into consideration the electrostatic repulsion).
280 //                                                270 //
281   G4double rm   = ZP * ZT * elm_coupling / (E     271   G4double rm   = ZP * ZT * elm_coupling / (E * AP);
282   G4double r    = 0.0;                            272   G4double r    = 0.0;
283   G4double rsq  = 0.0;                            273   G4double rsq  = 0.0;
284 //                                                274 //
285 //                                                275 //
286 // Initialise some of the variables which wll     276 // Initialise some of the variables which wll be used to calculate the chord-
287 // length for nucleons in the projectile and t    277 // length for nucleons in the projectile and target, and hence calculate the
288 // number of abraded nucleons and the excitati    278 // number of abraded nucleons and the excitation energy.
289 //                                                279 //
290   G4NuclearAbrasionGeometry *theAbrasionGeomet << 280   G4NuclearAbrasionGeometry *theAbrasionGeometry = NULL;
291   G4double CT   = 0.0;                            281   G4double CT   = 0.0;
292   G4double F    = 0.0;                            282   G4double F    = 0.0;
293   G4int Dabr    = 0;                              283   G4int Dabr    = 0;
294 //                                                284 //
295 //                                                285 //
296 // The following loop is performed until the n    286 // The following loop is performed until the number of nucleons which are
297 // abraded by the process is >1, i.e. an inter    287 // abraded by the process is >1, i.e. an interaction MUST occur.
298 //                                                288 //
299   G4bool skipInteraction = false;  // It will  << 289   while (Dabr == 0)
300   const G4int maxNumberOfLoops = 1000;         << 
301   G4int loopCounter = -1;                      << 
302   while (Dabr == 0 && ++loopCounter < maxNumbe << 
303   {                                               290   {
                                                   >> 291 // Added by MHM 20050119 to fix leaking memory on second pass through this loop
                                                   >> 292     if (theAbrasionGeometry)
                                                   >> 293     {
                                                   >> 294       delete theAbrasionGeometry;
                                                   >> 295       theAbrasionGeometry = NULL;
                                                   >> 296     }
304 //                                                297 //
305 //                                                298 //
306 // Sample the impact parameter.  For the momen    299 // Sample the impact parameter.  For the moment, this class takes account of
307 // electrostatic effects on the impact paramet    300 // electrostatic effects on the impact parameter, but (like HZETRN AND NUCFRG2)
308 // does not make any correction for the effect    301 // does not make any correction for the effects of nuclear-nuclear repulsion.
309 //                                                302 //
310     G4double rPT   = rP + rT;                     303     G4double rPT   = rP + rT;
311     G4double rPTsq = rPT * rPT;                   304     G4double rPTsq = rPT * rPT;
312 //                                             << 
313 //                                             << 
314 // This is a "catch" to make sure we don't go  << 
315 // energy is too low to overcome nuclear repul << 
316 // value of rm < fradius * rPT then we're unli << 
317 // impact parameter (energy of incident partic << 
318 //                                             << 
319     if (rm >= fradius * rPT) {                 << 
320       skipInteraction = true;                  << 
321     }                                          << 
322 //                                             << 
323 //                                             << 
324 // Now sample impact parameter until the crite << 
325 // and target overlap, but repulsion is taken  << 
326 //                                             << 
327     G4int evtcnt   = 0;                        << 
328     r              = 1.1 * rPT;                   305     r              = 1.1 * rPT;
329     while (r > rPT && ++evtcnt < 1000)  /* Loo << 306     while (r > rPT)
330     {                                             307     {
331       G4double bsq = rPTsq * G4UniformRand();     308       G4double bsq = rPTsq * G4UniformRand();
332       r            = (rm + std::sqrt(rm*rm + 4    309       r            = (rm + std::sqrt(rm*rm + 4.0*bsq)) / 2.0;
333     }                                             310     }
334 //                                             << 
335 //                                             << 
336 // We've tried to sample this 1000 times, but  << 
337 //                                             << 
338     if (evtcnt >= 1000) {                      << 
339       skipInteraction = true;                  << 
340     }                                          << 
341                                                << 
342     rsq = r * r;                                  311     rsq = r * r;
343 //                                                312 //
344 //                                                313 //
345 // Now determine the chord-length through the     314 // Now determine the chord-length through the target nucleus.
346 //                                                315 //
347     if (rT > rP)                                  316     if (rT > rP)
348     {                                             317     {
349       G4double x = (rPsq + rsq - rTsq) / 2.0 /    318       G4double x = (rPsq + rsq - rTsq) / 2.0 / r;
350       if (x > 0.0) CT = 2.0 * std::sqrt(rTsq -    319       if (x > 0.0) CT = 2.0 * std::sqrt(rTsq - x*x);
351       else         CT = 2.0 * std::sqrt(rTsq -    320       else         CT = 2.0 * std::sqrt(rTsq - rsq);
352     }                                             321     }
353     else                                          322     else
354     {                                             323     {
355       G4double x = (rTsq + rsq - rPsq) / 2.0 /    324       G4double x = (rTsq + rsq - rPsq) / 2.0 / r;
356       if (x > 0.0) CT = 2.0 * std::sqrt(rTsq -    325       if (x > 0.0) CT = 2.0 * std::sqrt(rTsq - x*x);
357       else         CT = 2.0 * rT;                 326       else         CT = 2.0 * rT;
358     }                                             327     }
359 //                                                328 //
360 //                                                329 //
361 // Determine the number of abraded nucleons.      330 // Determine the number of abraded nucleons.  Note that the mean number of
362 // abraded nucleons is used to sample the Pois    331 // abraded nucleons is used to sample the Poisson distribution.  The Poisson
363 // distribution is sampled only ten times with    332 // distribution is sampled only ten times with the current impact parameter,
364 // and if it fails after this to find a case f    333 // and if it fails after this to find a case for which the number of abraded
365 // nucleons >1, the impact parameter is re-sam    334 // nucleons >1, the impact parameter is re-sampled.
366 //                                                335 //
367     delete theAbrasionGeometry;                << 
368     theAbrasionGeometry = new G4NuclearAbrasio    336     theAbrasionGeometry = new G4NuclearAbrasionGeometry(AP,AT,r);
369     F                   = theAbrasionGeometry-    337     F                   = theAbrasionGeometry->F();
370     G4double lambda     = 16.6*fermi / G4Pow:: << 338     G4double lambda     = 16.6*fermi / std::pow(E/MeV,0.26);
371     G4double Mabr       = F * AP * (1.0 - G4Ex << 339     G4double Mabr       = F * AP * (1.0 - std::exp(-CT/lambda));
372     G4long n            = 0;                      340     G4long n            = 0;
373     for (G4int i = 0; i<10; ++i)               << 341     for (G4int i = 0; i<10; i++)
374     {                                             342     {
375       n = G4Poisson(Mabr);                        343       n = G4Poisson(Mabr);
376       if (n > 0)                                  344       if (n > 0)
377       {                                           345       {
378         if (n>AP) Dabr = (G4int) AP;              346         if (n>AP) Dabr = (G4int) AP;
379         else      Dabr = (G4int) n;               347         else      Dabr = (G4int) n;
380         break;                                    348         break;
381       }                                           349       }
382     }                                             350     }
383   }  // End of while loop                      << 
384                                                << 
385   if ( loopCounter >= maxNumberOfLoops || skip << 
386     // Assume nuclei do not collide and return << 
387     theParticleChange.SetStatusChange(isAlive) << 
388     theParticleChange.SetEnergyChange(theTrack << 
389     theParticleChange.SetMomentumChange(theTra << 
390     if (verboseLevel >= 2) {                   << 
391       G4cout <<"Particle energy too low to ove << 
392       G4cout <<"Event rejected and original tr << 
393       G4cout <<"############################## << 
394              <<"############################## << 
395              <<G4endl;                         << 
396     }                                          << 
397     delete theAbrasionGeometry;                << 
398     return &theParticleChange;                 << 
399   }                                               351   }
400                                                << 
401   if (verboseLevel >= 2)                          352   if (verboseLevel >= 2)
402   {                                               353   {
403     G4cout <<G4endl;                              354     G4cout <<G4endl;
404     G4cout <<"Impact parameter    = " <<r/ferm    355     G4cout <<"Impact parameter    = " <<r/fermi <<" fm" <<G4endl;
405     G4cout <<"# Abraded nucleons  = " <<Dabr <    356     G4cout <<"# Abraded nucleons  = " <<Dabr <<G4endl;
406   }                                               357   }
407 //                                                358 //
408 //                                                359 //
409 // The number of abraded nucleons must be no g    360 // The number of abraded nucleons must be no greater than the number of
410 // nucleons in either the projectile or the ta    361 // nucleons in either the projectile or the target.  If AP - Dabr < 2 or 
411 // AT - Dabr < 2 then either we have only a nu    362 // AT - Dabr < 2 then either we have only a nucleon left behind in the
412 // projectile/target or we've tried to abrade     363 // projectile/target or we've tried to abrade too many nucleons - and Dabr
413 // should be limited.                             364 // should be limited.
414 //                                                365 //
415   if (AP - (G4double) Dabr < 2.0) Dabr = (G4in    366   if (AP - (G4double) Dabr < 2.0) Dabr = (G4int) AP;
416   if (AT - (G4double) Dabr < 2.0) Dabr = (G4in    367   if (AT - (G4double) Dabr < 2.0) Dabr = (G4int) AT;
417 //                                                368 //
418 //                                                369 //
419 // Determine the abraded secondary nucleons fr    370 // Determine the abraded secondary nucleons from the projectile.  *fragmentP
420 // is a pointer to the prefragment from the pr    371 // is a pointer to the prefragment from the projectile and nSecP is the number
421 // of nucleons in theParticleChange which have    372 // of nucleons in theParticleChange which have been abraded.  The total energy
422 // from these is determined.                      373 // from these is determined.
423 //                                                374 //
424   G4ThreeVector boost   = pP.findBoostToCM();     375   G4ThreeVector boost   = pP.findBoostToCM();
425   G4Fragment *fragmentP = GetAbradedNucleons (    376   G4Fragment *fragmentP = GetAbradedNucleons (Dabr, AP, ZP, rP); 
426   G4int nSecP           = (G4int)theParticleCh << 377   G4int nSecP           = theParticleChange.GetNumberOfSecondaries();
427   G4int i               = 0;                      378   G4int i               = 0;
428   for (i=0; i<nSecP; ++i)                      << 379   for (i=0; i<nSecP; i++)
429   {                                               380   {
430     TotalEPost += theParticleChange.GetSeconda    381     TotalEPost += theParticleChange.GetSecondary(i)->
431       GetParticle()->GetTotalEnergy();            382       GetParticle()->GetTotalEnergy();
432   }                                               383   }
433 //                                                384 //
434 //                                                385 //
435 // Determine the number of spectators in the i    386 // Determine the number of spectators in the interaction region for the
436 // projectile.                                    387 // projectile.
437 //                                                388 //
438   G4int DspcP = (G4int) (AP*F) - Dabr;            389   G4int DspcP = (G4int) (AP*F) - Dabr;
439   if (DspcP <= 0)           DspcP = 0;            390   if (DspcP <= 0)           DspcP = 0;
440   else if (DspcP > AP-Dabr) DspcP = ((G4int) A    391   else if (DspcP > AP-Dabr) DspcP = ((G4int) AP) - Dabr;
441 //                                                392 //
442 //                                                393 //
443 // Determine excitation energy associated with    394 // Determine excitation energy associated with excess surface area of the
444 // projectile (EsP) and the excitation due to     395 // projectile (EsP) and the excitation due to scattering of nucleons which are
445 // retained within the projectile (ExP).  Add     396 // retained within the projectile (ExP).  Add the total energy from the excited
446 // nucleus to the total energy of the secondar    397 // nucleus to the total energy of the secondaries.
447 //                                                398 //
448   G4bool excitationAbsorbedByProjectile = fals    399   G4bool excitationAbsorbedByProjectile = false;
449   if (fragmentP != nullptr)                    << 400   if (fragmentP != NULL)
450   {                                               401   {
451     G4double EsP = theAbrasionGeometry->GetExc    402     G4double EsP = theAbrasionGeometry->GetExcitationEnergyOfProjectile();
452     G4double ExP = 0.0;                           403     G4double ExP = 0.0;
453     if (Dabr < AT)                                404     if (Dabr < AT)
454       excitationAbsorbedByProjectile = G4Unifo    405       excitationAbsorbedByProjectile = G4UniformRand() < 0.5;
455     if (excitationAbsorbedByProjectile)           406     if (excitationAbsorbedByProjectile)
456       ExP = GetNucleonInducedExcitation(rP, rT    407       ExP = GetNucleonInducedExcitation(rP, rT, r);
457     G4double xP = EsP + ExP;                      408     G4double xP = EsP + ExP;
458     if (xP > B*(AP-Dabr)) xP = B*(AP-Dabr);       409     if (xP > B*(AP-Dabr)) xP = B*(AP-Dabr);
459     G4LorentzVector lorentzVector = fragmentP-    410     G4LorentzVector lorentzVector = fragmentP->GetMomentum();
460     lorentzVector.setE(lorentzVector.e()+xP);     411     lorentzVector.setE(lorentzVector.e()+xP);
461     fragmentP->SetMomentum(lorentzVector);        412     fragmentP->SetMomentum(lorentzVector);
462     TotalEPost += lorentzVector.e();              413     TotalEPost += lorentzVector.e();
463   }                                               414   }
464   G4double EMassP = TotalEPost;                   415   G4double EMassP = TotalEPost;
465 //                                                416 //
466 //                                                417 //
467 // Determine the abraded secondary nucleons fr    418 // Determine the abraded secondary nucleons from the target.  Note that it's
468 // assumed that the same number of nucleons ar    419 // assumed that the same number of nucleons are abraded from the target as for
469 // the projectile, and obviously no boost is a    420 // the projectile, and obviously no boost is applied to the products. *fragmentT
470 // is a pointer to the prefragment from the ta    421 // is a pointer to the prefragment from the target and nSec is the total number
471 // of nucleons in theParticleChange which have    422 // of nucleons in theParticleChange which have been abraded.  The total energy
472 // from these is determined.                      423 // from these is determined.
473 //                                                424 //
474   G4Fragment *fragmentT = GetAbradedNucleons (    425   G4Fragment *fragmentT = GetAbradedNucleons (Dabr, AT, ZT, rT); 
475   G4int nSec = (G4int)theParticleChange.GetNum << 426   G4int nSec = theParticleChange.GetNumberOfSecondaries();
476   for (i=nSecP; i<nSec; ++i)                   << 427   for (i=nSecP; i<nSec; i++)
477   {                                               428   {
478     TotalEPost += theParticleChange.GetSeconda    429     TotalEPost += theParticleChange.GetSecondary(i)->
479       GetParticle()->GetTotalEnergy();            430       GetParticle()->GetTotalEnergy();
480   }                                               431   }
481 //                                                432 //
482 //                                                433 //
483 // Determine the number of spectators in the i    434 // Determine the number of spectators in the interaction region for the
484 // target.                                        435 // target.
485 //                                                436 //
486   G4int DspcT = (G4int) (AT*F) - Dabr;            437   G4int DspcT = (G4int) (AT*F) - Dabr;
487   if (DspcT <= 0)           DspcT = 0;            438   if (DspcT <= 0)           DspcT = 0;
488   else if (DspcT > AP-Dabr) DspcT = ((G4int) A    439   else if (DspcT > AP-Dabr) DspcT = ((G4int) AT) - Dabr;
489 //                                                440 //
490 //                                                441 //
491 // Determine excitation energy associated with    442 // Determine excitation energy associated with excess surface area of the
492 // target (EsT) and the excitation due to scat    443 // target (EsT) and the excitation due to scattering of nucleons which are
493 // retained within the target (ExT).  Add the     444 // retained within the target (ExT).  Add the total energy from the excited
494 // nucleus to the total energy of the secondar    445 // nucleus to the total energy of the secondaries.
495 //                                                446 //
496   if (fragmentT != nullptr)                    << 447   if (fragmentT != NULL)
497   {                                               448   {
498     G4double EsT = theAbrasionGeometry->GetExc    449     G4double EsT = theAbrasionGeometry->GetExcitationEnergyOfTarget();
499     G4double ExT = 0.0;                           450     G4double ExT = 0.0;
500     if (!excitationAbsorbedByProjectile)          451     if (!excitationAbsorbedByProjectile)
501       ExT = GetNucleonInducedExcitation(rT, rP    452       ExT = GetNucleonInducedExcitation(rT, rP, r);
502     G4double xT = EsT + ExT;                      453     G4double xT = EsT + ExT;
503     if (xT > B*(AT-Dabr)) xT = B*(AT-Dabr);       454     if (xT > B*(AT-Dabr)) xT = B*(AT-Dabr);
504     G4LorentzVector lorentzVector = fragmentT-    455     G4LorentzVector lorentzVector = fragmentT->GetMomentum();
505     lorentzVector.setE(lorentzVector.e()+xT);     456     lorentzVector.setE(lorentzVector.e()+xT);
506     fragmentT->SetMomentum(lorentzVector);        457     fragmentT->SetMomentum(lorentzVector);
507     TotalEPost += lorentzVector.e();              458     TotalEPost += lorentzVector.e();
508   }                                               459   }
509 //                                                460 //
510 //                                                461 //
511 // Now determine the difference between the pr    462 // Now determine the difference between the pre and post interaction
512 // energy - this will be used to determine the    463 // energy - this will be used to determine the Lorentz boost if conservation
513 // of energy is to be imposed/attempted.          464 // of energy is to be imposed/attempted.
514 //                                                465 //
515   G4double deltaE = TotalEPre - TotalEPost;       466   G4double deltaE = TotalEPre - TotalEPost;
516   if (deltaE > 0.0 && conserveEnergy)             467   if (deltaE > 0.0 && conserveEnergy)
517   {                                               468   {
518     G4double beta = std::sqrt(1.0 - EMassP*EMa << 469     G4double beta = std::sqrt(1.0 - EMassP*EMassP/std::pow(deltaE+EMassP,2.0));
519     boost = boost / boost.mag() * beta;           470     boost = boost / boost.mag() * beta;
520   }                                               471   }
521 //                                                472 //
522 //                                                473 //
523 // Now boost the secondaries from the projecti    474 // Now boost the secondaries from the projectile.
524 //                                                475 //
525   G4ThreeVector pBalance = pP.vect();             476   G4ThreeVector pBalance = pP.vect();
526   for (i=0; i<nSecP; ++i)                      << 477   for (i=0; i<nSecP; i++)
527   {                                               478   {
528     G4DynamicParticle *dynamicP = theParticleC    479     G4DynamicParticle *dynamicP = theParticleChange.GetSecondary(i)->
529       GetParticle();                              480       GetParticle();
530     G4LorentzVector lorentzVector = dynamicP->    481     G4LorentzVector lorentzVector = dynamicP->Get4Momentum();
531     lorentzVector.boost(-boost);                  482     lorentzVector.boost(-boost);
532     dynamicP->Set4Momentum(lorentzVector);        483     dynamicP->Set4Momentum(lorentzVector);
533     pBalance -= lorentzVector.vect();             484     pBalance -= lorentzVector.vect();
534   }                                               485   }
535 //                                                486 //
536 //                                                487 //
537 // Set the boost for the projectile prefragmen    488 // Set the boost for the projectile prefragment.  This is now based on the
538 // conservation of momentum.  However, if the     489 // conservation of momentum.  However, if the user selected momentum of the
539 // prefragment is not to be conserved this sim    490 // prefragment is not to be conserved this simply boosted to the velocity of the
540 // original projectile times the ratio of the     491 // original projectile times the ratio of the unexcited to the excited mass
541 // of the prefragment (the excitation increase    492 // of the prefragment (the excitation increases the effective mass of the
542 // prefragment, and therefore modifying the bo    493 // prefragment, and therefore modifying the boost is an attempt to prevent
543 // the momentum of the prefragment being exces    494 // the momentum of the prefragment being excessive).
544 //                                                495 //
545   if (fragmentP != nullptr)                    << 496   if (fragmentP != NULL)
546   {                                               497   {
547     G4LorentzVector lorentzVector = fragmentP-    498     G4LorentzVector lorentzVector = fragmentP->GetMomentum();
548     G4double fragmentM            = lorentzVec << 499     G4double m                    = lorentzVector.m();
549     if (conserveMomentum)                         500     if (conserveMomentum)
550       fragmentP->SetMomentum                      501       fragmentP->SetMomentum
551         (G4LorentzVector(pBalance,std::sqrt(pB << 502         (G4LorentzVector(pBalance,std::sqrt(pBalance.mag2()+m*m+1.0*eV*eV)));
552     else                                          503     else
553     {                                             504     {
554       G4double fragmentGroundStateM = fragment << 505       G4double mg = fragmentP->GetGroundStateMass();
555       fragmentP->SetMomentum(lorentzVector.boo << 506       fragmentP->SetMomentum(lorentzVector.boost(-boost * mg/m));
556     }                                             507     }
557   }                                               508   }
558 //                                                509 //
559 //                                                510 //
560 // Output information to user if verbose infor    511 // Output information to user if verbose information requested.
561 //                                                512 //
562   if (verboseLevel >= 2)                          513   if (verboseLevel >= 2)
563   {                                               514   {
564     G4cout <<G4endl;                              515     G4cout <<G4endl;
565     G4cout <<"--------------------------------    516     G4cout <<"-----------------------------------" <<G4endl;
566     G4cout <<"Secondary nucleons from projecti    517     G4cout <<"Secondary nucleons from projectile:" <<G4endl;
567     G4cout <<"--------------------------------    518     G4cout <<"-----------------------------------" <<G4endl;
568     G4cout.precision(7);                          519     G4cout.precision(7);
569     for (i=0; i<nSecP; ++i)                    << 520     for (i=0; i<nSecP; i++)
570     {                                             521     {
571       G4cout <<"Particle # " <<i <<G4endl;        522       G4cout <<"Particle # " <<i <<G4endl;
572       theParticleChange.GetSecondary(i)->GetPa    523       theParticleChange.GetSecondary(i)->GetParticle()->DumpInfo();
573       G4DynamicParticle *dyn = theParticleChan    524       G4DynamicParticle *dyn = theParticleChange.GetSecondary(i)->GetParticle();
574       G4cout <<"New nucleon (P) " <<dyn->GetDe    525       G4cout <<"New nucleon (P) " <<dyn->GetDefinition()->GetParticleName()
575              <<" : "              <<dyn->Get4M    526              <<" : "              <<dyn->Get4Momentum()
576              <<G4endl;                            527              <<G4endl;
577     }                                             528     }
578     G4cout <<"---------------------------" <<G    529     G4cout <<"---------------------------" <<G4endl;
579     G4cout <<"The projectile prefragment:" <<G    530     G4cout <<"The projectile prefragment:" <<G4endl;
580     G4cout <<"---------------------------" <<G    531     G4cout <<"---------------------------" <<G4endl;
581     if (fragmentP != nullptr)                  << 532     if (fragmentP != NULL)
582       G4cout <<*fragmentP <<G4endl;               533       G4cout <<*fragmentP <<G4endl;
583     else                                          534     else
584       G4cout <<"(No residual prefragment)" <<G    535       G4cout <<"(No residual prefragment)" <<G4endl;
585     G4cout <<G4endl;                              536     G4cout <<G4endl;
586     G4cout <<"-------------------------------"    537     G4cout <<"-------------------------------" <<G4endl;
587     G4cout <<"Secondary nucleons from target:"    538     G4cout <<"Secondary nucleons from target:" <<G4endl;
588     G4cout <<"-------------------------------"    539     G4cout <<"-------------------------------" <<G4endl;
589     G4cout.precision(7);                          540     G4cout.precision(7);
590     for (i=nSecP; i<nSec; ++i)                 << 541     for (i=nSecP; i<nSec; i++)
591     {                                             542     {
592       G4cout <<"Particle # " <<i <<G4endl;        543       G4cout <<"Particle # " <<i <<G4endl;
593       theParticleChange.GetSecondary(i)->GetPa    544       theParticleChange.GetSecondary(i)->GetParticle()->DumpInfo();
594       G4DynamicParticle *dyn = theParticleChan    545       G4DynamicParticle *dyn = theParticleChange.GetSecondary(i)->GetParticle();
595       G4cout <<"New nucleon (T) " <<dyn->GetDe    546       G4cout <<"New nucleon (T) " <<dyn->GetDefinition()->GetParticleName()
596              <<" : "              <<dyn->Get4M    547              <<" : "              <<dyn->Get4Momentum()
597              <<G4endl;                            548              <<G4endl;
598     }                                             549     }
599     G4cout <<"-----------------------" <<G4end    550     G4cout <<"-----------------------" <<G4endl;
600     G4cout <<"The target prefragment:" <<G4end    551     G4cout <<"The target prefragment:" <<G4endl;
601     G4cout <<"-----------------------" <<G4end    552     G4cout <<"-----------------------" <<G4endl;
602     if (fragmentT != nullptr)                  << 553     if (fragmentT != NULL)
603       G4cout <<*fragmentT <<G4endl;               554       G4cout <<*fragmentT <<G4endl;
604     else                                          555     else
605       G4cout <<"(No residual prefragment)" <<G    556       G4cout <<"(No residual prefragment)" <<G4endl;
606   }                                               557   }
607 //                                                558 //
608 //                                                559 //
609 // Now we can decay the nuclear fragments if p    560 // Now we can decay the nuclear fragments if present.  The secondaries are
610 // collected and boosted as well.  This is per    561 // collected and boosted as well.  This is performed first for the projectile...
611 //                                                562 //
612   if (fragmentP !=nullptr)                     << 563   if (fragmentP !=NULL)
613   {                                               564   {
614     G4ReactionProductVector *products = nullpt << 565     G4ReactionProductVector *products = NULL;
615     //    if (fragmentP->GetZ_asInt() != fragm << 566     if (fragmentP->GetZ() != fragmentP->GetA())
616     products = theExcitationHandler->BreakItUp << 567       products = theExcitationHandler->BreakItUp(*fragmentP);
617     // else                                    << 568     else
618     //   products = theExcitationHandlerx->Bre << 569       products = theExcitationHandlerx->BreakItUp(*fragmentP);      
619     delete fragmentP;                             570     delete fragmentP;
620     fragmentP = nullptr;                       << 571     fragmentP = NULL;
621                                                   572   
622     G4ReactionProductVector::iterator iter;       573     G4ReactionProductVector::iterator iter;
623     for (iter = products->begin(); iter != pro    574     for (iter = products->begin(); iter != products->end(); ++iter)
624     {                                             575     {
625       G4DynamicParticle *secondary =              576       G4DynamicParticle *secondary =
626         new G4DynamicParticle((*iter)->GetDefi    577         new G4DynamicParticle((*iter)->GetDefinition(),
627         (*iter)->GetTotalEnergy(), (*iter)->Ge    578         (*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
628       theParticleChange.AddSecondary (secondar << 579       theParticleChange.AddSecondary (secondary);  // Added MHM 20050118
629       G4String particleName = (*iter)->GetDefi    580       G4String particleName = (*iter)->GetDefinition()->GetParticleName();
630       delete (*iter); // get rid of leftover p << 581       delete (*iter); // get rid of leftover particle def!  // Added MHM 20050118
631       if (verboseLevel >= 2 && particleName.fi    582       if (verboseLevel >= 2 && particleName.find("[",0) < particleName.size())
632       {                                           583       {
633         G4cout <<"------------------------" <<    584         G4cout <<"------------------------" <<G4endl;
634         G4cout <<"The projectile fragment:" <<    585         G4cout <<"The projectile fragment:" <<G4endl;
635         G4cout <<"------------------------" <<    586         G4cout <<"------------------------" <<G4endl;
636         G4cout <<" fragmentP = " <<particleNam    587         G4cout <<" fragmentP = " <<particleName
637                <<" Energy    = " <<secondary->    588                <<" Energy    = " <<secondary->GetKineticEnergy()
638                <<G4endl;                          589                <<G4endl;
639       }                                           590       }
640     }                                             591     }
641     delete products;                           << 592     delete products;  // Added MHM 20050118
642   }                                               593   }
643 //                                                594 //
644 //                                                595 //
645 // Now decay the target nucleus - no boost is     596 // Now decay the target nucleus - no boost is applied since in this
646 // approximation it is assumed that there is n    597 // approximation it is assumed that there is negligible momentum transfer from
647 // the projectile.                                598 // the projectile.
648 //                                                599 //
649   if (fragmentT != nullptr)                    << 600   if (fragmentT != NULL)
650   {                                               601   {
651     G4ReactionProductVector *products = nullpt << 602     G4ReactionProductVector *products = NULL;
652     //    if (fragmentT->GetZ_asInt() != fragm << 603     if (fragmentT->GetZ() != fragmentT->GetA())
653       products = theExcitationHandler->BreakIt    604       products = theExcitationHandler->BreakItUp(*fragmentT);
654     // else                                    << 605     else
655     //   products = theExcitationHandlerx->Bre << 606       products = theExcitationHandlerx->BreakItUp(*fragmentT);      
656     // delete fragmentT;                       << 607     delete fragmentT;
657     fragmentT = nullptr;                       << 608     fragmentT = NULL;
658                                                   609   
659     G4ReactionProductVector::iterator iter;       610     G4ReactionProductVector::iterator iter;
660     for (iter = products->begin(); iter != pro    611     for (iter = products->begin(); iter != products->end(); ++iter)
661     {                                             612     {
662       G4DynamicParticle *secondary =              613       G4DynamicParticle *secondary =
663         new G4DynamicParticle((*iter)->GetDefi    614         new G4DynamicParticle((*iter)->GetDefinition(),
664         (*iter)->GetTotalEnergy(), (*iter)->Ge    615         (*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
665       theParticleChange.AddSecondary (secondar << 616       theParticleChange.AddSecondary (secondary);
666       G4String particleName = (*iter)->GetDefi    617       G4String particleName = (*iter)->GetDefinition()->GetParticleName();
667       delete (*iter); // get rid of leftover p << 618       delete (*iter); // get rid of leftover particle def!  // Added MHM 20050118
668       if (verboseLevel >= 2 && particleName.fi    619       if (verboseLevel >= 2 && particleName.find("[",0) < particleName.size())
669       {                                           620       {
670         G4cout <<"--------------------" <<G4en    621         G4cout <<"--------------------" <<G4endl;
671         G4cout <<"The target fragment:" <<G4en    622         G4cout <<"The target fragment:" <<G4endl;
672         G4cout <<"--------------------" <<G4en    623         G4cout <<"--------------------" <<G4endl;
673         G4cout <<" fragmentT = " <<particleNam    624         G4cout <<" fragmentT = " <<particleName
674                <<" Energy    = " <<secondary->    625                <<" Energy    = " <<secondary->GetKineticEnergy()
675                <<G4endl;                          626                <<G4endl;
676       }                                           627       }
677     }                                             628     }
678     delete products;                           << 629     delete products;  // Added MHM 20050118
679   }                                               630   }
680                                                   631 
681   if (verboseLevel >= 2)                          632   if (verboseLevel >= 2)
682      G4cout <<"###############################    633      G4cout <<"########################################"
683             <<"###############################    634             <<"########################################"
684             <<G4endl;                             635             <<G4endl;
685                                                   636   
686   delete theAbrasionGeometry;                     637   delete theAbrasionGeometry;
                                                   >> 638   
687   return &theParticleChange;                      639   return &theParticleChange;
688 }                                                 640 }
689 //////////////////////////////////////////////    641 ////////////////////////////////////////////////////////////////////////////////
690 //                                                642 //
691 G4Fragment *G4WilsonAbrasionModel::GetAbradedN    643 G4Fragment *G4WilsonAbrasionModel::GetAbradedNucleons (G4int Dabr, G4double A,
692   G4double Z, G4double r)                         644   G4double Z, G4double r)
693 {                                                 645 {
694 //                                                646 //
695 //                                                647 //
696 // Initialise variables.  tau is the Fermi rad    648 // Initialise variables.  tau is the Fermi radius of the nucleus.  The variables
697 // p..., C... and gamma are used to help sampl << 649 // p..., C... and g(amma) are used to help sample the secondary nucleon
698 // spectrum.                                      650 // spectrum.
699 //                                                651 //
700                                                   652   
701   G4double pK   = hbarc * G4Pow::GetInstance() << 653   G4double pK   = hbarc * std::pow(9.0 * pi / 4.0 * A, third) / (1.29 * r);
702   if (A <= 24.0) pK *= -0.229*G4Pow::GetInstan << 654   if (A <= 24.0) pK *= -0.229*std::pow(A,third) + 1.62; 
703   G4double pKsq = pK * pK;                        655   G4double pKsq = pK * pK;
704   G4double p1sq = 2.0/5.0 * pKsq;                 656   G4double p1sq = 2.0/5.0 * pKsq;
705   G4double p2sq = 6.0/5.0 * pKsq;                 657   G4double p2sq = 6.0/5.0 * pKsq;
706   G4double p3sq = 500.0 * 500.0;                  658   G4double p3sq = 500.0 * 500.0;
707   G4double C1   = 1.0;                            659   G4double C1   = 1.0;
708   G4double C2   = 0.03;                           660   G4double C2   = 0.03;
709   G4double C3   = 0.0002;                         661   G4double C3   = 0.0002;
710   G4double gamma = 90.0 * MeV;                 << 662   G4double g    = 90.0 * MeV;
711   G4double maxn = C1 + C2 + C3;                   663   G4double maxn = C1 + C2 + C3;
712 //                                                664 //
713 //                                                665 //
714 // initialise the number of secondary nucleons    666 // initialise the number of secondary nucleons abraded to zero, and initially set
715 // the type of nucleon abraded to proton ... j    667 // the type of nucleon abraded to proton ... just for now.
716 //                                                668 //  
717   G4double Aabr                     = 0.0;        669   G4double Aabr                     = 0.0;
718   G4double Zabr                     = 0.0;        670   G4double Zabr                     = 0.0; 
719   G4ParticleDefinition *typeNucleon = G4Proton    671   G4ParticleDefinition *typeNucleon = G4Proton::ProtonDefinition();
720   G4DynamicParticle *dynamicNucleon = nullptr; << 672   G4DynamicParticle *dynamicNucleon = NULL;
721   G4ParticleMomentum pabr(0.0, 0.0, 0.0);         673   G4ParticleMomentum pabr(0.0, 0.0, 0.0);
722 //                                                674 //
723 //                                                675 //
724 // Now go through each abraded nucleon and sam    676 // Now go through each abraded nucleon and sample type, spectrum and angle.
725 //                                                677 //
726   G4bool isForLoopExitAnticipated = false;     << 678   for (G4int i=0; i<Dabr; i++)
727   for (G4int i=0; i<Dabr; ++i)                 << 
728   {                                               679   {
729 //                                                680 //
730 //                                                681 //
731 // Sample the nucleon momentum distribution by    682 // Sample the nucleon momentum distribution by simple rejection techniques.  We
732 // reject values of p == 0.0 since this causes    683 // reject values of p == 0.0 since this causes bad behaviour in the sinh term.
733 //                                                684 //
734     G4double p   = 0.0;                           685     G4double p   = 0.0;
735     G4bool found = false;                         686     G4bool found = false;
736     const G4int maxNumberOfLoops = 100000;     << 687     while (!found)
737     G4int loopCounter = -1;                    << 
738     while (!found && ++loopCounter < maxNumber << 
739     {                                             688     {
740       while (p <= 0.0) p = npK * pK * G4Unifor << 689       while (p <= 0.0) p = npK * pK * G4UniformRand();
741       G4double psq = p * p;                       690       G4double psq = p * p;
742       found = maxn * G4UniformRand() < C1*G4Ex << 691       found = maxn * G4UniformRand() < C1*std::exp(-psq/p1sq/2.0) +
743         C2*G4Exp(-psq/p2sq/2.0) + C3*G4Exp(-ps << 692         C2*std::exp(-psq/p2sq/2.0) + C3*std::exp(-psq/p3sq/2.0) + p/g/std::sinh(p/g);
744     }                                          << 
745     if ( loopCounter >= maxNumberOfLoops )     << 
746     {                                          << 
747       isForLoopExitAnticipated = true;         << 
748       break;                                   << 
749     }                                             693     }
750 //                                                694 //
751 //                                                695 //
752 // Determine the type of particle abraded.  Ca    696 // Determine the type of particle abraded.  Can only be proton or neutron,
753 // and the probability is determine to be prop    697 // and the probability is determine to be proportional to the ratio as found
754 // in the nucleus at each stage.                  698 // in the nucleus at each stage.
755 //                                                699 //
756     G4double prob = (Z-Zabr)/(A-Aabr);            700     G4double prob = (Z-Zabr)/(A-Aabr);
757     if (G4UniformRand()<prob)                     701     if (G4UniformRand()<prob)
758     {                                             702     {
759       Zabr++;                                     703       Zabr++;
760       typeNucleon = G4Proton::ProtonDefinition    704       typeNucleon = G4Proton::ProtonDefinition();
761     }                                             705     }
762     else                                          706     else
763       typeNucleon = G4Neutron::NeutronDefiniti    707       typeNucleon = G4Neutron::NeutronDefinition();
764     Aabr++;                                       708     Aabr++;
765 //                                                709 //
766 //                                                710 //
767 // The angular distribution of the secondary n    711 // The angular distribution of the secondary nucleons is approximated to an
768 // isotropic distribution in the rest frame of    712 // isotropic distribution in the rest frame of the nucleus (this will be Lorentz
769 // boosted later.                                 713 // boosted later.
770 //                                                714 //
771     G4double costheta = 2.*G4UniformRand()-1.0    715     G4double costheta = 2.*G4UniformRand()-1.0;
772     G4double sintheta = std::sqrt((1.0 - costh    716     G4double sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
773     G4double phi      = 2.0*pi*G4UniformRand()    717     G4double phi      = 2.0*pi*G4UniformRand()*rad;
774     G4ThreeVector direction(sintheta*std::cos(    718     G4ThreeVector direction(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
775     G4double nucleonMass = typeNucleon->GetPDG    719     G4double nucleonMass = typeNucleon->GetPDGMass();
776     G4double E           = std::sqrt(p*p + nuc    720     G4double E           = std::sqrt(p*p + nucleonMass*nucleonMass)-nucleonMass;
777     dynamicNucleon = new G4DynamicParticle(typ    721     dynamicNucleon = new G4DynamicParticle(typeNucleon,direction,E);
778     theParticleChange.AddSecondary (dynamicNuc << 722     theParticleChange.AddSecondary (dynamicNucleon);
779     pabr += p*direction;                          723     pabr += p*direction;
780   }                                               724   }
781 //                                                725 //
782 //                                                726 //
783 // Next determine the details of the nuclear p    727 // Next determine the details of the nuclear prefragment .. that is if there
784 // is one or more protons in the residue.  (No    728 // is one or more protons in the residue.  (Note that the 1 eV in the total
785 // energy is a safety factor to avoid any poss    729 // energy is a safety factor to avoid any possibility of negative rest mass
786 // energy.)                                       730 // energy.)
787 //                                                731 //
788   G4Fragment *fragment = nullptr;              << 732   G4Fragment *fragment = NULL;
789   if ( ! isForLoopExitAnticipated && Z-Zabr>=1 << 733   if (Z-Zabr>=1.0)
790   {                                               734   {
791     G4double ionMass = G4ParticleTable::GetPar    735     G4double ionMass = G4ParticleTable::GetParticleTable()->GetIonTable()->
792                        GetIonMass(G4lrint(Z-Za    736                        GetIonMass(G4lrint(Z-Zabr),G4lrint(A-Aabr));
793     G4double E       = std::sqrt(pabr.mag2() +    737     G4double E       = std::sqrt(pabr.mag2() + ionMass*ionMass);
794     G4LorentzVector lorentzVector = G4LorentzV    738     G4LorentzVector lorentzVector = G4LorentzVector(-pabr, E + 1.0*eV);
795     fragment =                                    739     fragment =
796       new G4Fragment((G4int) (A-Aabr), (G4int)    740       new G4Fragment((G4int) (A-Aabr), (G4int) (Z-Zabr), lorentzVector);
797   }                                               741   }
798                                                   742 
799   return fragment;                                743   return fragment;
800 }                                                 744 }
801 //////////////////////////////////////////////    745 ////////////////////////////////////////////////////////////////////////////////
802 //                                                746 //
803 G4double G4WilsonAbrasionModel::GetNucleonIndu    747 G4double G4WilsonAbrasionModel::GetNucleonInducedExcitation
804   (G4double rP, G4double rT, G4double r)          748   (G4double rP, G4double rT, G4double r)
805 {                                                 749 {
806 //                                                750 //
807 //                                                751 //
808 // Initialise variables.                          752 // Initialise variables.
809 //                                                753 //
810   G4double Cl   = 0.0;                            754   G4double Cl   = 0.0;
811   G4double rPsq = rP * rP;                        755   G4double rPsq = rP * rP;
812   G4double rTsq = rT * rT;                        756   G4double rTsq = rT * rT;
813   G4double rsq  = r * r;                          757   G4double rsq  = r * r;
814 //                                                758 //
815 //                                                759 //
816 // Depending upon the impact parameter, a diff    760 // Depending upon the impact parameter, a different form of the chord length is
817 // is used.                                       761 // is used.
818 //                                                762 //  
819   if (r > rT) Cl = 2.0*std::sqrt(rPsq + 2.0*r*    763   if (r > rT) Cl = 2.0*std::sqrt(rPsq + 2.0*r*rT - rsq - rTsq);
820   else        Cl = 2.0*rP;                        764   else        Cl = 2.0*rP;
821 //                                             << 765   
822 //                                             << 766   G4double bP = (rPsq+rsq-rTsq)/2.0/r;
823 // The next lines have been changed to include << 767   G4double Ct = 2.0*std::sqrt(rPsq - bP*bP);
824 // projectile and target are too close, Ct is  << 
825 // Otherwise the standard Wilson algorithm sho << 
826 // PRT 20091023.                               << 
827 //                                             << 
828   G4double Ct = 0.0;                           << 
829   if      (rT > rP && rsq < rTsq - rPsq) Ct =  << 
830   else if (rP > rT && rsq < rPsq - rTsq) Ct =  << 
831   else {                                       << 
832     G4double bP = (rPsq+rsq-rTsq)/2.0/r;       << 
833     G4double x  = rPsq - bP*bP;                << 
834     if (x < 0.0) {                             << 
835       G4cerr <<"############################## << 
836              <<"############################## << 
837              <<G4endl;                         << 
838       G4cerr <<"ERROR IN G4WilsonAbrasionModel << 
839              <<G4endl;                         << 
840       G4cerr <<"rPsq - bP*bP < 0.0 and cannot  << 
841       G4cerr <<"Set to zero instead" <<G4endl; << 
842       G4cerr <<"############################## << 
843              <<"############################## << 
844              <<G4endl;                         << 
845     }                                          << 
846     Ct = 2.0*std::sqrt(x);                     << 
847   }                                            << 
848                                                   768   
849   G4double Ex = 13.0 * Cl / fermi;                769   G4double Ex = 13.0 * Cl / fermi;
850   if (Ct > 1.5*fermi)                             770   if (Ct > 1.5*fermi)
851     Ex += 13.0 * Cl / fermi /3.0 * (Ct/fermi -    771     Ex += 13.0 * Cl / fermi /3.0 * (Ct/fermi - 1.5);
852                                                   772 
853   return Ex;                                      773   return Ex;
854 }                                                 774 }
855 //////////////////////////////////////////////    775 ////////////////////////////////////////////////////////////////////////////////
856 //                                                776 //
857 void G4WilsonAbrasionModel::SetUseAblation (G4    777 void G4WilsonAbrasionModel::SetUseAblation (G4bool useAblation1)
858 {                                                 778 {
859   if (useAblation != useAblation1)                779   if (useAblation != useAblation1)
860   {                                               780   {
861     useAblation = useAblation1;                   781     useAblation = useAblation1;
                                                   >> 782     delete theExcitationHandler;
                                                   >> 783     delete theExcitationHandlerx;
                                                   >> 784     theExcitationHandler  = new G4ExcitationHandler;
                                                   >> 785     theExcitationHandlerx = new G4ExcitationHandler;
862     if (useAblation)                              786     if (useAblation)
863     {                                             787     {
864       theAblation = new G4WilsonAblationModel;    788       theAblation = new G4WilsonAblationModel;
865       theAblation->SetVerboseLevel(verboseLeve    789       theAblation->SetVerboseLevel(verboseLevel);
866       theExcitationHandler->SetEvaporation(the    790       theExcitationHandler->SetEvaporation(theAblation);
                                                   >> 791       theExcitationHandlerx->SetEvaporation(theAblation);
867     }                                             792     }
868     else                                          793     else
869     {                                             794     {
870       delete theExcitationHandler;             << 795       theAblation                      = NULL;
871       theAblation                      = nullp << 796       G4Evaporation * theEvaporation   = new G4Evaporation;
872       theExcitationHandler  = new G4Excitation << 797       G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
                                                   >> 798       G4StatMF * theMF                 = new G4StatMF;
                                                   >> 799       theExcitationHandler->SetEvaporation(theEvaporation);
                                                   >> 800       theExcitationHandler->SetFermiModel(theFermiBreakUp);
                                                   >> 801       theExcitationHandler->SetMultiFragmentation(theMF);
                                                   >> 802       theExcitationHandler->SetMaxAandZForFermiBreakUp(12, 6);
                                                   >> 803       theExcitationHandler->SetMinEForMultiFrag(5.0*MeV);
                                                   >> 804 
                                                   >> 805       theEvaporation  = new G4Evaporation;
                                                   >> 806       theFermiBreakUp = new G4FermiBreakUp;
                                                   >> 807       theExcitationHandlerx->SetEvaporation(theEvaporation);
                                                   >> 808       theExcitationHandlerx->SetFermiModel(theFermiBreakUp);
                                                   >> 809       theExcitationHandlerx->SetMaxAandZForFermiBreakUp(12, 6);
873     }                                             810     }
874   }                                               811   }
875   return;                                         812   return; 
876 }                                                 813 }
877 //////////////////////////////////////////////    814 ////////////////////////////////////////////////////////////////////////////////
878 //                                                815 //
879 void G4WilsonAbrasionModel::PrintWelcomeMessag    816 void G4WilsonAbrasionModel::PrintWelcomeMessage ()
880 {                                                 817 {
881   G4cout <<G4endl;                                818   G4cout <<G4endl;
882   G4cout <<" *********************************    819   G4cout <<" *****************************************************************"
883          <<G4endl;                                820          <<G4endl;
884   G4cout <<" Nuclear abrasion model for nuclea    821   G4cout <<" Nuclear abrasion model for nuclear-nuclear interactions activated"
885          <<G4endl;                                822          <<G4endl;
886   G4cout <<" (Written by QinetiQ Ltd for the E    823   G4cout <<" (Written by QinetiQ Ltd for the European Space Agency)"
887          <<G4endl;                                824          <<G4endl;
888   G4cout <<" *********************************    825   G4cout <<" *****************************************************************"
889          <<G4endl;                                826          <<G4endl;
890   G4cout << G4endl;                               827   G4cout << G4endl;
891                                                   828 
892   return;                                         829   return;
893 }                                                 830 }
894 //////////////////////////////////////////////    831 ////////////////////////////////////////////////////////////////////////////////
895 //                                                832 //
896                                                   833