Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (13 years ago)
Author:
garnier
Message:

geant4 tag 9.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiNeutronInelastic.cc

    r1340 r1347  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4HEAntiNeutronInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
    28 // GEANT4 tag $Name: geant4-09-03-ref-09 $
    29 //
     26// $Id: G4HEAntiNeutronInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $
     27// GEANT4 tag $Name: geant4-09-04-ref-00 $
    3028//
    3129
     
    3331#include "G4ios.hh"
    3432
    35 //
    3633// G4 Process: Gheisha High Energy Collision model.
    3734// This includes the high energy cascading model, the two-body-resonance model
    38 // and the low energy two-body model. Not included are the low energy stuff like
    39 // nuclear reactions, nuclear fission without any cascading and all processes for
    40 // particles at rest. 
     35// and the low energy two-body model.  Not included is the low energy stuff
     36// like nuclear reactions, nuclear fission without any cascading and all
     37// processes for particles at rest. 
    4138// First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 
    4239// H. Fesefeldt, RWTH-Aachen, 23-October-1996
     
    4542#include "G4HEAntiNeutronInelastic.hh"
    4643
    47 G4HadFinalState *  G4HEAntiNeutronInelastic::
    48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
    49   {
    50     G4HEVector * pv = new G4HEVector[MAXPART];
    51     const G4HadProjectile *aParticle = &aTrack;
    52 //    G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();
    53     const G4double atomicWeight = targetNucleus.GetN();
    54     const G4double atomicNumber = targetNucleus.GetZ();
    55     G4HEVector incidentParticle(aParticle);
    56 
    57     G4int    incidentCode          = incidentParticle.getCode();
    58     G4double incidentMass          = incidentParticle.getMass();
    59     G4double incidentTotalEnergy   = incidentParticle.getEnergy();
    60     G4double incidentTotalMomentum = incidentParticle.getTotalMomentum();
    61     G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass;
    62 
    63     if(incidentKineticEnergy < 1.)
    64       {
    65         G4cout << "GHEAntiNeutronInelastic: incident energy < 1 GeV" << G4endl;;
    66       }
    67     if(verboseLevel > 1)
    68       {
    69         G4cout << "G4HEAntiNeutronInelastic::ApplyYourself" << G4endl;
    70         G4cout << "incident particle " << incidentParticle.getName()
    71              << "mass "              << incidentMass
    72              << "kinetic energy "    << incidentKineticEnergy
    73              << G4endl;
    74         G4cout << "target material with (A,Z) = ("
    75              << atomicWeight << "," << atomicNumber << ")" << G4endl;
    76       }
    77 
    78     G4double inelasticity  = NuclearInelasticity(incidentKineticEnergy,
    79                                                  atomicWeight, atomicNumber);
    80     if(verboseLevel > 1)
    81         G4cout << "nuclear inelasticity = " << inelasticity << G4endl;
     44G4HadFinalState*
     45G4HEAntiNeutronInelastic::ApplyYourself(const G4HadProjectile &aTrack,
     46                                        G4Nucleus &targetNucleus)
     47{
     48  G4HEVector* pv = new G4HEVector[MAXPART];
     49  const G4HadProjectile* aParticle = &aTrack;
     50  const G4double atomicWeight = targetNucleus.GetN();
     51  const G4double atomicNumber = targetNucleus.GetZ();
     52  G4HEVector incidentParticle(aParticle);
     53
     54  G4int incidentCode = incidentParticle.getCode();
     55  G4double incidentMass = incidentParticle.getMass();
     56  G4double incidentTotalEnergy = incidentParticle.getEnergy();
     57  G4double incidentTotalMomentum = incidentParticle.getTotalMomentum();
     58  G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass;
     59
     60  if (incidentKineticEnergy < 1.)
     61    G4cout << "GHEAntiNeutronInelastic: incident energy < 1 GeV" << G4endl;;
     62
     63  if (verboseLevel > 1) {
     64    G4cout << "G4HEAntiNeutronInelastic::ApplyYourself" << G4endl;
     65    G4cout << "incident particle " << incidentParticle.getName()
     66           << "mass "              << incidentMass
     67           << "kinetic energy "    << incidentKineticEnergy
     68           << G4endl;
     69    G4cout << "target material with (A,Z) = ("
     70           << atomicWeight << "," << atomicNumber << ")" << G4endl;
     71  }
     72
     73  G4double inelasticity = NuclearInelasticity(incidentKineticEnergy,
     74                                              atomicWeight, atomicNumber);
     75  if (verboseLevel > 1)
     76    G4cout << "nuclear inelasticity = " << inelasticity << G4endl;
    8277   
    83     incidentKineticEnergy -= inelasticity;
     78  incidentKineticEnergy -= inelasticity;
    8479   
    85     G4double excitationEnergyGNP = 0.;
    86     G4double excitationEnergyDTA = 0.;
    87 
    88     G4double excitation    = NuclearExcitation(incidentKineticEnergy,
    89                                                atomicWeight, atomicNumber,
    90                                                excitationEnergyGNP,
    91                                                excitationEnergyDTA);
    92     if(verboseLevel > 1)
    93       G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP
     80  G4double excitationEnergyGNP = 0.;
     81  G4double excitationEnergyDTA = 0.;
     82
     83  G4double excitation = NuclearExcitation(incidentKineticEnergy,
     84                                          atomicWeight, atomicNumber,
     85                                          excitationEnergyGNP,
     86                                          excitationEnergyDTA);
     87  if (verboseLevel > 1)
     88    G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP
    9489           << excitationEnergyDTA << G4endl;             
    9590
    96 
    97     incidentKineticEnergy -= excitation;
    98     incidentTotalEnergy    = incidentKineticEnergy + incidentMass;
    99     incidentTotalMomentum  = std::sqrt( (incidentTotalEnergy-incidentMass)                   
    100                                   *(incidentTotalEnergy+incidentMass));
    101 
    102 
    103     G4HEVector targetParticle;
    104     if(G4UniformRand() < atomicNumber/atomicWeight)
    105       {
    106         targetParticle.setDefinition("Proton");
    107       }
    108     else
    109       {
    110         targetParticle.setDefinition("Neutron");
    111       }
    112 
    113     G4double targetMass         = targetParticle.getMass();
    114     G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
    115                                        + 2.0*targetMass*incidentTotalEnergy);
    116     G4double availableEnergy    = centerOfMassEnergy - targetMass - incidentMass;
    117 
    118                                                                 // this was the meaning of inElastic in the
    119                                                                 // original Gheisha stand-alone version.
    120 //    G4bool   inElastic          = InElasticCrossSectionInFirstInt
    121 //                                    (availableEnergy, incidentCode, incidentTotalMomentum); 
    122                                                                 // by unknown reasons, it has been replaced
    123                                                                 // to the following code in Geant???
    124     G4bool inElastic = true;
    125 //    if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false;   
    126 
    127     vecLength = 0;           
     91  incidentKineticEnergy -= excitation;
     92  incidentTotalEnergy = incidentKineticEnergy + incidentMass;
     93  incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
     94                                    *(incidentTotalEnergy+incidentMass));
     95
     96  G4HEVector targetParticle;
     97  if (G4UniformRand() < atomicNumber/atomicWeight) {
     98    targetParticle.setDefinition("Proton");
     99  } else {
     100    targetParticle.setDefinition("Neutron");
     101  }
     102
     103  G4double targetMass = targetParticle.getMass();
     104  G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass
     105                                        + targetMass*targetMass
     106                                        + 2.0*targetMass*incidentTotalEnergy);
     107  G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
     108
     109  G4bool inElastic = true;
     110  vecLength = 0;           
    128111       
    129     if(verboseLevel > 1)
    130       G4cout << "ApplyYourself: CallFirstIntInCascade for particle "
     112  if (verboseLevel > 1)
     113    G4cout << "ApplyYourself: CallFirstIntInCascade for particle "
    131114           << incidentCode << G4endl;
    132115
    133     G4bool successful = false;
     116  G4bool successful = false;
    134117   
    135     if(inElastic || (!inElastic && atomicWeight < 1.5))
    136       {
    137         FirstIntInCasAntiNeutron(inElastic, availableEnergy, pv, vecLength,
    138                                  incidentParticle, targetParticle, atomicWeight);
    139 
    140         if(verboseLevel > 1)
    141            G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 
    142 
    143 
    144         if ((vecLength > 0) && (availableEnergy > 1.))
    145                    StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy,
    146                                                   pv, vecLength,
    147                                                   incidentParticle, targetParticle);
    148             HighEnergyCascading( successful, pv, vecLength,
    149                                  excitationEnergyGNP, excitationEnergyDTA,
    150                                  incidentParticle, targetParticle,
    151                                  atomicWeight, atomicNumber);
    152         if (!successful)
    153             HighEnergyClusterProduction( successful, pv, vecLength,
    154                                          excitationEnergyGNP, excitationEnergyDTA,
    155                                          incidentParticle, targetParticle,
    156                                          atomicWeight, atomicNumber);
    157         if (!successful)
    158             MediumEnergyCascading( successful, pv, vecLength,
    159                                    excitationEnergyGNP, excitationEnergyDTA,
    160                                    incidentParticle, targetParticle,
    161                                    atomicWeight, atomicNumber);
    162 
    163         if (!successful)
    164             MediumEnergyClusterProduction( successful, pv, vecLength,
    165                                            excitationEnergyGNP, excitationEnergyDTA,       
    166                                            incidentParticle, targetParticle,
    167                                            atomicWeight, atomicNumber);
    168         if (!successful)
    169             QuasiElasticScattering( successful, pv, vecLength,
    170                                     excitationEnergyGNP, excitationEnergyDTA,
    171                                     incidentParticle, targetParticle,
    172                                     atomicWeight, atomicNumber);
    173       }
    174     if (!successful)
    175       {
    176             ElasticScattering( successful, pv, vecLength,
    177                                incidentParticle,   
    178                                atomicWeight, atomicNumber);
    179       }
    180 
    181     if (!successful)
    182       {
    183         G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl;
    184       }
    185       FillParticleChange(pv,  vecLength);
    186       delete [] pv;
    187       theParticleChange.SetStatusChange(stopAndKill);
    188       return & theParticleChange;
    189   }
     118  FirstIntInCasAntiNeutron(inElastic, availableEnergy, pv, vecLength,
     119                           incidentParticle, targetParticle, atomicWeight);
     120
     121  if (verboseLevel > 1)
     122    G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl;
     123
     124  if ((vecLength > 0) && (availableEnergy > 1.))
     125    StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy,
     126                                  pv, vecLength,
     127                                  incidentParticle, targetParticle);
     128  HighEnergyCascading(successful, pv, vecLength,
     129                      excitationEnergyGNP, excitationEnergyDTA,
     130                      incidentParticle, targetParticle,
     131                      atomicWeight, atomicNumber);
     132  if (!successful)
     133    HighEnergyClusterProduction(successful, pv, vecLength,
     134                                excitationEnergyGNP, excitationEnergyDTA,
     135                                incidentParticle, targetParticle,
     136                                atomicWeight, atomicNumber);
     137  if (!successful)
     138    MediumEnergyCascading(successful, pv, vecLength,
     139                          excitationEnergyGNP, excitationEnergyDTA,
     140                          incidentParticle, targetParticle,
     141                          atomicWeight, atomicNumber);
     142
     143  if (!successful)
     144    MediumEnergyClusterProduction(successful, pv, vecLength,
     145                                  excitationEnergyGNP, excitationEnergyDTA,       
     146                                  incidentParticle, targetParticle,
     147                                  atomicWeight, atomicNumber);
     148  if (!successful)
     149    QuasiElasticScattering(successful, pv, vecLength,
     150                           excitationEnergyGNP, excitationEnergyDTA,
     151                           incidentParticle, targetParticle,
     152                           atomicWeight, atomicNumber);
     153  if (!successful)
     154    ElasticScattering(successful, pv, vecLength,
     155                      incidentParticle,   
     156                      atomicWeight, atomicNumber);
     157
     158  if (!successful)
     159    G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles"
     160           << G4endl;
     161
     162  FillParticleChange(pv,  vecLength);
     163  delete [] pv;
     164  theParticleChange.SetStatusChange(stopAndKill);
     165  return &theParticleChange;
     166}
     167
    190168
    191169void
    192   G4HEAntiNeutronInelastic::FirstIntInCasAntiNeutron( G4bool &inElastic,
    193                                                       const G4double availableEnergy,
    194                                                       G4HEVector pv[],
    195                                                       G4int &vecLen,
    196                                                       G4HEVector incidentParticle,
    197                                                       G4HEVector targetParticle,
    198                                                       const G4double atomicWeight)
    199 
    200 // AntiNeutron undergoes interaction with nucleon within a nucleus.  Check if it is
    201 // energetically possible to produce pions/kaons.  In not, assume nuclear excitation
    202 // occurs and input particle is degraded in energy. No other particles are produced.
     170G4HEAntiNeutronInelastic::FirstIntInCasAntiNeutron(G4bool& inElastic,
     171                                                   const G4double availableEnergy,
     172                                                   G4HEVector pv[],
     173                                                   G4int& vecLen,
     174                                                   const G4HEVector& incidentParticle,
     175                                                   const G4HEVector& targetParticle,
     176                                                   const G4double atomicWeight)
     177
     178// AntiNeutron undergoes interaction with nucleon within a nucleus.  Check if
     179// it is energetically possible to produce pions/kaons.  If not, assume
     180// nuclear excitation occurs and input particle is degraded in energy.  No
     181// other particles are produced.
    203182// If reaction is possible, find the correct number of pions/protons/neutrons
    204183// produced using an interpolation to multiplicity data.  Replace some pions or
    205184// protons/neutrons by kaons or strange baryons according to the average
    206185// multiplicity per inelastic reaction.
    207 
    208  {
    209    static const G4double expxu =  std::log(MAXFLOAT); // upper bound for arg. of exp
    210    static const G4double expxl = -expxu;         // lower bound for arg. of exp
    211 
    212    static const G4double protb = 0.7;
    213    static const G4double neutb = 0.7;
    214    static const G4double     c = 1.25;
    215 
    216    static const G4int   numMul   = 1200;
    217    static const G4int   numMulAn = 400;
    218    static const G4int   numSec   = 60;
    219 
    220    G4int              neutronCode = Neutron.getCode();
    221    G4int              protonCode  = Proton.getCode();
    222 
    223    G4int               targetCode = targetParticle.getCode();
    224 //   G4double          incidentMass = incidentParticle.getMass();
    225 //   G4double        incidentEnergy = incidentParticle.getEnergy();
    226    G4double incidentTotalMomentum = incidentParticle.getTotalMomentum();
    227 
    228    static G4bool first = true;
    229    static G4double protmul[numMul],  protnorm[numSec];   // proton constants
    230    static G4double protmulAn[numMulAn],protnormAn[numSec];
    231    static G4double neutmul[numMul],  neutnorm[numSec];   // neutron constants
    232    static G4double neutmulAn[numMulAn],neutnormAn[numSec];
    233 
    234                               //  misc. local variables
    235                               //  np = number of pi+,  nm = number of pi-,  nz = number of pi0
    236 
    237    G4int i, counter, nt, np, nm, nz;
     186{
     187  static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
     188  static const G4double expxl = -expxu;             // lower bound for arg. of exp
     189
     190  static const G4double protb = 0.7;
     191  static const G4double neutb = 0.7;
     192  static const G4double     c = 1.25;
     193
     194  static const G4int numMul   = 1200;
     195  static const G4int numMulAn = 400;
     196  static const G4int numSec   = 60;
     197
     198  G4int neutronCode = Neutron.getCode();
     199  G4int protonCode = Proton.getCode();
     200
     201  G4int targetCode = targetParticle.getCode();
     202  G4double incidentTotalMomentum = incidentParticle.getTotalMomentum();
     203
     204  static G4bool first = true;
     205  static G4double protmul[numMul],  protnorm[numSec];   // proton constants
     206  static G4double protmulAn[numMulAn],protnormAn[numSec];
     207  static G4double neutmul[numMul],  neutnorm[numSec];   // neutron constants
     208  static G4double neutmulAn[numMulAn],neutnormAn[numSec];
     209
     210  //  misc. local variables
     211  //  np = number of pi+,  nm = number of pi-,  nz = number of pi0
     212
     213  G4int i, counter, nt, np, nm, nz;
    238214
    239215   if( first )
    240      {                         // compute normalization constants, this will only be done once
     216     {                 // compute normalization constants, this will only be done once
    241217       first = false;
    242218       for( i=0; i<numMul  ; i++ ) protmul[i]  = 0.0;
Note: See TracChangeset for help on using the changeset viewer.